summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch42
-rw-r--r--meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch9
-rw-r--r--meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch35
-rw-r--r--meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch19
-rw-r--r--meta/recipes-devtools/apt/apt-0.7.14/use-host.patch44
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc63
-rw-r--r--meta/recipes-devtools/apt/apt-native_0.7.14.bb8
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc104
-rw-r--r--meta/recipes-devtools/apt/apt.inc26
-rw-r--r--meta/recipes-devtools/apt/apt_0.7.14.bb15
-rw-r--r--meta/recipes-devtools/apt/files/apt.conf43
-rw-r--r--meta/recipes-devtools/apt/files/db_linking_hack.patch27
-rw-r--r--meta/recipes-devtools/apt/files/environment.patch13
-rw-r--r--meta/recipes-devtools/apt/files/no-curl.patch44
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoconf-x.patch36
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoheader-nonfatal-warnings.patch13
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-exclude.patch137
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-foreign.patch11
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch37
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-include.patch12
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/config_site.patch29
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/fix_path_xtra.patch118
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/path_prog_fixes.patch126
-rw-r--r--meta/recipes-devtools/autoconf/autoconf-2.65/program_prefix.patch19
-rw-r--r--meta/recipes-devtools/autoconf/autoconf.inc12
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.65.bb23
-rw-r--r--meta/recipes-devtools/automake/automake.inc13
-rw-r--r--meta/recipes-devtools/automake/automake/path_prog_fixes.patch67
-rw-r--r--meta/recipes-devtools/automake/automake_1.11.1.bb41
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch22
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch18
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch67
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch29
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch34
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch26
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch20
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc16
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc25
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb12
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc146
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.20.1.bb37
-rw-r--r--meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb25
-rw-r--r--meta/recipes-devtools/binutils/files/better_file_error.patch17
-rw-r--r--meta/recipes-devtools/binutils/files/ld_makefile.patch22
-rw-r--r--meta/recipes-devtools/binutils/files/objdump_fix.patch134
-rw-r--r--meta/recipes-devtools/binutils/files/plt32trunc.patch24
-rw-r--r--meta/recipes-devtools/binutils/files/signed_char_fix.patch12
-rw-r--r--meta/recipes-devtools/bison/bison/fix_cross_manpage_building.patch18
-rw-r--r--meta/recipes-devtools/bison/bison/m4.patch544
-rw-r--r--meta/recipes-devtools/bison/bison_2.4.2.bb22
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native/glibc-conflict-rename.patch228
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch26
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb24
-rw-r--r--meta/recipes-devtools/chrpath/chrpath_0.13.bb17
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_2.8.2.bb4
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc16
-rw-r--r--meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.15.bb12
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.47.bb26
-rw-r--r--meta/recipes-devtools/distcc/distcc_2.18.3.bb47
-rw-r--r--meta/recipes-devtools/distcc/files/default19
-rwxr-xr-xmeta/recipes-devtools/distcc/files/distcc106
-rw-r--r--meta/recipes-devtools/distcc/files/distcc-avahi.patch1736
-rw-r--r--meta/recipes-devtools/distcc/files/distccmon-gnome.desktop12
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb19
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch65
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch34
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch74
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch30
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch17
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch240
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch634
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch12
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.10.bb22
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc40
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/autofoo.patch48
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch26
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/nochroot.patch18
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/noman.patch16
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/noupdalt.patch16
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.14.19.bb13
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/acinclude.m486
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/mkdir.patch26
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/quotefix.patch43
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs.inc25
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.41.12.bb46
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.108/warnings.patch132
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff447
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/do-autoreconf.diff337
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff69
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch37
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff799
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h1657
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff307
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff711
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff1122
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff1707
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff19
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h1632
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.89/warnings.patch98
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.108.bb25
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb63
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.89.bb10
-rw-r--r--meta/recipes-devtools/fakechroot/fakechroot/fix-readlink.patch26
-rw-r--r--meta/recipes-devtools/fakechroot/fakechroot_2.9.bb13
-rw-r--r--meta/recipes-devtools/fakeroot/fakeroot-1.14.4/absolutepaths.patch47
-rw-r--r--meta/recipes-devtools/fakeroot/fakeroot_1.14.4.bb33
-rw-r--r--meta/recipes-devtools/file/file/dump81
-rw-r--r--meta/recipes-devtools/file/file/filesystems812
-rw-r--r--meta/recipes-devtools/file/file/ge-le.patch70
-rw-r--r--meta/recipes-devtools/file/file/stringb-compat.patch29
-rw-r--r--meta/recipes-devtools/file/file_5.04.bb29
-rw-r--r--meta/recipes-devtools/flex/flex.inc11
-rw-r--r--meta/recipes-devtools/flex/flex_2.5.35.bb4
-rw-r--r--meta/recipes-devtools/gcc/files/canadian-build-modules-configure.patch22
-rw-r--r--meta/recipes-devtools/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch12
-rw-r--r--meta/recipes-devtools/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch13
-rw-r--r--meta/recipes-devtools/gcc/files/gcc-posix-open-fix.patch11
-rw-r--r--meta/recipes-devtools/gcc/files/gcc4-mtune-compat.patch14
-rw-r--r--meta/recipes-devtools/gcc/files/gfortran-4.3.x.patch40
-rw-r--r--meta/recipes-devtools/gcc/files/gfortran.patch40
-rw-r--r--meta/recipes-devtools/gcc/files/pr22133-mingw-path-fixup.patch29
-rw-r--r--meta/recipes-devtools/gcc/files/pr33281-mingw-host-fragment.patch38
-rw-r--r--meta/recipes-devtools/gcc/files/pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3.inc69
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/100-uclibc-conf.patch37
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/103-uclibc-conf-noupstream.patch11
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/110-arm-eabi.patch27
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/200-uclibc-locale.patch2833
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch233
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/204-uclibc-locale-wchar_fix.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/205-uclibc-locale-update.patch519
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/300-libstdc++-pic.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/301-missing-execinfo_h.patch11
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/302-c99-snprintf.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/303-c99-complex-ugly-hack.patch12
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/304-index_macro.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/305-libmudflap-susv3-legacy.patch49
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/306-libstdc++-namespace.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/307-locale_facets.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/402-libbackend_dep_gcov-iov.h.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/602-sdk-libstdc++-includes.patch20
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/64bithack.patch33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/740-sh-pr24836.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/800-arm-bigendian.patch34
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/801-arm-bigendian-eabi.patch14
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/904-flatten-switch-stmt-00.patch153
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/arm-nolibfloat.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/arm-softfloat.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb-cache.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb.patch43
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/cache-amnesia.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/debian/arm-unbreak-eabi-armv4t.dpatch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/debian/gcc-ice-hack.dpatch331
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/debian/libstdc++-pic.dpatch71
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/debian/pr30961.dpatch179
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-c++-builtin-redecl.patch102
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-cpp-pragma.patch284
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch61
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch538
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-debug-iface-type.patch17
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-nomulti.patch44
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-libgomp-speedup.patch2797
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ppc32-retaddr.patch86
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr27898.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr32139.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr33763.patch153
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35440.patch56
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35751.patch114
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh251682.patch89
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh330771.patch34
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh341221.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fortran-cross-compile-hack.patch30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/fortran-static-linking.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch319
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch23
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch6691
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-arm-frename-registers.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-flags-for-build.patch279
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc-release-branch/PR-36500-fix-neon.patch265
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc41-configure.in.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-build-id.patch74
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-ppc64-ia64-GNU-stack.patch86
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/gfortran.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/headerpath.patch42
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/intermask-bigendian.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/ldflags.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/optional_libstdc.patch23
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/pr34130.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/pr35942.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/sdk-libstdc++-includes.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/sh3-installfix-fixheaders.patch11
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/sh_unwind.patch18
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/sparseset_rule.patch20
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/unbreak-armv4t.patch12
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/zecke-no-host-includes.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0.inc81
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/100-uclibc-conf.patch37
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/103-uclibc-conf-noupstream.patch15
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/200-uclibc-locale.patch2840
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/203-uclibc-locale-no__x.patch233
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/204-uclibc-locale-wchar_fix.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/205-uclibc-locale-update.patch519
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/301-missing-execinfo_h.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/302-c99-snprintf.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/303-c99-complex-ugly-hack.patch14
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/304-index_macro.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/305-libmudflap-susv3-legacy.patch49
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/306-libstdc++-namespace.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/307-locale_facets.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/602-sdk-libstdc++-includes.patch20
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/64bithack.patch33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/740-sh-pr24836.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/800-arm-bigendian.patch34
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/904-flatten-switch-stmt-00.patch74
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/arm-bswapsi2.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/arm-nolibfloat.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/arm-softfloat.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/arm-unbreak-eabi-armv4t.dpatch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/cache-amnesia.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-c++-builtin-redecl.patch114
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-cpp-pragma.patch284
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-i386-libgomp.patch65
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ia64-libunwind.patch550
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-debug-iface-type.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-nomulti.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-libgomp-speedup.patch2797
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ppc32-retaddr.patch90
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr27898.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr32139.patch19
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr33763.patch159
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh251682.patch89
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh330771.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh341221.patch32
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.0.2-e300c2c3.patch319
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch114
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.5.0_to_svn_162697.patch.bz2bin0 -> 6957305 bytes
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-arm-frename-registers.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-flags-for-build.patch178
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-ice-hack.dpatch331
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch149
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-pr43698-arm-rev-instr.patch117
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch67
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/gcc_revert_base_version_to_4.5.0.patch9
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-emit-__cxa_end_cleanup-in-text.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-pic.dpatch71
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/optional_libstdc.patch23
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/pr30961.dpatch179
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/pr35942.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/zecke-no-host-includes.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc46
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc107
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-cross.inc22
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-runtime.inc59
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-sdk.inc48
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-target.inc5
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc4
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb24
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb25
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc24
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb5
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb5
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_csl-arm-2008q1.bb10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-intermediate.inc28
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb15
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-kernel.inc10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc12
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross4.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb10
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb12
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb26
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc8
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc9
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk.inc16
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb3
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb4
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm-2005q3.inc22
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc53
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch13
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch48
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch12
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch1075
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch35
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch9
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch22
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch95
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch11
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch303
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-cross.inc47
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-runtime.inc58
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-sdk.inc52
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-target.inc99
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb11
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb11
-rw-r--r--meta/recipes-devtools/gcc/gcc_4.3.3.bb10
-rw-r--r--meta/recipes-devtools/gcc/gcc_4.5.0.bb10
-rw-r--r--meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb5
-rw-r--r--meta/recipes-devtools/gdb/gdb-common.inc48
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.1.bb10
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross.inc10
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_7.1.bb5
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc12
-rw-r--r--meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff15
-rw-r--r--meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch24
-rw-r--r--meta/recipes-devtools/gdb/gdb/libiberty-cross.patch630
-rw-r--r--meta/recipes-devtools/gdb/gdb/no-werror.patch78
-rw-r--r--meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch12
-rw-r--r--meta/recipes-devtools/gdb/gdb/sim-install.patch34
-rw-r--r--meta/recipes-devtools/gdb/gdb/uclibc.patch194
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.1.bb3
-rw-r--r--meta/recipes-devtools/genext2fs/genext2fs.inc15
-rw-r--r--meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb3
-rw-r--r--meta/recipes-devtools/git/files/autotools.patch14
-rw-r--r--meta/recipes-devtools/git/git.inc22
-rw-r--r--meta/recipes-devtools/git/git_1.7.2.1.bb3
-rw-r--r--meta/recipes-devtools/gmp/gmp-4.2.1/disable-stdc.patch31
-rw-r--r--meta/recipes-devtools/gmp/gmp.inc16
-rw-r--r--meta/recipes-devtools/gmp/gmp/amd64.patch14
-rw-r--r--meta/recipes-devtools/gmp/gmp/configure.patch195
-rw-r--r--meta/recipes-devtools/gmp/gmp/sh4-asmfix.patch26
-rw-r--r--meta/recipes-devtools/gmp/gmp/use-includedir.patch13
-rw-r--r--meta/recipes-devtools/gmp/gmp_4.2.1.bb14
-rw-r--r--meta/recipes-devtools/gmp/gmp_5.0.1.bb7
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch174
-rwxr-xr-xmeta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in267
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch21
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20080123.bb38
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-bash.patch286
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-import-commit.patch94
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-init.patch23
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-pop.patch71
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-push-no-series.patch27
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-push.patch40
-rw-r--r--meta/recipes-devtools/guilt/files/guilt-set-git_exec_path.patch27
-rw-r--r--meta/recipes-devtools/guilt/files/guilt.patch317
-rw-r--r--meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch69
-rw-r--r--meta/recipes-devtools/guilt/files/make_git_commands_conditional.patch46
-rw-r--r--meta/recipes-devtools/guilt/files/optional_head_check.patch58
-rw-r--r--meta/recipes-devtools/guilt/files/uninstall_force.patch12
-rw-r--r--meta/recipes-devtools/guilt/guilt-native_0.33.bb30
-rw-r--r--meta/recipes-devtools/icon-naming-utils/icon-naming-utils-native_0.8.7.bb9
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.2.10.bb34
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.2.10.bb22
-rw-r--r--meta/recipes-devtools/libtool/libtool-nativesdk_2.2.10.bb27
-rw-r--r--meta/recipes-devtools/libtool/libtool.inc14
-rw-r--r--meta/recipes-devtools/libtool/libtool/cross_compile.patch55
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix-manpage-fix.patch19
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch109
-rw-r--r--meta/recipes-devtools/libtool/libtool/trailingslash.patch32
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.2.10.bb33
-rw-r--r--meta/recipes-devtools/m4/m4-native_1.4.13.bb12
-rw-r--r--meta/recipes-devtools/m4/m4/ac_config_links.patch28
-rw-r--r--meta/recipes-devtools/m4/m4/make.patch41
-rw-r--r--meta/recipes-devtools/m4/m4_1.4.13.bb9
-rw-r--r--meta/recipes-devtools/make/files/SCCS.patch16
-rw-r--r--meta/recipes-devtools/make/make.inc11
-rw-r--r--meta/recipes-devtools/make/make_3.81.bb3
-rw-r--r--meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c360
-rw-r--r--meta/recipes-devtools/makedevs/makedevs_1.0.0.bb21
-rw-r--r--meta/recipes-devtools/mpfr/mpfr.inc6
-rw-r--r--meta/recipes-devtools/mpfr/mpfr_3.0.0.bb9
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch101
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch24
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch134
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch26
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch33
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_1.1.0+git.bb29
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_1.3.1.bb26
-rw-r--r--meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch63
-rw-r--r--meta/recipes-devtools/mtools/mtools/mtools.patch127
-rw-r--r--meta/recipes-devtools/mtools/mtools/no-x11.patch19
-rw-r--r--meta/recipes-devtools/mtools/mtools_3.9.9.bb22
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch54
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb24
-rw-r--r--meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch34
-rw-r--r--meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch17
-rw-r--r--meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch17
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral.bb22
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/dest1
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/lists2
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments23
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/src0
-rw-r--r--meta/recipes-devtools/opkg/opkg-config-base_1.0.bb29
-rw-r--r--meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb8
-rw-r--r--meta/recipes-devtools/opkg/opkg-nogpg_svn.bb10
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc33
-rw-r--r--meta/recipes-devtools/opkg/opkg/add_vercmp.patch34
-rw-r--r--meta/recipes-devtools/opkg/opkg/headerfix.patch17
-rw-r--r--meta/recipes-devtools/opkg/opkg/logfix.patch23
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.1.8.bb53
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb57
-rw-r--r--meta/recipes-devtools/patch/patch-2.5.9/2.5.9.patch27399
-rw-r--r--meta/recipes-devtools/patch/patch-2.5.9/debian.patch10424
-rw-r--r--meta/recipes-devtools/patch/patch-2.5.9/global-reject-file.diff201
-rw-r--r--meta/recipes-devtools/patch/patch-2.5.9/install.patch41
-rw-r--r--meta/recipes-devtools/patch/patch-2.5.9/unified-reject-files.diff305
-rw-r--r--meta/recipes-devtools/patch/patch.inc19
-rw-r--r--meta/recipes-devtools/patch/patch_2.5.9.bb10
-rw-r--r--meta/recipes-devtools/pax-utils/pax-utils_0.2.1.bb13
-rw-r--r--meta/recipes-devtools/perl/files/Configure-multilib.patch11
-rw-r--r--meta/recipes-devtools/perl/files/letgcc-find-errno.patch42
-rw-r--r--meta/recipes-devtools/perl/files/libperl-5.8.3-create-libperl-soname.patch11
-rw-r--r--meta/recipes-devtools/perl/files/perl-5.8.8-gcc-4.2.patch13
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl-native_2.36.bb7
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb21
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl-native_2.18.bb7
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.18.bb10
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/09_fix_installperl.patch32
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/52_debian_extutils_hacks.patch234
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch107
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/54_debian_perldoc-r.patch16
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/58_debian_cpan_config_path.patch14
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/60_debian_libnet_config_path.patch16
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/62_debian_cpan_definstalldirs.patch16
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/64_debian_enc2xs_inc.patch28
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/Makefile.SH.patch253
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/Makefile.patch61
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/asm-pageh-fix.patch19
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh1020
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-3258
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-be1
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-le1
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-6458
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-be1
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-le1
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch46
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/installperl.patch15
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/makedepend-dash.patch13
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/native-no-gdbminc.patch18
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/native-nopacklist.patch84
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/native-perlinc.patch24
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/native-ssp.patch14
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch43
-rwxr-xr-xmeta/recipes-devtools/perl/perl-5.8.8/perl-configure.sh43
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/perl-dynloader.patch23
-rw-r--r--meta/recipes-devtools/perl/perl-5.8.8/perl-moreconfig.patch16
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.8.8.bb93
-rw-r--r--meta/recipes-devtools/perl/perl-rdepends_5.8.8.inc1145
-rw-r--r--meta/recipes-devtools/perl/perl-rprovides.inc45
-rw-r--r--meta/recipes-devtools/perl/perl_5.8.8.bb218
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig-0.25/autofoo.patch526
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig-0.25/glibconfig-sysdefs.h6
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig.inc34
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/autofoo.patch526
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch42
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig/glibconfig-sysdefs.h6
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb3
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig_git.bb39
-rw-r--r--meta/recipes-devtools/prelink/prelink/prelink.conf18
-rw-r--r--meta/recipes-devtools/prelink/prelink/prelink.cron.daily40
-rw-r--r--meta/recipes-devtools/prelink/prelink/prelink.default22
-rw-r--r--meta/recipes-devtools/prelink/prelink_git.bb50
-rw-r--r--meta/recipes-devtools/pseudo/pseudo/static_sqlite.patch15
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb47
-rw-r--r--meta/recipes-devtools/python/fix-path.inc22
-rw-r--r--meta/recipes-devtools/python/python-2.6-manifest.inc268
-rw-r--r--meta/recipes-devtools/python/python-dbus_0.83.1.bb21
-rw-r--r--meta/recipes-devtools/python/python-gst/python-path.patch25
-rw-r--r--meta/recipes-devtools/python/python-gst_0.10.18.bb17
-rw-r--r--meta/recipes-devtools/python/python-imaging/path.patch33
-rw-r--r--meta/recipes-devtools/python/python-imaging_1.1.7.bb30
-rw-r--r--meta/recipes-devtools/python/python-iniparse-native_0.3.2.bb6
-rw-r--r--meta/recipes-devtools/python/python-iniparse_0.3.2.bb11
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch20
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/04-default-is-optimized.patch18
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/10-distutils-fix-swig-parameter.patch16
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/11-distutils-never-modify-shebang-line.patch18
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch60
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/debug.patch27
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/nohostlibs.patch53
-rw-r--r--meta/recipes-devtools/python/python-native-2.6.5/sitecustomize.py45
-rw-r--r--meta/recipes-devtools/python/python-native_2.6.5.bb30
-rw-r--r--meta/recipes-devtools/python/python-pycairo_1.8.10.bb22
-rw-r--r--meta/recipes-devtools/python/python-pycurl/no-static-link.patch14
-rw-r--r--meta/recipes-devtools/python/python-pycurl_7.19.0.bb29
-rw-r--r--meta/recipes-devtools/python/python-pygobject-native_2.21.1.bb15
-rw-r--r--meta/recipes-devtools/python/python-pygobject/generate-constants.patch18
-rw-r--r--meta/recipes-devtools/python/python-pygobject_2.21.1.bb30
-rw-r--r--meta/recipes-devtools/python/python-pygtk/acinclude.m490
-rw-r--r--meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch16
-rw-r--r--meta/recipes-devtools/python/python-pygtk/nodocs.patch13
-rw-r--r--meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch14
-rw-r--r--meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m490
-rw-r--r--meta/recipes-devtools/python/python-pygtk_2.17.0.bb42
-rw-r--r--meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb5
-rw-r--r--meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch13
-rw-r--r--meta/recipes-devtools/python/python-pyrex_0.9.9.bb16
-rw-r--r--meta/recipes-devtools/python/python-scons-native_1.3.0.bb6
-rw-r--r--meta/recipes-devtools/python/python-scons_1.3.0.bb12
-rw-r--r--meta/recipes-devtools/python/python-urlgrabber-native_3.9.1.bb4
-rw-r--r--meta/recipes-devtools/python/python-urlgrabber/urlgrabber-3.0.0-cleanup.patch28
-rw-r--r--meta/recipes-devtools/python/python-urlgrabber/urlgrabber-HEAD.patch142
-rw-r--r--meta/recipes-devtools/python/python-urlgrabber/urlgrabber-reset.patch15
-rw-r--r--meta/recipes-devtools/python/python-urlgrabber_3.9.1.bb16
-rw-r--r--meta/recipes-devtools/python/python.inc25
-rw-r--r--meta/recipes-devtools/python/python/00-fix-bindir-libdir-for-cross.patch20
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch116
-rw-r--r--meta/recipes-devtools/python/python/02-remove-test-for-cross.patch106
-rw-r--r--meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch40
-rw-r--r--meta/recipes-devtools/python/python/04-default-is-optimized.patch52
-rw-r--r--meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch28
-rw-r--r--meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch19
-rw-r--r--meta/recipes-devtools/python/python/sitecustomize.py45
-rw-r--r--meta/recipes-devtools/python/python_2.6.5.bb121
-rw-r--r--meta/recipes-devtools/python/yum-metadata-parser-native_1.1.4.bb7
-rw-r--r--meta/recipes-devtools/python/yum-metadata-parser_1.1.4.bb15
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch12
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch96
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch16
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch26
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch34376
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch136
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch115
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch63
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch24
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb21
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb44
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper/raw2flash.c370
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper/tunctl.c156
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc39
-rw-r--r--meta/recipes-devtools/qemu/qemu_0.12.4.bb27
-rw-r--r--meta/recipes-devtools/qemu/qemu_git.bb21
-rw-r--r--meta/recipes-devtools/quilt/quilt-native.inc13
-rw-r--r--meta/recipes-devtools/quilt/quilt-native_0.48.bb4
-rw-r--r--meta/recipes-devtools/quilt/quilt.inc27
-rw-r--r--meta/recipes-devtools/quilt/quilt/aclocal.patch126
-rw-r--r--meta/recipes-devtools/quilt/quilt/install.patch11
-rw-r--r--meta/recipes-devtools/quilt/quilt/non-gnu.patch223
-rw-r--r--meta/recipes-devtools/quilt/quilt_0.48.bb7
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh50
-rw-r--r--meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch440
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.1.10.bb137
-rw-r--r--meta/recipes-devtools/rsync/files/acinclude.m495
-rw-r--r--meta/recipes-devtools/rsync/files/rsyncd.conf15
-rw-r--r--meta/recipes-devtools/rsync/rsync.inc24
-rw-r--r--meta/recipes-devtools/rsync/rsync_2.6.9.bb25
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.0.7.bb18
-rw-r--r--meta/recipes-devtools/shasum/files/main.c60
-rw-r--r--meta/recipes-devtools/shasum/files/mhash_sha256.h64
-rw-r--r--meta/recipes-devtools/shasum/files/sha256.c322
-rw-r--r--meta/recipes-devtools/shasum/shasum-native.bb8
-rw-r--r--meta/recipes-devtools/shasum/shasum.inc23
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.5.5/disable-revision-install.patch22
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.5.5/libtool2.patch15
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.5.5/neon-detection.patch36
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.5.5.bb29
-rw-r--r--meta/recipes-devtools/syslinux/files/cross-build.patch64
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_3.86.bb46
-rw-r--r--meta/recipes-devtools/tcltk/tcl/fix-configure.patch44
-rw-r--r--meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch63
-rw-r--r--meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch50
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.5.8.bb62
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/001-2.2b47-2.2b51.patch2344
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/002-destdir.patch68
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/003-manpages.patch28
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch48
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/005-sys-time.patch29
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/006-reiserfs.patch1272
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/007-map.patch78
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/008-configure.patch13
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/009-multirw.patch15
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/010-realpath.patch30
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/011-fno-strict-aliasing.patch13
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/012-nostrip.patch13
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch32
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/014-uninitialized.patch12
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/015-setattr.patch26
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/016-makefile.in.patch14
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/017-wrs-dynamic-rpc.patch258
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/018-remove-tcp-wrappers.patch20
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/019-pid-before-fork.patch125
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/020-undefined-chmod-fix.patch18
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/021-nolibwrap.patch20
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/022-add-close-on-exec-descriptors.patch61
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server_2.2beta47.bb71
-rw-r--r--meta/recipes-devtools/unifdef/files/unifdef.c1005
-rw-r--r--meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb17
-rw-r--r--meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc30
-rw-r--r--meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb7
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/fix_issue_caused_by_ccache.patch30
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind_3.5.0-svn_r11264.patch.bz2bin0 -> 3681800 bytes
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.5.0.bb24
612 files changed, 141911 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch b/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch
new file mode 100644
index 0000000000..f4661648ea
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch
@@ -0,0 +1,42 @@
1Add missing includes required when building with modern toolchain, based on
2patch from Debian bugzilla:
3http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505954
4
5Should no longer be required once upgraded to 0.7.22 or later.
6
7Index: apt-0.7.14/apt-pkg/acquire.cc
8===================================================================
9--- apt-0.7.14.orig/apt-pkg/acquire.cc 2008-05-28 14:22:13.000000000 +0100
10+++ apt-0.7.14/apt-pkg/acquire.cc 2010-07-23 17:30:11.494883936 +0100
11@@ -22,6 +22,7 @@
12
13 #include <apti18n.h>
14
15+#include <cstdio>
16 #include <iostream>
17 #include <sstream>
18
19Index: apt-0.7.14/apt-pkg/contrib/sha256.h
20===================================================================
21--- apt-0.7.14.orig/apt-pkg/contrib/sha256.h 2008-05-28 14:22:14.000000000 +0100
22+++ apt-0.7.14/apt-pkg/contrib/sha256.h 2010-07-23 17:30:11.494883936 +0100
23@@ -14,6 +14,7 @@
24 #ifndef APTPKG_SHA256_H
25 #define APTPKG_SHA256_H
26
27+#include <stdint.h>
28 #include <string>
29 #include <cstring>
30 #include <algorithm>
31Index: apt-0.7.14/apt-pkg/deb/dpkgpm.cc
32===================================================================
33--- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc 2008-05-28 14:22:14.000000000 +0100
34+++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc 2010-07-23 17:30:36.960856870 +0100
35@@ -20,6 +20,7 @@
36 #include <stdlib.h>
37 #include <fcntl.h>
38 #include <sys/select.h>
39+#include <sys/stat.h>
40 #include <sys/types.h>
41 #include <sys/wait.h>
42 #include <signal.h>
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch b/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch
new file mode 100644
index 0000000000..5f3634b32a
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch
@@ -0,0 +1,9 @@
1---
2 po/LINGUAS | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- apt-0.7.14.orig/po/LINGUAS
6+++ apt-0.7.14/po/LINGUAS
7@@ -1 +1 @@
8-ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ko ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW
9+ar bg bs ca cs cy da de dz el en_GB es eu fi fr gl he hu it ja km ku mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch b/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch
new file mode 100644
index 0000000000..682a96da24
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch
@@ -0,0 +1,35 @@
1---
2 apt-pkg/packagemanager.cc | 4 ++++
3 1 file changed, 4 insertions(+)
4
5--- apt-0.6.45exp2.orig/apt-pkg/packagemanager.cc
6+++ apt-0.6.45exp2/apt-pkg/packagemanager.cc
7@@ -534,10 +534,12 @@ bool pkgPackageManager::SmartUnPack(PkgI
8
9 List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
10
11+#if 0
12 // Perform immedate configuration of the package.
13 if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
14 if (SmartConfigure(Pkg) == false)
15 return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name());
16+#endif
17
18 return true;
19 }
20@@ -609,6 +611,7 @@ pkgPackageManager::OrderResult pkgPackag
21 DoneSomething = true;
22 }
23
24+#if 0
25 // Final run through the configure phase
26 if (ConfigureAll() == false)
27 return Failed;
28@@ -623,6 +626,7 @@ pkgPackageManager::OrderResult pkgPackag
29 return Failed;
30 }
31 }
32+#endif
33
34 return Completed;
35 }
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch b/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch
new file mode 100644
index 0000000000..db8cf93717
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch
@@ -0,0 +1,19 @@
1---
2 Makefile | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- apt-0.7.14.orig/Makefile
6+++ apt-0.7.14/Makefile
7@@ -15,11 +15,11 @@ all headers library clean veryclean bina
8 $(MAKE) -C apt-inst $@
9 $(MAKE) -C methods $@
10 $(MAKE) -C cmdline $@
11 $(MAKE) -C ftparchive $@
12 $(MAKE) -C dselect $@
13- $(MAKE) -C doc $@
14+# $(MAKE) -C doc $@
15 $(MAKE) -C po $@
16
17 # Some very common aliases
18 .PHONY: maintainer-clean dist-clean distclean pristine sanity
19 maintainer-clean dist-clean distclean pristine sanity: veryclean
diff --git a/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch b/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch
new file mode 100644
index 0000000000..894a697661
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch
@@ -0,0 +1,44 @@
1---
2 buildlib/sizetable | 4 +++-
3 configure.in | 2 +-
4 2 files changed, 4 insertions(+), 2 deletions(-)
5
6--- apt-0.7.14.orig/buildlib/sizetable
7+++ apt-0.7.14/buildlib/sizetable
8@@ -9,16 +9,19 @@
9 #
10 # This is used primarily for the MD5 algorithm.
11 # The format is:-
12 # CPU endian sizeof: char, int, short, long
13 i386 little 1 4 2 4
14+i486 little 1 4 2 4
15+i586 little 1 4 2 4
16+i686 little 1 4 2 4
17 armeb big 1 4 2 4
18 arm little 1 4 2 4
19 alpha little 1 4 2 8
20 mipsel little 1 4 2 4
21 sparc big 1 4 2 4
22 sparc64 big 1 4 2 8
23 m68k big 1 4 2 4
24 powerpc big 1 4 2 4
25 mips big 1 4 2 4
26 hppa big 1 4 2 4
27-m32r big 1 4 2 4
28\ No newline at end of file
29+m32r big 1 4 2 4
30--- apt-0.7.14.orig/configure.in
31+++ apt-0.7.14/configure.in
32@@ -86,11 +86,11 @@ AC_SUBST(BDBLIB)
33 dnl Converts the ARCH to be something singular for this general CPU family
34 dnl This is often the dpkg architecture string.
35 dnl First check against the full canonical canoncial-system-type in $target
36 dnl and if that fails, just look for the cpu
37 AC_MSG_CHECKING(debian architecture)
38-archset="`dpkg-architecture -qDEB_HOST_ARCH`"
39+archset="`echo $host_alias|cut -d'-' -f1`"
40 if test "x$archset" = "x"; then
41 AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
42 fi
43 AC_MSG_RESULT($archset)
44 AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset")
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
new file mode 100644
index 0000000000..b16f99e93c
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -0,0 +1,63 @@
1require apt.inc
2inherit native
3
4DEPENDS += "dpkg-native gettext-native"
5PACKAGES = ""
6USE_NLS = "yes"
7
8SRC_URI += "file://db_linking_hack.patch"
9
10python do_install () {
11 bb.build.exec_func('do_install_base', d)
12 bb.build.exec_func('do_install_config', d)
13}
14
15python do_install_config () {
16 indir = os.path.dirname(bb.data.getVar('FILE',d,1))
17 infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
18 data = infile.read()
19 infile.close()
20
21 data = bb.data.expand(data, d)
22
23 outdir = os.path.join(bb.data.getVar('D', d, 1), bb.data.getVar('sysconfdir', d, 1), 'apt')
24 if not os.path.exists(outdir):
25 os.makedirs(outdir)
26 outpath = os.path.join(outdir, 'apt.conf.sample')
27
28 outfile = file(outpath, 'w')
29 outfile.write(data)
30 outfile.close()
31}
32
33do_install_base () {
34 install -d ${D}${bindir}
35 install -m 0755 bin/apt-cdrom ${D}${bindir}/
36 install -m 0755 bin/apt-get ${D}${bindir}/
37 install -m 0755 bin/apt-config ${D}${bindir}/
38 install -m 0755 bin/apt-cache ${D}${bindir}/
39 install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
40 install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
41
42 eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
43 oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
44 ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
45 oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
46 ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
47
48 install -d ${D}${libdir}/apt/methods
49 install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
50
51 install -d ${D}${libdir}/dpkg/methods/apt
52 install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
53 install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
54 install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
55 install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
56 install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
57
58 install -d ${D}${sysconfdir}/apt
59 install -d ${D}${localstatedir}/lib/apt/lists/partial
60 install -d ${D}${localstatedir}/cache/apt/archives/partial
61
62 install -d ${D}${localstatedir}/log/apt/
63}
diff --git a/meta/recipes-devtools/apt/apt-native_0.7.14.bb b/meta/recipes-devtools/apt/apt-native_0.7.14.bb
new file mode 100644
index 0000000000..2f04b72cab
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native_0.7.14.bb
@@ -0,0 +1,8 @@
1require apt-native.inc
2
3PR = "r3"
4
5SRC_URI += "file://nodoc.patch \
6 file://noconfigure.patch \
7 file://no-curl.patch \
8 file://includes-fix.patch"
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
new file mode 100644
index 0000000000..9e104f12ed
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -0,0 +1,104 @@
1apt-manpages="doc/apt-cache.8 \
2 doc/apt-cdrom.8 \
3 doc/apt-config.8 \
4 doc/apt-get.8 \
5 doc/apt.8 \
6 doc/apt.conf.5 \
7 doc/apt_preferences.5 \
8 doc/fr/apt-cache.fr.8 \
9 doc/fr/apt-cdrom.fr.8 \
10 doc/fr/apt-config.fr.8 \
11 doc/fr/apt-get.fr.8 \
12 doc/fr/apt.conf.fr.5 \
13 doc/fr/apt_preferences.fr.5 \
14 doc/fr/sources.list.fr.5 \
15 doc/es/apt.es.8 \
16 doc/es/apt-cache.es.8 \
17 doc/es/apt-cdrom.es.8 \
18 doc/es/apt-config.es.8 \
19 doc/es/apt-get.es.8 \
20 doc/es/apt.conf.es.5 \
21 doc/es/apt_preferences.es.5 \
22 doc/es/sources.list.es.5 \
23 doc/pt_BR/apt_preferences.pt_BR.5 \
24 doc/ja/apt-cache.ja.8 \
25 doc/ja/apt-cdrom.ja.8 \
26 doc/ja/apt-get.ja.8 \
27 doc/ja/apt.conf.ja.5 \
28 doc/sources.list.5"
29apt-utils-manpages="doc/apt-extracttemplates.1 \
30 doc/apt-sortpkgs.1 \
31 doc/fr/apt-extracttemplates.fr.1 \
32 doc/fr/apt-sortpkgs.fr.1"
33# doc/fr/apt-ftparchive.fr.1
34# doc/apt-ftparchive.1
35
36def get_files_apt_doc(d, bb, manpages):
37 import re
38 manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
39 manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
40 return manpages
41
42def get_commands_apt_doc(d, bb, manpages):
43 import os
44 s = list()
45 __dir_cache__ = list()
46 for m in manpages.split():
47 dest = get_files_apt_doc(d, bb, m)
48 dir = os.path.dirname(dest)
49 if not dir in __dir_cache__:
50 s.append("install -d ${D}/%s" % dir)
51 __dir_cache__.append(dir)
52 s.append("install -m 0644 %s ${D}/%s" % (m, dest))
53 return "\n".join(s)
54
55PACKAGES += "${PN}-utils ${PN}-utils-doc"
56FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
57 ${bindir}/apt-config ${bindir}/apt-cache \
58 ${libdir}/apt ${libdir}/libapt*.so.* \
59 ${localstatedir} ${sysconfdir} \
60 ${libdir}/dpkg"
61FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
62FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} \
63 ${docdir}/apt"
64FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}"
65FILES_${PN}-dev = "${libdir}/libapt*.so"
66
67do_install () {
68 set -x
69 ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))}
70 ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}
71 install -d ${D}${bindir}
72 install -m 0755 bin/apt-cdrom ${D}${bindir}/
73 install -m 0755 bin/apt-get ${D}${bindir}/
74 install -m 0755 bin/apt-config ${D}${bindir}/
75 install -m 0755 bin/apt-cache ${D}${bindir}/
76
77 install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
78 install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
79
80 eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
81 oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
82 ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
83 oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
84 ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
85
86 install -d ${D}${libdir}/apt/methods
87 install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
88
89 install -d ${D}${libdir}/dpkg/methods/apt
90 install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
91 install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
92 install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
93 install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
94 install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
95
96 install -d ${D}${sysconfdir}/apt
97 install -d ${D}${localstatedir}/lib/apt/lists/partial
98 install -d ${D}${localstatedir}/cache/apt/archives/partial
99 install -d ${D}${docdir}/apt/examples
100 install -m 0644 doc/examples/* ${D}${docdir}/apt/examples/
101
102 install -d ${D}${includedir}/apt-pkg/
103 install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
104}
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
new file mode 100644
index 0000000000..546683f9bc
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -0,0 +1,26 @@
1DESCRIPTION = "Advanced front-end for dpkg."
2LICENSE = "GPL"
3SECTION = "base"
4
5SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
6 file://no-ko-translation.patch \
7 file://use-host.patch \
8 "
9
10inherit autotools gettext
11
12EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
13
14# Apt wants to know the glibc version by running a binary file, which will
15# fail, so we have to tell configure which version to use Since I don't know
16# the impliations of setting a wrong value I only provide one for angstrom,
17# which uses glibc 2.5 (which claims to be 2.4)
18# Koen - 20070327
19EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4"
20
21# under Debian it is set to libc6.3 as they use glibc 2.3
22# They also provide glibc 2.5 in 'experimental' and it works with APT built
23# for 2.3 so we set it in same way
24EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3"
25
26FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/"
diff --git a/meta/recipes-devtools/apt/apt_0.7.14.bb b/meta/recipes-devtools/apt/apt_0.7.14.bb
new file mode 100644
index 0000000000..0ea9b48142
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt_0.7.14.bb
@@ -0,0 +1,15 @@
1DEPENDS = "curl db"
2RDEPENDS = "dpkg"
3
4require apt.inc
5
6PR = "r3"
7
8SRC_URI += "file://nodoc.patch \
9 file://includes-fix.patch"
10
11require apt-package.inc
12
13FILES_${PN} += "${bindir}/apt-key"
14apt-manpages += "doc/apt-key.8"
15
diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/files/apt.conf
new file mode 100644
index 0000000000..2bd9ddbfaf
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/apt.conf
@@ -0,0 +1,43 @@
1Dir "${STAGING_DIR_NATIVE}/"
2{
3 State "var/lib/apt/"
4 {
5 Lists "lists/";
6 status "${IMAGE_ROOTFS}/var/dpkg/status";
7 };
8 Cache "var/cache/apt/"
9 {
10 Archives "archives/";
11 pkgcache "";
12 srcpkgcache "";
13 };
14 Bin "${STAGING_BINDIR_NATIVE}/"
15 {
16 methods "${STAGING_LIBDIR}/apt/methods/";
17 gzip "/bin/gzip";
18 dpkg "dpkg";
19 dpkg-source "dpkg-source";
20 dpkg-buildpackage "dpkg-buildpackage";
21 apt-get "apt-get";
22 apt-cache "apt-cache";
23 };
24 Etc "etc/apt/"
25 {
26 Preferences "preferences";
27 };
28};
29
30APT
31{
32 Install-Recommends "true";
33 Immediate-Configure "false";
34 Architecture "i586";
35 Get
36 {
37 Assume-Yes "true";
38 Force-Yes "true"
39 };
40};
41
42DPkg::Options {"--root=${IMAGE_ROOTFS}";"--admindir=${IMAGE_ROOTFS}/var/dpkg";"--force-all";"--no-debsig"};
43};
diff --git a/meta/recipes-devtools/apt/files/db_linking_hack.patch b/meta/recipes-devtools/apt/files/db_linking_hack.patch
new file mode 100644
index 0000000000..3c8368b1ed
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/db_linking_hack.patch
@@ -0,0 +1,27 @@
1Index: apt-0.7.3/configure.in
2===================================================================
3--- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000
4+++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000
5@@ -67,8 +67,20 @@
6 [AC_DEFINE(HAVE_BDB)
7 BDBLIB="-ldb"
8 AC_MSG_RESULT(yes)],
9- [BDBLIB=""
10- AC_MSG_RESULT(no)]
11+
12+ LIBS="$LIBS -lpthread"
13+ [AC_MSG_CHECKING(if we can link against BerkeleyDB with pthread)
14+ AC_LINK_IFELSE(
15+ [AC_LANG_PROGRAM(
16+ [#include <db.h>],
17+ [int r, s, t; db_version(&r, &s, &t);]
18+ )],
19+ [AC_DEFINE(HAVE_BDB)
20+ BDBLIB="-ldb -lpthread"
21+ AC_MSG_RESULT(yes)],
22+ [BDBLIB=""
23+ AC_MSG_RESULT(no)]
24+ )]
25 )]
26 )
27
diff --git a/meta/recipes-devtools/apt/files/environment.patch b/meta/recipes-devtools/apt/files/environment.patch
new file mode 100644
index 0000000000..5bea1a0130
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/environment.patch
@@ -0,0 +1,13 @@
1Index: apt-0.6.46.2/buildlib/environment.mak.in
2===================================================================
3--- apt-0.6.46.2.orig/buildlib/environment.mak.in 2007-03-29 11:38:58.000000000 +0100
4+++ apt-0.6.46.2/buildlib/environment.mak.in 2007-03-29 11:39:12.000000000 +0100
5@@ -62,7 +62,7 @@
6
7 # Shared library things
8 HOST_OS = @host_os@
9-ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
10+ifneq ($(words $(filter linux-gnu linux-gnueabi gnu% %gnu,$(HOST_OS))),0)
11 SONAME_MAGIC=-Wl,-soname -Wl,
12 LFLAGS_SO=
13 else
diff --git a/meta/recipes-devtools/apt/files/no-curl.patch b/meta/recipes-devtools/apt/files/no-curl.patch
new file mode 100644
index 0000000000..4e07c8f2dc
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/no-curl.patch
@@ -0,0 +1,44 @@
1---
2 configure.in | 6 ------
3 methods/makefile | 7 -------
4 2 files changed, 13 deletions(-)
5
6--- apt-0.7.14.orig/configure.in
7+++ apt-0.7.14/configure.in
8@@ -84,16 +84,10 @@ AC_CHECK_HEADER(db.h,
9 )]
10 )
11
12 LIBS="$saveLIBS"
13
14-AC_CHECK_LIB(curl, curl_easy_init,
15- [AC_CHECK_HEADER(curl/curl.h,
16- curl_ok=yes,
17- curl_ok=no)],
18- AC_MSG_ERROR([failed: I need CURL due https support]),
19-)
20
21 AC_SUBST(BDBLIB)
22
23 dnl Converts the ARCH to be something singular for this general CPU family
24 dnl This is often the dpkg architecture string.
25--- apt-0.7.14.orig/methods/makefile
26+++ apt-0.7.14/methods/makefile
27@@ -50,17 +50,10 @@ PROGRAM=http
28 SLIBS = -lapt-pkg $(SOCKETLIBS)
29 LIB_MAKES = apt-pkg/makefile
30 SOURCE = http.cc rfc2553emu.cc connect.cc
31 include $(PROGRAM_H)
32
33-# The https method
34-PROGRAM=https
35-SLIBS = -lapt-pkg -lcurl
36-LIB_MAKES = apt-pkg/makefile
37-SOURCE = https.cc
38-include $(PROGRAM_H)
39-
40 # The ftp method
41 PROGRAM=ftp
42 SLIBS = -lapt-pkg $(SOCKETLIBS)
43 LIB_MAKES = apt-pkg/makefile
44 SOURCE = ftp.cc rfc2553emu.cc connect.cc
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoconf-x.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoconf-x.patch
new file mode 100644
index 0000000000..596535b7d6
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoconf-x.patch
@@ -0,0 +1,36 @@
1Index: lib/autoconf/libs.m4
2===================================================================
3RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/libs.m4,v
4retrieving revision 1.13
5diff -p -u -r1.13 libs.m4
6--- autoconf-2.59/lib/autoconf/libs.m4 6 Sep 2005 15:34:06 -0000 1.13
7+++ autoconf-2.59/lib/autoconf/libs.m4 18 Sep 2005 17:09:58 -0000
8@@ -265,13 +265,13 @@ ac_x_header_dirs='
9 /usr/openwin/share/include'
10
11 if test "$ac_x_includes" = no; then
12- # Guess where to find include files, by looking for Intrinsic.h.
13+ # Guess where to find include files, by looking for Xlib.h.
14 # First, try using that file with no special directory specified.
15- AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
16+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
17 [# We can compile using X headers with no special include directory.
18 ac_x_includes=],
19 [for ac_dir in $ac_x_header_dirs; do
20- if test -r "$ac_dir/X11/Intrinsic.h"; then
21+ if test -r "$ac_dir/X11/Xlib.h"; then
22 ac_x_includes=$ac_dir
23 break
24 fi
25@@ -284,9 +284,9 @@ if test "$ac_x_libraries" = no; then
26 # Don't add to $LIBS permanently.
27 ac_save_LIBS=$LIBS
28- LIBS="-lXt $LIBS"
29- AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
30- [XtMalloc (0)])],
31+ LIBS="-lX11 $LIBS"
32+ AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
33+ [XrmInitialize ()])],
34 [LIBS=$ac_save_LIBS
35 # We can link X programs with no special library path.
36 ac_x_libraries=],
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoheader-nonfatal-warnings.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoheader-nonfatal-warnings.patch
new file mode 100644
index 0000000000..1f18e04bba
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoheader-nonfatal-warnings.patch
@@ -0,0 +1,13 @@
1--- autoconf-2.59/bin/autoheader.in~ 2003-10-10 14:52:56.000000000 +0100
2+++ autoconf-2.59/bin/autoheader.in 2004-05-03 01:36:45.000000000 +0100
3@@ -272,8 +272,8 @@
4 }
5
6 }
7- exit 1
8- if keys %symbol;
9+# exit 1
10+# if keys %symbol;
11 }
12
13 update_file ("$tmp/config.hin", "$config_h_in");
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-exclude.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-exclude.patch
new file mode 100644
index 0000000000..fac7483bd1
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-exclude.patch
@@ -0,0 +1,137 @@
1Index: autoconf-2.63/bin/autoreconf.in
2===================================================================
3--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:39:01.000000000 +0000
4+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:43:38.000000000 +0000
5@@ -76,6 +76,7 @@
6 -i, --install copy missing auxiliary files
7 --no-recursive don't rebuild sub-packages
8 -s, --symlink with -i, install symbolic links instead of copies
9+ -x, --exclude=STEPS steps we should not run
10 -m, --make when applicable, re-run ./configure && make
11 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
12
13@@ -136,6 +137,13 @@
14 # Recurse into subpackages
15 my $recursive = 1;
16
17+# Steps to exclude
18+my @exclude;
19+my @ex;
20+
21+my $uses_gettext;
22+my $configure_ac;
23+
24 ## ---------- ##
25 ## Routines. ##
26 ## ---------- ##
27@@ -153,6 +161,7 @@
28 'B|prepend-include=s' => \@prepend_include,
29 'i|install' => \$install,
30 's|symlink' => \$symlink,
31+ 'x|exclude=s' => \@exclude,
32 'm|make' => \$run_make,
33 'recursive!' => \$recursive);
34
35@@ -162,6 +171,8 @@
36 parse_WARNINGS;
37 parse_warnings '--warnings', @warning;
38
39+ @exclude = map { split /,/ } @exclude;
40+
41 # Even if the user specified a configure.ac, trim to get the
42 # directory, and look for configure.ac again. Because (i) the code
43 # is simpler, and (ii) we are still able to diagnose simultaneous
44@@ -255,6 +266,11 @@
45 {
46 my ($aclocal, $flags) = @_;
47
48+ @ex = grep (/^aclocal$/, @exclude);
49+ if ($#ex != -1) {
50+ return;
51+ }
52+
53 # aclocal 1.8+ does all this for free. It can be recognized by its
54 # --force support.
55 if ($aclocal_supports_force)
56@@ -368,7 +384,10 @@
57 }
58 else
59 {
60- xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
61+ @ex = grep (/^autopoint$/, @exclude);
62+ if ($#ex == -1) {
63+ xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
64+ }
65 }
66
67
68@@ -532,16 +551,17 @@
69 {
70 $libtoolize .= " --ltdl";
71 }
72- xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
73- $rerun_aclocal = 1;
74+ @ex = grep (/^libtoolize$/, @exclude);
75+ if ($#ex == -1) {
76+ xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
77+ $rerun_aclocal = 1;
78+ }
79 }
80 else
81 {
82 verb "$configure_ac: not running libtoolize: --install not given";
83 }
84
85-
86-
87 # ------------------- #
88 # Rerunning aclocal. #
89 # ------------------- #
90@@ -572,7 +592,10 @@
91 # latter runs the former, and (ii) autoconf is stricter than
92 # autoheader. So all in all, autoconf should give better error
93 # messages.
94- xsystem ($autoconf);
95+ @ex = grep (/^autoconf$/, @exclude);
96+ if ($#ex == -1) {
97+ xsystem ("$autoconf");
98+ }
99
100
101 # -------------------- #
102@@ -593,7 +616,10 @@
103 }
104 else
105 {
106- xsystem ($autoheader);
107+ @ex = grep (/^autoheader$/, @exclude);
108+ if ($#ex == -1) {
109+ xsystem ("$autoheader");
110+ }
111 }
112
113
114@@ -610,7 +636,10 @@
115 # We should always run automake, and let it decide whether it shall
116 # update the file or not. In fact, the effect of `$force' is already
117 # included in `$automake' via `--no-force'.
118- xsystem ($automake);
119+ @ex = grep (/^automake$/, @exclude);
120+ if ($#ex == -1) {
121+ xsystem ("$automake");
122+ }
123 }
124
125
126@@ -634,7 +663,10 @@
127 }
128 else
129 {
130- xsystem ("$make");
131+ @ex = grep (/^make$/, @exclude);
132+ if ($#ex == -1) {
133+ xsystem ("$make");
134+ }
135 }
136 }
137 }
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-foreign.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-foreign.patch
new file mode 100644
index 0000000000..587a823826
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-foreign.patch
@@ -0,0 +1,11 @@
1--- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400
2+++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400
3@@ -184,6 +184,8 @@
4
5 $aclocal_supports_force = `$aclocal --help` =~ /--force/;
6
7+ $automake .= ' --foreign';
8+
9 # Dispatch autoreconf's option to the tools.
10 # --include;
11 $autoconf .= join (' --include=', '', @include);
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch
new file mode 100644
index 0000000000..851d24330d
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch
@@ -0,0 +1,37 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6Index: autoconf-2.63/bin/autoreconf.in
7===================================================================
8--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:43:55.000000000 +0000
9+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:46:16.000000000 +0000
10@@ -58,7 +58,7 @@
11 $help = "Usage: $0 [OPTION]... [DIRECTORY]...
12
13 Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
14-(formerly `gettextize'), and `libtoolize' where appropriate)
15+(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate)
16 repeatedly to remake the GNU Build System files in specified
17 DIRECTORIES and their subdirectories (defaulting to `.').
18
19@@ -115,6 +115,7 @@
20 my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
21 my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
22 my $make = $ENV{'MAKE'} || 'make';
23+my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize';
24
25 # --install -- as --add-missing in other tools.
26 my $install = 0;
27@@ -644,6 +645,10 @@
28 }
29 }
30
31+ @ex = grep (/^gnu-configize$/, @exclude);
32+ if ($#ex == -1) {
33+ xsystem ("$gnuconfigize");
34+ }
35
36 # -------------- #
37 # Running make. #
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-include.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-include.patch
new file mode 100644
index 0000000000..08646c10af
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-include.patch
@@ -0,0 +1,12 @@
1Index: autoconf-2.63/bin/autoreconf.in
2===================================================================
3--- autoconf-2.63.orig/bin/autoreconf.in 2008-08-28 03:08:10.000000000 +0100
4+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:38:40.000000000 +0000
5@@ -190,6 +190,7 @@
6 $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
7 $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include);
8 $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
9+ $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include);
10
11 # --install and --symlink;
12 if ($install)
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/config_site.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/config_site.patch
new file mode 100644
index 0000000000..8a90cd3307
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/config_site.patch
@@ -0,0 +1,29 @@
1Poky provides a list of site files in CONFIG_SITE whereas autoconf
2only expects one file. This patch changes autoconf to accept a list of
3them.
4
5RP 1/2/10
6
7Index: autoconf-2.65/lib/autoconf/general.m4
8===================================================================
9--- autoconf-2.65.orig/lib/autoconf/general.m4 2010-02-01 12:41:32.329073138 +0000
10+++ autoconf-2.65/lib/autoconf/general.m4 2010-02-01 12:41:56.769040799 +0000
11@@ -1863,17 +1863,10 @@
12 m4_define([AC_SITE_LOAD],
13 [# Prefer an explicitly selected file to automatically selected ones.
14 ac_site_file1=NONE
15-ac_site_file2=NONE
16 if test -n "$CONFIG_SITE"; then
17 ac_site_file1=$CONFIG_SITE
18-elif test "x$prefix" != xNONE; then
19- ac_site_file1=$prefix/share/config.site
20- ac_site_file2=$prefix/etc/config.site
21-else
22- ac_site_file1=$ac_default_prefix/share/config.site
23- ac_site_file2=$ac_default_prefix/etc/config.site
24 fi
25-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
26+for ac_site_file in $ac_site_file1
27 do
28 test "x$ac_site_file" = xNONE && continue
29 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/fix_path_xtra.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/fix_path_xtra.patch
new file mode 100644
index 0000000000..bc735718c1
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/fix_path_xtra.patch
@@ -0,0 +1,118 @@
1We don't build xmkmf so any values returned from it are going to be wrong.
2Using any paths in /usr/ for x headers/libs is a bad idea when cross compiling.
3This patch removes them to stop any confusion.
4
5RP - 20071115
6
7Index: autoconf-2.65/lib/autoconf/libs.m4
8===================================================================
9--- autoconf-2.65.orig/lib/autoconf/libs.m4 2009-10-29 01:53:41.000000000 +0000
10+++ autoconf-2.65/lib/autoconf/libs.m4 2010-01-29 13:40:13.000000000 +0000
11@@ -159,53 +159,6 @@
12 # --------------------- #
13
14
15-# _AC_PATH_X_XMKMF
16-# ----------------
17-# Internal subroutine of _AC_PATH_X.
18-# Set ac_x_includes and/or ac_x_libraries.
19-m4_define([_AC_PATH_X_XMKMF],
20-[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
21-rm -f -r conftest.dir
22-if mkdir conftest.dir; then
23- cd conftest.dir
24- cat >Imakefile <<'_ACEOF'
25-incroot:
26- @echo incroot='${INCROOT}'
27-usrlibdir:
28- @echo usrlibdir='${USRLIBDIR}'
29-libdir:
30- @echo libdir='${LIBDIR}'
31-_ACEOF
32- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
33- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
34- for ac_var in incroot usrlibdir libdir; do
35- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
36- done
37- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
38- for ac_extension in a so sl dylib la dll; do
39- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
40- test -f "$ac_im_libdir/libX11.$ac_extension"; then
41- ac_im_usrlibdir=$ac_im_libdir; break
42- fi
43- done
44- # Screen out bogus values from the imake configuration. They are
45- # bogus both because they are the default anyway, and because
46- # using them would break gcc on systems where it needs fixed includes.
47- case $ac_im_incroot in
48- /usr/include) ac_x_includes= ;;
49- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50- esac
51- case $ac_im_usrlibdir in
52- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
53- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
54- esac
55- fi
56- cd ..
57- rm -f -r conftest.dir
58-fi
59-])# _AC_PATH_X_XMKMF
60-
61-
62 # _AC_PATH_X_DIRECT
63 # -----------------
64 # Internal subroutine of _AC_PATH_X.
65@@ -213,44 +166,7 @@
66 m4_define([_AC_PATH_X_DIRECT],
67 [# Standard set of common directories for X headers.
68 # Check X11 before X11Rn because it is often a symlink to the current release.
69-ac_x_header_dirs='
70-/usr/X11/include
71-/usr/X11R7/include
72-/usr/X11R6/include
73-/usr/X11R5/include
74-/usr/X11R4/include
75-
76-/usr/include/X11
77-/usr/include/X11R7
78-/usr/include/X11R6
79-/usr/include/X11R5
80-/usr/include/X11R4
81-
82-/usr/local/X11/include
83-/usr/local/X11R7/include
84-/usr/local/X11R6/include
85-/usr/local/X11R5/include
86-/usr/local/X11R4/include
87-
88-/usr/local/include/X11
89-/usr/local/include/X11R7
90-/usr/local/include/X11R6
91-/usr/local/include/X11R5
92-/usr/local/include/X11R4
93-
94-/usr/X386/include
95-/usr/x386/include
96-/usr/XFree86/include/X11
97-
98-/usr/include
99-/usr/local/include
100-/usr/unsupported/include
101-/usr/athena/include
102-/usr/local/x11r5/include
103-/usr/lpp/Xamples/include
104-
105-/usr/openwin/include
106-/usr/openwin/share/include'
107+ac_x_header_dirs=''
108
109 if test "$ac_x_includes" = no; then
110 # Guess where to find include files, by looking for Xlib.h.
111@@ -299,7 +215,6 @@
112 [AC_CACHE_VAL(ac_cv_have_x,
113 [# One or both of the vars are not set, and there is no cached value.
114 ac_x_includes=no ac_x_libraries=no
115-_AC_PATH_X_XMKMF
116 _AC_PATH_X_DIRECT
117 case $ac_x_includes,$ac_x_libraries in #(
118 no,* | *,no | *\'*)
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/path_prog_fixes.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/path_prog_fixes.patch
new file mode 100644
index 0000000000..5f0d055a48
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/path_prog_fixes.patch
@@ -0,0 +1,126 @@
1Index: autoconf-2.59/bin/autoheader.in
2===================================================================
3--- autoconf-2.59.orig/bin/autoheader.in 2005-03-09 16:27:17.933878952 -0500
4+++ autoconf-2.59/bin/autoheader.in 2005-03-09 16:29:57.360642400 -0500
5@@ -1,8 +1,8 @@
6-#! @PERL@
7+#! @bindir@/env perl
8 # -*- Perl -*-
9 # @configure_input@
10
11-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
12+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
13 if 0;
14
15 # autoheader -- create `config.h.in' from `configure.ac'
16Index: autoconf-2.59/bin/autom4te.in
17===================================================================
18--- autoconf-2.59.orig/bin/autom4te.in 2003-10-28 03:48:36.000000000 -0500
19+++ autoconf-2.59/bin/autom4te.in 2005-03-09 16:30:14.957967200 -0500
20@@ -1,8 +1,10 @@
21-#! @PERL@ -w
22+#! @bindir@/env perl
23 # -*- perl -*-
24 # @configure_input@
25
26-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
27+use warnings;
28+
29+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
30 if 0;
31
32 # autom4te - Wrapper around M4 libraries.
33@@ -87,7 +89,7 @@
34 my $freeze = 0;
35
36 # $M4.
37-my $m4 = $ENV{"M4"} || '@M4@';
38+my $m4 = $ENV{"M4"} || '@bindir@/env m4';
39 # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
40 fatal "need GNU m4 1.4 or later: $m4"
41 if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
42Index: autoconf-2.59/bin/autoreconf.in
43===================================================================
44--- autoconf-2.59.orig/bin/autoreconf.in 2005-03-09 16:27:17.354966960 -0500
45+++ autoconf-2.59/bin/autoreconf.in 2005-03-09 16:31:19.572144352 -0500
46@@ -1,8 +1,10 @@
47-#! @PERL@ -w
48+#! @bindir@/env perl
49 # -*- perl -*-
50 # @configure_input@
51
52-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
53+use warnings;
54+
55+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
56 if 0;
57
58 # autoreconf - install the GNU Build System in a directory tree
59Index: autoconf-2.59/bin/autoscan.in
60===================================================================
61--- autoconf-2.59.orig/bin/autoscan.in 2003-09-26 08:57:49.000000000 -0400
62+++ autoconf-2.59/bin/autoscan.in 2005-03-09 16:30:18.136483992 -0500
63@@ -1,4 +1,4 @@
64-#! @PERL@ -w
65+#! @bindir@/env perl
66 # -*- perl -*-
67 # autoscan - Create configure.scan (a preliminary configure.ac) for a package.
68 # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
69@@ -21,7 +21,9 @@
70
71 # Written by David MacKenzie <djm@gnu.ai.mit.edu>.
72
73-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
74+use warnings;
75+
76+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
77 if 0;
78
79 BEGIN
80Index: autoconf-2.59/bin/autoupdate.in
81===================================================================
82--- autoconf-2.59.orig/bin/autoupdate.in 2003-08-27 07:26:32.000000000 -0400
83+++ autoconf-2.59/bin/autoupdate.in 2005-03-09 16:30:19.912214040 -0500
84@@ -1,4 +1,4 @@
85-#! @PERL@ -w
86+#! @bindir@/env perl
87 # -*- perl -*-
88 # autoupdate - modernize an Autoconf file.
89 # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
90@@ -22,7 +22,9 @@
91 # Originally written by David MacKenzie <djm@gnu.ai.mit.edu>.
92 # Rewritten by Akim Demaille <akim@freefriends.org>.
93
94-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
95+use warnings;
96+
97+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
98 if 0;
99
100 BEGIN
101@@ -54,7 +56,7 @@
102 my @include = ('@datadir@');
103 my $force = 0;
104 # m4.
105-my $m4 = $ENV{"M4"} || '@M4@';
106+my $m4 = $ENV{"M4"} || '@bindir@/env m4';
107
108
109 # $HELP
110Index: autoconf-2.59/bin/ifnames.in
111===================================================================
112--- autoconf-2.59.orig/bin/ifnames.in 2003-10-10 09:52:56.000000000 -0400
113+++ autoconf-2.59/bin/ifnames.in 2005-03-09 16:30:22.656796800 -0500
114@@ -1,8 +1,10 @@
115-#! @PERL@ -w
116+#! @bindir@/env perl
117 # -*- perl -*-
118 # @configure_input@
119
120-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
121+use warnings;
122+
123+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
124 if 0;
125
126 # ifnames - print the identifiers used in C preprocessor conditionals
diff --git a/meta/recipes-devtools/autoconf/autoconf-2.65/program_prefix.patch b/meta/recipes-devtools/autoconf/autoconf-2.65/program_prefix.patch
new file mode 100644
index 0000000000..e6f4096a97
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/program_prefix.patch
@@ -0,0 +1,19 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- autoconf-2.57/lib/autoconf/general.m4~program_prefix
7+++ autoconf-2.57/lib/autoconf/general.m4
8@@ -1676,8 +1676,9 @@
9 # The aliases save the names the user supplied, while $host etc.
10 # will get canonicalized.
11 test -n "$target_alias" &&
12- test "$program_prefix$program_suffix$program_transform_name" = \
13- NONENONEs,x,x, &&
14+ test "$target_alias" != "$host_alias" &&
15+ test "$program_prefix$program_suffix$program_transform_name" = \
16+ NONENONEs,x,x, &&
17 program_prefix=${target_alias}-[]dnl
18 ])# AC_CANONICAL_TARGET
19
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc
new file mode 100644
index 0000000000..8816a66d32
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -0,0 +1,12 @@
1DESCRIPTION = "A package of M4 macros to produce scripts to \
2automatically configure sourcecode."
3LICENSE = "GPLv3"
4HOMEPAGE = "http://www.gnu.org/software/autoconf/"
5SECTION = "devel"
6DEPENDS += "m4-native"
7RDEPENDS_${PN} = "m4 gnu-config"
8
9SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \
10 file://program_prefix.patch;patch=1"
11
12inherit autotools
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.65.bb b/meta/recipes-devtools/autoconf/autoconf_2.65.bb
new file mode 100644
index 0000000000..5adb9756d1
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf_2.65.bb
@@ -0,0 +1,23 @@
1require autoconf.inc
2
3PR = "r2"
4
5PARALLEL_MAKE = ""
6
7DEPENDS += "m4-native"
8RDEPENDS_${PN} = "m4 gnu-config"
9
10SRC_URI += "file://autoreconf-include.patch;patch=1 \
11 file://autoreconf-exclude.patch;patch=1 \
12 file://autoreconf-foreign.patch;patch=1 \
13 file://autoreconf-gnuconfigize.patch;patch=1 \
14 file://autoheader-nonfatal-warnings.patch;patch=1 \
15 ${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]} \
16 file://config_site.patch;patch=1"
17
18DEPENDS_virtclass-native = "m4-native gnu-config-native"
19RDEPENDS_${PN}_virtclass-native = "m4-native gnu-config-native"
20
21SRC_URI_append_virtclass-native = " file://fix_path_xtra.patch;patch=1"
22
23BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/automake/automake.inc b/meta/recipes-devtools/automake/automake.inc
new file mode 100644
index 0000000000..d68c45d4f7
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake.inc
@@ -0,0 +1,13 @@
1DESCRIPTION = "A tool for automatically generating Makefiles."
2LICENSE = "GPLv2"
3HOMEPAGE = "http://www.gnu.org/software/automake/"
4SECTION = "devel"
5PR = "r1"
6
7SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 "
8
9inherit autotools
10
11export AUTOMAKE = "${@bb.which('automake', bb.data.getVar('PATH', d, 1))}"
12
13FILES_${PN} += "${datadir}/automake* ${datadir}/aclocal*"
diff --git a/meta/recipes-devtools/automake/automake/path_prog_fixes.patch b/meta/recipes-devtools/automake/automake/path_prog_fixes.patch
new file mode 100644
index 0000000000..fb38442e30
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/path_prog_fixes.patch
@@ -0,0 +1,67 @@
1---
2 Makefile.am | 3 ++-
3 Makefile.in | 3 ++-
4 aclocal.in | 4 ++--
5 automake.in | 6 ++++--
6 4 files changed, 10 insertions(+), 6 deletions(-)
7
8Index: automake-1.10.1/Makefile.am
9===================================================================
10--- automake-1.10.1.orig/Makefile.am 2008-01-21 22:28:58.000000000 +0000
11+++ automake-1.10.1/Makefile.am 2008-10-10 17:21:20.000000000 +0100
12@@ -75,7 +75,8 @@
13 -e 's,[@]SHELL[@],$(SHELL),g' \
14 -e 's,[@]VERSION[@],$(VERSION),g' \
15 -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
16- -e 's,[@]datadir[@],$(datadir),g'
17+ -e 's,[@]datadir[@],$(datadir),g' \
18+ -e 's,[@]bindir[@],$(bindir),g'
19
20 ## These files depend on Makefile so they are rebuilt if $(VERSION),
21 ## $(datadir) or other do_subst'ituted variables change.
22Index: automake-1.10.1/Makefile.in
23===================================================================
24--- automake-1.10.1.orig/Makefile.in 2008-01-21 22:29:10.000000000 +0000
25+++ automake-1.10.1/Makefile.in 2008-10-10 17:22:21.000000000 +0100
26@@ -185,7 +185,8 @@
27 -e 's,[@]SHELL[@],$(SHELL),g' \
28 -e 's,[@]VERSION[@],$(VERSION),g' \
29 -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
30- -e 's,[@]datadir[@],$(datadir),g'
31+ -e 's,[@]datadir[@],$(datadir),g' \
32+ -e 's,[@]bindir[@],$(bindir),g'
33
34 WGET = wget
35 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
36Index: automake-1.10.1/aclocal.in
37===================================================================
38--- automake-1.10.1.orig/aclocal.in 2008-01-21 22:11:41.000000000 +0000
39+++ automake-1.10.1/aclocal.in 2008-10-10 17:21:20.000000000 +0100
40@@ -1,8 +1,8 @@
41-#!@PERL@ -w
42+#!@bindir@/env perl
43 # -*- perl -*-
44 # @configure_input@
45
46-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
47+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
48 if 0;
49
50 # aclocal - create aclocal.m4 by scanning configure.ac
51Index: automake-1.10.1/automake.in
52===================================================================
53--- automake-1.10.1.orig/automake.in 2008-01-21 22:11:41.000000000 +0000
54+++ automake-1.10.1/automake.in 2008-10-10 17:21:20.000000000 +0100
55@@ -1,8 +1,10 @@
56-#!@PERL@ -w
57+#!@bindir@/env perl
58 # -*- perl -*-
59 # @configure_input@
60
61-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
62+use warnings;
63+
64+eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
65 if 0;
66
67 # automake - create Makefile.in from Makefile.am
diff --git a/meta/recipes-devtools/automake/automake_1.11.1.bb b/meta/recipes-devtools/automake/automake_1.11.1.bb
new file mode 100644
index 0000000000..a78b6901f1
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake_1.11.1.bb
@@ -0,0 +1,41 @@
1require automake.inc
2
3DEPENDS_virtclass-native = "autoconf-native"
4
5RDEPENDS_automake += "\
6 autoconf \
7 perl \
8 perl-module-bytes \
9 perl-module-constant \
10 perl-module-cwd \
11 perl-module-data-dumper \
12 perl-module-dynaloader \
13 perl-module-errno \
14 perl-module-exporter-heavy \
15 perl-module-file-basename \
16 perl-module-file-compare \
17 perl-module-file-copy \
18 perl-module-file-glob \
19 perl-module-file-spec-unix \
20 perl-module-file-stat \
21 perl-module-getopt-long \
22 perl-module-io \
23 perl-module-io-file \
24 perl-module-posix \
25 perl-module-strict \
26 perl-module-text-parsewords \
27 perl-module-vars "
28
29RDEPENDS_automake-native = "autoconf-native perl-native-runtime"
30
31PATHFIXPATCH = "file://path_prog_fixes.patch;patch=1"
32PATHFIXPATCH_virtclass-native = ""
33
34SRC_URI += "${PATHFIXPATCH}"
35
36do_install () {
37 oe_runmake 'DESTDIR=${D}' install
38 install -d ${D}${datadir}
39}
40
41BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..2623301da0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
@@ -0,0 +1,22 @@
1--- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200
2+++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200
3@@ -561,7 +561,7 @@
4 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
5 libgloss_dir=arm
6 ;;
7- arm*-*-linux-gnueabi)
8+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
9 noconfigdirs="$noconfigdirs target-qthreads"
10 noconfigdirs="$noconfigdirs target-libobjc"
11 case ${with_newlib} in
12--- /tmp/configure 2008-06-22 14:17:11.000000000 +0200
13+++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200
14@@ -2307,7 +2307,7 @@
15 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
16 libgloss_dir=arm
17 ;;
18- arm*-*-linux-gnueabi)
19+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
20 noconfigdirs="$noconfigdirs target-qthreads"
21 noconfigdirs="$noconfigdirs target-libobjc"
22 case ${with_newlib} in
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
new file mode 100644
index 0000000000..dfe9b18e17
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
@@ -0,0 +1,18 @@
1Adds support for Freescale Power architecture e300c2 and e300c3 cores.
2http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
3
4Leon Woestenberg <leonw@mailcan.com>
5
6Index: binutils-2.19.51.0.3/opcodes/ppc-dis.c
7===================================================================
8--- binutils-2.19.51.0.3.orig/opcodes/ppc-dis.c 2009-04-16 00:38:45.000000000 -0700
9+++ binutils-2.19.51.0.3/opcodes/ppc-dis.c 2009-04-16 00:43:56.000000000 -0700
10@@ -132,6 +132,8 @@
11 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC
12 | PPC_OPCODE_VSX),
13 0 },
14+ { "pmr", (PPC_OPCODE_PMR),
15+ 0 },
16 { "ppc", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
17 0 },
18 { "ppc32", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
new file mode 100644
index 0000000000..61517d1d4c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
@@ -0,0 +1,67 @@
1This is because libdir has a trailing slash which breaks the comparision.
2
3RP 2/1/10
4
5Index: binutils-2.20.1/ltmain.sh
6===================================================================
7--- binutils-2.20.1.orig/ltmain.sh 2009-09-01 00:59:32.000000000 +0800
8+++ binutils-2.20.1/ltmain.sh 2010-07-29 09:41:14.000000000 +0800
9@@ -2156,8 +2156,12 @@
10 dir="$dir$objdir"
11
12 if test -n "$relink_command"; then
13+ # Strip any trailing slash from the destination.
14+ func_stripname '' '/' "$libdir"
15+ destlibdir=$func_stripname_result
16+
17 # Determine the prefix the user has applied to our future dir.
18- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
19+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"`
20
21 # Don't allow the user to place us outside of our expected
22 # location b/c this prevents finding dependent libraries that
23@@ -5570,8 +5574,14 @@
24 absdir="$abs_ladir"
25 libdir="$abs_ladir"
26 else
27- dir="$libdir"
28- absdir="$libdir"
29+ # Adding 'libdir' from the .la file to our library search paths
30+ # breaks crosscompilation horribly. We cheat here and don't add
31+ # it, instead adding the path where we found the .la. -CL
32+ dir="$abs_ladir"
33+ absdir="$abs_ladir"
34+ libdir="$abs_ladir"
35+ #dir="$libdir"
36+ #absdir="$libdir"
37 fi
38 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
39 else
40@@ -5942,8 +5952,6 @@
41 add="$libdir/$linklib"
42 fi
43 else
44- # We cannot seem to hardcode it, guess we'll fake it.
45- add_dir="-L$libdir"
46 # Try looking first in the location we're being installed to.
47 if test -n "$inst_prefix_dir"; then
48 case $libdir in
49@@ -6089,7 +6097,17 @@
50 fi
51 ;;
52 *)
53- path="-L$absdir/$objdir"
54+ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
55+ # preferring $objdir. RP 31/04/2008
56+ if test -f "$absdir/$objdir/$depdepl" ; then
57+ depdepl="$absdir/$objdir/$depdepl"
58+ path="-L$absdir/$objdir"
59+ elif test -f "$absdir/$depdepl" ; then
60+ depdepl="$absdir/$depdepl"
61+ path="-L$absdir"
62+ else
63+ path="-L$absdir/$objdir"
64+ fi
65 ;;
66 esac
67 else
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
new file mode 100644
index 0000000000..c71f0ad4db
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
@@ -0,0 +1,29 @@
1# "-fPIE" always triggers segmentation fault in ld.so.1 on mips platform,
2# which was first saw on dbus-daemon. Below borrow the binutils fix from
3# binutils bugzilla:
4#
5# http://sourceware.org/bugzilla/show_bug.cgi?id=10858
6#
7# Its commit message says:
8# * elfxx-mips.c (mips_elf_create_dynamic_relocation): Use section
9# sym dynindx for relocs against defined syms in PIEs.
10#
11# It's in upstream CVS now (rev 1.267), but not in current release
12#
13# By Kevin Tian <kevin.tian@intel.com>, 2010-07-15
14
15diff --git a/elfxx-mips.c b/elfxx-mips.c
16index 3a1c8ba..f6c2c1c 100644
17--- binutils-2.20.1.orig/bfd/elfxx-mips.c
18+++ binutils-2.20.1/bfd/elfxx-mips.c
19@@ -5688,9 +5688,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
20
21 /* We must now calculate the dynamic symbol table index to use
22 in the relocation. */
23- if (h != NULL
24- && (!h->root.def_regular
25- || (info->shared && !info->symbolic && !h->root.forced_local)))
26+ if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
27 {
28 indx = h->root.dynindx;
29 if (SGI_COMPAT (output_bfd))
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..8de04e0fe0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,34 @@
1--- binutils-2.18.orig/configure
2+++ binutils-2.18/configure
3@@ -2206,7 +2206,7 @@
4 am33_2.0-*-linux*)
5 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
6 ;;
7- sh-*-linux*)
8+ sh*-*-linux*)
9 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
10 ;;
11 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
12@@ -2504,7 +2504,7 @@
13 romp-*-*)
14 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
15 ;;
16- sh-*-* | sh64-*-*)
17+ sh*-*-* | sh64-*-*)
18 case "${host}" in
19 i[3456789]86-*-vsta) ;; # don't add gprof back in
20 i[3456789]86-*-go32*) ;; # don't add gprof back in
21--- binutils-2.18.orig/gprof/configure
22+++ binutils-2.18/gprof/configure
23@@ -4124,6 +4124,11 @@
24 lt_cv_deplibs_check_method=pass_all
25 ;;
26
27+linux-uclibc*)
28+ lt_cv_deplibs_check_method=pass_all
29+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
30+ ;;
31+
32 netbsd*)
33 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
34 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
1#!/bin/sh -e
2## 001_ld_makefile_patch.dpatch
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Description: correct where ld scripts are installed
6## DP: Author: Chris Chimelis <chris@debian.org>
7## DP: Upstream status: N/A
8## DP: Date: ??
9
10if [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14
15[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
16patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
17
18case "$1" in
19 -patch) patch $patch_opts -p1 < $0;;
20 -unpatch) patch $patch_opts -p1 -R < $0;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1;;
24esac
25
26exit 0
27
28@DPATCH@
29--- binutils-2.16.91.0.1/ld/Makefile.am
30+++ binutils-2.16.91.0.1/ld/Makefile.am
31@@ -20,7 +20,7 @@
32 # We put the scripts in the directory $(scriptdir)/ldscripts.
33 # We can't put the scripts in $(datadir) because the SEARCH_DIR
34 # directives need to be different for native and cross linkers.
35-scriptdir = $(tooldir)/lib
36+scriptdir = $(libdir)
37
38 EMUL = @EMUL@
39 EMULATION_OFILES = @EMULATION_OFILES@
40--- binutils-2.16.91.0.1/ld/Makefile.in
41+++ binutils-2.16.91.0.1/ld/Makefile.in
42@@ -268,7 +268,7 @@
43 # We put the scripts in the directory $(scriptdir)/ldscripts.
44 # We can't put the scripts in $(datadir) because the SEARCH_DIR
45 # directives need to be different for native and cross linkers.
46-scriptdir = $(tooldir)/lib
47+scriptdir = $(libdir)
48 BASEDIR = $(srcdir)/..
49 BFDDIR = $(BASEDIR)/bfd
50 INCDIR = $(BASEDIR)/include
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
1#!/bin/sh -e
2## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Specify which filename is causing an error if the filename is a
6## DP: directory. (#45832)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
28--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
29+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
30@@ -150,6 +150,13 @@
31 {
32 bfd *nbfd;
33 const bfd_target *target_vec;
34+ struct stat s;
35+
36+ if (stat (filename, &s) == 0)
37+ if (S_ISDIR(s.st_mode)) {
38+ bfd_set_error (bfd_error_file_not_recognized);
39+ return NULL;
40+ }
41
42 nbfd = _bfd_new_bfd ();
43 if (nbfd == NULL)
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
1#!/bin/sh -e
2## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
6## DP: cases where -rpath isn't specified. (#151024)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
28--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
29+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
30@@ -692,6 +692,8 @@
31 && command_line.rpath == NULL)
32 {
33 lib_path = (const char *) getenv ("LD_RUN_PATH");
34+ if ((lib_path) && (strlen (lib_path) == 0))
35+ lib_path = NULL;
36 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
37 force))
38 break;
39@@ -871,6 +873,8 @@
40 rpath = command_line.rpath;
41 if (rpath == NULL)
42 rpath = (const char *) getenv ("LD_RUN_PATH");
43+ if ((rpath) && (strlen (rpath) == 0))
44+ rpath = NULL;
45 if (! (bfd_elf_size_dynamic_sections
46 (output_bfd, command_line.soname, rpath,
47 command_line.filter_shlib,
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000000..db838cf20c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch
@@ -0,0 +1,38 @@
1Source: Khem Raj <raj.khem@gmail.com>
2Disposition: submit upstream.
3
4Description:
5
6We do not need to have the libtool patch anymore for binutils after
7libtool has been updated upstream it include support for it. However
8for building gas natively on uclibc systems we have to link it with
9-lm so that it picks up missing symbols.
10
11/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
12floatformat.c:(.text+0x1ec): undefined reference to `frexp'
13floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
14/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
15floatformat.c:(.text+0x38a): undefined reference to `ldexp'
16floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
17floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
18collect2: ld returned 1 exit status
19make[4]: *** [as-new] Error 1
20
21Index: binutils-2.17.50/gas/configure.tgt
22===================================================================
23--- binutils-2.17.50.orig/gas/configure.tgt
24+++ binutils-2.17.50/gas/configure.tgt
25@@ -408,6 +408,12 @@ case ${generic_target} in
26 *-*-netware) fmt=elf em=netware ;;
27 esac
28
29+case ${generic_target} in
30+ arm-*-*uclibc*)
31+ need_libm=yes
32+ ;;
33+esac
34+
35 case ${cpu_type} in
36 alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
37 bfd_gas=yes
38
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000000..4cd9e22438
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
1#!/bin/sh -e
2## 127_x86_64_i386_biarch.dpatch
3##
4## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
5## DP: Author: Aurelien Jarno <aurel32.debian.org>
6## DP: Upstream status: Debian specific
7#
8# Hacked to apply with quilt
9# Adapted to binutils 2.18.50.0.7
10
11--- binutils/ld/emulparams/elf_i386.sh
12+++ binutils/ld/emulparams/elf_i386.sh
13@@ -12,3 +12,13 @@
14 SEPARATE_GOTPLT=12
15 SHARABLE_SECTIONS=yes
16 IREL_IN_PLT=
17+
18+# Linux modify the default library search path to first include
19+# a 32-bit specific directory.
20+case "$target" in
21+ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
22+ case "$EMULATION_NAME" in
23+ *i386*) LIBPATH_SUFFIX=32 ;;
24+ esac
25+ ;;
26+esac
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
new file mode 100644
index 0000000000..36a14d7a18
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
@@ -0,0 +1,20 @@
1don't let the distro compiler point to the wrong installation location
2
3Thanks to RP for helping find the source code causing the issue.
4
52010/08/13
6Nitin A Kamble <nitin.a.kamble@intel.com>
7Index: binutils-2.20.1/libiberty/Makefile.in
8===================================================================
9--- binutils-2.20.1.orig/libiberty/Makefile.in
10+++ binutils-2.20.1/libiberty/Makefile.in
11@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst
12 # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
13 # default multilib, so we have to take CFLAGS into account as well,
14 # since it will be passed the multilib flags.
15-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
16+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
17+MULTIOSDIR = ""
18 install_to_libdir: all
19 ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
20 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
new file mode 100644
index 0000000000..4953bc2c3b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -0,0 +1,16 @@
1inherit cross-canadian
2DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
3EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
4 --program-prefix=${TARGET_PREFIX}"
5
6do_install () {
7 autotools_do_install
8
9 # We're not interested in the libs or headers, these would come from the
10 # nativesdk or target version of the binutils recipe
11 rm -rf ${D}${prefix}/${TARGET_SYS}
12 rm -f ${D}${libdir}/libbfd*
13 rm -f ${D}${libdir}/libiberty*
14 rm -f ${D}${libdir}/libopcodes*
15 rm -f ${D}${includedir}/*.h
16}
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
new file mode 100644
index 0000000000..f4a7a0e619
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
@@ -0,0 +1,3 @@
1require binutils_${PV}.bb
2require binutils-cross-canadian.inc
3PR = "r4"
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
new file mode 100644
index 0000000000..4eeb6584c9
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -0,0 +1,25 @@
1inherit cross
2PROVIDES = "virtual/${TARGET_PREFIX}binutils"
3
4EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
5 --program-prefix=${TARGET_PREFIX} \
6 --disable-install-libbfd \
7 --disable-werror"
8
9do_install () {
10 oe_runmake 'DESTDIR=${D}' install
11
12 # We don't really need these, so we'll remove them...
13 rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a
14 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}
15 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
16 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
17 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
18 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
19 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
20 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
21 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
22 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
23 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
24 rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
25}
diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
new file mode 100644
index 0000000000..8c7e4bc1a3
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
@@ -0,0 +1,3 @@
1require binutils_${PV}.bb
2require binutils-cross.inc
3
diff --git a/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb b/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..8ab1e7f63e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb
@@ -0,0 +1,3 @@
1require binutils_csl-arm-2008q1.bb
2require binutils-cross.inc
3PR = "r1"
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
new file mode 100644
index 0000000000..f3bc5bfc22
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
@@ -0,0 +1,12 @@
1require binutils-cross_${PV}.bb
2
3inherit crosssdk
4
5PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
6
7PR = "r3"
8
9do_configure_prepend () {
10 sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
11}
12
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
new file mode 100644
index 0000000000..7a352b5d3b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -0,0 +1,146 @@
1DESCRIPTION = "A GNU collection of binary utilities"
2HOMEPAGE = "http://www.gnu.org/software/binutils/"
3BUGTRACKER = "http://sourceware.org/bugzilla/"
4SECTION = "devel"
5LICENSE = "GPLv2"
6
7DEPENDS = "flex-native bison-native"
8
9inherit autotools gettext
10
11PACKAGES += "${PN}-symlinks"
12
13FILES_${PN} = " \
14 ${bindir}/${TARGET_PREFIX}* \
15 ${libdir}/lib*-*.so \
16 ${prefix}/${TARGET_SYS}/bin/*"
17
18FILES_${PN}-dev = " \
19 ${includedir} \
20 ${libdir}/*.a \
21 ${libdir}/*.la \
22 ${libdir}/libbfd.so \
23 ${libdir}/libopcodes.so"
24
25FILES_${PN}-symlinks = " \
26 ${bindir}/addr2line \
27 ${bindir}/as \
28 ${bindir}/c++filt \
29 ${bindir}/gprof \
30 ${bindir}/ld \
31 ${bindir}/nm \
32 ${bindir}/objcopy \
33 ${bindir}/objdump \
34 ${bindir}/ranlib \
35 ${bindir}/readelf \
36 ${bindir}/size \
37 ${bindir}/strip"
38
39B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
40
41EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
42 --enable-install-libbfd \
43 --enable-shared"
44
45EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
46
47# This is necessary due to a bug in the binutils Makefiles
48# EXTRA_OEMAKE = "configure-build-libiberty all"
49
50export AR = "${HOST_PREFIX}ar"
51export AS = "${HOST_PREFIX}as"
52export LD = "${HOST_PREFIX}ld"
53export NM = "${HOST_PREFIX}nm"
54export RANLIB = "${HOST_PREFIX}ranlib"
55export OBJCOPY = "${HOST_PREFIX}objcopy"
56export OBJDUMP = "${HOST_PREFIX}objdump"
57
58export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
59export AS_FOR_TARGET = "${TARGET_PREFIX}as"
60export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
61export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
62export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
63
64export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
65export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
66
67export CC_FOR_BUILD = "${BUILD_CC}"
68export CPP_FOR_BUILD = "${BUILD_CPP}"
69export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
70
71export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
72
73do_configure () {
74 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
75 oe_runconf
76#
77# must prime config.cache to ensure the build of libiberty
78#
79 mkdir -p ${B}/build-${BUILD_SYS}
80 for i in ${CONFIG_SITE}; do
81 cat $i >> ${B}/build-${BUILD_SYS}/config.cache
82 done
83}
84
85do_install () {
86 autotools_do_install
87
88 # We don't really need these, so we'll remove them...
89 rm -rf ${D}${libdir}/ldscripts
90
91 # Fix the /usr/${TARGET_SYS}/bin/* links
92 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
93 rm -f $l
94 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
95 | tr -s / \
96 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
97 done
98
99 # Install the libiberty header
100 install -d ${D}${includedir}
101 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
102 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
103
104 cd ${D}${bindir}
105
106 # Symlinks for ease of running these on the native target
107 for p in ${TARGET_SYS}-* ; do
108 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
109 done
110
111 rm ${D}${bindir}/ar ${D}${bindir}/strings
112}
113
114do_install_virtclass-native () {
115 autotools_do_install
116
117 # Install the libiberty header
118 install -d ${D}${includedir}
119 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
120 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
121
122 # We only want libiberty, libbfd and libopcodes
123 rm -rf ${D}${bindir}
124 rm -rf ${D}${prefix}/${TARGET_SYS}
125 rm -rf ${D}${prefix}/lib/ldscripts
126 rm -rf ${D}${prefix}/share/info
127 rm -rf ${D}${prefix}/share/locale
128 rm -rf ${D}${prefix}/share/man
129 rmdir ${D}${prefix}/share || :
130 rmdir ${D}/${libdir}/gcc-lib || :
131 rmdir ${D}/${libdir}64/gcc-lib || :
132 rmdir ${D}/${libdir} || :
133 rmdir ${D}/${libdir}64 || :
134}
135
136pkg_postinst_${PN}-symlinks () {
137 update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100
138 update-alternatives --install ${bindir}/strings strings ${TARGET_SYS}-strings 100
139}
140
141
142pkg_prerm_${PN}-symlinks () {
143 update-alternatives --remove ar ${TARGET_SYS}-ar
144 update-alternatives --remove strings ${TARGET_SYS}-strings
145}
146
diff --git a/meta/recipes-devtools/binutils/binutils_2.20.1.bb b/meta/recipes-devtools/binutils/binutils_2.20.1.bb
new file mode 100644
index 0000000000..d5cd985cca
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_2.20.1.bb
@@ -0,0 +1,37 @@
1require binutils.inc
2
3PR = "r2"
4
5LIC_FILES_CHKSUM="\
6 file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
7 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
8 file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
9 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
10 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
11 file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
12 file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
13 file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
14 file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
15 file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
16 "
17
18SRC_URI = "\
19 ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2;name=tarball \
20 file://binutils-uclibc-100-uclibc-conf.patch \
21 file://110-arm-eabi-conf.patch \
22 file://binutils-uclibc-300-001_ld_makefile_patch.patch \
23 file://binutils-uclibc-300-006_better_file_error.patch \
24 file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
25 file://binutils-uclibc-gas-needs-libm.patch \
26 file://binutils-x86_64_i386_biarch.patch \
27 file://binutils-mips-pie.patch \
28 file://binutils-libtool.patch \
29 file://libiberty_path_fix.patch \
30 "
31
32# powerpc patches
33SRC_URI += "\
34 file://binutils-2.16.1-e300c2c3.patch \
35 "
36
37BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb b/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..dd9b798306
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb
@@ -0,0 +1,25 @@
1require binutils.inc
2
3DEFAULT_PREFERENCE = "-1"
4
5SRC_URI = "\
6 http://www.codesourcery.com/gnu_toolchains/arm/portal/package2553/public/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
7 file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
8 file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
9 file://110-arm-eabi-conf.patch;patch=1 \
10 file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
11 file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
12 file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
13 file://docs_hack2.patch;patch=1 \
14 "
15
16PV = "2.18+csl-arm-2008q1-126"
17
18S = "${WORKDIR}/binutils-stable"
19
20do_unpack2() {
21 cd ${WORKDIR}
22 tar -xvjf ./arm-2008q1-126-arm-none-eabi/binutils-2008q1-126.tar.bz2
23}
24
25addtask unpack2 after do_unpack before do_patch
diff --git a/meta/recipes-devtools/binutils/files/better_file_error.patch b/meta/recipes-devtools/binutils/files/better_file_error.patch
new file mode 100644
index 0000000000..38ef52966e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/better_file_error.patch
@@ -0,0 +1,17 @@
1diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c
2--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001
3+++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001
4@@ -127,6 +127,13 @@
5 {
6 bfd *nbfd;
7 const bfd_target *target_vec;
8+ struct stat s;
9+
10+ if (stat (filename, &s) == 0)
11+ if (S_ISDIR(s.st_mode)) {
12+ bfd_set_error (bfd_error_file_not_recognized);
13+ return NULL;
14+ }
15
16 nbfd = _bfd_new_bfd ();
17 if (nbfd == NULL)
diff --git a/meta/recipes-devtools/binutils/files/ld_makefile.patch b/meta/recipes-devtools/binutils/files/ld_makefile.patch
new file mode 100644
index 0000000000..c1d2ac1ece
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/ld_makefile.patch
@@ -0,0 +1,22 @@
1--- binutils-2.11.90.0.19.orig/ld/Makefile.am
2+++ binutils-2.11.90.0.19/ld/Makefile.am
3@@ -19,7 +19,7 @@
4 # We put the scripts in the directory $(scriptdir)/ldscripts.
5 # We can't put the scripts in $(datadir) because the SEARCH_DIR
6 # directives need to be different for native and cross linkers.
7-scriptdir = $(tooldir)/lib
8+scriptdir = $(libdir)
9
10 EMUL = @EMUL@
11 EMULATION_OFILES = @EMULATION_OFILES@
12--- binutils-2.11.90.0.19.orig/ld/Makefile.in
13+++ binutils-2.11.90.0.19/ld/Makefile.in
14@@ -123,7 +123,7 @@
15 # We put the scripts in the directory $(scriptdir)/ldscripts.
16 # We can't put the scripts in $(datadir) because the SEARCH_DIR
17 # directives need to be different for native and cross linkers.
18-scriptdir = $(tooldir)/lib
19+scriptdir = $(libdir)
20
21 EMUL = @EMUL@
22 EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/meta/recipes-devtools/binutils/files/objdump_fix.patch b/meta/recipes-devtools/binutils/files/objdump_fix.patch
new file mode 100644
index 0000000000..90ad732c06
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/objdump_fix.patch
@@ -0,0 +1,134 @@
1From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005
2Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-binutils at sources dot redhat dot com
4Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000
5Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/binutils/>
9List-Post: <mailto:binutils at sources dot redhat dot com>
10List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: binutils-owner at sources dot redhat dot com
12Delivered-To: mailing list binutils at sources dot redhat dot com
13Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000
14Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94)
15 by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000
16Received: from bgo1sminn1.broadpark.no ([217.13.4.93])
17 by bgo1smout1 dot broadpark dot no
18 (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
19 with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for
20 binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET)
21Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no
22 (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
23 with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for
24 binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET)
25Date: Tue, 22 Feb 2005 20:24:08 +0100
26From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net>
27Subject: [PATCH] objdump relocation fixes for ARM disassembly
28To: binutils at sources dot redhat dot com
29Message-id: <421B86D8.8080604@users.sourceforge.net>
30MIME-version: 1.0
31Content-type: text/plain; charset=ISO-8859-1; format=flowed
32Content-transfer-encoding: 7BIT
33User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
34
35Hello,
36
37objdump disassembly did not relocate correctly for the ARM processor. It seems
38that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other,
39since octets would always be zero) and all relocations would thus fail. I changed the test
40so the flag is set when we are about to disassemble an insn that the current relocation
41entry points to. I also changed objdump_print_addr to use the current relocation entry if
42the insn has such an entry. This causes the symbol printed to be correct for both external
43symbols (from the undefined section) and local symbols.
44
45This has only been tested for the ARM processor, but I don't think it should break other
46DISASSEMBLER_NEEDS_RELOCS processors either.
47
48
49binutils/
50
512005-02-22 Stig Petter Olsroed <stigpo@users.sourceforge.net>
52
53 * objdump.c (disassemble_bytes): Fixed relocation check for
54 DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the
55 INSN_HAS_RELOC flag. Set the current relocation entry in
56 objdump_disasm_info to allow printing the proper symbol.
57 (objdump_print_addr): Use the relocation entry in
58 objdump_disasm_info to lookup the correct symbol for
59 DISASSEMBLER_NEEDS_RELOCS platforms.
60
61--- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100
62+++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100
63@@ -128,6 +128,7 @@
64 arelent ** dynrelbuf;
65 long dynrelcount;
66 disassembler_ftype disassemble_fn;
67+ arelent * reloc;
68 };
69
70 /* Architecture to disassemble for, or default if NULL. */
71@@ -852,6 +853,8 @@
72 {
73 struct objdump_disasm_info *aux;
74 asymbol *sym;
75+ arelent *q;
76+ int skip_find = 0;
77
78 if (sorted_symcount < 1)
79 {
80@@ -861,6 +864,22 @@
81 }
82
83 aux = (struct objdump_disasm_info *) info->application_data;
84+
85+ q = aux->reloc;
86+ if (q != NULL)
87+ {
88+ if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL)
89+ {
90+ /* Adjust the vma to the reloc */
91+ vma += bfd_asymbol_value (*q->sym_ptr_ptr);
92+ if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr)))
93+ {
94+ skip_find = 1;
95+ sym = *q->sym_ptr_ptr;
96+ }
97+ }
98+ }
99+ if (!skip_find)
100 sym = find_symbol_for_address (vma, info, NULL);
101 objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
102 skip_zeroes);
103@@ -1350,16 +1369,22 @@
104 info->bytes_per_chunk = 0;
105
106 #ifdef DISASSEMBLER_NEEDS_RELOCS
107- /* FIXME: This is wrong. It tests the number of octets
108- in the last instruction, not the current one. */
109- if (*relppp < relppend
110- && (**relppp)->address >= rel_offset + addr_offset
111- && ((**relppp)->address
112- < rel_offset + addr_offset + octets / opb))
113+ /* Check if the current relocation entry applies to the
114+ instruction we are about to disassemble.
115+ This works for ARM at least.
116+ */
117+ if ((*relppp) < relppend
118+ && ((**relppp)->address == rel_offset + addr_offset))
119+ {
120 info->flags = INSN_HAS_RELOC;
121+ aux->reloc = **relppp;
122+ }
123 else
124 #endif
125+ {
126 info->flags = 0;
127+ aux->reloc = NULL;
128+ }
129
130 octets = (*disassemble_fn) (section->vma + addr_offset, info);
131 info->fprintf_func = (fprintf_ftype) fprintf;
132
133
134
diff --git a/meta/recipes-devtools/binutils/files/plt32trunc.patch b/meta/recipes-devtools/binutils/files/plt32trunc.patch
new file mode 100644
index 0000000000..4990f5dbb6
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/plt32trunc.patch
@@ -0,0 +1,24 @@
1--- binutils/bfd/elf32-arm.h.orig 2004-04-22 22:11:15.000000000 -0400
2+++ binutils/bfd/elf32-arm.h 2004-04-22 22:28:37.000000000 -0400
3@@ -2229,6 +2229,8 @@ elf32_arm_relocate_section (output_bfd,
4 case R_ARM_PC24:
5 case R_ARM_ABS32:
6 case R_ARM_THM_PC22:
7+ case R_ARM_PLT32:
8+
9 if (info->shared
10 && (
11 (!info->symbolic && h->dynindx != -1)
12@@ -2262,11 +2264,6 @@ elf32_arm_relocate_section (output_bfd,
13 relocation = 0;
14 break;
15
16- case R_ARM_PLT32:
17- if (h->plt.offset != (bfd_vma)-1)
18- relocation = 0;
19- break;
20-
21 default:
22 if (unresolved_reloc)
23 _bfd_error_handler
24
diff --git a/meta/recipes-devtools/binutils/files/signed_char_fix.patch b/meta/recipes-devtools/binutils/files/signed_char_fix.patch
new file mode 100644
index 0000000000..b3709dabed
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/signed_char_fix.patch
@@ -0,0 +1,12 @@
1diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c
2--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001
3+++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001
4@@ -1830,7 +1830,7 @@
5 * The function returns the length of this instruction in bytes.
6 */
7
8-static char intel_syntax;
9+static signed char intel_syntax;
10 static char open_char;
11 static char close_char;
12 static char separator_char;
diff --git a/meta/recipes-devtools/bison/bison/fix_cross_manpage_building.patch b/meta/recipes-devtools/bison/bison/fix_cross_manpage_building.patch
new file mode 100644
index 0000000000..850ec06aa7
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/fix_cross_manpage_building.patch
@@ -0,0 +1,18 @@
1help2man is looking at the generated binary for help output. This does not work for cross compilations. So taking out the local PREPATH (../src) directory from path so that help2 man can find the native version of the bison in the native sysroot directory.
2
3Date: 2010/06/28
4Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
5
6Index: bison-2.4.2/doc/Makefile.am
7===================================================================
8--- bison-2.4.2.orig/doc/Makefile.am
9+++ bison-2.4.2/doc/Makefile.am
10@@ -77,7 +77,7 @@ PREPATH = $(top_builddir)/src
11 (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
12 done
13 @echo "Updating man page $@"
14- PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
15+# PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH";
16 export PATH; \
17 $(HELP2MAN) \
18 --include=$*.x \
diff --git a/meta/recipes-devtools/bison/bison/m4.patch b/meta/recipes-devtools/bison/bison/m4.patch
new file mode 100644
index 0000000000..9332354b50
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/m4.patch
@@ -0,0 +1,544 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6Index: bison-2.4.2/m4/lcmessage.m4
7===================================================================
8--- /dev/null
9+++ bison-2.4.2/m4/lcmessage.m4
10@@ -0,0 +1,32 @@
11+# lcmessage.m4 serial 3 (gettext-0.11.3)
12+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
13+dnl This file is free software, distributed under the terms of the GNU
14+dnl General Public License. As a special exception to the GNU General
15+dnl Public License, this file may be distributed as part of a program
16+dnl that contains a configuration script generated by Autoconf, under
17+dnl the same distribution terms as the rest of that program.
18+dnl
19+dnl This file can can be used in projects which are not available under
20+dnl the GNU General Public License or the GNU Library General Public
21+dnl License but which still want to provide support for the GNU gettext
22+dnl functionality.
23+dnl Please note that the actual code of the GNU gettext library is covered
24+dnl by the GNU Library General Public License, and the rest of the GNU
25+dnl gettext package package is covered by the GNU General Public License.
26+dnl They are *not* in the public domain.
27+
28+dnl Authors:
29+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
30+
31+# Check whether LC_MESSAGES is available in <locale.h>.
32+
33+AC_DEFUN([AM_LC_MESSAGES],
34+[
35+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
36+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
37+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
38+ if test $am_cv_val_LC_MESSAGES = yes; then
39+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
40+ [Define if your <locale.h> file defines LC_MESSAGES.])
41+ fi
42+])
43Index: bison-2.4.2/m4/uintmax_t.m4
44===================================================================
45--- /dev/null
46+++ bison-2.4.2/m4/uintmax_t.m4
47@@ -0,0 +1,29 @@
48+# uintmax_t.m4 serial 6 (gettext-0.11)
49+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
50+dnl This file is free software, distributed under the terms of the GNU
51+dnl General Public License. As a special exception to the GNU General
52+dnl Public License, this file may be distributed as part of a program
53+dnl that contains a configuration script generated by Autoconf, under
54+dnl the same distribution terms as the rest of that program.
55+
56+dnl From Paul Eggert.
57+
58+AC_PREREQ(2.13)
59+
60+# Define uintmax_t to `unsigned long' or `unsigned long long'
61+# if <inttypes.h> does not exist.
62+
63+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
64+[
65+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
66+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
67+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
68+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
69+ test $ac_cv_type_unsigned_long_long = yes \
70+ && ac_type='unsigned long long' \
71+ || ac_type='unsigned long'
72+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
73+ [Define to unsigned long or unsigned long long
74+ if <inttypes.h> and <stdint.h> don't define.])
75+ fi
76+])
77Index: bison-2.4.2/m4/glibc21.m4
78===================================================================
79--- /dev/null
80+++ bison-2.4.2/m4/glibc21.m4
81@@ -0,0 +1,32 @@
82+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
83+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
84+dnl This file is free software, distributed under the terms of the GNU
85+dnl General Public License. As a special exception to the GNU General
86+dnl Public License, this file may be distributed as part of a program
87+dnl that contains a configuration script generated by Autoconf, under
88+dnl the same distribution terms as the rest of that program.
89+
90+# Test for the GNU C Library, version 2.1 or newer.
91+# From Bruno Haible.
92+
93+AC_DEFUN([jm_GLIBC21],
94+ [
95+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
96+ ac_cv_gnu_library_2_1,
97+ [AC_EGREP_CPP([Lucky GNU user],
98+ [
99+#include <features.h>
100+#ifdef __GNU_LIBRARY__
101+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
102+ Lucky GNU user
103+ #endif
104+#endif
105+ ],
106+ ac_cv_gnu_library_2_1=yes,
107+ ac_cv_gnu_library_2_1=no)
108+ ]
109+ )
110+ AC_SUBST(GLIBC21)
111+ GLIBC21="$ac_cv_gnu_library_2_1"
112+ ]
113+)
114Index: bison-2.4.2/m4/stdint_h.m4
115===================================================================
116--- /dev/null
117+++ bison-2.4.2/m4/stdint_h.m4
118@@ -0,0 +1,28 @@
119+# stdint_h.m4 serial 2 (gettext-0.11.4)
120+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
121+dnl This file is free software, distributed under the terms of the GNU
122+dnl General Public License. As a special exception to the GNU General
123+dnl Public License, this file may be distributed as part of a program
124+dnl that contains a configuration script generated by Autoconf, under
125+dnl the same distribution terms as the rest of that program.
126+
127+dnl From Paul Eggert.
128+
129+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
130+# doesn't clash with <sys/types.h>, and declares uintmax_t.
131+
132+AC_DEFUN([jm_AC_HEADER_STDINT_H],
133+[
134+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
135+ [AC_TRY_COMPILE(
136+ [#include <sys/types.h>
137+#include <stdint.h>],
138+ [uintmax_t i = (uintmax_t) -1;],
139+ jm_ac_cv_header_stdint_h=yes,
140+ jm_ac_cv_header_stdint_h=no)])
141+ if test $jm_ac_cv_header_stdint_h = yes; then
142+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
143+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
144+ and declares uintmax_t. ])
145+ fi
146+])
147Index: bison-2.4.2/m4/inttypes_h.m4
148===================================================================
149--- /dev/null
150+++ bison-2.4.2/m4/inttypes_h.m4
151@@ -0,0 +1,28 @@
152+# inttypes_h.m4 serial 4 (gettext-0.11.4)
153+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
154+dnl This file is free software, distributed under the terms of the GNU
155+dnl General Public License. As a special exception to the GNU General
156+dnl Public License, this file may be distributed as part of a program
157+dnl that contains a configuration script generated by Autoconf, under
158+dnl the same distribution terms as the rest of that program.
159+
160+dnl From Paul Eggert.
161+
162+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
163+# doesn't clash with <sys/types.h>, and declares uintmax_t.
164+
165+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
166+[
167+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
168+ [AC_TRY_COMPILE(
169+ [#include <sys/types.h>
170+#include <inttypes.h>],
171+ [uintmax_t i = (uintmax_t) -1;],
172+ jm_ac_cv_header_inttypes_h=yes,
173+ jm_ac_cv_header_inttypes_h=no)])
174+ if test $jm_ac_cv_header_inttypes_h = yes; then
175+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
176+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
177+ and declares uintmax_t. ])
178+ fi
179+])
180Index: bison-2.4.2/m4/ulonglong.m4
181===================================================================
182--- /dev/null
183+++ bison-2.4.2/m4/ulonglong.m4
184@@ -0,0 +1,23 @@
185+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
186+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
187+dnl This file is free software, distributed under the terms of the GNU
188+dnl General Public License. As a special exception to the GNU General
189+dnl Public License, this file may be distributed as part of a program
190+dnl that contains a configuration script generated by Autoconf, under
191+dnl the same distribution terms as the rest of that program.
192+
193+dnl From Paul Eggert.
194+
195+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
196+[
197+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
198+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
199+ [unsigned long long ullmax = (unsigned long long) -1;
200+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
201+ ac_cv_type_unsigned_long_long=yes,
202+ ac_cv_type_unsigned_long_long=no)])
203+ if test $ac_cv_type_unsigned_long_long = yes; then
204+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
205+ [Define if you have the unsigned long long type.])
206+ fi
207+])
208Index: bison-2.4.2/m4/codeset.m4
209===================================================================
210--- /dev/null
211+++ bison-2.4.2/m4/codeset.m4
212@@ -0,0 +1,23 @@
213+# codeset.m4 serial AM1 (gettext-0.10.40)
214+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
215+dnl This file is free software, distributed under the terms of the GNU
216+dnl General Public License. As a special exception to the GNU General
217+dnl Public License, this file may be distributed as part of a program
218+dnl that contains a configuration script generated by Autoconf, under
219+dnl the same distribution terms as the rest of that program.
220+
221+dnl From Bruno Haible.
222+
223+AC_DEFUN([AM_LANGINFO_CODESET],
224+[
225+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
226+ [AC_TRY_LINK([#include <langinfo.h>],
227+ [char* cs = nl_langinfo(CODESET);],
228+ am_cv_langinfo_codeset=yes,
229+ am_cv_langinfo_codeset=no)
230+ ])
231+ if test $am_cv_langinfo_codeset = yes; then
232+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
233+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
234+ fi
235+])
236Index: bison-2.4.2/m4/intdiv0.m4
237===================================================================
238--- /dev/null
239+++ bison-2.4.2/m4/intdiv0.m4
240@@ -0,0 +1,72 @@
241+# intdiv0.m4 serial 1 (gettext-0.11.3)
242+dnl Copyright (C) 2002 Free Software Foundation, Inc.
243+dnl This file is free software, distributed under the terms of the GNU
244+dnl General Public License. As a special exception to the GNU General
245+dnl Public License, this file may be distributed as part of a program
246+dnl that contains a configuration script generated by Autoconf, under
247+dnl the same distribution terms as the rest of that program.
248+
249+dnl From Bruno Haible.
250+
251+AC_DEFUN([gt_INTDIV0],
252+[
253+ AC_REQUIRE([AC_PROG_CC])dnl
254+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
255+
256+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
257+ gt_cv_int_divbyzero_sigfpe,
258+ [
259+ AC_TRY_RUN([
260+#include <stdlib.h>
261+#include <signal.h>
262+
263+static void
264+#ifdef __cplusplus
265+sigfpe_handler (int sig)
266+#else
267+sigfpe_handler (sig) int sig;
268+#endif
269+{
270+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
271+ exit (sig != SIGFPE);
272+}
273+
274+int x = 1;
275+int y = 0;
276+int z;
277+int nan;
278+
279+int main ()
280+{
281+ signal (SIGFPE, sigfpe_handler);
282+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
283+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
284+ signal (SIGTRAP, sigfpe_handler);
285+#endif
286+/* Linux/SPARC yields signal SIGILL. */
287+#if defined (__sparc__) && defined (__linux__)
288+ signal (SIGILL, sigfpe_handler);
289+#endif
290+
291+ z = x / y;
292+ nan = y / y;
293+ exit (1);
294+}
295+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
296+ [
297+ # Guess based on the CPU.
298+ case "$host_cpu" in
299+ alpha* | i[34567]86 | m68k | s390*)
300+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
301+ *)
302+ gt_cv_int_divbyzero_sigfpe="guessing no";;
303+ esac
304+ ])
305+ ])
306+ case "$gt_cv_int_divbyzero_sigfpe" in
307+ *yes) value=1;;
308+ *) value=0;;
309+ esac
310+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
311+ [Define if integer division by zero raises signal SIGFPE.])
312+])
313Index: bison-2.4.2/m4/glib.m4
314===================================================================
315--- /dev/null
316+++ bison-2.4.2/m4/glib.m4
317@@ -0,0 +1,196 @@
318+# Configure paths for GLIB
319+# Owen Taylor 97-11-3
320+
321+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
322+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
323+dnl gthread is specified in MODULES, pass to glib-config
324+dnl
325+AC_DEFUN(AM_PATH_GLIB,
326+[dnl
327+dnl Get the cflags and libraries from the glib-config script
328+dnl
329+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
330+ glib_config_prefix="$withval", glib_config_prefix="")
331+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
332+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
333+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
334+ , enable_glibtest=yes)
335+
336+ if test x$glib_config_exec_prefix != x ; then
337+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
338+ if test x${GLIB_CONFIG+set} != xset ; then
339+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
340+ fi
341+ fi
342+ if test x$glib_config_prefix != x ; then
343+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
344+ if test x${GLIB_CONFIG+set} != xset ; then
345+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
346+ fi
347+ fi
348+
349+ for module in . $4
350+ do
351+ case "$module" in
352+ gmodule)
353+ glib_config_args="$glib_config_args gmodule"
354+ ;;
355+ gthread)
356+ glib_config_args="$glib_config_args gthread"
357+ ;;
358+ esac
359+ done
360+
361+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
362+ min_glib_version=ifelse([$1], ,0.99.7,$1)
363+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
364+ no_glib=""
365+ if test "$GLIB_CONFIG" = "no" ; then
366+ no_glib=yes
367+ else
368+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
369+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
370+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
371+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
372+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
373+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
374+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
375+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
376+ if test "x$enable_glibtest" = "xyes" ; then
377+ ac_save_CFLAGS="$CFLAGS"
378+ ac_save_LIBS="$LIBS"
379+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
380+ LIBS="$GLIB_LIBS $LIBS"
381+dnl
382+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
383+dnl checks the results of glib-config to some extent
384+dnl
385+ rm -f conf.glibtest
386+ AC_TRY_RUN([
387+#include <glib.h>
388+#include <stdio.h>
389+#include <stdlib.h>
390+
391+int
392+main ()
393+{
394+ int major, minor, micro;
395+ char *tmp_version;
396+
397+ system ("touch conf.glibtest");
398+
399+ /* HP/UX 9 (%@#!) writes to sscanf strings */
400+ tmp_version = g_strdup("$min_glib_version");
401+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
402+ printf("%s, bad version string\n", "$min_glib_version");
403+ exit(1);
404+ }
405+
406+ if ((glib_major_version != $glib_config_major_version) ||
407+ (glib_minor_version != $glib_config_minor_version) ||
408+ (glib_micro_version != $glib_config_micro_version))
409+ {
410+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
411+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
412+ glib_major_version, glib_minor_version, glib_micro_version);
413+ printf ("*** was found! If glib-config was correct, then it is best\n");
414+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
415+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
416+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
417+ printf("*** required on your system.\n");
418+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
419+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
420+ printf("*** before re-running configure\n");
421+ }
422+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
423+ (glib_minor_version != GLIB_MINOR_VERSION) ||
424+ (glib_micro_version != GLIB_MICRO_VERSION))
425+ {
426+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
427+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
428+ printf("*** library (version %d.%d.%d)\n",
429+ glib_major_version, glib_minor_version, glib_micro_version);
430+ }
431+ else
432+ {
433+ if ((glib_major_version > major) ||
434+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
435+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
436+ {
437+ return 0;
438+ }
439+ else
440+ {
441+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
442+ glib_major_version, glib_minor_version, glib_micro_version);
443+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
444+ major, minor, micro);
445+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
446+ printf("***\n");
447+ printf("*** If you have already installed a sufficiently new version, this error\n");
448+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
449+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
450+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
451+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
452+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
453+ printf("*** so that the correct libraries are found at run-time))\n");
454+ }
455+ }
456+ return 1;
457+}
458+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
459+ CFLAGS="$ac_save_CFLAGS"
460+ LIBS="$ac_save_LIBS"
461+ fi
462+ fi
463+ if test "x$no_glib" = x ; then
464+ AC_MSG_RESULT(yes)
465+ ifelse([$2], , :, [$2])
466+ else
467+ AC_MSG_RESULT(no)
468+ if test "$GLIB_CONFIG" = "no" ; then
469+ echo "*** The glib-config script installed by GLIB could not be found"
470+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
471+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
472+ echo "*** full path to glib-config."
473+ else
474+ if test -f conf.glibtest ; then
475+ :
476+ else
477+ echo "*** Could not run GLIB test program, checking why..."
478+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
479+ LIBS="$LIBS $GLIB_LIBS"
480+ AC_TRY_LINK([
481+#include <glib.h>
482+#include <stdio.h>
483+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
484+ [ echo "*** The test program compiled, but did not run. This usually means"
485+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
486+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
487+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
488+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
489+ echo "*** is required on your system"
490+ echo "***"
491+ echo "*** If you have an old version installed, it is best to remove it, although"
492+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
493+ echo "***"
494+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
495+ echo "*** came with the system with the command"
496+ echo "***"
497+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
498+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
499+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
500+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
501+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
502+ CFLAGS="$ac_save_CFLAGS"
503+ LIBS="$ac_save_LIBS"
504+ fi
505+ fi
506+ GLIB_CFLAGS=""
507+ GLIB_LIBS=""
508+ ifelse([$3], , :, [$3])
509+ fi
510+ AC_SUBST(GLIB_CFLAGS)
511+ AC_SUBST(GLIB_LIBS)
512+ rm -f conf.glibtest
513+])
514Index: bison-2.4.2/m4/isc-posix.m4
515===================================================================
516--- /dev/null
517+++ bison-2.4.2/m4/isc-posix.m4
518@@ -0,0 +1,26 @@
519+# isc-posix.m4 serial 2 (gettext-0.11.2)
520+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
521+dnl This file is free software, distributed under the terms of the GNU
522+dnl General Public License. As a special exception to the GNU General
523+dnl Public License, this file may be distributed as part of a program
524+dnl that contains a configuration script generated by Autoconf, under
525+dnl the same distribution terms as the rest of that program.
526+
527+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
528+
529+# This test replaces the one in autoconf.
530+# Currently this macro should have the same name as the autoconf macro
531+# because gettext's gettext.m4 (distributed in the automake package)
532+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
533+# give these diagnostics:
534+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
535+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
536+
537+undefine([AC_ISC_POSIX])
538+
539+AC_DEFUN([AC_ISC_POSIX],
540+ [
541+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
542+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
543+ ]
544+)
diff --git a/meta/recipes-devtools/bison/bison_2.4.2.bb b/meta/recipes-devtools/bison/bison_2.4.2.bb
new file mode 100644
index 0000000000..1d053cf5e4
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison_2.4.2.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "GNU Project parser generator (yacc replacement)."
2HOMEPAGE = "http://www.gnu.org/software/bison/"
3LICENSE = "GPL"
4SECTION = "devel"
5PRIORITY = "optional"
6DEPENDS = "gettext bison-native"
7
8PR = "r0"
9
10BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
11 file://m4.patch;patch=1"
12
13SRC_URI = "${BASE_SRC_URI} \
14 file://fix_cross_manpage_building.patch "
15
16DEPENDS_virtclass-native = "gettext-native"
17SRC_URI_virtclass-native = "${BASE_SRC_URI}"
18
19inherit autotools
20acpaths = "-I ${S}/m4"
21
22BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native/glibc-conflict-rename.patch b/meta/recipes-devtools/cdrtools/cdrtools-native/glibc-conflict-rename.patch
new file mode 100644
index 0000000000..0b9b892aa2
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native/glibc-conflict-rename.patch
@@ -0,0 +1,228 @@
1Index: cdrtools-2.01/include/schily.h
2===================================================================
3--- cdrtools-2.01.orig/include/schily.h 2009-06-18 11:30:45.000000000 +0100
4+++ cdrtools-2.01/include/schily.h 2009-06-18 11:31:22.000000000 +0100
5@@ -108,7 +108,7 @@
6 /* 6th arg not const, fexecv forces av[ac] = NULL */
7 extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
8 char **));
9-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
10+extern int fexecve_schily __PR((const char *, FILE *, FILE *, FILE *,
11 char * const *, char * const *));
12 extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
13 extern int fspawnl __PR((FILE *, FILE *, FILE *,
14@@ -187,7 +187,7 @@
15 extern char *findbytes __PR((const void *, int, char));
16 extern int findline __PR((const char *, char, const char *,
17 int, char **, int));
18-extern int getline __PR((char *, int));
19+extern int getline_schily __PR((char *, int));
20 extern int getstr __PR((char *, int));
21 extern int breakline __PR((char *, char, char **, int));
22 extern int getallargs __PR((int *, char * const**, const char *, ...));
23Index: cdrtools-2.01/libscg/scsitransp.c
24===================================================================
25--- cdrtools-2.01.orig/libscg/scsitransp.c 2009-06-18 11:33:57.000000000 +0100
26+++ cdrtools-2.01/libscg/scsitransp.c 2009-06-18 11:34:24.000000000 +0100
27@@ -323,7 +323,7 @@
28
29 js_printf("%s", msg);
30 flush();
31- if (getline(okbuf, sizeof (okbuf)) == EOF)
32+ if (getline_schily(okbuf, sizeof (okbuf)) == EOF)
33 exit(EX_BAD);
34 if (streql(okbuf, "y") || streql(okbuf, "yes") ||
35 streql(okbuf, "Y") || streql(okbuf, "YES"))
36Index: cdrtools-2.01/libschily/fexec.c
37===================================================================
38--- cdrtools-2.01.orig/libschily/fexec.c 2009-06-18 11:29:29.000000000 +0100
39+++ cdrtools-2.01/libschily/fexec.c 2009-06-18 11:30:36.000000000 +0100
40@@ -159,7 +159,7 @@
41 } while (p != NULL);
42 va_end(args);
43
44- ret = fexecve(name, in, out, err, av, env);
45+ ret = fexecve_schily(name, in, out, err, av, env);
46 if (av != xav)
47 free(av);
48 return (ret);
49@@ -173,11 +173,11 @@
50 char *av[];
51 {
52 av[ac] = NULL; /* force list to be null terminated */
53- return (fexecve(name, in, out, err, av, environ));
54+ return (fexecve_schily(name, in, out, err, av, environ));
55 }
56
57 EXPORT int
58-fexecve(name, in, out, err, av, env)
59+fexecve_schily(name, in, out, err, av, env)
60 const char *name;
61 FILE *in, *out, *err;
62 char * const av[], * const env[];
63Index: cdrtools-2.01/libschily/stdio/fgetline.c
64===================================================================
65--- cdrtools-2.01.orig/libschily/stdio/fgetline.c 2009-06-18 11:28:14.000000000 +0100
66+++ cdrtools-2.01/libschily/stdio/fgetline.c 2009-06-18 11:28:55.000000000 +0100
67@@ -64,7 +64,7 @@
68 }
69
70 EXPORT int
71-getline(buf, len)
72+getline_schily(buf, len)
73 char *buf;
74 int len;
75 {
76Index: cdrtools-2.01/readcd/io.c
77===================================================================
78--- cdrtools-2.01.orig/readcd/io.c 2009-06-18 11:33:57.000000000 +0100
79+++ cdrtools-2.01/readcd/io.c 2009-06-18 11:34:38.000000000 +0100
80@@ -138,7 +138,7 @@
81 (*prt)(s, *lp, mini, maxi, dp);
82 flush();
83 line[0] = '\0';
84- if (getline(line, 80) == EOF)
85+ if (getline_schily(line, 80) == EOF)
86 exit(EX_BAD);
87
88 linep = skipwhite(line);
89@@ -205,7 +205,7 @@
90 printf("%r", form, args);
91 va_end(args);
92 flush();
93- if (getline(okbuf, sizeof(okbuf)) == EOF)
94+ if (getline_schily(okbuf, sizeof(okbuf)) == EOF)
95 exit(EX_BAD);
96 if (okbuf[0] == '?') {
97 printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
98Index: cdrtools-2.01/readcd/readcd.c
99===================================================================
100--- cdrtools-2.01.orig/readcd/readcd.c 2009-06-18 11:33:58.000000000 +0100
101+++ cdrtools-2.01/readcd/readcd.c 2009-06-18 11:35:03.000000000 +0100
102@@ -1651,7 +1651,7 @@
103 error("Copy from SCSI (%d,%d,%d) disk to file\n",
104 scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
105 error("Enter filename [%s]: ", defname); flush();
106- (void) getline(filename, sizeof (filename));
107+ (void) getline_schily(filename, sizeof (filename));
108 }
109
110 if (askrange) {
111@@ -1820,7 +1820,7 @@
112 error("Copy from file to SCSI (%d,%d,%d) disk\n",
113 scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
114 error("Enter filename [%s]: ", defname); flush();
115- (void) getline(filename, sizeof (filename));
116+ (void) getline_schily(filename, sizeof (filename));
117 error("Notice: reading from file always starts at file offset 0.\n");
118
119 getlong("Enter starting sector for copy:", &addr, 0L, end-1);
120Index: cdrtools-2.01/scgcheck/dmaresid.c
121===================================================================
122--- cdrtools-2.01.orig/scgcheck/dmaresid.c 2009-06-18 11:33:59.000000000 +0100
123+++ cdrtools-2.01/scgcheck/dmaresid.c 2009-06-18 11:35:43.000000000 +0100
124@@ -64,7 +64,7 @@
125 printf("Ready to start test for working DMA residual count? Enter <CR> to continue: ");
126 fprintf(logfile, "**********> Testing for working DMA residual count.\n");
127 flushit();
128- (void) getline(abuf, sizeof (abuf));
129+ (void) getline_schily(abuf, sizeof (abuf));
130
131 printf("**********> Testing for working DMA residual count == 0.\n");
132 fprintf(logfile, "**********> Testing for working DMA residual count == 0.\n");
133@@ -95,7 +95,7 @@
134 printf("Ready to start test for working DMA residual count == DMA count? Enter <CR> to continue: ");
135 fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n");
136 flushit();
137- (void) getline(abuf, sizeof (abuf));
138+ (void) getline_schily(abuf, sizeof (abuf));
139 passed = TRUE;
140 dmacnt = cnt;
141 ret = xtinquiry(scgp, 0, dmacnt);
142@@ -130,7 +130,7 @@
143 printf("Ready to start test for working DMA residual count == 1? Enter <CR> to continue: ");
144 fprintf(logfile, "**********> Testing for working DMA residual count == 1.\n");
145 flushit();
146- (void) getline(abuf, sizeof (abuf));
147+ (void) getline_schily(abuf, sizeof (abuf));
148 passed = TRUE;
149 dmacnt = cnt+1;
150 ret = xtinquiry(scgp, cnt, dmacnt);
151Index: cdrtools-2.01/scgcheck/scgcheck.c
152===================================================================
153--- cdrtools-2.01.orig/scgcheck/scgcheck.c 2009-06-18 11:33:59.000000000 +0100
154+++ cdrtools-2.01/scgcheck/scgcheck.c 2009-06-18 11:35:31.000000000 +0100
155@@ -189,7 +189,7 @@
156 break;
157 error("Enter SCSI device name for bus scanning [%s]: ", device);
158 flushit();
159- (void) getline(device, sizeof (device));
160+ (void) getline_schily(device, sizeof (device));
161 if (device[0] == '\0')
162 strcpy(device, "0,6,0");
163
164@@ -227,7 +227,7 @@
165 do {
166 error("Enter SCSI device name [%s]: ", device);
167 flushit();
168- (void) getline(device, sizeof (device));
169+ (void) getline_schily(device, sizeof (device));
170 if (device[0] == '\0')
171 strcpy(device, "0,6,0");
172
173@@ -256,7 +256,7 @@
174
175 printf("Ready to start test for second SCSI open? Enter <CR> to continue: ");
176 flushit();
177- (void) getline(abuf, sizeof (abuf));
178+ (void) getline_schily(abuf, sizeof (abuf));
179 #define CHECK_SECOND_OPEN
180 #ifdef CHECK_SECOND_OPEN
181 if (!streql(abuf, "n")) {
182@@ -344,7 +344,7 @@
183
184 printf("Ready to start test for succeeded command? Enter <CR> to continue: ");
185 flushit();
186- (void) getline(abuf, sizeof (abuf));
187+ (void) getline_schily(abuf, sizeof (abuf));
188 scgp->verbose++;
189 ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry));
190 scg_vsetup(scgp);
191Index: cdrtools-2.01/scgcheck/sense.c
192===================================================================
193--- cdrtools-2.01.orig/scgcheck/sense.c 2009-06-18 11:33:58.000000000 +0100
194+++ cdrtools-2.01/scgcheck/sense.c 2009-06-18 11:35:54.000000000 +0100
195@@ -66,7 +66,7 @@
196 printf("Ready to start test for failing command? Enter <CR> to continue: ");
197 fprintf(logfile, "**********> Testing for failed SCSI command.\n");
198 flushit();
199- (void)getline(abuf, sizeof(abuf));
200+ (void)getline_schily(abuf, sizeof(abuf));
201 /* scgp->verbose++;*/
202 fillbytes(buf, sizeof(struct scsi_inquiry), '\0');
203 fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0');
204@@ -82,13 +82,13 @@
205 printf("the test utility. Otherwise remove any medium from the drive.\n");
206 printf("Ready to start test for failing command? Enter <CR> to continue: ");
207 flushit();
208- (void)getline(abuf, sizeof(abuf));
209+ (void)getline_schily(abuf, sizeof(abuf));
210 ret = test_unit_ready(scgp);
211 if (ret >= 0 || !scg_cmd_err(scgp)) {
212 printf("Test Unit Ready did not fail.\n");
213 printf("Ready to eject tray? Enter <CR> to continue: ");
214 flushit();
215- (void)getline(abuf, sizeof(abuf));
216+ (void)getline_schily(abuf, sizeof(abuf));
217 scsi_unload(scgp, (cdr_t *)0);
218 ret = test_unit_ready(scgp);
219 }
220@@ -127,7 +127,7 @@
221 printf("Ready to start test for sense data count? Enter <CR> to continue: ");
222 fprintf(logfile, "**********> Testing for SCSI sense data count.\n");
223 flushit();
224- (void)getline(abuf, sizeof(abuf));
225+ (void)getline_schily(abuf, sizeof(abuf));
226 printf("Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
227 fprintf(logfile, "**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
228 ret = sensecount(scgp, CCS_SENSE_LEN);
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch b/meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch
new file mode 100644
index 0000000000..0318d31a6d
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch
@@ -0,0 +1,26 @@
1Index: cdrtools-2.01/DEFAULTS/Defaults.gnu
2===================================================================
3--- cdrtools-2.01.orig/DEFAULTS/Defaults.gnu 2008-09-22 12:42:12.000000000 +0100
4+++ cdrtools-2.01/DEFAULTS/Defaults.gnu 2008-09-22 12:42:27.000000000 +0100
5@@ -18,7 +18,7 @@
6 ###########################################################################
7 CWARNOPTS=
8
9-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
10+DEFINCDIRS= $(SRCROOT)/include
11 LDPATH= -L/opt/schily/lib
12 RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
13
14Index: cdrtools-2.01/DEFAULTS/Defaults.linux
15===================================================================
16--- cdrtools-2.01.orig/DEFAULTS/Defaults.linux 2008-09-22 12:42:08.000000000 +0100
17+++ cdrtools-2.01/DEFAULTS/Defaults.linux 2008-09-22 12:42:37.000000000 +0100
18@@ -18,7 +18,7 @@
19 ###########################################################################
20 CWARNOPTS=
21
22-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
23+DEFINCDIRS= $(SRCROOT)/include
24 LDPATH= -L/opt/schily/lib
25 RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
26
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb
new file mode 100644
index 0000000000..2421b23640
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb
@@ -0,0 +1,24 @@
1# cdrtools-native OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5LICENSE="GPL"
6DESCRIPTION="A set of tools for CD recording, including cdrecord"
7HOMEPAGE="http://cdrecord.berlios.de/old/private/cdrecord.html"
8PR = "r2"
9
10SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/cdrtools-${PV}.tar.bz2 \
11 file://no_usr_src.patch;patch=1 \
12 file://glibc-conflict-rename.patch;patch=1"
13
14inherit native
15
16STAGE_TEMP="${WORKDIR}/image-temp"
17
18do_install() {
19 install -d ${STAGE_TEMP}
20 make install INS_BASE=${STAGE_TEMP}
21
22 install -d ${D}${bindir}/
23 install ${STAGE_TEMP}/bin/* ${D}${bindir}/
24}
diff --git a/meta/recipes-devtools/chrpath/chrpath_0.13.bb b/meta/recipes-devtools/chrpath/chrpath_0.13.bb
new file mode 100644
index 0000000000..38ae2f797e
--- /dev/null
+++ b/meta/recipes-devtools/chrpath/chrpath_0.13.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "chrpath allows you to change the rpath (where the application \
2looks for libraries) in an application. It does not (yet) allow you to add an \
3rpath if there isn't one already."
4LICENSE = "GPL"
5PR = "r2"
6
7SRC_URI = "${DEBIAN_MIRROR}/main/c/chrpath/chrpath_${PV}.orig.tar.gz"
8
9inherit autotools
10
11S = "${WORKDIR}/chrpath-${PV}"
12
13# We don't have a staged chrpath-native for ensuring our binary is relocatable
14# so must use the one we've just built
15CHRPATH_BIN_virtclass-native = "${S}/chrpath"
16
17BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.2.bb
new file mode 100644
index 0000000000..6175728538
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.2.bb
@@ -0,0 +1,4 @@
1CMAKE_MAJOR_VERSION="2.8"
2require cmake.inc
3inherit native
4PR = "r0"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
new file mode 100644
index 0000000000..7743847129
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -0,0 +1,16 @@
1# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
2# Released under the MIT license (see packages/COPYING)
3
4DESCRIPTION = "A cross-platform, open-source make system"
5HOMEPAGE = "http://www.cmake.org/"
6BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
7SECTION = "console/utils"
8LICENSE = "BSD"
9
10SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz"
11
12inherit autotools
13
14do_configure () {
15 ./configure --prefix=${prefix} || die "./bootstrap failed"
16}
diff --git a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.15.bb b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.15.bb
new file mode 100644
index 0000000000..9603982ea6
--- /dev/null
+++ b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.15.bb
@@ -0,0 +1,12 @@
1SECTION = "console/utils"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
3DESCRIPTION = "command line utilities to work with *.desktop files"
4LICENSE = "GPL"
5
6DEPENDS = "glib-2.0-native"
7
8SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.gz"
9
10inherit autotools native
11
12S = "${WORKDIR}/desktop-file-utils-${PV}"
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.47.bb b/meta/recipes-devtools/diffstat/diffstat_1.47.bb
new file mode 100644
index 0000000000..53d9c1b4c8
--- /dev/null
+++ b/meta/recipes-devtools/diffstat/diffstat_1.47.bb
@@ -0,0 +1,26 @@
1DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
2the insertions, deletions, and modifications per-file. It is useful for \
3reviewing large, complex patch files."
4HOMEPAGE = "http://invisible-island.net/diffstat/"
5PRIORITY = "optional"
6SECTION = "devel"
7DEPENDS = "gettext"
8
9PR = "r0"
10
11# NOTE: The upstream maintainer has a single 'diffstat.tar.gz' for the
12# latest version of the package. It could easily change out from under us.
13# I'd rather rely on debian, and possible have the sources vanish, than risk
14# the sources _changing_ underneith us. -CL
15SRC_URI = "${DEBIAN_MIRROR}/main/d/diffstat/diffstat_${PV}.orig.tar.gz \
16 ${DEBIAN_MIRROR}/main/d/diffstat/diffstat_${PV}-1.diff.gz;apply=yes"
17S = "${WORKDIR}/diffstat-${PV}"
18
19inherit autotools
20
21do_configure () {
22 if [ ! -e acinclude.m4 ]; then
23 mv aclocal.m4 acinclude.m4
24 fi
25 autotools_do_configure
26}
diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
new file mode 100644
index 0000000000..cce2812b7c
--- /dev/null
+++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
@@ -0,0 +1,47 @@
1DESCRIPTION = "distcc is a parallel build system that distributes \
2compilation of C/C++/ObjC code across machines on a network."
3SECTION = "devel"
4LICENSE = "GPLv2"
5PR = "r5"
6
7DEPENDS = "avahi gtk+"
8RRECOMMENDS = "avahi-daemon"
9
10# Upstream change this patch periodically so store locally
11# http://0pointer.de/public/distcc-avahi.patch
12SRC_URI = "http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2 \
13 file://distcc-avahi.patch;patch=1 \
14 file://default \
15 file://distccmon-gnome.desktop \
16 file://distcc"
17
18inherit autotools pkgconfig update-rc.d
19
20INITSCRIPT_NAME = "distcc"
21
22EXTRA_OECONF = " --with-gtk "
23
24do_install_append() {
25 install -d ${D}${sysconfdir}/init.d/
26 install -d ${D}${sysconfdir}/default
27 install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
28 install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
29 install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
30}
31
32PACKAGES += "distcc-distmon-gnome"
33
34FILES_${PN} = " ${sysconfdir} \
35 ${bindir}/distcc \
36 ${bindir}/distccd \
37 ${bindir}/distccmon-text"
38FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
39 ${datadir}/distcc"
40
41pkg_postinst_${PN} () {
42 if test "x$D" != "x"; then
43 exit 1
44 else
45 grep distcc /etc/passwd || adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup distcc
46 fi
47}
diff --git a/meta/recipes-devtools/distcc/files/default b/meta/recipes-devtools/distcc/files/default
new file mode 100644
index 0000000000..95290f8488
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/default
@@ -0,0 +1,19 @@
1# Defaults for distcc initscript
2# sourced by /etc/init.d/distcc
3
4#
5# should distcc be started on boot?
6#
7# STARTDISTCC="true"
8
9STARTDISTCC="true"
10
11#
12# Which networks/hosts should be allowed to connect to the daemon?
13# You can list multiple hosts/networks separated by spaces.
14# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
15# Hosts are represented by a single IP Adress
16#
17# ALLOWEDNETS="127.0.0.1"
18
19ALLOWEDNETS="192.168.7.0/24"
diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
new file mode 100755
index 0000000000..513bc483ea
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -0,0 +1,106 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: distcc
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 1
8# Short-Description: simple distributed compiler client and server
9### END INIT INFO
10#
11# distccd Debian init.d script contributed by Jason Thomas. (Debian #161136)
12#
13# skeleton example file to build /etc/init.d/ scripts.
14# This file should be used to construct scripts for /etc/init.d.
15#
16# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
17# Modified for Debian GNU/Linux
18# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
19#
20# Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl
21#
22
23PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
24DAEMON=/usr/bin/distccd
25NAME=distcc
26DESC="Distributed Compiler Daemon"
27DAEMON_ARGS="--pid-file=/var/run/$NAME.pid --daemon"
28# please change those variables by overriding them in /etc/defaults/distcc
29ALLOWEDNETS="127.0.0.1"
30
31# Reads config file (will override defaults above)
32[ -r /etc/default/distcc ] && . /etc/default/distcc
33
34test -x $DAEMON || exit 0
35
36set -e
37
38# construct access list
39ALLOW=""
40for net in $ALLOWEDNETS
41do
42 ALLOW="$ALLOW --allow $net"
43done
44
45should_start() {
46 if [ "$STARTDISTCC" != "true" ] && [ "$STARTDISTCC" != "YES" ]; then
47 echo "STARTDISTCC is set to false in /etc/default/distcc"
48 echo "$DAEMON not starting"
49 exit 0
50 fi
51}
52
53case "$1" in
54 start)
55 should_start
56 echo -n "Starting $DESC: $NAME"
57 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
58 --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
59 {
60 code=$?
61 echo "$0: start failed with error code $code" >&2
62 exit $code
63 }
64 echo "."
65 ;;
66 stop)
67 echo -n "Stopping $DESC: $NAME"
68 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
69 --exec $DAEMON ||
70 {
71 code=$?
72 echo "$0: stop failed with error code $code" >&2
73 exit $code
74 }
75 echo "."
76 ;;
77 restart|force-reload)
78 #
79 # If the "reload" option is implemented, move the "force-reload"
80 # option to the "reload" entry above. If not, "force-reload" is
81 # just the same as "restart".
82 #
83 echo -n "Restarting $DESC: $NAME"
84 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
85 --exec $DAEMON
86 sleep 1
87 should_start
88 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
89 --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
90 {
91 code=$?
92 echo "$0: restart failed with error code $code" >&2
93 exit $code
94 }
95 echo "."
96 ;;
97 *)
98 N=/etc/init.d/$NAME
99 echo "Usage: $N {start|stop|restart|force-reload}" >&2
100 exit 1
101 ;;
102esac
103
104exit 0
105
106
diff --git a/meta/recipes-devtools/distcc/files/distcc-avahi.patch b/meta/recipes-devtools/distcc/files/distcc-avahi.patch
new file mode 100644
index 0000000000..1702ea7eab
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc-avahi.patch
@@ -0,0 +1,1736 @@
1--- upstream/aclocal.m4 1970-01-01 01:00:00.000000000 +0100
2+++ lennart/aclocal.m4 2005-11-18 04:19:18.000000000 +0100
3@@ -0,0 +1,171 @@
4+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
5+
6+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7+# 2005 Free Software Foundation, Inc.
8+# This file is free software; the Free Software Foundation
9+# gives unlimited permission to copy and/or distribute it,
10+# with or without modifications, as long as this notice is preserved.
11+
12+# This program is distributed in the hope that it will be useful,
13+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
14+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15+# PARTICULAR PURPOSE.
16+
17+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
18+#
19+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
20+#
21+# This program is free software; you can redistribute it and/or modify
22+# it under the terms of the GNU General Public License as published by
23+# the Free Software Foundation; either version 2 of the License, or
24+# (at your option) any later version.
25+#
26+# This program is distributed in the hope that it will be useful, but
27+# WITHOUT ANY WARRANTY; without even the implied warranty of
28+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29+# General Public License for more details.
30+#
31+# You should have received a copy of the GNU General Public License
32+# along with this program; if not, write to the Free Software
33+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34+#
35+# As a special exception to the GNU General Public License, if you
36+# distribute this file as part of a program that contains a
37+# configuration script generated by Autoconf, you may include it under
38+# the same distribution terms that you use for the rest of that program.
39+
40+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
41+# ----------------------------------
42+AC_DEFUN([PKG_PROG_PKG_CONFIG],
43+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
44+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
45+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
46+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
47+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
48+fi
49+if test -n "$PKG_CONFIG"; then
50+ _pkg_min_version=m4_default([$1], [0.9.0])
51+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
52+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
53+ AC_MSG_RESULT([yes])
54+ else
55+ AC_MSG_RESULT([no])
56+ PKG_CONFIG=""
57+ fi
58+
59+fi[]dnl
60+])# PKG_PROG_PKG_CONFIG
61+
62+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
63+#
64+# Check to see whether a particular set of modules exists. Similar
65+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
66+#
67+#
68+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
69+# this or PKG_CHECK_MODULES is called, or make sure to call
70+# PKG_CHECK_EXISTS manually
71+# --------------------------------------------------------------
72+AC_DEFUN([PKG_CHECK_EXISTS],
73+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
74+if test -n "$PKG_CONFIG" && \
75+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
76+ m4_ifval([$2], [$2], [:])
77+m4_ifvaln([$3], [else
78+ $3])dnl
79+fi])
80+
81+
82+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
83+# ---------------------------------------------
84+m4_define([_PKG_CONFIG],
85+[if test -n "$PKG_CONFIG"; then
86+ if test -n "$$1"; then
87+ pkg_cv_[]$1="$$1"
88+ else
89+ PKG_CHECK_EXISTS([$3],
90+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
91+ [pkg_failed=yes])
92+ fi
93+else
94+ pkg_failed=untried
95+fi[]dnl
96+])# _PKG_CONFIG
97+
98+# _PKG_SHORT_ERRORS_SUPPORTED
99+# -----------------------------
100+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
101+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
102+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
103+ _pkg_short_errors_supported=yes
104+else
105+ _pkg_short_errors_supported=no
106+fi[]dnl
107+])# _PKG_SHORT_ERRORS_SUPPORTED
108+
109+
110+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
111+# [ACTION-IF-NOT-FOUND])
112+#
113+#
114+# Note that if there is a possibility the first call to
115+# PKG_CHECK_MODULES might not happen, you should be sure to include an
116+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
117+#
118+#
119+# --------------------------------------------------------------
120+AC_DEFUN([PKG_CHECK_MODULES],
121+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
122+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
123+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
124+
125+pkg_failed=no
126+AC_MSG_CHECKING([for $1])
127+
128+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
129+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
130+
131+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
132+and $1[]_LIBS to avoid the need to call pkg-config.
133+See the pkg-config man page for more details.])
134+
135+if test $pkg_failed = yes; then
136+ _PKG_SHORT_ERRORS_SUPPORTED
137+ if test $_pkg_short_errors_supported = yes; then
138+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
139+ else
140+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
141+ fi
142+ # Put the nasty error message in config.log where it belongs
143+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
144+
145+ ifelse([$4], , [AC_MSG_ERROR(dnl
146+[Package requirements ($2) were not met:
147+
148+$$1_PKG_ERRORS
149+
150+Consider adjusting the PKG_CONFIG_PATH environment variable if you
151+installed software in a non-standard prefix.
152+
153+_PKG_TEXT
154+])],
155+ [$4])
156+elif test $pkg_failed = untried; then
157+ ifelse([$4], , [AC_MSG_FAILURE(dnl
158+[The pkg-config script could not be found or is too old. Make sure it
159+is in your PATH or set the PKG_CONFIG environment variable to the full
160+path to pkg-config.
161+
162+_PKG_TEXT
163+
164+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
165+ [$4])
166+else
167+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
168+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
169+ AC_MSG_RESULT([yes])
170+ ifelse([$3], , :, [$3])
171+fi[]dnl
172+])# PKG_CHECK_MODULES
173+
174+m4_include([acinclude.m4])
175--- upstream/Makefile.in 2005-11-18 16:15:40.000000000 +0100
176+++ lennart/Makefile.in 2005-11-18 01:14:43.000000000 +0100
177@@ -171,6 +171,7 @@
178 src/ssh.o src/state.o src/strip.o \
179 src/timefile.o src/traceenv.o \
180 src/where.o \
181+ @ZEROCONF_DISTCC_OBJS@ \
182 $(common_obj)
183
184 distccd_obj = src/access.o \
185@@ -178,6 +179,7 @@
186 src/ncpus.o \
187 src/prefork.o \
188 src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o \
189+ @ZEROCONF_DISTCCD_OBJS@ \
190 $(common_obj) @BUILD_POPT@
191
192 # Objects that need to be linked in to build monitors
193--- upstream/src/distcc.c 2005-11-18 16:15:40.000000000 +0100
194+++ lennart/src/distcc.c 2005-11-18 01:14:43.000000000 +0100
195@@ -83,6 +83,9 @@
196 " COMPILER defaults to \"cc\"\n"
197 " --help explain usage and exit\n"
198 " --version show version and exit\n"
199+" --show-hosts show host list and exit\n"
200+" -j calculate the concurrency level from\n"
201+" the host list.\n"
202 "\n"
203 "Environment variables:\n"
204 " See the manual page for a complete list.\n"
205@@ -135,7 +138,46 @@
206 signal(SIGHUP, &dcc_client_signalled);
207 }
208
209+static void dcc_free_hostlist(struct dcc_hostdef *list) {
210+ while (list) {
211+ struct dcc_hostdef *l = list;
212+ list = list->next;
213+ dcc_free_hostdef(l);
214+ }
215+}
216+
217+static void dcc_show_hosts(void) {
218+ struct dcc_hostdef *list, *l;
219+ int nhosts;
220+
221+ if (dcc_get_hostlist(&list, &nhosts) != 0) {
222+ rs_log_crit("Failed to get host list");
223+ return;
224+ }
225+
226+ for (l = list; l; l = l->next)
227+ printf("%s\n", l->hostdef_string);
228+
229+ dcc_free_hostlist(list);
230+}
231+
232+static void dcc_concurrency_level(void) {
233+ struct dcc_hostdef *list, *l;
234+ int nhosts;
235+ int nslots = 0;
236+
237+ if (dcc_get_hostlist(&list, &nhosts) != 0) {
238+ rs_log_crit("Failed to get host list");
239+ return;
240+ }
241+
242+ for (l = list; l; l = l->next)
243+ nslots += l->n_slots;
244
245+ dcc_free_hostlist(list);
246+
247+ printf("%i\n", nslots);
248+}
249
250 /**
251 * distcc client entry point.
252@@ -182,6 +224,18 @@
253 ret = 0;
254 goto out;
255 }
256+
257+ if (!strcmp(argv[1], "--show-hosts")) {
258+ dcc_show_hosts();
259+ ret = 0;
260+ goto out;
261+ }
262+
263+ if (!strcmp(argv[1], "-j")) {
264+ dcc_concurrency_level();
265+ ret = 0;
266+ goto out;
267+ }
268
269 dcc_find_compiler(argv, &compiler_args);
270 /* compiler_args is now respectively either "cc -c hello.c" or
271--- upstream/src/distcc.h 2005-11-18 16:15:40.000000000 +0100
272+++ lennart/src/distcc.h 2005-11-18 01:14:43.000000000 +0100
273@@ -112,7 +112,7 @@
274 int *ret_nhosts);
275 int dcc_parse_hosts(const char *where, const char *source_name,
276 struct dcc_hostdef **ret_list,
277- int *ret_nhosts);
278+ int *ret_nhosts, struct dcc_hostdef **ret_prev);
279
280 /* ncpu.c */
281 int dcc_ncpus(int *);
282@@ -226,6 +226,7 @@
283 int dcc_make_tmpnam(const char *, const char *suffix, char **);
284
285 int dcc_mkdir(const char *path) WARN_UNUSED;
286+int dcc_get_subdir(const char *name, char **path_ret) WARN_UNUSED;
287 int dcc_get_lock_dir(char **path_ret) WARN_UNUSED;
288 int dcc_get_state_dir(char **path_ret) WARN_UNUSED;
289 int dcc_get_top_dir(char **path_ret) WARN_UNUSED;
290--- upstream/src/dopt.c 2005-11-18 16:15:40.000000000 +0100
291+++ lennart/src/dopt.c 2005-11-18 04:14:26.000000000 +0100
292@@ -93,6 +93,10 @@
293 opt_log_level
294 };
295
296+#ifdef HAVE_AVAHI
297+/* Flag for enabling/disabling Zeroconf using Avahi */
298+int opt_zeroconf = 0;
299+#endif
300
301 const struct poptOption options[] = {
302 { "allow", 'a', POPT_ARG_STRING, 0, 'a', 0, 0 },
303@@ -115,6 +119,9 @@
304 { "verbose", 0, POPT_ARG_NONE, 0, 'v', 0, 0 },
305 { "version", 0, POPT_ARG_NONE, 0, 'V', 0, 0 },
306 { "wizard", 'W', POPT_ARG_NONE, 0, 'W', 0, 0 },
307+#ifdef HAVE_AVAHI
308+ { "zeroconf", 0, POPT_ARG_NONE, &opt_zeroconf, 0, 0, 0 },
309+#endif
310 { 0, 0, 0, 0, 0, 0, 0 }
311 };
312
313@@ -137,6 +144,9 @@
314 " -p, --port PORT TCP port to listen on\n"
315 " --listen ADDRESS IP address to listen on\n"
316 " -a, --allow IP[/BITS] client address access control\n"
317+#ifdef HAVE_AVAHI
318+" --zeroconf register via mDNS/DNS-SD\n"
319+#endif
320 " Debug and trace:\n"
321 " --log-level=LEVEL set detail level for log file\n"
322 " levels: critical, error, warning, notice, info, debug\n"
323--- upstream/src/dopt.h 2005-11-18 16:15:40.000000000 +0100
324+++ lennart/src/dopt.h 2005-11-18 02:27:45.000000000 +0100
325@@ -38,3 +38,7 @@
326 extern int opt_lifetime;
327 extern char *opt_listen_addr;
328 extern int opt_niceness;
329+
330+#ifdef HAVE_AVAHI
331+extern int opt_zeroconf;
332+#endif
333--- upstream/src/dparent.c 2005-11-18 16:15:40.000000000 +0100
334+++ lennart/src/dparent.c 2005-11-18 04:13:23.000000000 +0100
335@@ -70,6 +70,7 @@
336 #include "types.h"
337 #include "daemon.h"
338 #include "netutil.h"
339+#include "zeroconf.h"
340
341 static void dcc_nofork_parent(int listen_fd) NORETURN;
342 static void dcc_detach(void);
343@@ -94,6 +95,9 @@
344 int listen_fd;
345 int n_cpus;
346 int ret;
347+#ifdef HAVE_AVAHI
348+ void *avahi = NULL;
349+#endif
350
351 if ((ret = dcc_socket_listen(arg_port, &listen_fd, opt_listen_addr)) != 0)
352 return ret;
353@@ -131,6 +135,14 @@
354 /* Don't catch signals until we've detached or created a process group. */
355 dcc_daemon_catch_signals();
356
357+#ifdef HAVE_AVAHI
358+ /* Zeroconf registration */
359+ if (opt_zeroconf) {
360+ if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus)))
361+ return EXIT_CONNECT_FAILED;
362+ }
363+#endif
364+
365 /* This is called in the master daemon, whether that is detached or
366 * not. */
367 dcc_master_pid = getpid();
368@@ -138,10 +150,21 @@
369 if (opt_no_fork) {
370 dcc_log_daemon_started("non-forking daemon");
371 dcc_nofork_parent(listen_fd);
372+ ret = 0;
373 } else {
374 dcc_log_daemon_started("preforking daemon");
375- return dcc_preforking_parent(listen_fd);
376+ ret = dcc_preforking_parent(listen_fd);
377 }
378+
379+#ifdef HAVE_AVAHI
380+ /* Remove zeroconf registration */
381+ if (opt_zeroconf) {
382+ if (dcc_zeroconf_unregister(avahi) != 0)
383+ return EXIT_CONNECT_FAILED;
384+ }
385+#endif
386+
387+ return ret;
388 }
389
390
391--- upstream/src/help.c 2005-11-18 16:15:40.000000000 +0100
392+++ lennart/src/help.c 2005-11-18 02:27:45.000000000 +0100
393@@ -62,6 +62,9 @@
394 "distcc comes with ABSOLUTELY NO WARRANTY. distcc is free software, and\n"
395 "you may use, modify and redistribute it under the terms of the GNU \n"
396 "General Public License version 2 or later.\n"
397+#ifdef HAVE_AVAHI
398+"\nBuilt with Zeroconf support.\n"
399+#endif
400 "\n"
401 ,
402 prog, PACKAGE_VERSION, GNU_HOST, DISTCC_DEFAULT_PORT,
403--- upstream/src/hostfile.c 2005-11-18 16:15:40.000000000 +0100
404+++ lennart/src/hostfile.c 2005-11-18 01:14:43.000000000 +0100
405@@ -59,7 +59,7 @@
406 if ((ret = dcc_load_file_string(fname, &body)) != 0)
407 return ret;
408
409- ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts);
410+ ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts, NULL);
411
412 free(body);
413
414--- upstream/src/hosts.c 2005-11-18 16:15:40.000000000 +0100
415+++ lennart/src/hosts.c 2005-11-18 02:27:45.000000000 +0100
416@@ -96,6 +96,10 @@
417 #include "hosts.h"
418 #include "exitcode.h"
419 #include "snprintf.h"
420+#ifdef HAVE_AVAHI
421+#include "zeroconf.h"
422+#define ZEROCONF_MAGIC "+zeroconf"
423+#endif
424
425 const int dcc_default_port = DISTCC_DEFAULT_PORT;
426
427@@ -134,9 +138,12 @@
428 char *path, *top;
429 int ret;
430
431+ *ret_list = NULL;
432+ *ret_nhosts = 0;
433+
434 if ((env = getenv("DISTCC_HOSTS")) != NULL) {
435 rs_trace("read hosts from environment");
436- return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts);
437+ return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts, NULL);
438 }
439
440 /* $DISTCC_DIR or ~/.distcc */
441@@ -163,7 +170,7 @@
442 rs_trace("not reading %s: %s", path, strerror(errno));
443 free(path);
444 }
445-
446+
447 /* FIXME: Clearer message? */
448 rs_log_warning("no hostlist is set; can't distribute work");
449
450@@ -346,17 +353,19 @@
451 **/
452 int dcc_parse_hosts(const char *where, const char *source_name,
453 struct dcc_hostdef **ret_list,
454- int *ret_nhosts)
455+ int *ret_nhosts, struct dcc_hostdef **ret_prev)
456 {
457 int ret;
458- struct dcc_hostdef *prev, *curr;
459+ struct dcc_hostdef *curr, *_prev;
460+
461+ if (!ret_prev) {
462+ ret_prev = &_prev;
463+ _prev = NULL;
464+ }
465
466 /* TODO: Check for '/' in places where it might cause trouble with
467 * a lock file name. */
468
469- prev = NULL;
470- *ret_list = NULL;
471- *ret_nhosts = 0;
472 /* A simple, hardcoded scanner. Some of the GNU routines might be
473 * useful here, but they won't work on less capable systems.
474 *
475@@ -390,6 +399,15 @@
476 token_start = where;
477 token_len = strcspn(where, " #\t\n\f\r");
478
479+#ifdef HAVE_AVAHI
480+ if (token_len == sizeof(ZEROCONF_MAGIC)-1 &&
481+ !strncmp(token_start, ZEROCONF_MAGIC, (unsigned) token_len)) {
482+ if ((ret = dcc_zeroconf_add_hosts(ret_list, ret_nhosts, 4, ret_prev) != 0))
483+ return ret;
484+ goto skip;
485+ }
486+#endif
487+
488 /* Allocate new list item */
489 curr = calloc(1, sizeof(struct dcc_hostdef));
490 if (!curr) {
491@@ -404,8 +422,8 @@
492 }
493
494 /* Link into list */
495- if (prev) {
496- prev->next = curr;
497+ if (*ret_prev) {
498+ (*ret_prev)->next = curr;
499 } else {
500 *ret_list = curr; /* first */
501 }
502@@ -434,10 +452,15 @@
503 return ret;
504 }
505
506+ (*ret_nhosts)++;
507+ *ret_prev = curr;
508+
509+#ifdef HAVE_AVAHI
510+ skip:
511+#endif
512+
513 /* continue to next token if any */
514 where = token_start + token_len;
515- prev = curr;
516- (*ret_nhosts)++;
517 }
518
519 if (*ret_nhosts) {
520--- upstream/src/io.c 2005-11-18 16:15:40.000000000 +0100
521+++ lennart/src/io.c 2005-11-18 01:14:43.000000000 +0100
522@@ -163,7 +163,7 @@
523 return ret;
524 else
525 continue;
526- } else if (r == -1 && errno == EAGAIN) {
527+ } else if (r == -1 && errno == EINTR) {
528 continue;
529 } else if (r == -1) {
530 rs_log_error("failed to read: %s", strerror(errno));
531@@ -205,9 +205,6 @@
532 } else if (r == -1) {
533 rs_log_error("failed to write: %s", strerror(errno));
534 return EXIT_IO_ERROR;
535- } else if (r == 0) {
536- rs_log_error("unexpected eof on fd%d", fd);
537- return EXIT_TRUNCATED;
538 } else {
539 buf = &((char *) buf)[r];
540 len -= r;
541--- upstream/src/tempfile.c 2005-11-18 16:15:40.000000000 +0100
542+++ lennart/src/tempfile.c 2005-11-18 01:14:43.000000000 +0100
543@@ -161,7 +161,7 @@
544 * Return a subdirectory of the DISTCC_DIR of the given name, making
545 * sure that the directory exists.
546 **/
547-static int dcc_get_subdir(const char *name,
548+int dcc_get_subdir(const char *name,
549 char **dir_ret)
550 {
551 int ret;
552--- upstream/configure.ac 2005-11-18 16:15:40.000000000 +0100
553+++ lennart/configure.ac 2005-11-18 04:18:07.000000000 +0100
554@@ -388,6 +388,23 @@
555 AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [define if you have struct sockaddr_storage]),,
556 [#include <sys/socket.h>])
557
558+dnl check for avahi
559+PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6],
560+[AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available])
561+CFLAGS="$CFLAGS $AVAHI_CFLAGS"
562+LIBS="$LIBS $AVAHI_LIBS"
563+ZEROCONF_DISTCC_OBJS="src/zeroconf.o"
564+ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o"],
565+[ZEROCONF_DISTCC_OBJS=""
566+ZEROCONF_DISTCCD_OBJS=""])
567+AC_SUBST(ZEROCONF_DISTCC_OBJS)
568+AC_SUBST(ZEROCONF_DISTCCD_OBJS)
569+
570+ACX_PTHREAD
571+LIBS="$PTHREAD_LIBS $LIBS"
572+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
573+CC="$PTHREAD_CC"
574+
575 dnl ##### Output
576 AC_SUBST(docdir)
577 AC_SUBST(CFLAGS)
578--- upstream/acinclude.m4 1970-01-01 01:00:00.000000000 +0100
579+++ lennart/acinclude.m4 2005-11-18 04:17:08.000000000 +0100
580@@ -0,0 +1,235 @@
581+dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
582+dnl
583+dnl This macro figures out how to build C programs using POSIX threads.
584+dnl It sets the PTHREAD_LIBS output variable to the threads library and
585+dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
586+dnl C compiler flags that are needed. (The user can also force certain
587+dnl compiler flags/libs to be tested by setting these environment
588+dnl variables.)
589+dnl
590+dnl Also sets PTHREAD_CC to any special C compiler that is needed for
591+dnl multi-threaded programs (defaults to the value of CC otherwise).
592+dnl (This is necessary on AIX to use the special cc_r compiler alias.)
593+dnl
594+dnl NOTE: You are assumed to not only compile your program with these
595+dnl flags, but also link it with them as well. e.g. you should link
596+dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
597+dnl $LIBS
598+dnl
599+dnl If you are only building threads programs, you may wish to use
600+dnl these variables in your default LIBS, CFLAGS, and CC:
601+dnl
602+dnl LIBS="$PTHREAD_LIBS $LIBS"
603+dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
604+dnl CC="$PTHREAD_CC"
605+dnl
606+dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
607+dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
608+dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
609+dnl
610+dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
611+dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
612+dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
613+dnl default action will define HAVE_PTHREAD.
614+dnl
615+dnl Please let the authors know if this macro fails on any platform, or
616+dnl if you have any other suggestions or comments. This macro was based
617+dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
618+dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
619+dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
620+dnl We are also grateful for the helpful feedback of numerous users.
621+dnl
622+dnl @category InstalledPackages
623+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
624+dnl @version 2005-01-14
625+dnl @license GPLWithACException
626+
627+AC_DEFUN([ACX_PTHREAD], [
628+AC_REQUIRE([AC_CANONICAL_HOST])
629+AC_LANG_SAVE
630+AC_LANG_C
631+acx_pthread_ok=no
632+
633+# We used to check for pthread.h first, but this fails if pthread.h
634+# requires special compiler flags (e.g. on True64 or Sequent).
635+# It gets checked for in the link test anyway.
636+
637+# First of all, check if the user has set any of the PTHREAD_LIBS,
638+# etcetera environment variables, and if threads linking works using
639+# them:
640+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
641+ save_CFLAGS="$CFLAGS"
642+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
643+ save_LIBS="$LIBS"
644+ LIBS="$PTHREAD_LIBS $LIBS"
645+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
646+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
647+ AC_MSG_RESULT($acx_pthread_ok)
648+ if test x"$acx_pthread_ok" = xno; then
649+ PTHREAD_LIBS=""
650+ PTHREAD_CFLAGS=""
651+ fi
652+ LIBS="$save_LIBS"
653+ CFLAGS="$save_CFLAGS"
654+fi
655+
656+# We must check for the threads library under a number of different
657+# names; the ordering is very important because some systems
658+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
659+# libraries is broken (non-POSIX).
660+
661+# Create a list of thread flags to try. Items starting with a "-" are
662+# C compiler flags, and other items are library names, except for "none"
663+# which indicates that we try without any flags at all, and "pthread-config"
664+# which is a program returning the flags for the Pth emulation library.
665+
666+acx_pthread_flags="pthreads pthread none -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config"
667+
668+# The ordering *is* (sometimes) important. Some notes on the
669+# individual items follow:
670+
671+# pthreads: AIX (must check this before -lpthread)
672+# none: in case threads are in libc; should be tried before -Kthread and
673+# other compiler flags to prevent continual compiler warnings
674+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
675+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
676+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
677+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
678+# -pthreads: Solaris/gcc
679+# -mthreads: Mingw32/gcc, Lynx/gcc
680+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
681+# doesn't hurt to check since this sometimes defines pthreads too;
682+# also defines -D_REENTRANT)
683+# pthread: Linux, etcetera
684+# --thread-safe: KAI C++
685+# pthread-config: use pthread-config program (for GNU Pth library)
686+
687+case "${host_cpu}-${host_os}" in
688+ *solaris*)
689+
690+ # On Solaris (at least, for some versions), libc contains stubbed
691+ # (non-functional) versions of the pthreads routines, so link-based
692+ # tests will erroneously succeed. (We need to link with -pthread or
693+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
694+ # a function called by this macro, so we could check for that, but
695+ # who knows whether they'll stub that too in a future libc.) So,
696+ # we'll just look for -pthreads and -lpthread first:
697+
698+ acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
699+ ;;
700+esac
701+
702+if test x"$acx_pthread_ok" = xno; then
703+for flag in $acx_pthread_flags; do
704+
705+ case $flag in
706+ none)
707+ AC_MSG_CHECKING([whether pthreads work without any flags])
708+ ;;
709+
710+ -*)
711+ AC_MSG_CHECKING([whether pthreads work with $flag])
712+ PTHREAD_CFLAGS="$flag"
713+ ;;
714+
715+ pthread-config)
716+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
717+ if test x"$acx_pthread_config" = xno; then continue; fi
718+ PTHREAD_CFLAGS="`pthread-config --cflags`"
719+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
720+ ;;
721+
722+ *)
723+ AC_MSG_CHECKING([for the pthreads library -l$flag])
724+ PTHREAD_LIBS="-l$flag"
725+ ;;
726+ esac
727+
728+ save_LIBS="$LIBS"
729+ save_CFLAGS="$CFLAGS"
730+ LIBS="$PTHREAD_LIBS $LIBS"
731+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
732+
733+ # Check for various functions. We must include pthread.h,
734+ # since some functions may be macros. (On the Sequent, we
735+ # need a special flag -Kthread to make this header compile.)
736+ # We check for pthread_join because it is in -lpthread on IRIX
737+ # while pthread_create is in libc. We check for pthread_attr_init
738+ # due to DEC craziness with -lpthreads. We check for
739+ # pthread_cleanup_push because it is one of the few pthread
740+ # functions on Solaris that doesn't have a non-functional libc stub.
741+ # We try pthread_create on general principles.
742+ AC_TRY_LINK([#include <pthread.h>],
743+ [pthread_t th; pthread_join(th, 0);
744+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
745+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
746+ [acx_pthread_ok=yes])
747+
748+ LIBS="$save_LIBS"
749+ CFLAGS="$save_CFLAGS"
750+
751+ AC_MSG_RESULT($acx_pthread_ok)
752+ if test "x$acx_pthread_ok" = xyes; then
753+ break;
754+ fi
755+
756+ PTHREAD_LIBS=""
757+ PTHREAD_CFLAGS=""
758+done
759+fi
760+
761+# Various other checks:
762+if test "x$acx_pthread_ok" = xyes; then
763+ save_LIBS="$LIBS"
764+ LIBS="$PTHREAD_LIBS $LIBS"
765+ save_CFLAGS="$CFLAGS"
766+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
767+
768+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
769+ AC_MSG_CHECKING([for joinable pthread attribute])
770+ attr_name=unknown
771+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
772+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
773+ [attr_name=$attr; break])
774+ done
775+ AC_MSG_RESULT($attr_name)
776+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
777+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
778+ [Define to necessary symbol if this constant
779+ uses a non-standard name on your system.])
780+ fi
781+
782+ AC_MSG_CHECKING([if more special flags are required for pthreads])
783+ flag=no
784+ case "${host_cpu}-${host_os}" in
785+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
786+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
787+ esac
788+ AC_MSG_RESULT(${flag})
789+ if test "x$flag" != xno; then
790+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
791+ fi
792+
793+ LIBS="$save_LIBS"
794+ CFLAGS="$save_CFLAGS"
795+
796+ # More AIX lossage: must compile with cc_r
797+ AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
798+else
799+ PTHREAD_CC="$CC"
800+fi
801+
802+AC_SUBST(PTHREAD_LIBS)
803+AC_SUBST(PTHREAD_CFLAGS)
804+AC_SUBST(PTHREAD_CC)
805+
806+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
807+if test x"$acx_pthread_ok" = xyes; then
808+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
809+ :
810+else
811+ acx_pthread_ok=no
812+ $2
813+fi
814+AC_LANG_RESTORE
815+])dnl ACX_PTHREAD
816--- upstream/src/zeroconf.h 1970-01-01 01:00:00.000000000 +0100
817+++ lennart/src/zeroconf.h 2005-11-18 04:06:29.000000000 +0100
818@@ -0,0 +1,13 @@
819+#ifndef foozeroconfhfoo
820+#define foozeroconfhfoo
821+
822+#include <inttypes.h>
823+
824+int dcc_zeroconf_add_hosts(struct dcc_hostdef **re_list, int *ret_nhosts, int slots, struct dcc_hostdef **ret_prev);
825+
826+void * dcc_zeroconf_register(uint16_t port, int n_cpus);
827+int dcc_zeroconf_unregister(void*);
828+
829+#define DCC_DNS_SERVICE_TYPE "_distcc._tcp"
830+
831+#endif
832--- upstream/src/zeroconf.c 1970-01-01 01:00:00.000000000 +0100
833+++ lennart/src/zeroconf.c 2005-11-18 15:51:45.000000000 +0100
834@@ -0,0 +1,602 @@
835+/* -*- c-file-style: "java"; indent-tabs-mode: nil -*- */
836+
837+#include "config.h"
838+
839+#include <assert.h>
840+#include <stdio.h>
841+#include <sys/select.h>
842+#include <signal.h>
843+#include <sys/file.h>
844+#include <sys/time.h>
845+#include <time.h>
846+#include <sys/stat.h>
847+#include <string.h>
848+#include <errno.h>
849+#include <unistd.h>
850+#include <stdlib.h>
851+#include <limits.h>
852+
853+#include <avahi-common/domain.h>
854+#include <avahi-common/error.h>
855+#include <avahi-common/malloc.h>
856+#include <avahi-common/address.h>
857+#include <avahi-common/simple-watch.h>
858+#include <avahi-client/lookup.h>
859+
860+#include "distcc.h"
861+#include "hosts.h"
862+#include "zeroconf.h"
863+#include "trace.h"
864+#include "exitcode.h"
865+
866+/* How long shall the background daemon be idle before i terminates itself? */
867+#define MAX_IDLE_TIME 20
868+
869+/* Maxium size of host file to load */
870+#define MAX_FILE_SIZE (1024*100)
871+
872+/* General daemon data */
873+struct daemon_data {
874+ struct host *hosts;
875+ int fd;
876+ int n_slots;
877+
878+ AvahiClient *client;
879+ AvahiServiceBrowser *browser;
880+ AvahiSimplePoll *simple_poll;
881+};
882+
883+/* Zeroconf service wrapper */
884+struct host {
885+ struct daemon_data *daemon_data;
886+ struct host *next;
887+
888+ AvahiIfIndex interface;
889+ AvahiProtocol protocol;
890+ char *service;
891+ char *domain;
892+
893+ AvahiAddress address;
894+ uint16_t port;
895+ int n_cpus;
896+
897+ AvahiServiceResolver *resolver;
898+};
899+
900+/* A generic, system independant lock routine, similar to sys_lock,
901+ * but more powerful:
902+ * rw: if non-zero: r/w lock instead of r/o lock
903+ * enable: lock or unlock
904+ * block: block when locking */
905+static int generic_lock(int fd, int rw, int enable, int block) {
906+#if defined(F_SETLK)
907+ struct flock lockparam;
908+
909+ lockparam.l_type = enable ? (rw ? F_WRLCK : F_RDLCK) : F_UNLCK;
910+ lockparam.l_whence = SEEK_SET;
911+ lockparam.l_start = 0;
912+ lockparam.l_len = 0; /* whole file */
913+
914+ return fcntl(fd, block ? F_SETLKW : F_SETLK, &lockparam);
915+#elif defined(HAVE_FLOCK)
916+ return flock(fd, (enable ? (rw ? LOCK_EX : LOCK_SH) : LOCK_UN) | (block ? LOCK_NB : 0));
917+#elif defined(HAVE_LOCKF)
918+ return lockf(fd, (enable ? (block ? F_LOCK : F_TLOCK) : F_ULOCK));
919+#else
920+# error "No supported lock method. Please port this code."
921+#endif
922+}
923+
924+/* Return the number of seconds, when the specified file was last
925+ * read. If the atime of that file is < clip_time, use clip_time
926+ * instead */
927+static time_t fd_last_used(int fd, time_t clip_time) {
928+ struct stat st;
929+ time_t now, ft;
930+ assert(fd >= 0);
931+
932+ if (fstat(fd, &st) < 0) {
933+ rs_log_crit("fstat() failed: %s\n", strerror(errno));
934+ return -1;
935+ }
936+
937+ if ((now = time(NULL)) == (time_t) -1) {
938+ rs_log_crit("time() failed: %s\n", strerror(errno));
939+ return -1;
940+ }
941+
942+ ft = clip_time ? (st.st_atime < clip_time ? clip_time : st.st_atime) : st.st_atime;
943+ assert(ft <= now);
944+
945+ return now - ft;
946+}
947+
948+/* Write host data to host file */
949+static int write_hosts(struct daemon_data *d) {
950+ struct host *h;
951+ int r = 0;
952+ assert(d);
953+
954+ rs_log_info("writing zeroconf data.\n");
955+
956+ if (generic_lock(d->fd, 1, 1, 1) < 0) {
957+ rs_log_crit("lock failed: %s\n", strerror(errno));
958+ return -1;
959+ }
960+
961+ if (lseek(d->fd, 0, SEEK_SET) < 0) {
962+ rs_log_crit("lseek() failed: %s\n", strerror(errno));
963+ return -1;
964+ }
965+
966+ if (ftruncate(d->fd, 0) < 0) {
967+ rs_log_crit("ftruncate() failed: %s\n", strerror(errno));
968+ return -1;
969+ }
970+
971+ for (h = d->hosts; h; h = h->next) {
972+ char t[256], a[AVAHI_ADDRESS_STR_MAX];
973+
974+ if (h->resolver)
975+ /* Not yet fully resolved */
976+ continue;
977+
978+ snprintf(t, sizeof(t), "%s:%u/%i\n", avahi_address_snprint(a, sizeof(a), &h->address), h->port, d->n_slots * h->n_cpus);
979+
980+ if (dcc_writex(d->fd, t, strlen(t)) != 0) {
981+ rs_log_crit("write() failed: %s\n", strerror(errno));
982+ goto finish;
983+ }
984+ }
985+
986+ r = 0;
987+
988+finish:
989+
990+ generic_lock(d->fd, 1, 0, 1);
991+ return r;
992+
993+};
994+
995+/* Free host data */
996+static void free_host(struct host *h) {
997+ assert(h);
998+
999+ if (h->resolver)
1000+ avahi_service_resolver_free(h->resolver);
1001+
1002+ free(h->service);
1003+ free(h->domain);
1004+ free(h);
1005+}
1006+
1007+/* Remove a service from the host list */
1008+static void remove_service(struct daemon_data *d, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *domain) {
1009+ struct host *h, *p = NULL;
1010+ assert(d);
1011+
1012+ for (h = d->hosts; h; h = h->next) {
1013+ if (h->interface == interface &&
1014+ h->protocol == protocol &&
1015+ !strcmp(h->service, name) &&
1016+ avahi_domain_equal(h->domain, domain)) {
1017+
1018+ if (p)
1019+ p->next = h->next;
1020+ else
1021+ d->hosts = h->next;
1022+
1023+ free_host(h);
1024+
1025+ break;
1026+ } else
1027+ p = h;
1028+ }
1029+}
1030+
1031+/* Called when a resolve call completes */
1032+static void resolve_reply(AvahiServiceResolver *UNUSED(r),
1033+ AvahiIfIndex UNUSED(interface),
1034+ AvahiProtocol UNUSED(protocol),
1035+ AvahiResolverEvent event,
1036+ const char *name,
1037+ const char *UNUSED(type),
1038+ const char *UNUSED(domain),
1039+ const char *UNUSED(host_name),
1040+ const AvahiAddress *a,
1041+ uint16_t port,
1042+ AvahiStringList *txt,
1043+ AvahiLookupResultFlags UNUSED(flags),
1044+ void *userdata) {
1045+
1046+ struct host *h = userdata;
1047+
1048+ switch (event) {
1049+
1050+ case AVAHI_RESOLVER_FOUND: {
1051+ AvahiStringList *i;
1052+
1053+ /* Look for the number of CPUs in TXT RRs */
1054+ for (i = txt; i; i = i->next) {
1055+ char *key, *value;
1056+
1057+ if (avahi_string_list_get_pair(i, &key, &value, NULL) < 0)
1058+ continue;
1059+
1060+ if (!strcmp(key, "cpus"))
1061+ if ((h->n_cpus = atoi(value)) <= 0)
1062+ h->n_cpus = 1;
1063+
1064+ avahi_free(key);
1065+ avahi_free(value);
1066+ }
1067+
1068+ h->address = *a;
1069+ h->port = port;
1070+
1071+ avahi_service_resolver_free(h->resolver);
1072+ h->resolver = NULL;
1073+
1074+ /* Write modified hosts file */
1075+ write_hosts(h->daemon_data);
1076+
1077+ break;
1078+ }
1079+
1080+ case AVAHI_RESOLVER_FAILURE:
1081+
1082+ rs_log_warning("Failed to resolve service '%s': %s\n", name,
1083+ avahi_strerror(avahi_client_errno(h->daemon_data->client)));
1084+
1085+ free_host(h);
1086+ break;
1087+ }
1088+
1089+}
1090+
1091+/* Called whenever a new service is found or removed */
1092+static void browse_reply(AvahiServiceBrowser *UNUSED(b),
1093+ AvahiIfIndex interface,
1094+ AvahiProtocol protocol,
1095+ AvahiBrowserEvent event,
1096+ const char *name,
1097+ const char *type,
1098+ const char *domain,
1099+ AvahiLookupResultFlags UNUSED(flags),
1100+ void *userdata) {
1101+
1102+ struct daemon_data *d = userdata;
1103+ assert(d);
1104+
1105+ switch (event) {
1106+ case AVAHI_BROWSER_NEW: {
1107+ struct host *h;
1108+
1109+ h = malloc(sizeof(struct host));
1110+ assert(h);
1111+
1112+ rs_log_info("new service: %s\n", name);
1113+
1114+ if (!(h->resolver = avahi_service_resolver_new(d->client,
1115+ interface,
1116+ protocol,
1117+ name,
1118+ type,
1119+ domain,
1120+ AVAHI_PROTO_UNSPEC,
1121+ 0,
1122+ resolve_reply,
1123+ h))) {
1124+ rs_log_warning("Failed to create service resolver for '%s': %s\n", name,
1125+ avahi_strerror(avahi_client_errno(d->client)));
1126+
1127+ free(h);
1128+
1129+ } else {
1130+
1131+ /* Fill in missing data */
1132+ h->service = strdup(name);
1133+ assert(h->service);
1134+ h->domain = strdup(domain);
1135+ assert(h->domain);
1136+ h->daemon_data = d;
1137+ h->interface = interface;
1138+ h->protocol = protocol;
1139+ h->next = d->hosts;
1140+ h->n_cpus = 1;
1141+ d->hosts = h;
1142+ }
1143+
1144+ break;
1145+ }
1146+
1147+ case AVAHI_BROWSER_REMOVE:
1148+
1149+ rs_log_info("Removed service: %s\n", name);
1150+
1151+ remove_service(d, interface, protocol, name, domain);
1152+ write_hosts(d);
1153+ break;
1154+
1155+ case AVAHI_BROWSER_FAILURE:
1156+ rs_log_crit("Service Browser failure '%s': %s\n", name,
1157+ avahi_strerror(avahi_client_errno(d->client)));
1158+
1159+ avahi_simple_poll_quit(d->simple_poll);
1160+ break;
1161+
1162+ case AVAHI_BROWSER_CACHE_EXHAUSTED:
1163+ case AVAHI_BROWSER_ALL_FOR_NOW:
1164+ ;
1165+
1166+ }
1167+}
1168+
1169+static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
1170+ struct daemon_data *d = userdata;
1171+
1172+ switch (state) {
1173+
1174+ case AVAHI_CLIENT_FAILURE:
1175+ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
1176+ avahi_simple_poll_quit(d->simple_poll);
1177+ break;
1178+
1179+ case AVAHI_CLIENT_S_COLLISION:
1180+ case AVAHI_CLIENT_S_REGISTERING:
1181+ case AVAHI_CLIENT_S_RUNNING:
1182+ case AVAHI_CLIENT_CONNECTING:
1183+ ;
1184+ }
1185+}
1186+
1187+/* The main function of the background daemon */
1188+static void daemon_proc(const char *host_file, const char *lock_file, int n_slots) {
1189+ int ret = 1;
1190+ int lock_fd = -1;
1191+ struct daemon_data d;
1192+ time_t clip_time;
1193+ int error;
1194+
1195+ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
1196+
1197+ /* Prepare daemon data structure */
1198+ d.fd = -1;
1199+ d.hosts = NULL;
1200+ d.n_slots = n_slots;
1201+ d.simple_poll = NULL;
1202+ d.browser = NULL;
1203+ d.client = NULL;
1204+ clip_time = time(NULL);
1205+
1206+ rs_log_info("Zeroconf daemon running.\n");
1207+
1208+ /* Open daemon lock file and lock it */
1209+ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
1210+ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
1211+ goto finish;
1212+ }
1213+
1214+ if (generic_lock(lock_fd, 1, 1, 0) < 0) {
1215+ /* lock failed, there's probably already another daemon running */
1216+ goto finish;
1217+ }
1218+
1219+ /* Open host file */
1220+ if ((d.fd = open(host_file, O_RDWR|O_CREAT, 0666)) < 0) {
1221+ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
1222+ goto finish;
1223+ }
1224+
1225+ /* Clear host file */
1226+ write_hosts(&d);
1227+
1228+ if (!(d.simple_poll = avahi_simple_poll_new())) {
1229+ rs_log_crit("Failed to create simple poll object.\n");
1230+ goto finish;
1231+ }
1232+
1233+ if (!(d.client = avahi_client_new(avahi_simple_poll_get(d.simple_poll),
1234+ 0,
1235+ client_callback,
1236+ &d,
1237+ &error))) {
1238+ rs_log_crit("Failed to create Avahi client object: %s\n", avahi_strerror(error));
1239+ goto finish;
1240+ }
1241+
1242+ if (!(d.browser = avahi_service_browser_new(d.client,
1243+ AVAHI_IF_UNSPEC,
1244+ AVAHI_PROTO_UNSPEC,
1245+ DCC_DNS_SERVICE_TYPE,
1246+ NULL,
1247+ 0,
1248+ browse_reply,
1249+ &d))) {
1250+ rs_log_crit("Failed to create service browser object: %s\n", avahi_strerror(avahi_client_errno(d.client)));
1251+ goto finish;
1252+ }
1253+
1254+ /* Check whether the host file has been used recently */
1255+ while (fd_last_used(d.fd, clip_time) <= MAX_IDLE_TIME) {
1256+
1257+ /* Iterate the main loop for 500ms */
1258+ if (avahi_simple_poll_iterate(d.simple_poll, 500) != 0) {
1259+ rs_log_crit("Event loop exited abnormaly.\n");
1260+ goto finish;
1261+ }
1262+ }
1263+
1264+ /* Wer are idle */
1265+ rs_log_info("Zeroconf daemon unused.\n");
1266+
1267+ ret = 0;
1268+
1269+finish:
1270+
1271+ /* Cleanup */
1272+ if (lock_fd >= 0) {
1273+ generic_lock(lock_fd, 1, 0, 0);
1274+ close(lock_fd);
1275+ }
1276+
1277+ if (d.fd >= 0)
1278+ close(d.fd);
1279+
1280+ while (d.hosts) {
1281+ struct host *h = d.hosts;
1282+ d.hosts = d.hosts->next;
1283+ free_host(h);
1284+ }
1285+
1286+ if (d.client)
1287+ avahi_client_free(d.client);
1288+
1289+ if (d.simple_poll)
1290+ avahi_simple_poll_free(d.simple_poll);
1291+
1292+ rs_log_info("zeroconf daemon ended.\n");
1293+
1294+ _exit(ret);
1295+}
1296+
1297+/* Return path to the zeroconf directory in ~/.distcc */
1298+static int get_zeroconf_dir(char **dir_ret) {
1299+ static char *cached;
1300+ int ret;
1301+
1302+ if (cached) {
1303+ *dir_ret = cached;
1304+ return 0;
1305+ } else {
1306+ ret = dcc_get_subdir("zeroconf", dir_ret);
1307+ if (ret == 0)
1308+ cached = *dir_ret;
1309+ return ret;
1310+ }
1311+}
1312+
1313+/* Get the host list from zeroconf */
1314+int dcc_zeroconf_add_hosts(struct dcc_hostdef **ret_list, int *ret_nhosts, int n_slots, struct dcc_hostdef **ret_prev) {
1315+ char host_file[PATH_MAX], lock_file[PATH_MAX], *s = NULL;
1316+ int lock_fd = -1, host_fd = -1;
1317+ int fork_daemon = 0;
1318+ int r = -1;
1319+ char *dir;
1320+ struct stat st;
1321+
1322+ if (get_zeroconf_dir(&dir) != 0) {
1323+ rs_log_crit("failed to get zeroconf dir.\n");
1324+ goto finish;
1325+ }
1326+
1327+ snprintf(lock_file, sizeof(lock_file), "%s/lock", dir);
1328+ snprintf(host_file, sizeof(host_file), "%s/hosts", dir);
1329+
1330+ /* Open lock file */
1331+ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
1332+ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
1333+ goto finish;
1334+ }
1335+
1336+ /* Try to lock the lock file */
1337+ if (generic_lock(lock_fd, 1, 1, 0) >= 0) {
1338+ /* The lock succeeded => there's no daemon running yet! */
1339+ fork_daemon = 1;
1340+ generic_lock(lock_fd, 1, 0, 0);
1341+ }
1342+
1343+ close(lock_fd);
1344+
1345+ /* Shall we fork a new daemon? */
1346+ if (fork_daemon) {
1347+ pid_t pid;
1348+
1349+ rs_log_info("Spawning zeroconf daemon.\n");
1350+
1351+ if ((pid = fork()) == -1) {
1352+ rs_log_crit("fork() failed: %s\n", strerror(errno));
1353+ goto finish;
1354+ } else if (pid == 0) {
1355+ int fd;
1356+ /* Child */
1357+
1358+ /* Close file descriptors and replace them by /dev/null */
1359+ close(0);
1360+ close(1);
1361+ close(2);
1362+ fd = open("/dev/null", O_RDWR);
1363+ assert(fd == 0);
1364+ fd = dup(0);
1365+ assert(fd == 1);
1366+ fd = dup(0);
1367+ assert(fd == 2);
1368+
1369+#ifdef HAVE_SETSID
1370+ setsid();
1371+#endif
1372+
1373+ chdir("/");
1374+ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
1375+ daemon_proc(host_file, lock_file, n_slots);
1376+ }
1377+
1378+ /* Parent */
1379+
1380+ /* Wait some time for initial host gathering */
1381+ usleep(1000000); /* 1000 ms */
1382+
1383+ }
1384+
1385+ /* Open host list read-only */
1386+ if ((host_fd = open(host_file, O_RDONLY)) < 0) {
1387+ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
1388+ goto finish;
1389+ }
1390+
1391+ /* A read lock */
1392+ if (generic_lock(host_fd, 0, 1, 1) < 0) {
1393+ rs_log_crit("lock failed: %s\n", strerror(errno));
1394+ goto finish;
1395+ }
1396+
1397+ /* Get file size */
1398+ if (fstat(host_fd, &st) < 0) {
1399+ rs_log_crit("stat() failed: %s\n", strerror(errno));
1400+ goto finish;
1401+ }
1402+
1403+ if (st.st_size >= MAX_FILE_SIZE) {
1404+ rs_log_crit("file too large.\n");
1405+ goto finish;
1406+ }
1407+
1408+ /* read file data */
1409+ s = malloc((size_t) st.st_size+1);
1410+ assert(s);
1411+
1412+ if (dcc_readx(host_fd, s, (size_t) st.st_size) != 0) {
1413+ rs_log_crit("failed to read from file.\n");
1414+ goto finish;
1415+ }
1416+ s[st.st_size] = 0;
1417+
1418+ /* Parse host data */
1419+ if (dcc_parse_hosts(s, host_file, ret_list, ret_nhosts, ret_prev) != 0) {
1420+ rs_log_crit("failed to parse host file.\n");
1421+ goto finish;
1422+ }
1423+
1424+ r = 0;
1425+
1426+finish:
1427+ if (host_fd >= 0) {
1428+ generic_lock(host_fd, 0, 0, 1);
1429+ close(host_fd);
1430+ }
1431+
1432+ free(s);
1433+
1434+ return r;
1435+}
1436+
1437--- upstream/src/zeroconf-reg.c 1970-01-01 01:00:00.000000000 +0100
1438+++ lennart/src/zeroconf-reg.c 2005-11-18 15:34:00.000000000 +0100
1439@@ -0,0 +1,297 @@
1440+/* -*- c-file-style: "java"; indent-tabs-mode: nil -*- */
1441+
1442+#include "config.h"
1443+
1444+#include <assert.h>
1445+#include <stdio.h>
1446+#include <sys/select.h>
1447+#include <signal.h>
1448+#include <sys/file.h>
1449+#include <sys/time.h>
1450+#include <time.h>
1451+#include <sys/stat.h>
1452+#include <sys/poll.h>
1453+#include <pthread.h>
1454+#include <stdlib.h>
1455+#include <unistd.h>
1456+#include <string.h>
1457+#include <errno.h>
1458+
1459+#include <avahi-common/simple-watch.h>
1460+#include <avahi-common/error.h>
1461+#include <avahi-common/alternative.h>
1462+#include <avahi-common/malloc.h>
1463+#include <avahi-client/publish.h>
1464+
1465+#include "distcc.h"
1466+#include "zeroconf.h"
1467+#include "trace.h"
1468+#include "exitcode.h"
1469+
1470+struct context {
1471+ int thread_running;
1472+ pthread_t thread_id;
1473+ pthread_mutex_t mutex;
1474+ char *name;
1475+ AvahiSimplePoll *simple_poll;
1476+ AvahiClient *client;
1477+ AvahiEntryGroup *group;
1478+ uint16_t port;
1479+ int n_cpus;
1480+};
1481+
1482+static void publish_reply(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata);
1483+
1484+static void register_stuff(struct context *ctx) {
1485+
1486+ if (!ctx->group) {
1487+
1488+ if (!(ctx->group = avahi_entry_group_new(ctx->client, publish_reply, ctx))) {
1489+ rs_log_crit("Failed to create entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
1490+ goto fail;
1491+ }
1492+
1493+ }
1494+
1495+ if (avahi_entry_group_is_empty(ctx->group)) {
1496+ char cpus[32];
1497+
1498+ snprintf(cpus, sizeof(cpus), "cpus=%i", ctx->n_cpus);
1499+
1500+ /* Register our service */
1501+
1502+ if (avahi_entry_group_add_service(ctx->group,
1503+ AVAHI_IF_UNSPEC,
1504+ AVAHI_PROTO_UNSPEC,
1505+ 0,
1506+ ctx->name,
1507+ DCC_DNS_SERVICE_TYPE,
1508+ NULL,
1509+ NULL,
1510+ ctx->port,
1511+ "txtvers=1",
1512+ cpus,
1513+ "distcc="PACKAGE_VERSION,
1514+ "gnuhost="GNU_HOST,
1515+ NULL) < 0) {
1516+ rs_log_crit("Failed to add service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
1517+ goto fail;
1518+ }
1519+
1520+ if (avahi_entry_group_commit(ctx->group) < 0) {
1521+ rs_log_crit("Failed to commit entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
1522+ goto fail;
1523+ }
1524+ }
1525+
1526+ return;
1527+
1528+ fail:
1529+ avahi_simple_poll_quit(ctx->simple_poll);
1530+}
1531+
1532+/* Called when publishing of service data completes */
1533+static void publish_reply(AvahiEntryGroup *UNUSED(g), AvahiEntryGroupState state, void *userdata) {
1534+ struct context *ctx = userdata;
1535+
1536+ switch (state) {
1537+
1538+ case AVAHI_ENTRY_GROUP_COLLISION: {
1539+ char *n;
1540+
1541+ /* Pick a new name for our service */
1542+
1543+ n = avahi_alternative_service_name(ctx->name);
1544+ assert(n);
1545+
1546+ avahi_free(ctx->name);
1547+ ctx->name = n;
1548+
1549+ register_stuff(ctx);
1550+ break;
1551+ }
1552+
1553+ case AVAHI_ENTRY_GROUP_FAILURE:
1554+ rs_log_crit("Failed to register service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
1555+ avahi_simple_poll_quit(ctx->simple_poll);
1556+ break;
1557+
1558+ case AVAHI_ENTRY_GROUP_UNCOMMITED:
1559+ case AVAHI_ENTRY_GROUP_REGISTERING:
1560+ case AVAHI_ENTRY_GROUP_ESTABLISHED:
1561+ ;
1562+ }
1563+}
1564+
1565+static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
1566+ struct context *ctx = userdata;
1567+
1568+ ctx->client = client;
1569+
1570+ switch (state) {
1571+
1572+ case AVAHI_CLIENT_S_RUNNING:
1573+
1574+ register_stuff(ctx);
1575+ break;
1576+
1577+ case AVAHI_CLIENT_S_COLLISION:
1578+
1579+ if (ctx->group)
1580+ avahi_entry_group_reset(ctx->group);
1581+ break;
1582+
1583+ case AVAHI_CLIENT_FAILURE:
1584+
1585+ if (avahi_client_errno(client) == AVAHI_ERR_DISCONNECTED) {
1586+ int error;
1587+
1588+ avahi_client_free(ctx->client);
1589+ ctx->client = NULL;
1590+ ctx->group = NULL;
1591+
1592+ /* Reconnect to the server */
1593+
1594+ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll),
1595+ AVAHI_CLIENT_NO_FAIL,
1596+ client_callback,
1597+ ctx,
1598+ &error))) {
1599+
1600+ rs_log_crit("Failed to contact server: %s\n", avahi_strerror(error));
1601+ avahi_simple_poll_quit(ctx->simple_poll);
1602+ }
1603+
1604+ } else {
1605+ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
1606+ avahi_simple_poll_quit(ctx->simple_poll);
1607+ }
1608+
1609+ break;
1610+
1611+ case AVAHI_CLIENT_S_REGISTERING:
1612+ case AVAHI_CLIENT_CONNECTING:
1613+ ;
1614+ }
1615+}
1616+
1617+static void* thread(void *userdata) {
1618+ struct context *ctx = userdata;
1619+ sigset_t mask;
1620+ int r;
1621+
1622+ /* Make sure that signals are delivered to the main thread */
1623+ sigfillset(&mask);
1624+ pthread_sigmask(SIG_BLOCK, &mask, NULL);
1625+
1626+ pthread_mutex_lock(&ctx->mutex);
1627+
1628+ /* Run the main loop */
1629+ r = avahi_simple_poll_loop(ctx->simple_poll);
1630+
1631+ /* Cleanup some stuff */
1632+ if (ctx->client)
1633+ avahi_client_free(ctx->client);
1634+ ctx->client = NULL;
1635+ ctx->group = NULL;
1636+
1637+ pthread_mutex_unlock(&ctx->mutex);
1638+
1639+ return NULL;
1640+}
1641+
1642+static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
1643+ pthread_mutex_t *mutex = userdata;
1644+ int r;
1645+
1646+ /* Before entering poll() we unlock the mutex, so that
1647+ * avahi_simple_poll_quit() can succeed from another thread. */
1648+
1649+ pthread_mutex_unlock(mutex);
1650+ r = poll(ufds, nfds, timeout);
1651+ pthread_mutex_lock(mutex);
1652+
1653+ return r;
1654+}
1655+
1656+/* register a distcc service in DNS-SD/mDNS with the given port and number of CPUs */
1657+void* dcc_zeroconf_register(uint16_t port, int n_cpus) {
1658+ struct context *ctx = NULL;
1659+
1660+ char service[256] = "distcc@";
1661+ int error, ret;
1662+
1663+ ctx = malloc(sizeof(struct context));
1664+ assert(ctx);
1665+ ctx->client = NULL;
1666+ ctx->group = NULL;
1667+ ctx->simple_poll = NULL;
1668+ ctx->thread_running = 0;
1669+ ctx->port = port;
1670+ ctx->n_cpus = n_cpus;
1671+ pthread_mutex_init(&ctx->mutex, NULL);
1672+
1673+ /* Prepare service name */
1674+ gethostname(service+7, sizeof(service)-8);
1675+ service[sizeof(service)-1] = 0;
1676+
1677+ ctx->name = strdup(service);
1678+ assert(ctx->name);
1679+
1680+ if (!(ctx->simple_poll = avahi_simple_poll_new())) {
1681+ rs_log_crit("Failed to create event loop object.\n");
1682+ goto fail;
1683+ }
1684+
1685+ avahi_simple_poll_set_func(ctx->simple_poll, poll_func, &ctx->mutex);
1686+
1687+ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll), AVAHI_CLIENT_NO_FAIL, client_callback, ctx, &error))) {
1688+ rs_log_crit("Failed to create client object: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
1689+ goto fail;
1690+ }
1691+
1692+ /* Create the mDNS event handler */
1693+ if ((ret = pthread_create(&ctx->thread_id, NULL, thread, ctx)) < 0) {
1694+ rs_log_crit("Failed to create thread: %s\n", strerror(ret));
1695+ goto fail;
1696+ }
1697+
1698+ ctx->thread_running = 1;
1699+
1700+ return ctx;
1701+
1702+ fail:
1703+
1704+ if (ctx)
1705+ dcc_zeroconf_unregister(ctx);
1706+
1707+ return NULL;
1708+}
1709+
1710+/* Unregister this server from DNS-SD/mDNS */
1711+int dcc_zeroconf_unregister(void *u) {
1712+ struct context *ctx = u;
1713+
1714+ if (ctx->thread_running) {
1715+ pthread_mutex_lock(&ctx->mutex);
1716+ avahi_simple_poll_quit(ctx->simple_poll);
1717+ pthread_mutex_unlock(&ctx->mutex);
1718+
1719+ pthread_join(ctx->thread_id, NULL);
1720+ ctx->thread_running = 0;
1721+ }
1722+
1723+ avahi_free(ctx->name);
1724+
1725+ if (ctx->client)
1726+ avahi_client_free(ctx->client);
1727+
1728+ if (ctx->simple_poll)
1729+ avahi_simple_poll_free(ctx->simple_poll);
1730+
1731+ pthread_mutex_destroy(&ctx->mutex);
1732+
1733+ free(ctx);
1734+
1735+ return 0;
1736+}
diff --git a/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
new file mode 100644
index 0000000000..7b5d85ce4e
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
@@ -0,0 +1,12 @@
1[Desktop Entry]
2Version=0.9.4
3Exec=distccmon-gnome
4Name=distcc monitor
5GenericName=Distributed Compile Monitor
6Comment=Graphical view of distributed compile tasks
7Icon=distccmon-gnome-icon
8TryExec=distccmon-gnome
9Terminal=false
10Type=Application
11Categories=GNOME;Development;
12StartupNotify=true
diff --git a/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb b/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb
new file mode 100644
index 0000000000..4853c154ad
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb
@@ -0,0 +1,19 @@
1# dosfstools-native OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5require dosfstools_${PV}.bb
6
7PR="r5"
8
9SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
10 file://mkdosfs-bootcode.patch;patch=1 \
11 file://mkdosfs-dir.patch;patch=1 \
12 file://alignment_hack.patch;patch=1 \
13 file://dosfstools-2.10-kernel-2.6.patch;patch=1 \
14 file://msdos_fat12_undefined.patch;patch=1 \
15 file://dosfstools-msdos_fs-types.patch;patch=1 \
16 file://include-linux-types.patch;patch=1 \
17 file://2.6.20-syscall.patch;patch=1"
18
19inherit native
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
new file mode 100644
index 0000000000..7cf2662d27
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
@@ -0,0 +1,65 @@
1Index: dosfstools-2.10/dosfsck/io.c
2===================================================================
3--- dosfstools-2.10.orig/dosfsck/io.c 2007-06-07 16:15:52.000000000 +0200
4+++ dosfstools-2.10/dosfsck/io.c 2007-06-07 16:16:06.000000000 +0200
5@@ -42,28 +42,11 @@
6 /* Use the _llseek system call directly, because there (once?) was a bug in
7 * the glibc implementation of it. */
8 #include <linux/unistd.h>
9-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
10 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
11 static loff_t llseek( int fd, loff_t offset, int whence )
12 {
13 return lseek(fd, offset, whence);
14 }
15-#else
16-# ifndef __NR__llseek
17-# error _llseek system call not present
18-# endif
19-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
20- loff_t *, res, uint, wh );
21-
22-static loff_t llseek( int fd, loff_t offset, int whence )
23-{
24- loff_t actual;
25-
26- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
27- return (loff_t)-1;
28- return actual;
29-}
30-#endif
31
32
33 void fs_open(char *path,int rw)
34Index: dosfstools-2.10/mkdosfs/mkdosfs.c
35===================================================================
36--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2007-06-07 16:15:11.000000000 +0200
37+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2007-06-07 16:15:30.000000000 +0200
38@@ -116,27 +116,11 @@
39 /* Use the _llseek system call directly, because there (once?) was a bug in
40 * the glibc implementation of it. */
41 #include <linux/unistd.h>
42-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
43 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
44 static loff_t llseek( int fd, loff_t offset, int whence )
45 {
46 return lseek(fd, offset, whence);
47 }
48-#else
49-# ifndef __NR__llseek
50-# error _llseek system call not present
51-# endif
52-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
53- loff_t *, res, uint, wh );
54-static loff_t llseek( int fd, loff_t offset, int whence )
55-{
56- loff_t actual;
57-
58- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
59- return (loff_t)-1;
60- return actual;
61-}
62-#endif
63
64 #define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
65
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
new file mode 100644
index 0000000000..e15060a6fe
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
@@ -0,0 +1,34 @@
1The problem is that unsigned char[2] is
2guranteed to be 8Bit aligned on arm
3but unsigned short is/needs to be 16bit aligned
4the union { unsigned short; unsigned char[2] } trick
5didn't work so no we use the alpha hack.
6
7memcpy into an 16bit aligned
8
9 -zecke
10
11
12--- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
13+++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
14@@ -36,17 +36,15 @@
15 { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
16 };
17
18-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
19+
20 /* Unaligned fields must first be copied byte-wise */
21 #define GET_UNALIGNED_W(f) \
22 ({ \
23 unsigned short __v; \
24 memcpy( &__v, &f, sizeof(__v) ); \
25- CF_LE_W( *(unsigned short *)&f ); \
26+ CF_LE_W( *(unsigned short *)&__v ); \
27 })
28-#else
29-#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
30-#endif
31+
32
33
34 static char *get_media_descr( unsigned char media )
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch
new file mode 100644
index 0000000000..3ecafc324b
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch
@@ -0,0 +1,74 @@
1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
2Date: 2004-02-09
3Initial Package Version: 2.6
4Origin: Jim Gifford
5Upstream Status: Accepted
6Description: Fixes Compile Issues with the 2.6 Kernel
7
8--- dosfstools-2.10/dosfsck/common.h.orig 2004-02-09 18:37:59.056737458 +0000
9+++ dosfstools-2.10/dosfsck/common.h 2004-02-09 18:38:18.333392952 +0000
10@@ -2,6 +2,13 @@
11
12 /* Written 1993 by Werner Almesberger */
13
14+#include <linux/version.h>
15+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
16+ #define __KERNEL__
17+ #include <asm/types.h>
18+ #undef __KERNEL__
19+ #define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
20+#endif
21
22 #ifndef _COMMON_H
23 #define _COMMON_H
24--- dosfstools-2.10/dosfsck/file.c.orig 2004-02-09 18:40:52.016728845 +0000
25+++ dosfstools-2.10/dosfsck/file.c 2004-02-09 18:40:03.665117865 +0000
26@@ -15,6 +15,14 @@
27 #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
28 #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
29 #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
30+
31+#include <linux/version.h>
32+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
33+ #define __KERNEL__
34+ #include <asm/types.h>
35+ #undef __KERNEL__
36+#endif
37+
38 #include <linux/msdos_fs.h>
39
40 #include "common.h"
41--- dosfstools-2.10/dosfsck/dosfsck.h.orig 2004-02-09 18:57:11.022870974 +0000
42+++ dosfstools-2.10/dosfsck/dosfsck.h 2004-02-09 18:56:20.628614393 +0000
43@@ -13,6 +13,15 @@
44 #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
45 #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
46 #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
47+
48+#include <linux/version.h>
49+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
50+ #define __KERNEL__
51+ #include <asm/types.h>
52+ #include <asm/byteorder.h>
53+ #undef __KERNEL__
54+#endif
55+
56 #include <linux/msdos_fs.h>
57
58 /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
59--- dosfstools-2.10/mkdosfs/mkdosfs.c.orig 2004-02-09 18:31:41.997157413 +0000
60+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-02-09 18:34:07.311945252 +0000
61@@ -66,6 +66,13 @@
62 #include <time.h>
63 #include <errno.h>
64
65+#include <linux/version.h>
66+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
67+ #define __KERNEL__
68+ #include <asm/types.h>
69+ #undef __KERNEL__
70+#endif
71+
72 #if __BYTE_ORDER == __BIG_ENDIAN
73
74 #include <asm/byteorder.h>
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch
new file mode 100644
index 0000000000..e70a3ead2a
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch
@@ -0,0 +1,30 @@
1--- dosfstools-2.10/dosfsck/dosfsck.h.org 2006-02-21 08:36:14.000000000 -0700
2+++ dosfstools-2.10/dosfsck/dosfsck.h 2006-02-21 08:40:12.000000000 -0700
3@@ -22,6 +22,14 @@
4 #undef __KERNEL__
5 #endif
6
7+#ifndef __s8
8+#include <asm/types.h>
9+#endif
10+
11+#ifndef __ASM_STUB_BYTEORDER_H__
12+#include <asm/byteorder.h>
13+#endif
14+
15 #include <linux/msdos_fs.h>
16
17 /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
18--- dosfstools-2.10/dosfsck/file.c.org 2006-02-21 08:37:36.000000000 -0700
19+++ dosfstools-2.10/dosfsck/file.c 2006-02-21 08:37:47.000000000 -0700
20@@ -23,6 +23,10 @@
21 #undef __KERNEL__
22 #endif
23
24+#ifndef __s8
25+#include <asm/types.h>
26+#endif
27+
28 #include <linux/msdos_fs.h>
29
30 #include "common.h"
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch
new file mode 100644
index 0000000000..4bbd4e76e4
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch
@@ -0,0 +1,17 @@
1mkdsofs is using types of the style __u8, which it gets with some
2versions of libc headers via linux/hdreg.h including asm/types.h.
3Newer version of fedora (at least) have a hdreg.h whichdoes not
4include asm/types.h. To work around this patch mkdosfs.c to explicity
5include linux/types.h which will in turn pull in asm/types.h which
6defines these variables.
7
8--- dosfstools-2.10/mkdosfs/mkdosfs.c~ 2006-07-12 18:46:21.000000000 +1000
9+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2006-07-12 18:46:21.000000000 +1000
10@@ -60,6 +60,7 @@
11 #include "../version.h"
12
13 #include <fcntl.h>
14+#include <linux/types.h>
15 #include <linux/hdreg.h>
16 #include <linux/fs.h>
17 #include <linux/fd.h>
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
new file mode 100644
index 0000000000..52be86284b
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
@@ -0,0 +1,240 @@
1diff -urN dosfstools-2.10.orig/mkdosfs/ChangeLog dosfstools-2.10/mkdosfs/ChangeLog
2--- dosfstools-2.10.orig/mkdosfs/ChangeLog 1997-06-18 03:09:38.000000000 -0700
3+++ dosfstools-2.10/mkdosfs/ChangeLog 2004-08-02 20:57:57.734939816 -0700
4@@ -1,3 +1,14 @@
5+19th June 2003 Sam Bingner (sam@bingner.com)
6+
7+ Added option to read in bootcode from a file so that if you have
8+ for example Windows 2000 boot code, you can have it write that
9+ as the bootcode. This is a dump of the behinning of a partition
10+ generally 512 bytes, but can be up to reserved sectors*512 bytes.
11+ Also writes 0x80 as the BIOS drive number if we are formatting a
12+ hard drive, and sets the number of hidden sectors to be the
13+ number of sectors in one track. These were required so that DOS
14+ could boot using the bootcode.
15+
16 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com)
17
18 Better algorithm to select cluster sizes on large filesystems.
19diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.8 dosfstools-2.10/mkdosfs/mkdosfs.8
20--- dosfstools-2.10.orig/mkdosfs/mkdosfs.8 2003-05-15 11:28:28.000000000 -0700
21+++ dosfstools-2.10/mkdosfs/mkdosfs.8 2004-08-02 20:57:57.735939664 -0700
22@@ -40,6 +40,10 @@
23 .I message-file
24 ]
25 [
26+.B \-B
27+.I bootcode-file
28+]
29+[
30 .B \-n
31 .I volume-name
32 ]
33@@ -155,6 +159,18 @@
34 carriage return-line feed combinations, and tabs have been expanded.
35 If the filename is a hyphen (-), the text is taken from standard input.
36 .TP
37+.BI \-B " bootcode-file"
38+Uses boot machine code from file "file". On any thing other than FAT32,
39+this only writes the first 3 bytes, and 480 bytes from offset 3Eh. On
40+FAT32, this writes the first 3 bytes, 420 bytes from offset 5Ah to both
41+primary and backup boot sectors. Also writes all other reserved sectors
42+excluding the sectors following boot sectors (usually sector 2 and 7).
43+Does not require that the input file be as large as reserved_sectors*512.
44+To make a FAT32 partition bootable, you will need at least the first
45+13 sectors (6656 bytes). You can also specify a partition as the argument
46+to clone the boot code from that partition.
47+i.e mkdosfs -B /dev/sda1 /dev/sda1
48+.TP
49 .BI \-n " volume-name"
50 Sets the volume name (label) of the filesystem. The volume name can
51 be up to 11 characters long. The default is no label.
52@@ -188,8 +204,9 @@
53 simply will not support it ;)
54 .SH AUTHOR
55 Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
56-<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
57-<Roman.Hodek@informatik.uni-erlangen.de> for Debian/GNU Linux.
58+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and
59+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
60+for Debian/GNU Linux.
61 .SH ACKNOWLEDGEMENTS
62 .B mkdosfs
63 is based on code from
64diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c
65--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2003-06-14 13:07:08.000000000 -0700
66+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:57:57.736939512 -0700
67@@ -24,6 +24,12 @@
68 - New options -A, -S, -C
69 - Support for filesystems > 2GB
70 - FAT32 support
71+
72+ Fixes/additions June 2003 by Sam Bingner
73+ <sam@bingner.com>:
74+ - Add -B option to read in bootcode from a file
75+ - Write BIOS drive number so that FS can properly boot
76+ - Set number of hidden sectors before boot code to be one track
77
78 Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk)
79
80@@ -167,6 +173,8 @@
81 #define FAT_BAD 0x0ffffff7
82
83 #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */
84+#define HD_DRIVE_NUMBER 0x80 /* Boot off first hard drive */
85+#define FD_DRIVE_NUMBER 0x00 /* Boot off first floppy drive */
86 #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */
87 #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */
88 #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */
89@@ -188,6 +196,8 @@
90 #define BOOTCODE_SIZE 448
91 #define BOOTCODE_FAT32_SIZE 420
92
93+#define MAX_RESERVED 0xFFFF
94+
95 /* __attribute__ ((packed)) is used on all structures to make gcc ignore any
96 * alignments */
97
98@@ -215,7 +225,7 @@
99 __u16 fat_length; /* sectors/FAT */
100 __u16 secs_track; /* sectors per track */
101 __u16 heads; /* number of heads */
102- __u32 hidden; /* hidden sectors (unused) */
103+ __u32 hidden; /* hidden sectors (one track) */
104 __u32 total_sect; /* number of sectors (if sectors == 0) */
105 union {
106 struct {
107@@ -298,6 +308,8 @@
108
109 /* Global variables - the root of all evil :-) - see these and weep! */
110
111+static char *template_boot_code; /* Variable to store a full template boot sector in */
112+static int use_template = 0;
113 static char *program_name = "mkdosfs"; /* Name of the program */
114 static char *device_name = NULL; /* Name of the device on which to create the filesystem */
115 static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */
116@@ -842,6 +854,12 @@
117 vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16);
118 vi->volume_id[3] = (unsigned char) (volume_id >> 24);
119 }
120+ if (bs.media == 0xf8) {
121+ vi->drive_number = HD_DRIVE_NUMBER; /* Set bios drive number to 80h */
122+ }
123+ else {
124+ vi->drive_number = FD_DRIVE_NUMBER; /* Set bios drive number to 00h */
125+ }
126
127 if (!atari_format) {
128 memcpy(vi->volume_label, volume_name, 11);
129@@ -886,7 +904,7 @@
130 printf( "Using %d reserved sectors\n", reserved_sectors );
131 bs.fats = (char) nr_fats;
132 if (!atari_format || size_fat == 32)
133- bs.hidden = CT_LE_L(0);
134+ bs.hidden = bs.secs_track;
135 else
136 /* In Atari format, hidden is a 16 bit field */
137 memset( &bs.hidden, 0, 2 );
138@@ -1358,6 +1376,32 @@
139 * dir area on FAT12/16, and the first cluster on FAT32. */
140 writebuf( (char *) root_dir, size_root_dir, "root directory" );
141
142+ if (use_template == 1) {
143+ /* dupe template into reserved sectors */
144+ seekto( 0, "Start of partition" );
145+ if (size_fat == 32) {
146+ writebuf( template_boot_code, 3, "backup jmpBoot" );
147+ seekto( 0x5a, "sector 1 boot area" );
148+ writebuf( template_boot_code+0x5a, 420, "sector 1 boot area" );
149+ seekto( 512*2, "third sector" );
150+ if (backup_boot != 0) {
151+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" );
152+ seekto( backup_boot*sector_size, "backup boot sector" );
153+ writebuf( template_boot_code, 3, "backup jmpBoot" );
154+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" );
155+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" );
156+ seekto( (backup_boot+2)*sector_size, "sector following backup code" );
157+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" );
158+ } else {
159+ writebuf( template_boot_code+512*2, (reserved_sectors-2)*512, "remaining data" );
160+ }
161+ } else {
162+ writebuf( template_boot_code, 3, "jmpBoot" );
163+ seekto( 0x3e, "sector 1 boot area" );
164+ writebuf( template_boot_code+0x3e, 448, "boot code" );
165+ }
166+ }
167+
168 if (info_sector) free( info_sector );
169 free (root_dir); /* Free up the root directory space from setup_tables */
170 free (fat); /* Free up the fat table space reserved during setup_tables */
171@@ -1371,7 +1415,7 @@
172 {
173 fatal_error("\
174 Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\
175- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\
176+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
177 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
178 [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
179 /dev/name [blocks]\n");
180@@ -1433,7 +1477,7 @@
181 printf ("%s " VERSION " (" VERSION_DATE ")\n",
182 program_name);
183
184- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v")) != EOF)
185+ while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
186 /* Scan the command line for options */
187 switch (c)
188 {
189@@ -1494,6 +1538,51 @@
190 listfile = optarg;
191 break;
192
193+ case 'B': /* B : read in bootcode */
194+ if ( strcmp(optarg, "-") )
195+ {
196+ msgfile = fopen(optarg, "r");
197+ if ( !msgfile )
198+ perror(optarg);
199+ }
200+ else
201+ msgfile = stdin;
202+
203+ if ( msgfile )
204+ {
205+ if (!(template_boot_code = malloc( MAX_RESERVED )))
206+ die( "Out of memory" );
207+ /* The template boot sector including reserved must not be > 65535 */
208+ use_template = 1;
209+ i = 0;
210+ do
211+ {
212+ ch = getc(msgfile);
213+ switch (ch)
214+ {
215+ case EOF:
216+ break;
217+
218+ default:
219+ template_boot_code[i++] = ch; /* Store character */
220+ break;
221+ }
222+ }
223+ while ( ch != EOF && i < MAX_RESERVED );
224+ ch = getc(msgfile); /* find out if we're at EOF */
225+
226+ /* Fill up with zeros */
227+ while( i < MAX_RESERVED )
228+ template_boot_code[i++] = '\0';
229+
230+ if ( ch != EOF )
231+ printf ("Warning: template too long; truncated after %d bytes\n", i);
232+
233+ if ( msgfile != stdin )
234+ fclose(msgfile);
235+ }
236+ break;
237+
238 case 'm': /* m : Set boot message */
239 if ( strcmp(optarg, "-") )
240 {
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
new file mode 100644
index 0000000000..8f753b052c
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
@@ -0,0 +1,634 @@
1diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c
2--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2004-08-02 20:48:45.000000000 -0700
3+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:49:44.296953792 -0700
4@@ -18,6 +18,10 @@
5 as a rule), and not the block. For example the boot block does not
6 occupy a full cluster.
7
8+ June 2004 - Jordan Crouse (info.linux@amd.com)
9+ Added -d <directory> support to populate the image
10+ Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved
11+
12 Fixes/additions May 1998 by Roman Hodek
13 <Roman.Hodek@informatik.uni-erlangen.de>:
14 - Atari format support
15@@ -71,6 +75,8 @@
16 #include <unistd.h>
17 #include <time.h>
18 #include <errno.h>
19+#include <libgen.h>
20+#include <dirent.h>
21
22 #if __BYTE_ORDER == __BIG_ENDIAN
23
24@@ -124,6 +130,8 @@
25 }
26 #endif
27
28+#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
29+
30 /* Constant definitions */
31
32 #define TRUE 1 /* Boolean constants */
33@@ -163,7 +171,6 @@
34 #define ATTR_VOLUME 8 /* volume label */
35 #define ATTR_DIR 16 /* directory */
36 #define ATTR_ARCH 32 /* archived */
37-
38 #define ATTR_NONE 0 /* no attribute bits */
39 #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
40 /* attribute bits that are copied "as is" */
41@@ -258,6 +265,19 @@
42 __u32 reserved2[4];
43 };
44
45+/* This stores up to 13 chars of the name */
46+
47+struct msdos_dir_slot {
48+ __u8 id; /* sequence number for slot */
49+ __u8 name0_4[10]; /* first 5 characters in name */
50+ __u8 attr; /* attribute byte */
51+ __u8 reserved; /* always 0 */
52+ __u8 alias_checksum; /* checksum for 8.3 alias */
53+ __u8 name5_10[12]; /* 6 more characters in name */
54+ __u16 start; /* starting cluster number, 0 in long slots */
55+ __u8 name11_12[4]; /* last 2 characters in name */
56+};
57+
58 struct msdos_dir_entry
59 {
60 char name[8], ext[3]; /* name and extension */
61@@ -306,6 +326,15 @@
62
63 #define MESSAGE_OFFSET 29 /* Offset of message in above code */
64
65+/* Special structure to keep track of directories as we add them for the -d option */
66+
67+struct dir_entry {
68+ int root; /* Specifies if this is the root dir or not */
69+ int count; /* Number of items in the table */
70+ int entries; /* Number of entries in the table */
71+ struct msdos_dir_entry *table; /* Pointer to the entry table */
72+};
73+
74 /* Global variables - the root of all evil :-) - see these and weep! */
75
76 static char *template_boot_code; /* Variable to store a full template boot sector in */
77@@ -339,6 +368,9 @@
78 static int size_root_dir; /* Size of the root directory in bytes */
79 static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
80 static int root_dir_entries = 0; /* Number of root directory entries */
81+static int root_dir_num_entries = 0;
82+static int last_cluster_written = 0;
83+
84 static char *blank_sector; /* Blank sector - all zeros */
85
86
87@@ -411,7 +443,6 @@
88 }
89 }
90
91-
92 /* Mark a specified sector as having a particular value in it's FAT entry */
93
94 static void
95@@ -1262,6 +1293,9 @@
96 die ("unable to allocate space for root directory in memory");
97 }
98
99+
100+ last_cluster_written = 2;
101+
102 memset(root_dir, 0, size_root_dir);
103 if ( memcmp(volume_name, " ", 11) )
104 {
105@@ -1310,11 +1344,11 @@
106 }
107
108 if (!(blank_sector = malloc( sector_size )))
109- die( "Out of memory" );
110+ die( "Out of memory" );
111+
112 memset(blank_sector, 0, sector_size);
113 }
114-
115-
116+
117 /* Write the new filesystem's data tables to wherever they're going to end up! */
118
119 #define error(str) \
120@@ -1336,7 +1370,7 @@
121 do { \
122 int __size = (size); \
123 if (write (dev, buf, __size) != __size) \
124- error ("failed whilst writing " errstr); \
125+ error ("failed whilst writing " errstr); \
126 } while(0)
127
128
129@@ -1407,6 +1441,452 @@
130 free (fat); /* Free up the fat table space reserved during setup_tables */
131 }
132
133+/* Add a file to the specified directory entry, and also write it into the image */
134+
135+static void copy_filename(char *filename, char *base, char *ext) {
136+
137+ char *ch = filename;
138+ int i, len;
139+
140+ memset(base, 0x20, 8);
141+ memset(ext, 0x20, 3);
142+
143+ for(len = 0 ; *ch && *ch != '.'; ch++) {
144+ base[len++] = toupper(*ch);
145+ if (len == 8) break;
146+ }
147+
148+ for ( ; *ch && *ch != '.'; ch++);
149+ if (*ch) ch++;
150+
151+ for(len = 0 ; *ch; ch++) {
152+ ext[len++] = toupper(*ch);
153+ if (len == 3) break;
154+ }
155+}
156+
157+/* Check for an .attrib.<filename> file, and read the attributes therein */
158+
159+/* We are going to be pretty pedantic about this. The file needs 3
160+ bytes at the beginning, the attributes are listed in this order:
161+
162+ (H)idden|(S)ystem|(A)rchived
163+
164+ A capital HSA means to enable it, anything else will disable it
165+ (I recommend a '-') The unix user attributes will still be used
166+ for write access.
167+
168+ For example, to enable system file access for ldlinux.sys, write
169+ the following to .attrib.ldlinux.sys: -S-
170+*/
171+
172+unsigned char check_attrib_file(char *dir, char *filename) {
173+
174+ char attrib[4] = { '-', '-', '-' };
175+ unsigned char *buffer = 0;
176+ int ret = ATTR_NONE;
177+ int fd = -1;
178+
179+ buffer = (char *) calloc(1, strlen(dir) + strlen(filename) + 10);
180+ if (!buffer) return ATTR_NONE;
181+
182+ sprintf(buffer, "%s/.attrib.%s", dir, filename);
183+
184+ if (access(buffer, R_OK))
185+ goto exit_attrib;
186+
187+ if ((fd = open(buffer, O_RDONLY, 0)) < 0)
188+ goto exit_attrib;
189+
190+ if (read(fd, attrib, 3) < 0)
191+ goto exit_attrib;
192+
193+ if (attrib[0] == 'H') ret |= ATTR_HIDDEN;
194+ if (attrib[1] == 'S') ret |= ATTR_SYS;
195+ if (attrib[2] == 'A') ret |= ATTR_ARCH;
196+
197+ printf("%s: Setting atrribute %x\n", filename, ret);
198+
199+ exit_attrib:
200+ if (fd >= 0) close(fd);
201+ if (buffer) free(buffer);
202+
203+ return ret;
204+}
205+
206+static void copy_name(char *buffer, int size, char **pointer) {
207+ int i;
208+
209+ for(i = 0; i < size; i += 2) {
210+ if (*pointer) {
211+ buffer[i] = **pointer;
212+ buffer[i + 1] = 0x00;
213+ *pointer = **pointer ? *pointer + 1 : 0;
214+ }
215+ else {
216+ buffer[i] = 0xFF;
217+ buffer[i + 1] = 0xFF;
218+ }
219+ }
220+}
221+
222+static int add_file(char *filename, struct dir_entry *dir, unsigned char attr)
223+{
224+ struct stat stat;
225+ struct msdos_dir_entry *entry;
226+ int infile = 0;
227+ int sectors, clusters;
228+ struct tm *ctime;
229+ int c, s;
230+ int ptr;
231+ char *buffer, *base;
232+ int start;
233+ int usedsec, totalsec;
234+
235+ char name83[8], ext83[3];
236+
237+ struct msdos_dir_slot *slot;
238+ int i;
239+ char *p;
240+
241+ /* The root directory is static, everything else grows as needed */
242+
243+ if (dir->root) {
244+ if (dir->count == dir->entries) {
245+ printf("Error - too many directory entries\n");
246+ }
247+ }
248+ else {
249+ if (dir->count == dir->entries) {
250+ if (!dir->table)
251+ dir->table =
252+ (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
253+ else {
254+ dir->table =
255+ (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
256+ sizeof(struct msdos_dir_entry));
257+
258+ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
259+ }
260+
261+ dir->entries++;
262+ }
263+ }
264+
265+ infile = open(filename, O_RDONLY, 0);
266+ if (!infile) return;
267+
268+ if (fstat(infile, &stat))
269+ goto exit_add;
270+
271+ if (S_ISCHR(stat.st_mode) ||S_ISBLK(stat.st_mode) ||
272+ S_ISFIFO(stat.st_mode) || S_ISLNK(stat.st_mode)) {
273+ printf("Error - cannot create a special file in a FATFS\n");
274+ goto exit_add;
275+ }
276+
277+ /* FIXME: This isn't very pretty */
278+
279+ usedsec = start_data_sector + (size_root_dir / sector_size) +
280+ (last_cluster_written * bs.cluster_size);
281+
282+ totalsec = blocks * BLOCK_SIZE / sector_size;
283+
284+ /* Figure out how many sectors / clustors the file requires */
285+
286+ sectors = ROUND_UP(stat.st_size, sector_size);
287+ clusters = ROUND_UP(sectors, (int) bs.cluster_size);
288+
289+ if (usedsec + sectors > totalsec) {
290+ printf("Error - %s is too big (%d vs %d)\n", filename, sectors, totalsec - usedsec);
291+ close(infile);
292+ return -1;
293+ }
294+
295+ printf("ADD %s\n", filename);
296+
297+ /* Grab the basename of the file */
298+ base = basename(filename);
299+
300+ /* Extract out the 8.3 name */
301+ copy_filename(base, name83, ext83);
302+
303+ /* Make an extended name slot */
304+
305+ slot = (struct msdos_dir_slot *) &dir->table[dir->count++];
306+ slot->id = 'A';
307+ slot->attr = 0x0F;
308+ slot->reserved = 0;
309+ slot->start = 0;
310+
311+ slot->alias_checksum = 0;
312+
313+ for(i = 0; i < 8; i++)
314+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i];
315+
316+ for(i = 0; i < 3; i++)
317+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i];
318+
319+ p = base;
320+
321+ copy_name(slot->name0_4, 10, &p);
322+ copy_name(slot->name5_10, 12, &p);
323+ copy_name(slot->name11_12, 4, &p);
324+
325+
326+ /* Get the entry from the root filesytem */
327+ entry = &dir->table[dir->count++];
328+
329+ strncpy(entry->name, name83, 8);
330+ strncpy(entry->ext, ext83, 3);
331+
332+
333+ /* If the user has it read only, then add read only to the incoming
334+ attribute settings */
335+
336+ if (!(stat.st_mode & S_IWUSR)) attr |= ATTR_RO;
337+ entry->attr = attr;
338+
339+ /* Set the access time on the file */
340+ ctime = localtime(&create_time);
341+
342+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
343+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
344+
345+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
346+ ((ctime->tm_mon+1) << 5) +
347+ ((ctime->tm_year-80) << 9)));
348+
349+ entry->ctime_ms = 0;
350+ entry->ctime = entry->time;
351+ entry->cdate = entry->date;
352+ entry->adate = entry->date;
353+ entry->size = stat.st_size;
354+
355+ start = last_cluster_written;
356+
357+ entry->start = CT_LE_W(start); /* start sector */
358+ entry->starthi = CT_LE_W((start & 0xFFFF0000) >> 16); /* High start sector (for FAT32) */
359+
360+ /* We mark all of the clusters we use in the FAT */
361+
362+ for(c = 0; c < clusters; c++ ) {
363+ int free;
364+ int next = c == (clusters - 1) ? FAT_EOF : start + c + 1;
365+ mark_FAT_cluster(start + c, next);
366+ last_cluster_written++;
367+ }
368+
369+ /* This confused me too - cluster 2 starts after the
370+ root directory data - search me as to why */
371+
372+ ptr = (start_data_sector * sector_size) + size_root_dir;
373+ ptr += (start - 2) * bs.cluster_size * sector_size;
374+
375+ buffer = (char *) malloc(sector_size);
376+
377+ if (!buffer) {
378+ printf("Error - couldn't allocate memory\n");
379+ goto exit_add;
380+ }
381+
382+ /* Write the file into the file block */
383+
384+ seekto(ptr, "datafile");
385+
386+ while(1) {
387+ int size = read(infile, buffer, sector_size);
388+ if (size <= 0) break;
389+
390+ writebuf(buffer, size, "data");
391+ }
392+
393+ exit_add:
394+ if (infile) close(infile);
395+}
396+
397+/* Add a new directory to the specified directory entry, and in turn populate
398+ it with its own files */
399+
400+/* FIXME: This should check to make sure there is enough size to add itself */
401+
402+static void add_directory(char *filename, struct dir_entry *dir) {
403+
404+ struct dir_entry *newdir = 0;
405+ struct msdos_dir_entry *entry;
406+ struct tm *ctime;
407+ DIR *rddir = opendir(filename);
408+ struct dirent *dentry = 0;
409+ int remain;
410+ char *data;
411+
412+ /* If the directory doesn't exist */
413+ if (!rddir) return;
414+
415+ if (dir->root) {
416+ if (dir->count == dir->entries) {
417+ printf("Error - too many directory entries\n");
418+ goto exit_add_dir;
419+ }
420+ }
421+ else {
422+ if (dir->count == dir->entries) {
423+ if (!dir->table)
424+ dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
425+ else {
426+ dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
427+ sizeof(struct msdos_dir_entry));
428+
429+ /* Zero it out to avoid issues */
430+ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
431+ }
432+ dir->entries++;
433+ }
434+ }
435+
436+ /* Now, create a new directory entry for the new directory */
437+ newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry));
438+ if (!newdir) goto exit_add_dir;
439+
440+ entry = &dir->table[dir->count++];
441+
442+ strncpy(entry->name, basename(filename), sizeof(entry->name));
443+
444+ entry->attr = ATTR_DIR;
445+ ctime = localtime(&create_time);
446+
447+ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
448+ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
449+
450+ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
451+ ((ctime->tm_mon+1) << 5) +
452+ ((ctime->tm_year-80) << 9)));
453+
454+ entry->ctime_ms = 0;
455+ entry->ctime = entry->time;
456+ entry->cdate = entry->date;
457+ entry->adate = entry->date;
458+
459+ /* Now, read the directory */
460+
461+ while((dentry = readdir(rddir))) {
462+ struct stat st;
463+ char *buffer;
464+
465+ if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
466+ continue;
467+
468+ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
469+ if (dentry->d_name[0] == '.') continue;
470+
471+ buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
472+ if (!buffer) continue;
473+
474+ sprintf(buffer, "%s/%s", filename, dentry->d_name);
475+ if (!stat(buffer, &st)) {
476+ if (S_ISDIR(st.st_mode))
477+ add_directory(buffer, newdir);
478+ else if (S_ISREG(st.st_mode)) {
479+ unsigned char attrib = check_attrib_file(filename, dentry->d_name);
480+ add_file(buffer, newdir, attrib);
481+ }
482+ }
483+
484+ free(buffer);
485+ }
486+
487+ /* Now that the entire directory has been written, go ahead and write the directory
488+ entry as well */
489+
490+ entry->start = CT_LE_W(last_cluster_written);
491+ entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16);
492+ entry->size = newdir->count * sizeof(struct msdos_dir_entry);
493+
494+ remain = entry->size;
495+ data = (char *) newdir->table;
496+
497+ while(remain) {
498+ int size =
499+ remain > bs.cluster_size * sector_size ? bs.cluster_size * sector_size : remain;
500+
501+ int pos = (start_data_sector * sector_size) + size_root_dir;
502+ pos += (last_cluster_written - 2) * bs.cluster_size * sector_size;
503+
504+ seekto(pos, "add_dir");
505+ writebuf(data, size, "add_dir");
506+
507+ remain -= size;
508+ data += size;
509+
510+ mark_FAT_cluster(last_cluster_written, remain ? last_cluster_written + 1 : FAT_EOF);
511+ last_cluster_written++;
512+ }
513+
514+ exit_add_dir:
515+ if (rddir) closedir(rddir);
516+ if (newdir->table) free(newdir->table);
517+ if (newdir) free(newdir);
518+}
519+
520+/* Given a directory, add all the files and directories to the root directory of the
521+ image.
522+*/
523+
524+static void add_root_directory(char *dirname)
525+{
526+ DIR *dir = opendir(dirname);
527+ struct dirent *entry = 0;
528+ struct dir_entry *newdir = 0;
529+
530+ if (!dir) {
531+ printf("Error - directory %s does not exist\n", dirname);
532+ return;
533+ }
534+
535+ /* Create the root directory structure - this is a bit different then
536+ above, because the table already exists, we just refer to it. */
537+
538+ newdir = (struct dir_entry *) calloc(1,sizeof(struct dir_entry));
539+
540+ if (!newdir) {
541+ closedir(dir);
542+ return;
543+ }
544+
545+ newdir->entries = root_dir_entries;
546+ newdir->root = 1;
547+ newdir->count = 0;
548+ newdir->table = root_dir;
549+
550+ while((entry = readdir(dir))) {
551+ struct stat st;
552+ char *buffer;
553+
554+ if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
555+ continue;
556+
557+ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
558+ if (entry->d_name[0] == '.') continue;
559+
560+ buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
561+ if (!buffer) continue;
562+
563+ sprintf(buffer, "%s/%s", dirname, entry->d_name);
564+ if (!stat(buffer, &st)) {
565+ if (S_ISDIR(st.st_mode))
566+ add_directory(buffer, newdir);
567+ else if (S_ISREG(st.st_mode)) {
568+ unsigned char attrib = check_attrib_file(dirname, entry->d_name);
569+ add_file(buffer, newdir, attrib);
570+ }
571+ }
572+
573+ free(buffer);
574+ }
575+
576+ closedir(dir);
577+ if (newdir) free(newdir);
578+}
579
580 /* Report the command usage and return a failure error code */
581
582@@ -1418,9 +1898,9 @@
583 [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
584 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
585 [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
586- /dev/name [blocks]\n");
587+ [-d directory] /dev/name [blocks]\n");
588 }
589-
590+
591 /*
592 * ++roman: On m68k, check if this is an Atari; if yes, turn on Atari variant
593 * of MS-DOS filesystem by default.
594@@ -1458,6 +1938,8 @@
595 int c;
596 char *tmp;
597 char *listfile = NULL;
598+ char *dirname = NULL;
599+
600 FILE *msgfile;
601 struct stat statbuf;
602 int i = 0, pos, ch;
603@@ -1477,7 +1959,7 @@
604 printf ("%s " VERSION " (" VERSION_DATE ")\n",
605 program_name);
606
607- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
608+ while ((c = getopt (argc, argv, "AcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
609 /* Scan the command line for options */
610 switch (c)
611 {
612@@ -1502,6 +1984,10 @@
613 create = TRUE;
614 break;
615
616+ case 'd':
617+ dirname = optarg;
618+ break;
619+
620 case 'f': /* f : Choose number of FATs */
621 nr_fats = (int) strtol (optarg, &tmp, 0);
622 if (*tmp || nr_fats < 1 || nr_fats > 4)
623@@ -1796,8 +2282,10 @@
624 else if (listfile)
625 get_list_blocks (listfile);
626
627- write_tables (); /* Write the file system tables away! */
628
629+ if (dirname) add_root_directory(dirname);
630+
631+ write_tables (); /* Write the file system tables away! */
632 exit (0); /* Terminate with no errors! */
633 }
634
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch b/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch
new file mode 100644
index 0000000000..4987aa3019
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch
@@ -0,0 +1,12 @@
1--- dosfstools-2.10/dosfsck/boot.c.orig 2004-10-15 08:51:42.394725176 -0600
2+++ dosfstools-2.10/dosfsck/boot.c 2004-10-15 08:49:16.776862456 -0600
3@@ -14,6 +14,9 @@
4 #include "io.h"
5 #include "boot.h"
6
7+#ifndef MSDOS_FAT12
8+#define MSDOS_FAT12 4084
9+#endif
10
11 #define ROUND_TO_MULTIPLE(n,m) ((n) && (m) ? (n)+(m)-1-((n)-1)%(m) : 0)
12 /* don't divide by zero */
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb
new file mode 100644
index 0000000000..100044b75d
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb
@@ -0,0 +1,22 @@
1# dosfstools OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5DESCRIPTION = "DOS FAT Filesystem Utilities"
6
7SECTION = "base"
8PRIORITY = "optional"
9LICENSE = "GPL"
10
11PR = "r2"
12
13SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
14 file://alignment_hack.patch;patch=1 \
15 file://dosfstools-2.10-kernel-2.6.patch;patch=1 \
16 file://msdos_fat12_undefined.patch;patch=1 \
17 file://include-linux-types.patch;patch=1"
18
19do_install () {
20 oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
21 "MANDIR=${D}${mandir}/man8" install
22}
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
new file mode 100644
index 0000000000..a5f6e034dd
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -0,0 +1,21 @@
1# dosfstools OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5DESCRIPTION = "DOS FAT Filesystem Utilities"
6
7SECTION = "base"
8PRIORITY = "optional"
9LICENSE = "GPL"
10
11PR = "r0"
12
13SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
14 file://alignment_hack.patch;patch=1 \
15 file://msdos_fat12_undefined.patch;patch=1 \
16 file://include-linux-types.patch;patch=1"
17
18do_install () {
19 oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
20 "MANDIR=${D}${mandir}/man8" install
21}
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
new file mode 100644
index 0000000000..7a4a1a607a
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -0,0 +1,40 @@
1DESCRIPTION = "Package maintenance system for Debian."
2LICENSE = "GPL"
3SECTION = "base"
4PR = "r7"
5
6SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz \
7 file://ignore_extra_fields.patch;patch=1 \
8 file://noupdalt.patch;patch=1"
9
10DEPENDS = "zlib bzip2"
11DEPENDS_virtclass-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native"
12RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}"
13RDEPENDS_${PN}_virtclass-native = ""
14
15S = "${WORKDIR}/${BPN}-${PV}"
16
17PARALLEL_MAKE = ""
18
19inherit autotools gettext
20
21DPKG_INIT_POSITION = "98"
22DPKG_INIT_POSITION_slugos = "41"
23
24pkg_postinst_dpkg () {
25#!/bin/sh
26if [ "x$D" != "x" ]; then
27 install -d $D/${sysconfdir}/rcS.d
28 # this happens at S98 where our good 'ole packages script used to run
29 echo -e "#!/bin/sh
30 dpkg --configure -a
31 rm -f /${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
32" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
33 chmod 0755 $D/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
34fi
35}
36
37do_configure () {
38 echo >> m4/compiler.m4
39 autotools_do_configure
40}
diff --git a/meta/recipes-devtools/dpkg/dpkg/autofoo.patch b/meta/recipes-devtools/dpkg/dpkg/autofoo.patch
new file mode 100644
index 0000000000..691121e418
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/autofoo.patch
@@ -0,0 +1,48 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- dpkg-1.10.23/configure.in~autofoo
7+++ dpkg-1.10.23/configure.in
8@@ -227,21 +227,36 @@
9 # OpenBSD passes AC_TRY_COMPILE for va_copy even though
10 # it doesn't seem to exist, which is odd. We need to use
11 # AC_TRY_RUN.
12+#
13+# If crosscompiling, use AC_TRY_COMPILE. -CL
14 AC_TRY_RUN([
15 #include <stdarg.h>
16 main(){
17 va_list v1,v2;
18 va_copy(v1, v2);
19 exit(0);}
20-], [AC_MSG_RESULT(yes)
21-AC_DEFINE(HAVE_VA_COPY,,[Whether the va_copy macro exists])],[AC_MSG_RESULT(no)
22-AC_MSG_CHECKING([for va_list assignment copy])
23+], [dpkg_cv_va_copy=yes], [dpkg_cv_va_copy=no],
24 AC_TRY_COMPILE([
25 #include <stdarg.h>
26+main(){
27+va_list v1,v2;
28+va_copy(v1, v2);
29+exit(0);}
30+], [dpkg_cv_va_copy=yes], [dpkg_vc_va_copy=no]))
31+
32+if test "$dpkg_cv_va_copy" = "yes"; then
33+ AC_MSG_RESULT(yes)
34+ AC_DEFINE(HAVE_VA_COPY,,[Whether the va_copy macro exists])
35+else
36+ AC_MSG_RESULT(no)
37+ AC_MSG_CHECKING([for va_list assignment copy])
38+ AC_TRY_COMPILE([
39+#include <stdarg.h>
40 ],[
41 va_list v1,v2;
42 v1 = v2;
43-], AC_MSG_RESULT(yes),AC_MSG_ERROR(no))])
44+], AC_MSG_RESULT(yes), AC_MSG_ERROR(no))
45+fi
46
47 DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.],
48 DPKG_C_GCC_ATTRIBUTE(noreturn,noreturn,[int x],noreturn,NORETURN,[Define if nonreturning functions a la GCC 2.5 and higher are available.])
diff --git a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
new file mode 100644
index 0000000000..d09343c6e5
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
@@ -0,0 +1,26 @@
1 dpkg-deb/build.c | 4 ++--
2 1 file changed, 2 insertions(+), 2 deletions(-)
3
4--- dpkg-1.14.19.orig/dpkg-deb/build.c
5+++ dpkg-1.14.19/dpkg-deb/build.c
6@@ -241,18 +241,18 @@ void do_build(const char *const *argv) {
7 if (checkedinfo->priority == pri_other) {
8 fprintf(stderr, _("warning, `%s' contains user-defined Priority value `%s'\n"),
9 controlfile, checkedinfo->otherpriority);
10 warns++;
11 }
12- for (field= checkedinfo->available.arbs; field; field= field->next) {
13+ /*for (field= checkedinfo->available.arbs; field; field= field->next) {
14 if (known_arbitrary_field(field))
15 continue;
16
17 fprintf(stderr, _("warning, `%s' contains user-defined field `%s'\n"),
18 controlfile, field->name);
19 warns++;
20- }
21+ }*/
22 checkversion(checkedinfo->available.version.version,"(upstream) version",&errs);
23 checkversion(checkedinfo->available.version.revision,"Debian revision",&errs);
24 if (errs) ohshit(_("%d errors in control file"),errs);
25
26 if (subdir) {
diff --git a/meta/recipes-devtools/dpkg/dpkg/nochroot.patch b/meta/recipes-devtools/dpkg/dpkg/nochroot.patch
new file mode 100644
index 0000000000..3a8beaebbf
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/nochroot.patch
@@ -0,0 +1,18 @@
1---
2 src/help.c | 2 ++
3 1 file changed, 2 insertions(+)
4
5--- dpkg-1.13.22.orig/src/help.c
6+++ dpkg-1.13.22/src/help.c
7@@ -175,9 +175,11 @@ static const char* preexecscript(const c
8 */
9 size_t instdirl;
10
11+#if 0
12 if (*instdir) {
13 if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir);
14 }
15+#endif
16 if (f_debug & dbg_scripts) {
17 fprintf(stderr,"D0%05o: fork/exec %s (",dbg_scripts,path);
18 while (*++argv) fprintf(stderr," %s",*argv);
diff --git a/meta/recipes-devtools/dpkg/dpkg/noman.patch b/meta/recipes-devtools/dpkg/dpkg/noman.patch
new file mode 100644
index 0000000000..f5984fe14a
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch
@@ -0,0 +1,16 @@
1---
2 Makefile.am | 3 +--
3 1 file changed, 1 insertion(+), 2 deletions(-)
4
5--- dpkg-1.13.22.orig/Makefile.am
6+++ dpkg-1.13.22/Makefile.am
7@@ -15,8 +15,7 @@ SUBDIRS = \
8 utils \
9 scripts \
10 po \
11- origins \
12- man
13+ origins
14
15 ACLOCAL_AMFLAGS = -I m4
16
diff --git a/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch b/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch
new file mode 100644
index 0000000000..023e99ae8d
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch
@@ -0,0 +1,16 @@
1---
2 scripts/Makefile.am | 3 +--
3 1 file changed, 1 insertion(+), 2 deletions(-)
4
5--- dpkg-1.13.22.orig/scripts/Makefile.am
6+++ dpkg-1.13.22/scripts/Makefile.am
7@@ -20,8 +20,7 @@ bin_SCRIPTS = \
8 sbin_SCRIPTS = \
9 cleanup-info \
10 dpkg-divert \
11- dpkg-statoverride \
12- update-alternatives
13+ dpkg-statoverride
14
15 changelogdir = $(pkglibdir)/parsechangelog
16 changelog_SCRIPTS = \
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.14.19.bb b/meta/recipes-devtools/dpkg/dpkg_1.14.19.bb
new file mode 100644
index 0000000000..1e54306c93
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg_1.14.19.bb
@@ -0,0 +1,13 @@
1require dpkg.inc
2
3SRC_URI += "file://noman.patch;patch=1"
4
5EXTRA_OECONF = "--without-static-progs \
6 --without-dselect \
7 --with-start-stop-daemon \
8 --with-zlib \
9 --with-bz2lib \
10 --without-selinux \
11 --without-sgml-doc"
12
13BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/acinclude.m4
new file mode 100644
index 0000000000..4b00668476
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/acinclude.m4
@@ -0,0 +1,86 @@
1# Extracted from the package's shipped aclocal.m4. Custom macros should be in
2# acinclude.m4 so running aclocal doesn't blow them away.
3#
4# RP 1/6/2010
5
6# ===========================================================================
7# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
8# ===========================================================================
9#
10# SYNOPSIS
11#
12# CHECK_GNU_MAKE()
13#
14# DESCRIPTION
15#
16# This macro searches for a GNU version of make. If a match is found, the
17# makefile variable `ifGNUmake' is set to the empty string, otherwise it
18# is set to "#". This is useful for including a special features in a
19# Makefile, which cannot be handled by other versions of make. The
20# variable _cv_gnu_make_command is set to the command to invoke GNU make
21# if it exists, the empty string otherwise.
22#
23# Here is an example of its use:
24#
25# Makefile.in might contain:
26#
27# # A failsafe way of putting a dependency rule into a makefile
28# $(DEPEND):
29# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
30#
31# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
32# @ifGNUmake@ include $(DEPEND)
33# @ifGNUmake@ endif
34#
35# Then configure.in would normally contain:
36#
37# CHECK_GNU_MAKE()
38# AC_OUTPUT(Makefile)
39#
40# Then perhaps to cause gnu make to override any other make, we could do
41# something like this (note that GNU make always looks for GNUmakefile
42# first):
43#
44# if ! test x$_cv_gnu_make_command = x ; then
45# mv Makefile GNUmakefile
46# echo .DEFAULT: > Makefile ;
47# echo \ $_cv_gnu_make_command \$@ >> Makefile;
48# fi
49#
50# Then, if any (well almost any) other make is called, and GNU make also
51# exists, then the other make wraps the GNU make.
52#
53# LICENSE
54#
55# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
56#
57# Copying and distribution of this file, with or without modification, are
58# permitted in any medium without royalty provided the copyright notice
59# and this notice are preserved.
60#
61# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
62
63AC_DEFUN(
64 [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
65 _cv_gnu_make_command='' ;
66dnl Search all the common names for GNU make
67 for a in "$MAKE" make gmake gnumake ; do
68 if test -z "$a" ; then continue ; fi ;
69 if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
70 _cv_gnu_make_command=$a ;
71 break;
72 fi
73 done ;
74 ) ;
75dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
76 if test "x$_cv_gnu_make_command" != "x" ; then
77 ifGNUmake='' ;
78 ifNotGNUmake='#' ;
79 else
80 ifGNUmake='#' ;
81 ifNotGNUmake='' ;
82 AC_MSG_RESULT("Not found");
83 fi
84 AC_SUBST(ifGNUmake)
85 AC_SUBST(ifNotGNUmake)
86] )
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/mkdir.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/mkdir.patch
new file mode 100644
index 0000000000..b0577e3bcb
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/mkdir.patch
@@ -0,0 +1,26 @@
1Index: e2fsprogs-1.41.5/po/Makefile.in.in
2===================================================================
3--- e2fsprogs-1.41.5.orig/po/Makefile.in.in 2009-02-14 13:49:08.000000000 +0000
4+++ e2fsprogs-1.41.5/po/Makefile.in.in 2009-08-19 17:52:31.000000000 +0100
5@@ -30,7 +30,7 @@
6 INSTALL = @INSTALL@
7 INSTALL_DATA = @INSTALL_DATA@
8 MKINSTALLDIRS = @MKINSTALLDIRS@
9-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
10+mkinstalldirs = $(MKINSTALLDIRS)
11
12 GMSGFMT = @GMSGFMT@
13 MSGFMT = @MSGFMT@
14Index: e2fsprogs-1.41.5/configure.in
15===================================================================
16--- e2fsprogs-1.41.5.orig/configure.in 2009-08-19 17:53:50.000000000 +0100
17+++ e2fsprogs-1.41.5/configure.in 2009-08-19 17:48:38.000000000 +0100
18@@ -970,6 +970,8 @@
19 fi
20 AC_SUBST(BUILD_CFLAGS)
21 AC_SUBST(BUILD_LDFLAGS)
22+MKINSTALLDIRS="mkdir -p"
23+AC_SUBST(MKINSTALLDIRS)
24 dnl
25 dnl Make our output files, being sure that we create the some miscellaneous
26 dnl directories
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/quotefix.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/quotefix.patch
new file mode 100644
index 0000000000..528e319d84
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/quotefix.patch
@@ -0,0 +1,43 @@
1These macros are underquoted and break with recent autoconf+automake
2combinations.
3
4RP 1/2/10
5
6Index: e2fsprogs-1.41.5/configure.in
7===================================================================
8--- e2fsprogs-1.41.5.orig/configure.in 2010-02-01 11:40:10.547790252 +0000
9+++ e2fsprogs-1.41.5/configure.in 2010-02-01 11:44:51.577876485 +0000
10@@ -397,11 +397,11 @@
11 AC_MSG_ERROR([pkg-config not installed; please install it.])
12 fi
13
14- AC_CHECK_LIB(blkid, blkid_get_cache,
15+ [AC_CHECK_LIB(blkid, blkid_get_cache,
16 [LIBBLKID=`$PKG_CONFIG --libs blkid`;
17 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
18 [AC_MSG_ERROR([external blkid library not found])],
19- [$LIBBLKID])
20+ [$LIBBLKID])]
21 BLKID_CMT=#
22 AC_MSG_RESULT([Disabling private blkid library])
23 else
24@@ -786,15 +786,15 @@
25 dnl
26 SEM_INIT_LIB=''
27 AC_CHECK_FUNC(sem_init, ,
28- AC_CHECK_LIB(pthread, sem_init,
29+ [AC_CHECK_LIB(pthread, sem_init,
30 AC_DEFINE(HAVE_SEM_INIT)
31 SEM_INIT_LIB=-lpthread,
32- AC_CHECK_LIB(rt, sem_init,
33+ [AC_CHECK_LIB(rt, sem_init,
34 AC_DEFINE(HAVE_SEM_INIT)
35 SEM_INIT_LIB=-lrt,
36- AC_CHECK_LIB(posix4, sem_init,
37+ [AC_CHECK_LIB(posix4, sem_init,
38 AC_DEFINE(HAVE_SEM_INIT)
39- SEM_INIT_LIB=-lposix4))))dnl
40+ SEM_INIT_LIB=-lposix4)])])])dnl
41 AC_SUBST(SEM_INIT_LIB)
42 dnl
43 dnl Check for unified diff
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
new file mode 100644
index 0000000000..a107178514
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -0,0 +1,25 @@
1DESCRIPTION = "The Ext2 Filesystem Utilities (e2fsprogs) contain all of the standard utilities for creating, fixing, configuring , and debugging ext2 filesystems."
2HOMEPAGE = "http://e2fsprogs.sourceforge.net/"
3
4LICENSE = "GPLv2 & LGPLv2 & BSD & MIT"
5LICENSE_e2fsprogs-blkid = "LGPLv2"
6LICENSE_e2fsprogs-e2fsck = "GPLv2"
7LICENSE_e2fsprogs-mke2fs = "GPLv2"
8LICENSE_e2fsprogs-fsck = "GPLv2"
9LICENSE_e2fsprogs-tune2fs = "GPLv2"
10LICENSE_e2fsprogs-badblocks = "GPLv2"
11LIC_FILES_CHKSUM = "file://COPYING;md5=b48f21d765b875bd10400975d12c1ca2 \
12 file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
13 file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
14 file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
15 file://lib/uuid/COPYING;md5=58dcd8452651fc8b07d1f65ce07ca8af \
16 file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
17 file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
18SECTION = "base"
19DEPENDS = "gettext util-linux"
20
21SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz \
22 file://mkdir.patch;apply=yes"
23
24inherit autotools
25
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.41.12.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.41.12.bb
new file mode 100644
index 0000000000..15c80478f5
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.41.12.bb
@@ -0,0 +1,46 @@
1require e2fsprogs.inc
2
3PR = "r19"
4
5SRC_URI += "file://quotefix.patch;patch=1 \
6 file://acinclude.m4"
7#file://no-hardlinks.patch;patch=1 \
8
9PARALLEL_MAKE = ""
10
11EXTRA_OECONF += " --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid"
12EXTRA_OECONF_darwin = "--sbindir=${base_sbindir} --enable-bsd-shlibs"
13EXTRA_OECONF_darwin8 = "--sbindir=${base_sbindir} --enable-bsd-shlibs"
14
15do_configure_prepend () {
16 cp ${WORKDIR}/acinclude.m4 ${S}/
17}
18
19do_compile_prepend () {
20 find ./ -print|xargs chmod u=rwX
21 ( cd util; ${BUILD_CC} subst.c -o subst )
22}
23
24do_install () {
25 oe_runmake 'DESTDIR=${D}' install
26 oe_runmake 'DESTDIR=${D}' install-libs
27 # We use blkid from util-linux now so remove from here
28 rm -f ${D}${libdir}/libblkid*
29 rm -rf ${D}${includedir}/blkid
30 rm -f ${D}${libdir}/pkgconfig/blkid.pc
31}
32
33# blkid used to be part of e2fsprogs but is useful outside, add it
34# as an RDEPENDS so that anything relying on it being in e2fsprogs
35# still works
36RDEPENDS_e2fsprogs = "e2fsprogs-blkid e2fsprogs-badblocks"
37
38PACKAGES =+ "e2fsprogs-blkid e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-tune2fs e2fsprogs-badblocks"
39FILES_e2fsprogs-blkid = "${base_sbindir}/blkid"
40FILES_e2fsprogs-fsck = "${base_sbindir}/fsck"
41FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
42FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext*"
43FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs"
44FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
45
46BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.108/warnings.patch b/meta/recipes-devtools/elfutils/elfutils-0.108/warnings.patch
new file mode 100644
index 0000000000..680e0441fe
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.108/warnings.patch
@@ -0,0 +1,132 @@
1Index: elfutils-0.108/configure.ac
2===================================================================
3--- elfutils-0.108.orig/configure.ac 2006-04-10 19:18:34.000000000 +0100
4+++ elfutils-0.108/configure.ac 2006-04-10 19:19:33.000000000 +0100
5@@ -49,6 +49,10 @@
6 dnl Add all the languages for which translations are available.
7 ALL_LINGUAS=
8
9+if test X"$CFLAGS" = X; then
10+ CFLAGS="-Wall -g -O2"
11+fi
12+
13 AC_PROG_CC
14 AC_PROG_RANLIB
15 AC_PROG_YACC
16Index: elfutils-0.108/lib/Makefile.am
17===================================================================
18--- elfutils-0.108.orig/lib/Makefile.am 2006-04-10 19:18:34.000000000 +0100
19+++ elfutils-0.108/lib/Makefile.am 2006-04-10 19:19:33.000000000 +0100
20@@ -21,7 +21,7 @@
21 else
22 AM_CFLAGS =
23 endif
24-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
25+AM_CFLAGS += -fpic -Wshadow -Wunused $($(*F)_CFLAGS)
26 INCLUDES = -I$(srcdir)/../libelf -I..
27
28 noinst_LIBRARIES = libeu.a
29Index: elfutils-0.108/libasm/Makefile.am
30===================================================================
31--- elfutils-0.108.orig/libasm/Makefile.am 2006-04-10 19:18:34.000000000 +0100
32+++ elfutils-0.108/libasm/Makefile.am 2006-04-10 19:19:33.000000000 +0100
33@@ -18,7 +18,7 @@
34 else
35 AM_CFLAGS =
36 endif
37-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
38+AM_CFLAGS += -Wshadow -Wunused -Wformat=2
39 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
40 -I$(top_srcdir)/lib
41 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
42Index: elfutils-0.108/libcpu/Makefile.am
43===================================================================
44--- elfutils-0.108.orig/libcpu/Makefile.am 2006-04-10 19:18:34.000000000 +0100
45+++ elfutils-0.108/libcpu/Makefile.am 2006-04-10 19:19:33.000000000 +0100
46@@ -13,7 +13,7 @@
47 ## 3001 King Ranch Road, Ukiah, CA 95482.
48 ##
49 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
50-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
51+AM_CFLAGS = -Wshadow -Wformat=2 -Wunused
52 INCLUDES = -I$(srcdir)
53
54 noinst_LIBRARIES = libcpu_i386.a
55Index: elfutils-0.108/libdw/Makefile.am
56===================================================================
57--- elfutils-0.108.orig/libdw/Makefile.am 2006-04-10 19:18:34.000000000 +0100
58+++ elfutils-0.108/libdw/Makefile.am 2006-04-10 19:19:33.000000000 +0100
59@@ -18,7 +18,7 @@
60 else
61 AM_CFLAGS =
62 endif
63-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
64+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99
65 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
66 VERSION = 1
67
68Index: elfutils-0.108/libebl/Makefile.am
69===================================================================
70--- elfutils-0.108.orig/libebl/Makefile.am 2006-04-10 19:18:34.000000000 +0100
71+++ elfutils-0.108/libebl/Makefile.am 2006-04-10 19:19:33.000000000 +0100
72@@ -18,7 +18,7 @@
73 else
74 AM_CFLAGS =
75 endif
76-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
77+AM_CFLAGS += -fpic -Wshadow -Wunused -Wformat=2 \
78 -std=gnu99
79
80 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
81Index: elfutils-0.108/libelf/Makefile.am
82===================================================================
83--- elfutils-0.108.orig/libelf/Makefile.am 2006-04-10 19:18:34.000000000 +0100
84+++ elfutils-0.108/libelf/Makefile.am 2006-04-10 19:19:33.000000000 +0100
85@@ -21,7 +21,7 @@
86 else
87 AM_CFLAGS =
88 endif
89-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
90+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 \
91 $($(*F)_CFLAGS)
92 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
93 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
94Index: elfutils-0.108/src/Makefile.am
95===================================================================
96--- elfutils-0.108.orig/src/Makefile.am 2006-04-10 19:18:34.000000000 +0100
97+++ elfutils-0.108/src/Makefile.am 2006-04-10 19:20:19.000000000 +0100
98@@ -15,14 +15,12 @@
99 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
100 -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
101 if MUDFLAP
102-AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
103+AM_CFLAGS = -Wshadow -Wunused -std=gnu99 -fmudflap \
104 $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
105 $(if $($(*F)_no_Wformat),,-Wformat=2)
106 else
107-AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
108- $(if $($(*F)_no_Werror),,-Werror) \
109- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
110- $(if $($(*F)_no_Wformat),,-Wformat=2)
111+AM_CFLAGS = -Wshadow -std=gnu99 $(native_ld_cflags) \
112+ $(if $($(*F)_no_Werror),,)
113 endif
114 if MUDFLAP
115 libmudflap = -lmudflap
116Index: elfutils-0.108/tests/Makefile.am
117===================================================================
118--- elfutils-0.108.orig/tests/Makefile.am 2006-04-10 19:18:34.000000000 +0100
119+++ elfutils-0.108/tests/Makefile.am 2006-04-10 19:19:33.000000000 +0100
120@@ -14,10 +14,10 @@
121 ##
122 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
123 if MUDFLAP
124-AM_CFLAGS = -Wall -Werror -std=gnu99 -fmudflap\
125+AM_CFLAGS = -std=gnu99 -fmudflap\
126 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
127 else
128-AM_CFLAGS = -Wall -Werror -std=gnu99 \
129+AM_CFLAGS = -std=gnu99 \
130 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
131 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
132 endif
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
new file mode 100644
index 0000000000..a309d1ba1d
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
@@ -0,0 +1,447 @@
1Index: elfutils-0.146/backends/arm_init.c
2===================================================================
3--- elfutils-0.146.orig/backends/arm_init.c 2009-04-21 14:50:01.000000000 +0000
4+++ elfutils-0.146/backends/arm_init.c 2010-04-24 10:11:13.000000000 +0000
5@@ -32,21 +32,32 @@
6 #define RELOC_PREFIX R_ARM_
7 #include "libebl_CPU.h"
8
9+#include "libebl_arm.h"
10+
11 /* This defines the common reloc hooks based on arm_reloc.def. */
12 #include "common-reloc.c"
13
14
15 const char *
16 arm_init (elf, machine, eh, ehlen)
17- Elf *elf __attribute__ ((unused));
18+ Elf *elf;
19 GElf_Half machine __attribute__ ((unused));
20 Ebl *eh;
21 size_t ehlen;
22 {
23+ int soft_float = 0;
24+
25 /* Check whether the Elf_BH object has a sufficent size. */
26 if (ehlen < sizeof (Ebl))
27 return NULL;
28
29+ if (elf) {
30+ GElf_Ehdr ehdr_mem;
31+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
32+ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
33+ soft_float = 1;
34+ }
35+
36 /* We handle it. */
37 eh->name = "ARM";
38 arm_init_reloc (eh);
39@@ -58,7 +69,10 @@
40 HOOK (eh, core_note);
41 HOOK (eh, auxv_info);
42 HOOK (eh, check_object_attribute);
43- HOOK (eh, return_value_location);
44+ if (soft_float)
45+ eh->return_value_location = arm_return_value_location_soft;
46+ else
47+ eh->return_value_location = arm_return_value_location_hard;
48
49 return MODVERSION;
50 }
51Index: elfutils-0.146/backends/arm_regs.c
52===================================================================
53--- elfutils-0.146.orig/backends/arm_regs.c 2009-04-21 14:50:01.000000000 +0000
54+++ elfutils-0.146/backends/arm_regs.c 2010-04-24 10:11:13.000000000 +0000
55@@ -28,6 +28,7 @@
56 #endif
57
58 #include <string.h>
59+#include <stdio.h>
60 #include <dwarf.h>
61
62 #define BACKEND arm_
63@@ -58,7 +59,15 @@
64 namelen = 2;
65 break;
66
67- case 10 ... 12:
68+ case 10 ... 11:
69+ name[0] = 'r';
70+ name[1] = '1';
71+ name[2] = regno % 10 + '0';
72+ namelen = 3;
73+ break;
74+
75+ case 12:
76+ *type = DW_ATE_unsigned;
77 name[0] = 'r';
78 name[1] = '1';
79 name[2] = regno % 10 + '0';
80@@ -73,6 +82,9 @@
81 break;
82
83 case 16 + 0 ... 16 + 7:
84+ /* AADWARF says that there are no registers in that range,
85+ * but gcc maps FPA registers here
86+ */
87 regno += 96 - 16;
88 /* Fall through. */
89 case 96 + 0 ... 96 + 7:
90@@ -84,11 +96,139 @@
91 namelen = 2;
92 break;
93
94+ case 64 + 0 ... 64 + 9:
95+ *setname = "VFP";
96+ *bits = 32;
97+ *type = DW_ATE_float;
98+ name[0] = 's';
99+ name[1] = regno - 64 + '0';
100+ namelen = 2;
101+ break;
102+
103+ case 64 + 10 ... 64 + 31:
104+ *setname = "VFP";
105+ *bits = 32;
106+ *type = DW_ATE_float;
107+ name[0] = 's';
108+ name[1] = (regno - 64) / 10 + '0';
109+ name[2] = (regno - 64) % 10 + '0';
110+ namelen = 3;
111+ break;
112+
113+ case 104 + 0 ... 104 + 7:
114+ /* XXX TODO:
115+ * This can be either intel wireless MMX general purpose/control
116+ * registers or xscale accumulator, which have different usage.
117+ * We only have the intel wireless MMX here now.
118+ * The name needs to be changed for the xscale accumulator too. */
119+ *setname = "MMX";
120+ *type = DW_ATE_unsigned;
121+ *bits = 32;
122+ memcpy(name, "wcgr", 4);
123+ name[4] = regno - 104 + '0';
124+ namelen = 5;
125+ break;
126+
127+ case 112 + 0 ... 112 + 9:
128+ *setname = "MMX";
129+ *type = DW_ATE_unsigned;
130+ *bits = 64;
131+ name[0] = 'w';
132+ name[1] = 'r';
133+ name[2] = regno - 112 + '0';
134+ namelen = 3;
135+ break;
136+
137+ case 112 + 10 ... 112 + 15:
138+ *setname = "MMX";
139+ *type = DW_ATE_unsigned;
140+ *bits = 64;
141+ name[0] = 'w';
142+ name[1] = 'r';
143+ name[2] = '1';
144+ name[3] = regno - 112 - 10 + '0';
145+ namelen = 4;
146+ break;
147+
148 case 128:
149+ *setname = "special";
150 *type = DW_ATE_unsigned;
151 return stpcpy (name, "spsr") + 1 - name;
152
153+ case 129:
154+ *setname = "special";
155+ *type = DW_ATE_unsigned;
156+ return stpcpy(name, "spsr_fiq") + 1 - name;
157+
158+ case 130:
159+ *setname = "special";
160+ *type = DW_ATE_unsigned;
161+ return stpcpy(name, "spsr_irq") + 1 - name;
162+
163+ case 131:
164+ *setname = "special";
165+ *type = DW_ATE_unsigned;
166+ return stpcpy(name, "spsr_abt") + 1 - name;
167+
168+ case 132:
169+ *setname = "special";
170+ *type = DW_ATE_unsigned;
171+ return stpcpy(name, "spsr_und") + 1 - name;
172+
173+ case 133:
174+ *setname = "special";
175+ *type = DW_ATE_unsigned;
176+ return stpcpy(name, "spsr_svc") + 1 - name;
177+
178+ case 144 ... 150:
179+ *setname = "integer";
180+ *type = DW_ATE_signed;
181+ *bits = 32;
182+ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
183+
184+ case 151 ... 157:
185+ *setname = "integer";
186+ *type = DW_ATE_signed;
187+ *bits = 32;
188+ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
189+
190+ case 158 ... 159:
191+ *setname = "integer";
192+ *type = DW_ATE_signed;
193+ *bits = 32;
194+ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
195+
196+ case 160 ... 161:
197+ *setname = "integer";
198+ *type = DW_ATE_signed;
199+ *bits = 32;
200+ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
201+
202+ case 162 ... 163:
203+ *setname = "integer";
204+ *type = DW_ATE_signed;
205+ *bits = 32;
206+ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
207+
208+ case 164 ... 165:
209+ *setname = "integer";
210+ *type = DW_ATE_signed;
211+ *bits = 32;
212+ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
213+
214+ case 192 ... 199:
215+ *setname = "MMX";
216+ *bits = 32;
217+ *type = DW_ATE_unsigned;
218+ name[0] = 'w';
219+ name[1] = 'c';
220+ name[2] = regno - 192 + '0';
221+ namelen = 3;
222+ break;
223+
224 case 256 + 0 ... 256 + 9:
225+ /* XXX TODO: Neon also uses those registers and can contain
226+ * both float and integers */
227 *setname = "VFP";
228 *type = DW_ATE_float;
229 *bits = 64;
230Index: elfutils-0.146/backends/arm_retval.c
231===================================================================
232--- elfutils-0.146.orig/backends/arm_retval.c 2010-01-12 16:57:54.000000000 +0000
233+++ elfutils-0.146/backends/arm_retval.c 2010-04-24 10:11:13.000000000 +0000
234@@ -45,6 +45,13 @@
235 #define nloc_intreg 1
236 #define nloc_intregs(n) (2 * (n))
237
238+/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
239+static const Dwarf_Op loc_fpreg[] =
240+ {
241+ { .atom = DW_OP_reg16 },
242+ };
243+#define nloc_fpreg 1
244+
245 /* The return value is a structure and is actually stored in stack space
246 passed in a hidden argument by the caller. But, the compiler
247 helpfully returns the address of that space in r0. */
248@@ -55,8 +62,9 @@
249 #define nloc_aggregate 1
250
251
252-int
253-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
254+static int
255+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
256+ int soft_float)
257 {
258 /* Start with the function's type, and get the DW_AT_type attribute,
259 which is the type of the return value. */
260@@ -109,14 +117,31 @@
261 else
262 return -1;
263 }
264+ if (tag == DW_TAG_base_type)
265+ {
266+ Dwarf_Word encoding;
267+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
268+ &attr_mem), &encoding) != 0)
269+ return -1;
270+
271+ if ((encoding == DW_ATE_float) && !soft_float)
272+ {
273+ *locp = loc_fpreg;
274+ if (size <= 8)
275+ return nloc_fpreg;
276+ goto aggregate;
277+ }
278+ }
279 if (size <= 16)
280 {
281 intreg:
282 *locp = loc_intreg;
283 return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
284 }
285+ /* fall through. */
286
287 aggregate:
288+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
289 *locp = loc_aggregate;
290 return nloc_aggregate;
291
292@@ -135,3 +160,18 @@
293 DWARF and might be valid. */
294 return -2;
295 }
296+
297+/* return location for -mabi=apcs-gnu -msoft-float */
298+int
299+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
300+{
301+ return arm_return_value_location_ (functypedie, locp, 1);
302+}
303+
304+/* return location for -mabi=apcs-gnu -mhard-float (current default) */
305+int
306+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
307+{
308+ return arm_return_value_location_ (functypedie, locp, 0);
309+}
310+
311Index: elfutils-0.146/libelf/elf.h
312===================================================================
313--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:11.000000000 +0000
314+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
315@@ -2290,6 +2290,9 @@
316 #define EF_ARM_EABI_VER4 0x04000000
317 #define EF_ARM_EABI_VER5 0x05000000
318
319+/* EI_OSABI values */
320+#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
321+
322 /* Additional symbol types for Thumb. */
323 #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
324 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
325@@ -2307,12 +2310,19 @@
326
327 /* Processor specific values for the Phdr p_type field. */
328 #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
329+#define PT_ARM_UNWIND PT_ARM_EXIDX
330
331 /* Processor specific values for the Shdr sh_type field. */
332 #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
333 #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
334 #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
335
336+/* Processor specific values for the Dyn d_tag field. */
337+#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
338+#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
339+#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
340+#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
341+#define DT_ARM_NUM 4
342
343 /* ARM relocs. */
344
345@@ -2344,12 +2354,75 @@
346 #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
347 #define R_ARM_GOT32 26 /* 32 bit GOT entry */
348 #define R_ARM_PLT32 27 /* 32 bit PLT address */
349+#define R_ARM_CALL 28
350+#define R_ARM_JUMP24 29
351+#define R_ARM_THM_JUMP24 30
352+#define R_ARM_BASE_ABS 31
353 #define R_ARM_ALU_PCREL_7_0 32
354 #define R_ARM_ALU_PCREL_15_8 33
355 #define R_ARM_ALU_PCREL_23_15 34
356 #define R_ARM_LDR_SBREL_11_0 35
357 #define R_ARM_ALU_SBREL_19_12 36
358 #define R_ARM_ALU_SBREL_27_20 37
359+#define R_ARM_TARGET1 38
360+#define R_ARM_SBREL31 39
361+#define R_ARM_V4BX 40
362+#define R_ARM_TARGET2 41
363+#define R_ARM_PREL31 42
364+#define R_ARM_MOVW_ABS_NC 43
365+#define R_ARM_MOVT_ABS 44
366+#define R_ARM_MOVW_PREL_NC 45
367+#define R_ARM_MOVT_PREL 46
368+#define R_ARM_THM_MOVW_ABS_NC 47
369+#define R_ARM_THM_MOVT_ABS 48
370+#define R_ARM_THM_MOVW_PREL_NC 49
371+#define R_ARM_THM_MOVT_PREL 50
372+#define R_ARM_THM_JUMP19 51
373+#define R_ARM_THM_JUMP6 52
374+#define R_ARM_THM_ALU_PREL_11_0 53
375+#define R_ARM_THM_PC12 54
376+#define R_ARM_ABS32_NOI 55
377+#define R_ARM_REL32_NOI 56
378+#define R_ARM_ALU_PC_G0_NC 57
379+#define R_ARM_ALU_PC_G0 58
380+#define R_ARM_ALU_PC_G1_NC 59
381+#define R_ARM_ALU_PC_G1 60
382+#define R_ARM_ALU_PC_G2 61
383+#define R_ARM_LDR_PC_G1 62
384+#define R_ARM_LDR_PC_G2 63
385+#define R_ARM_LDRS_PC_G0 64
386+#define R_ARM_LDRS_PC_G1 65
387+#define R_ARM_LDRS_PC_G2 66
388+#define R_ARM_LDC_PC_G0 67
389+#define R_ARM_LDC_PC_G1 68
390+#define R_ARM_LDC_PC_G2 69
391+#define R_ARM_ALU_SB_G0_NC 70
392+#define R_ARM_ALU_SB_G0 71
393+#define R_ARM_ALU_SB_G1_NC 72
394+#define R_ARM_ALU_SB_G1 73
395+#define R_ARM_ALU_SB_G2 74
396+#define R_ARM_LDR_SB_G0 75
397+#define R_ARM_LDR_SB_G1 76
398+#define R_ARM_LDR_SB_G2 77
399+#define R_ARM_LDRS_SB_G0 78
400+#define R_ARM_LDRS_SB_G1 79
401+#define R_ARM_LDRS_SB_G2 80
402+#define R_ARM_LDC_G0 81
403+#define R_ARM_LDC_G1 82
404+#define R_ARM_LDC_G2 83
405+#define R_ARM_MOVW_BREL_NC 84
406+#define R_ARM_MOVT_BREL 85
407+#define R_ARM_MOVW_BREL 86
408+#define R_ARM_THM_MOVW_BREL_NC 87
409+#define R_ARM_THM_MOVT_BREL 88
410+#define R_ARM_THM_MOVW_BREL 89
411+/* 90-93 unallocated */
412+#define R_ARM_PLT32_ABS 94
413+#define R_ARM_GOT_ABS 95
414+#define R_ARM_GOT_PREL 96
415+#define R_ARM_GOT_BREL12 97
416+#define R_ARM_GOTOFF12 98
417+#define R_ARM_GOTRELAX 99
418 #define R_ARM_GNU_VTENTRY 100
419 #define R_ARM_GNU_VTINHERIT 101
420 #define R_ARM_THM_PC11 102 /* thumb unconditional branch */
421@@ -2364,6 +2437,12 @@
422 static TLS block offset */
423 #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
424 TLS block */
425+#define R_ARM_TLS_LDO12 109
426+#define R_ARM_TLS_LE12 110
427+#define R_ARM_TLS_IE12GP 111
428+/* 112 - 127 private range */
429+#define R_ARM_ME_TOO 128 /* obsolete */
430+
431 #define R_ARM_RXPC25 249
432 #define R_ARM_RSBREL32 250
433 #define R_ARM_THM_RPC22 251
434Index: elfutils-0.146/backends/libebl_arm.h
435===================================================================
436--- /dev/null 1970-01-01 00:00:00.000000000 +0000
437+++ elfutils-0.146/backends/libebl_arm.h 2010-04-24 10:11:13.000000000 +0000
438@@ -0,0 +1,9 @@
439+#ifndef _LIBEBL_ARM_H
440+#define _LIBEBL_ARM_H 1
441+
442+#include <libdw.h>
443+
444+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
445+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
446+
447+#endif
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/do-autoreconf.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/do-autoreconf.diff
new file mode 100644
index 0000000000..41afa5ef36
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/do-autoreconf.diff
@@ -0,0 +1,337 @@
1Generated by copying the whole dir, running `sh debian/autogen.sh` and diffing.
2
3Index: elfutils-0.148/backends/Makefile.in
4===================================================================
5--- elfutils-0.148.orig/backends/Makefile.in 2010-07-03 13:07:10.000000000 +0000
6+++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:13:52.000000000 +0000
7@@ -77,39 +77,54 @@
8 am__objects_4 = ia64_init.$(OBJEXT) ia64_symbol.$(OBJEXT) \
9 ia64_regs.$(OBJEXT) ia64_retval.$(OBJEXT)
10 libebl_ia64_pic_a_OBJECTS = $(am_libebl_ia64_pic_a_OBJECTS)
11+libebl_m68k_pic_a_AR = $(AR) $(ARFLAGS)
12+libebl_m68k_pic_a_LIBADD =
13+am__objects_5 = m68k_init.$(OBJEXT) m68k_symbol.$(OBJEXT) \
14+ m68k_regs.$(OBJEXT)
15+libebl_m68k_pic_a_OBJECTS = $(am_libebl_m68k_pic_a_OBJECTS)
16+libebl_mips_pic_a_AR = $(AR) $(ARFLAGS)
17+libebl_mips_pic_a_LIBADD =
18+am__objects_6 = mips_init.$(OBJEXT) mips_symbol.$(OBJEXT) \
19+ mips_regs.$(OBJEXT) mips_retval.$(OBJEXT)
20+libebl_mips_pic_a_OBJECTS = $(am_libebl_mips_pic_a_OBJECTS)
21+libebl_parisc_pic_a_AR = $(AR) $(ARFLAGS)
22+libebl_parisc_pic_a_LIBADD =
23+am__objects_7 = parisc_init.$(OBJEXT) parisc_symbol.$(OBJEXT) \
24+ parisc_regs.$(OBJEXT) parisc_retval.$(OBJEXT)
25+libebl_parisc_pic_a_OBJECTS = $(am_libebl_parisc_pic_a_OBJECTS)
26 libebl_ppc64_pic_a_AR = $(AR) $(ARFLAGS)
27 libebl_ppc64_pic_a_LIBADD =
28-am__objects_5 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \
29+am__objects_8 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \
30 ppc64_retval.$(OBJEXT) ppc64_corenote.$(OBJEXT) \
31 ppc_regs.$(OBJEXT) ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) \
32 ppc_syscall.$(OBJEXT)
33 libebl_ppc64_pic_a_OBJECTS = $(am_libebl_ppc64_pic_a_OBJECTS)
34 libebl_ppc_pic_a_AR = $(AR) $(ARFLAGS)
35 libebl_ppc_pic_a_LIBADD =
36-am__objects_6 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \
37+am__objects_9 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \
38 ppc_retval.$(OBJEXT) ppc_regs.$(OBJEXT) ppc_corenote.$(OBJEXT) \
39 ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) ppc_syscall.$(OBJEXT)
40 libebl_ppc_pic_a_OBJECTS = $(am_libebl_ppc_pic_a_OBJECTS)
41 libebl_s390_pic_a_AR = $(AR) $(ARFLAGS)
42 libebl_s390_pic_a_LIBADD =
43-am__objects_7 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \
44+am__objects_10 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \
45 s390_regs.$(OBJEXT) s390_retval.$(OBJEXT)
46 libebl_s390_pic_a_OBJECTS = $(am_libebl_s390_pic_a_OBJECTS)
47 libebl_sh_pic_a_AR = $(AR) $(ARFLAGS)
48 libebl_sh_pic_a_LIBADD =
49-am__objects_8 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \
50+am__objects_11 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \
51 sh_corenote.$(OBJEXT) sh_regs.$(OBJEXT) sh_retval.$(OBJEXT)
52 libebl_sh_pic_a_OBJECTS = $(am_libebl_sh_pic_a_OBJECTS)
53 libebl_sparc_pic_a_AR = $(AR) $(ARFLAGS)
54 libebl_sparc_pic_a_LIBADD =
55-am__objects_9 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \
56+am__objects_12 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \
57 sparc_regs.$(OBJEXT) sparc_retval.$(OBJEXT) \
58 sparc_corenote.$(OBJEXT) sparc64_corenote.$(OBJEXT) \
59 sparc_auxv.$(OBJEXT)
60 libebl_sparc_pic_a_OBJECTS = $(am_libebl_sparc_pic_a_OBJECTS)
61 libebl_x86_64_pic_a_AR = $(AR) $(ARFLAGS)
62 libebl_x86_64_pic_a_LIBADD =
63-am__objects_10 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \
64+am__objects_13 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \
65 x86_64_corenote.$(OBJEXT) x86_64_cfi.$(OBJEXT) \
66 x86_64_retval.$(OBJEXT) x86_64_regs.$(OBJEXT) \
67 i386_auxv.$(OBJEXT) x86_64_syscall.$(OBJEXT)
68@@ -124,15 +139,18 @@
69 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
70 SOURCES = $(libebl_alpha_pic_a_SOURCES) $(libebl_arm_pic_a_SOURCES) \
71 $(libebl_i386_pic_a_SOURCES) $(libebl_ia64_pic_a_SOURCES) \
72- $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \
73- $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \
74- $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES)
75-DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \
76- $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \
77- $(libebl_ia64_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \
78+ $(libebl_m68k_pic_a_SOURCES) $(libebl_mips_pic_a_SOURCES) \
79+ $(libebl_parisc_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \
80 $(libebl_ppc_pic_a_SOURCES) $(libebl_s390_pic_a_SOURCES) \
81 $(libebl_sh_pic_a_SOURCES) $(libebl_sparc_pic_a_SOURCES) \
82 $(libebl_x86_64_pic_a_SOURCES)
83+DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \
84+ $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \
85+ $(libebl_ia64_pic_a_SOURCES) $(libebl_m68k_pic_a_SOURCES) \
86+ $(libebl_mips_pic_a_SOURCES) $(libebl_parisc_pic_a_SOURCES) \
87+ $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \
88+ $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \
89+ $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES)
90 DATA = $(noinst_DATA)
91 HEADERS = $(noinst_HEADERS)
92 ETAGS = etags
93@@ -270,11 +288,12 @@
94 CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \
95 libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS))
96 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
97-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
98+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
99 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
100 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
101 libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
102- libebl_s390_pic.a
103+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
104+ libebl_m68k_pic.a
105
106 noinst_LIBRARIES = $(libebl_pic)
107 noinst_DATA = $(libebl_pic:_pic.a=.so)
108@@ -328,6 +347,15 @@
109 s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c
110 libebl_s390_pic_a_SOURCES = $(s390_SRCS)
111 am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
112+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
113+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
114+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
115+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
116+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
117+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
118+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
119+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
120+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
121 noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
122 EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def)
123 all: all-am
124@@ -383,6 +411,18 @@
125 -rm -f libebl_ia64_pic.a
126 $(libebl_ia64_pic_a_AR) libebl_ia64_pic.a $(libebl_ia64_pic_a_OBJECTS) $(libebl_ia64_pic_a_LIBADD)
127 $(RANLIB) libebl_ia64_pic.a
128+libebl_m68k_pic.a: $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_DEPENDENCIES)
129+ -rm -f libebl_m68k_pic.a
130+ $(libebl_m68k_pic_a_AR) libebl_m68k_pic.a $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_LIBADD)
131+ $(RANLIB) libebl_m68k_pic.a
132+libebl_mips_pic.a: $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_DEPENDENCIES)
133+ -rm -f libebl_mips_pic.a
134+ $(libebl_mips_pic_a_AR) libebl_mips_pic.a $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_LIBADD)
135+ $(RANLIB) libebl_mips_pic.a
136+libebl_parisc_pic.a: $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_DEPENDENCIES)
137+ -rm -f libebl_parisc_pic.a
138+ $(libebl_parisc_pic_a_AR) libebl_parisc_pic.a $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_LIBADD)
139+ $(RANLIB) libebl_parisc_pic.a
140 libebl_ppc64_pic.a: $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_DEPENDENCIES)
141 -rm -f libebl_ppc64_pic.a
142 $(libebl_ppc64_pic_a_AR) libebl_ppc64_pic.a $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_LIBADD)
143@@ -439,6 +479,17 @@
144 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_regs.Po@am__quote@
145 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_retval.Po@am__quote@
146 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_symbol.Po@am__quote@
147+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_init.Po@am__quote@
148+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_regs.Po@am__quote@
149+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_symbol.Po@am__quote@
150+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_init.Po@am__quote@
151+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_regs.Po@am__quote@
152+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_retval.Po@am__quote@
153+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_symbol.Po@am__quote@
154+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_init.Po@am__quote@
155+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_regs.Po@am__quote@
156+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_retval.Po@am__quote@
157+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_symbol.Po@am__quote@
158 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_corenote.Po@am__quote@
159 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_init.Po@am__quote@
160 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_retval.Po@am__quote@
161Index: elfutils-0.148/configure
162===================================================================
163--- elfutils-0.148.orig/configure 2010-07-03 13:06:16.000000000 +0000
164+++ elfutils-0.148/configure 2010-07-03 13:13:49.000000000 +0000
165@@ -602,6 +602,8 @@
166 base_cpu
167 NATIVE_LD_FALSE
168 NATIVE_LD_TRUE
169+LD_AS_NEEDED
170+WEXTRA
171 LEXLIB
172 LEX_OUTPUT_ROOT
173 LEX
174@@ -3852,6 +3854,130 @@
175 as_fn_error "gcc with C99 support required" "$LINENO" 5
176 fi
177
178+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
179+$as_echo_n "checking for -Wextra option to $CC... " >&6; }
180+if test "${ac_cv_cc_wextra+set}" = set; then :
181+ $as_echo_n "(cached) " >&6
182+else
183+ old_CFLAGS="$CFLAGS"
184+CFLAGS="$CFLAGS -Wextra"
185+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
186+/* end confdefs.h. */
187+void foo (void) { }
188+_ACEOF
189+if ac_fn_c_try_compile "$LINENO"; then :
190+ ac_cv_cc_wextra=yes
191+else
192+ ac_cv_cc_wextra=no
193+fi
194+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
195+CFLAGS="$old_CFLAGS"
196+fi
197+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
198+$as_echo "$ac_cv_cc_wextra" >&6; }
199+
200+if test "x$ac_cv_cc_wextra" = xyes; then :
201+ WEXTRA=-Wextra
202+else
203+ WEXTRA=-W
204+fi
205+
206+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
207+$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
208+if test "${ac_cv_cc_gnu89_inline+set}" = set; then :
209+ $as_echo_n "(cached) " >&6
210+else
211+ old_CFLAGS="$CFLAGS"
212+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
213+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
214+/* end confdefs.h. */
215+
216+void foo (void)
217+{
218+ inline void bar (void) {}
219+ bar ();
220+}
221+extern inline void baz (void) {}
222+
223+_ACEOF
224+if ac_fn_c_try_compile "$LINENO"; then :
225+ ac_cv_cc_gnu89_inline=yes
226+else
227+ ac_cv_cc_gnu89_inline=no
228+fi
229+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
230+CFLAGS="$old_CFLAGS"
231+fi
232+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
233+$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
234+if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
235+ WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
236+fi
237+
238+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
239+$as_echo_n "checking for --as-needed linker option... " >&6; }
240+if test "${ac_cv_as_needed+set}" = set; then :
241+ $as_echo_n "(cached) " >&6
242+else
243+ cat > conftest.c <<EOF
244+int main (void) { return 0; }
245+EOF
246+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
247+ -fPIC -shared -o conftest.so conftest.c
248+ -Wl,--as-needed 1>&5'
249+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
250+ (eval $ac_try) 2>&5
251+ ac_status=$?
252+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
253+ test $ac_status = 0; }; }
254+then
255+ ac_cv_as_needed=yes
256+else
257+ ac_cv_as_needed=no
258+fi
259+rm -f conftest*
260+fi
261+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
262+$as_echo "$ac_cv_as_needed" >&6; }
263+if test "x$ac_cv_as_needed" = xyes; then :
264+ LD_AS_NEEDED=-Wl,--as-needed
265+else
266+ LD_AS_NEEDED=
267+fi
268+
269+
270+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
271+$as_echo_n "checking for __builtin_popcount... " >&6; }
272+if test "${ac_cv_popcount+set}" = set; then :
273+ $as_echo_n "(cached) " >&6
274+else
275+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
276+/* end confdefs.h. */
277+
278+int
279+main ()
280+{
281+exit (__builtin_popcount (127));
282+ ;
283+ return 0;
284+}
285+_ACEOF
286+if ac_fn_c_try_link "$LINENO"; then :
287+ ac_cv_popcount=yes
288+else
289+ ac_cv_popcount=no
290+fi
291+rm -f core conftest.err conftest.$ac_objext \
292+ conftest$ac_exeext conftest.$ac_ext
293+fi
294+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
295+$as_echo "$ac_cv_popcount" >&6; }
296+if test "x$ac_cv_popcount" = xyes; then :
297+
298+$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
299+
300+fi
301+
302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
303 $as_echo_n "checking for __thread support... " >&6; }
304 if test "${ac_cv_tls+set}" = set; then :
305@@ -3888,7 +4014,13 @@
306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
307 $as_echo "$ac_cv_tls" >&6; }
308 if test "x$ac_cv_tls" != xyes; then :
309- as_fn_error "__thread support required" "$LINENO" 5
310+ if test "$use_locks" = yes; then :
311+ as_fn_error "--enable-thread-safety requires __thread support" "$LINENO" 5
312+else
313+
314+$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
315+
316+fi
317 fi
318
319 # Check whether --enable-largefile was given.
320@@ -4874,7 +5006,7 @@
321
322 # 1.234<whatever> -> 1234<whatever>
323 case "$PACKAGE_VERSION" in
324-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
325+[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
326 *) as_fn_error "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
327 esac
328 case "$eu_version" in
329@@ -4903,7 +5035,7 @@
330 esac
331
332 # Round up to the next release API (x.y) version.
333-eu_version=$[($eu_version + 999) / 1000]
334+eu_version=`expr \( $eu_version + 999 \) / 1000`
335
336 cat >confcache <<\_ACEOF
337 # This file is a shell script that caches the results of configure
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
new file mode 100644
index 0000000000..59a082b6cf
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
@@ -0,0 +1,69 @@
1Index: elfutils-0.146/libelf/elf.h
2===================================================================
3--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
4+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:22:43.000000000 +0000
5@@ -143,6 +143,7 @@
6 #define ELFOSABI_HPUX 1 /* HP-UX */
7 #define ELFOSABI_NETBSD 2 /* NetBSD. */
8 #define ELFOSABI_LINUX 3 /* Linux. */
9+#define ELFOSABI_HURD 4 /* GNU/Hurd */
10 #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
11 #define ELFOSABI_AIX 7 /* IBM AIX. */
12 #define ELFOSABI_IRIX 8 /* SGI Irix. */
13@@ -150,8 +151,13 @@
14 #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
15 #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
16 #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
17+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
18+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
19+#define ELFOSABI_AROS 15 /* Amiga Research OS */
20+/* 64-255 Architecture-specific value range */
21 #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
22 #define ELFOSABI_ARM 97 /* ARM */
23+/* This is deprecated? It's not in the latest version anymore. */
24 #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
25
26 #define EI_ABIVERSION 8 /* ABI version */
27@@ -206,7 +212,7 @@
28 #define EM_H8_300H 47 /* Hitachi H8/300H */
29 #define EM_H8S 48 /* Hitachi H8S */
30 #define EM_H8_500 49 /* Hitachi H8/500 */
31-#define EM_IA_64 50 /* Intel Merced */
32+#define EM_IA_64 50 /* Intel IA64 */
33 #define EM_MIPS_X 51 /* Stanford MIPS-X */
34 #define EM_COLDFIRE 52 /* Motorola Coldfire */
35 #define EM_68HC12 53 /* Motorola M68HC12 */
36@@ -220,7 +226,8 @@
37 #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
38 #define EM_X86_64 62 /* AMD x86-64 architecture */
39 #define EM_PDSP 63 /* Sony DSP Processor */
40-
41+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
42+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
43 #define EM_FX66 66 /* Siemens FX66 microcontroller */
44 #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
45 #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
46@@ -250,7 +257,22 @@
47 #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
48 #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
49 #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
50-#define EM_NUM 95
51+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
52+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
53+#define EM_NS32K 97 /* National Semiconductor 32000 series */
54+#define EM_TPC 98 /* Tenor Network TPC processor */
55+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
56+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
57+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
58+#define EM_MAX 102 /* MAX Processor */
59+#define EM_CR 103 /* National Semiconductor CompactRISC */
60+#define EM_F2MC16 104 /* Fujitsu F2MC16 */
61+#define EM_MSP430 105 /* TI msp430 micro controller */
62+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
63+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
64+#define EM_SEP 108 /* Sharp embedded microprocessor */
65+#define EM_ARCA 109 /* Arca RISC Microprocessor */
66+#define EM_NUM 110
67
68 /* If it is necessary to assign new unofficial EM_* values, please
69 pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
new file mode 100644
index 0000000000..9cf9cef525
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
@@ -0,0 +1,37 @@
1The ELF_T_LIB and ELF_T_GNUHASH sizes were missing from fsize table.
2
3This could cause a failure in the elf*_xlatetof function.
4
5diff -ur elfutils-0.148.orig/libelf/exttypes.h elfutils-0.148/libelf/exttypes.h
6--- elfutils-0.148.orig/libelf/exttypes.h 2009-01-08 12:56:37.000000000 -0800
7+++ elfutils-0.148/libelf/exttypes.h 2010-08-18 14:00:33.000000000 -0700
8@@ -94,6 +94,7 @@
9 Vernaux32 (Ext_);
10 Syminfo32 (Ext_);
11 Move32 (Ext_);
12+Lib32 (Ext_);
13 auxv_t32 (Ext_);
14
15 Ehdr64 (Ext_);
16@@ -110,6 +111,7 @@
17 Vernaux64 (Ext_);
18 Syminfo64 (Ext_);
19 Move64 (Ext_);
20+Lib64 (Ext_);
21 auxv_t64 (Ext_);
22
23 #undef START
24diff -ur elfutils-0.148.orig/libelf/gelf_fsize.c elfutils-0.148/libelf/gelf_fsize.c
25--- elfutils-0.148.orig/libelf/gelf_fsize.c 2009-01-08 12:56:37.000000000 -0800
26+++ elfutils-0.148/libelf/gelf_fsize.c 2010-08-18 14:11:57.000000000 -0700
27@@ -87,7 +87,9 @@
28 [ELF_T_NHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Nhdr)), \
29 [ELF_T_SYMINFO] = sizeof (ElfW2(LIBELFBITS, Ext_Syminfo)), \
30 [ELF_T_MOVE] = sizeof (ElfW2(LIBELFBITS, Ext_Move)), \
31- [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t))
32+ [ELF_T_LIB] = sizeof (ElfW2(LIBELFBITS, Ext_Lib)), \
33+ [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)), \
34+ [ELF_T_GNUHASH] = ELFW2(LIBELFBITS, FSZ_WORD)
35 TYPE_SIZES (32)
36 },
37 [ELFCLASS64 - 1] = {
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
new file mode 100644
index 0000000000..98353d5b4b
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
@@ -0,0 +1,799 @@
1Index: elfutils-0.146/backends/parisc_init.c
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ elfutils-0.146/backends/parisc_init.c 2010-04-24 10:10:50.000000000 +0000
5@@ -0,0 +1,74 @@
6+/* Initialization of PA-RISC specific backend library.
7+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
8+ This file is part of Red Hat elfutils.
9+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
10+
11+ Red Hat elfutils is free software; you can redistribute it and/or modify
12+ it under the terms of the GNU General Public License as published by the
13+ Free Software Foundation; version 2 of the License.
14+
15+ Red Hat elfutils is distributed in the hope that it will be useful, but
16+ WITHOUT ANY WARRANTY; without even the implied warranty of
17+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+ General Public License for more details.
19+
20+ You should have received a copy of the GNU General Public License along
21+ with Red Hat elfutils; if not, write to the Free Software Foundation,
22+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
23+
24+ Red Hat elfutils is an included package of the Open Invention Network.
25+ An included package of the Open Invention Network is a package for which
26+ Open Invention Network licensees cross-license their patents. No patent
27+ license is granted, either expressly or impliedly, by designation as an
28+ included package. Should you wish to participate in the Open Invention
29+ Network licensing program, please visit www.openinventionnetwork.com
30+ <http://www.openinventionnetwork.com>. */
31+
32+#ifdef HAVE_CONFIG_H
33+# include <config.h>
34+#endif
35+
36+#define BACKEND parisc_
37+#define RELOC_PREFIX R_PARISC_
38+#include "libebl_CPU.h"
39+#include "libebl_parisc.h"
40+
41+/* This defines the common reloc hooks based on parisc_reloc.def. */
42+#include "common-reloc.c"
43+
44+
45+const char *
46+parisc_init (elf, machine, eh, ehlen)
47+ Elf *elf __attribute__ ((unused));
48+ GElf_Half machine __attribute__ ((unused));
49+ Ebl *eh;
50+ size_t ehlen;
51+{
52+ int pa64 = 0;
53+
54+ /* Check whether the Elf_BH object has a sufficent size. */
55+ if (ehlen < sizeof (Ebl))
56+ return NULL;
57+
58+ if (elf) {
59+ GElf_Ehdr ehdr_mem;
60+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
61+ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
62+ pa64 = 1;
63+ }
64+ /* We handle it. */
65+ eh->name = "PA-RISC";
66+ parisc_init_reloc (eh);
67+ HOOK (eh, reloc_simple_type);
68+ HOOK (eh, machine_flag_check);
69+ HOOK (eh, symbol_type_name);
70+ HOOK (eh, segment_type_name);
71+ HOOK (eh, section_type_name);
72+ HOOK (eh, register_info);
73+ if (pa64)
74+ eh->return_value_location = parisc_return_value_location_64;
75+ else
76+ eh->return_value_location = parisc_return_value_location_32;
77+
78+ return MODVERSION;
79+}
80Index: elfutils-0.146/backends/parisc_regs.c
81===================================================================
82--- /dev/null 1970-01-01 00:00:00.000000000 +0000
83+++ elfutils-0.146/backends/parisc_regs.c 2010-04-24 10:10:50.000000000 +0000
84@@ -0,0 +1,159 @@
85+/* Register names and numbers for PA-RISC DWARF.
86+ Copyright (C) 2005, 2006 Red Hat, Inc.
87+ This file is part of Red Hat elfutils.
88+
89+ Red Hat elfutils is free software; you can redistribute it and/or modify
90+ it under the terms of the GNU General Public License as published by the
91+ Free Software Foundation; version 2 of the License.
92+
93+ Red Hat elfutils is distributed in the hope that it will be useful, but
94+ WITHOUT ANY WARRANTY; without even the implied warranty of
95+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
96+ General Public License for more details.
97+
98+ You should have received a copy of the GNU General Public License along
99+ with Red Hat elfutils; if not, write to the Free Software Foundation,
100+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
101+
102+ Red Hat elfutils is an included package of the Open Invention Network.
103+ An included package of the Open Invention Network is a package for which
104+ Open Invention Network licensees cross-license their patents. No patent
105+ license is granted, either expressly or impliedly, by designation as an
106+ included package. Should you wish to participate in the Open Invention
107+ Network licensing program, please visit www.openinventionnetwork.com
108+ <http://www.openinventionnetwork.com>. */
109+
110+#ifdef HAVE_CONFIG_H
111+# include <config.h>
112+#endif
113+
114+#include <string.h>
115+#include <dwarf.h>
116+
117+#define BACKEND parisc_
118+#include "libebl_CPU.h"
119+
120+ssize_t
121+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
122+ const char **prefix, const char **setname,
123+ int *bits, int *type)
124+{
125+ int pa64 = 0;
126+
127+ if (ebl->elf) {
128+ GElf_Ehdr ehdr_mem;
129+ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
130+ if (ehdr->e_flags & EF_PARISC_WIDE)
131+ pa64 = 1;
132+ }
133+
134+ int nregs = pa64 ? 127 : 128;
135+
136+ if (name == NULL)
137+ return nregs;
138+
139+ if (regno < 0 || regno >= nregs || namelen < 6)
140+ return -1;
141+
142+ *prefix = "%";
143+
144+ if (regno < 32)
145+ {
146+ *setname = "integer";
147+ *type = DW_ATE_signed;
148+ if (pa64)
149+ {
150+ *bits = 64;
151+ }
152+ else
153+ {
154+ *bits = 32;
155+ }
156+ }
157+ else if (regno == 32)
158+ {
159+ *setname = "special";
160+ if (pa64)
161+ {
162+ *bits = 6;
163+ }
164+ else
165+ {
166+ *bits = 5;
167+ }
168+ *type = DW_ATE_unsigned;
169+ }
170+ else
171+ {
172+ *setname = "FPU";
173+ *type = DW_ATE_float;
174+ if (pa64)
175+ {
176+ *bits = 64;
177+ }
178+ else
179+ {
180+ *bits = 32;
181+ }
182+ }
183+
184+ if (regno < 33) {
185+ switch (regno)
186+ {
187+ case 0 ... 9:
188+ name[0] = 'r';
189+ name[1] = regno + '0';
190+ namelen = 2;
191+ break;
192+ case 10 ... 31:
193+ name[0] = 'r';
194+ name[1] = regno / 10 + '0';
195+ name[2] = regno % 10 + '0';
196+ namelen = 3;
197+ break;
198+ case 32:
199+ *prefix = NULL;
200+ name[0] = 'S';
201+ name[1] = 'A';
202+ name[2] = 'R';
203+ namelen = 3;
204+ break;
205+ }
206+ }
207+ else {
208+ if (pa64 && ((regno - 72) % 2)) {
209+ *setname = NULL;
210+ return 0;
211+ }
212+
213+ switch (regno)
214+ {
215+ case 72 + 0 ... 72 + 11:
216+ name[0] = 'f';
217+ name[1] = 'r';
218+ name[2] = (regno + 8 - 72) / 2 + '0';
219+ namelen = 3;
220+ if ((regno + 8 - 72) % 2) {
221+ name[3] = 'R';
222+ namelen++;
223+ }
224+ break;
225+ case 72 + 12 ... 72 + 55:
226+ name[0] = 'f';
227+ name[1] = 'r';
228+ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
229+ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
230+ namelen = 4;
231+ if ((regno + 8 - 72) % 2) {
232+ name[4] = 'R';
233+ namelen++;
234+ }
235+ break;
236+ default:
237+ *setname = NULL;
238+ return 0;
239+ }
240+ }
241+ name[namelen++] = '\0';
242+ return namelen;
243+}
244Index: elfutils-0.146/backends/parisc_reloc.def
245===================================================================
246--- /dev/null 1970-01-01 00:00:00.000000000 +0000
247+++ elfutils-0.146/backends/parisc_reloc.def 2010-04-24 10:10:50.000000000 +0000
248@@ -0,0 +1,128 @@
249+/* List the relocation types for PA-RISC. -*- C -*-
250+ Copyright (C) 2005 Red Hat, Inc.
251+ This file is part of Red Hat elfutils.
252+
253+ Red Hat elfutils is free software; you can redistribute it and/or modify
254+ it under the terms of the GNU General Public License as published by the
255+ Free Software Foundation; version 2 of the License.
256+
257+ Red Hat elfutils is distributed in the hope that it will be useful, but
258+ WITHOUT ANY WARRANTY; without even the implied warranty of
259+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
260+ General Public License for more details.
261+
262+ You should have received a copy of the GNU General Public License along
263+ with Red Hat elfutils; if not, write to the Free Software Foundation,
264+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
265+
266+ Red Hat elfutils is an included package of the Open Invention Network.
267+ An included package of the Open Invention Network is a package for which
268+ Open Invention Network licensees cross-license their patents. No patent
269+ license is granted, either expressly or impliedly, by designation as an
270+ included package. Should you wish to participate in the Open Invention
271+ Network licensing program, please visit www.openinventionnetwork.com
272+ <http://www.openinventionnetwork.com>. */
273+
274+/* NAME, REL|EXEC|DYN */
275+
276+RELOC_TYPE (NONE, EXEC|DYN)
277+RELOC_TYPE (DIR32, REL|EXEC|DYN)
278+RELOC_TYPE (DIR21L, REL|EXEC|DYN)
279+RELOC_TYPE (DIR17R, REL)
280+RELOC_TYPE (DIR17F, REL)
281+RELOC_TYPE (DIR14R, REL|DYN)
282+RELOC_TYPE (PCREL32, REL)
283+RELOC_TYPE (PCREL21L, REL)
284+RELOC_TYPE (PCREL17R, REL)
285+RELOC_TYPE (PCREL17F, REL)
286+RELOC_TYPE (PCREL14R, REL|EXEC)
287+RELOC_TYPE (DPREL21L, REL)
288+RELOC_TYPE (DPREL14WR, REL)
289+RELOC_TYPE (DPREL14DR, REL)
290+RELOC_TYPE (DPREL14R, REL)
291+RELOC_TYPE (GPREL21L, 0)
292+RELOC_TYPE (GPREL14R, 0)
293+RELOC_TYPE (LTOFF21L, REL)
294+RELOC_TYPE (LTOFF14R, REL)
295+RELOC_TYPE (DLTIND14F, 0)
296+RELOC_TYPE (SETBASE, 0)
297+RELOC_TYPE (SECREL32, REL)
298+RELOC_TYPE (BASEREL21L, 0)
299+RELOC_TYPE (BASEREL17R, 0)
300+RELOC_TYPE (BASEREL14R, 0)
301+RELOC_TYPE (SEGBASE, 0)
302+RELOC_TYPE (SEGREL32, REL)
303+RELOC_TYPE (PLTOFF21L, 0)
304+RELOC_TYPE (PLTOFF14R, 0)
305+RELOC_TYPE (PLTOFF14F, 0)
306+RELOC_TYPE (LTOFF_FPTR32, 0)
307+RELOC_TYPE (LTOFF_FPTR21L, 0)
308+RELOC_TYPE (LTOFF_FPTR14R, 0)
309+RELOC_TYPE (FPTR64, 0)
310+RELOC_TYPE (PLABEL32, REL|DYN)
311+RELOC_TYPE (PCREL64, 0)
312+RELOC_TYPE (PCREL22C, 0)
313+RELOC_TYPE (PCREL22F, 0)
314+RELOC_TYPE (PCREL14WR, 0)
315+RELOC_TYPE (PCREL14DR, 0)
316+RELOC_TYPE (PCREL16F, 0)
317+RELOC_TYPE (PCREL16WF, 0)
318+RELOC_TYPE (PCREL16DF, 0)
319+RELOC_TYPE (DIR64, REL|DYN)
320+RELOC_TYPE (DIR14WR, REL)
321+RELOC_TYPE (DIR14DR, REL)
322+RELOC_TYPE (DIR16F, REL)
323+RELOC_TYPE (DIR16WF, REL)
324+RELOC_TYPE (DIR16DF, REL)
325+RELOC_TYPE (GPREL64, 0)
326+RELOC_TYPE (GPREL14WR, 0)
327+RELOC_TYPE (GPREL14DR, 0)
328+RELOC_TYPE (GPREL16F, 0)
329+RELOC_TYPE (GPREL16WF, 0)
330+RELOC_TYPE (GPREL16DF, 0)
331+RELOC_TYPE (LTOFF64, 0)
332+RELOC_TYPE (LTOFF14WR, 0)
333+RELOC_TYPE (LTOFF14DR, 0)
334+RELOC_TYPE (LTOFF16F, 0)
335+RELOC_TYPE (LTOFF16WF, 0)
336+RELOC_TYPE (LTOFF16DF, 0)
337+RELOC_TYPE (SECREL64, 0)
338+RELOC_TYPE (BASEREL14WR, 0)
339+RELOC_TYPE (BASEREL14DR, 0)
340+RELOC_TYPE (SEGREL64, 0)
341+RELOC_TYPE (PLTOFF14WR, 0)
342+RELOC_TYPE (PLTOFF14DR, 0)
343+RELOC_TYPE (PLTOFF16F, 0)
344+RELOC_TYPE (PLTOFF16WF, 0)
345+RELOC_TYPE (PLTOFF16DF, 0)
346+RELOC_TYPE (LTOFF_FPTR64, 0)
347+RELOC_TYPE (LTOFF_FPTR14WR, 0)
348+RELOC_TYPE (LTOFF_FPTR14DR, 0)
349+RELOC_TYPE (LTOFF_FPTR16F, 0)
350+RELOC_TYPE (LTOFF_FPTR16WF, 0)
351+RELOC_TYPE (LTOFF_FPTR16DF, 0)
352+RELOC_TYPE (COPY, EXEC)
353+RELOC_TYPE (IPLT, EXEC|DYN)
354+RELOC_TYPE (EPLT, 0)
355+RELOC_TYPE (TPREL32, DYN)
356+RELOC_TYPE (TPREL21L, 0)
357+RELOC_TYPE (TPREL14R, 0)
358+RELOC_TYPE (LTOFF_TP21L, 0)
359+RELOC_TYPE (LTOFF_TP14R, 0)
360+RELOC_TYPE (LTOFF_TP14F, 0)
361+RELOC_TYPE (TPREL64, 0)
362+RELOC_TYPE (TPREL14WR, 0)
363+RELOC_TYPE (TPREL14DR, 0)
364+RELOC_TYPE (TPREL16F, 0)
365+RELOC_TYPE (TPREL16WF, 0)
366+RELOC_TYPE (TPREL16DF, 0)
367+RELOC_TYPE (LTOFF_TP64, 0)
368+RELOC_TYPE (LTOFF_TP14WR, 0)
369+RELOC_TYPE (LTOFF_TP14DR, 0)
370+RELOC_TYPE (LTOFF_TP16F, 0)
371+RELOC_TYPE (LTOFF_TP16WF, 0)
372+RELOC_TYPE (LTOFF_TP16DF, 0)
373+RELOC_TYPE (TLS_DTPMOD32, DYN)
374+RELOC_TYPE (TLS_DTPMOD64, DYN)
375+
376+#define NO_RELATIVE_RELOC 1
377Index: elfutils-0.146/backends/parisc_retval.c
378===================================================================
379--- /dev/null 1970-01-01 00:00:00.000000000 +0000
380+++ elfutils-0.146/backends/parisc_retval.c 2010-04-24 10:10:50.000000000 +0000
381@@ -0,0 +1,213 @@
382+/* Function return value location for Linux/PA-RISC ABI.
383+ Copyright (C) 2005 Red Hat, Inc.
384+ This file is part of Red Hat elfutils.
385+
386+ Red Hat elfutils is free software; you can redistribute it and/or modify
387+ it under the terms of the GNU General Public License as published by the
388+ Free Software Foundation; version 2 of the License.
389+
390+ Red Hat elfutils is distributed in the hope that it will be useful, but
391+ WITHOUT ANY WARRANTY; without even the implied warranty of
392+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
393+ General Public License for more details.
394+
395+ You should have received a copy of the GNU General Public License along
396+ with Red Hat elfutils; if not, write to the Free Software Foundation,
397+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
398+
399+ Red Hat elfutils is an included package of the Open Invention Network.
400+ An included package of the Open Invention Network is a package for which
401+ Open Invention Network licensees cross-license their patents. No patent
402+ license is granted, either expressly or impliedly, by designation as an
403+ included package. Should you wish to participate in the Open Invention
404+ Network licensing program, please visit www.openinventionnetwork.com
405+ <http://www.openinventionnetwork.com>. */
406+
407+#ifdef HAVE_CONFIG_H
408+# include <config.h>
409+#endif
410+
411+#include <assert.h>
412+#include <dwarf.h>
413+
414+#define BACKEND parisc_
415+#include "libebl_CPU.h"
416+#include "libebl_parisc.h"
417+
418+/* %r28, or pair %r28, %r29. */
419+static const Dwarf_Op loc_intreg32[] =
420+ {
421+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
422+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
423+ };
424+
425+static const Dwarf_Op loc_intreg[] =
426+ {
427+ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
428+ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
429+ };
430+#define nloc_intreg 1
431+#define nloc_intregpair 4
432+
433+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
434+static const Dwarf_Op loc_fpreg32[] =
435+ {
436+ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
437+ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
438+ };
439+#define nloc_fpreg32 2
440+#define nloc_fpregpair32 4
441+
442+/* $fr4 */
443+static const Dwarf_Op loc_fpreg[] =
444+ {
445+ { .atom = DW_OP_regx, .number = 72 },
446+ };
447+#define nloc_fpreg 1
448+
449+#if 0
450+/* The return value is a structure and is actually stored in stack space
451+ passed in a hidden argument by the caller. Address of the location is stored
452+ in %r28 before function call, but it may be changed by function. */
453+static const Dwarf_Op loc_aggregate[] =
454+ {
455+ { .atom = DW_OP_breg28 },
456+ };
457+#define nloc_aggregate 1
458+#endif
459+
460+static int
461+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
462+{
463+ Dwarf_Word regsize = pa64 ? 8 : 4;
464+
465+ /* Start with the function's type, and get the DW_AT_type attribute,
466+ which is the type of the return value. */
467+
468+ Dwarf_Attribute attr_mem;
469+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
470+ if (attr == NULL)
471+ /* The function has no return value, like a `void' function in C. */
472+ return 0;
473+
474+ Dwarf_Die die_mem;
475+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
476+ int tag = dwarf_tag (typedie);
477+
478+ /* Follow typedefs and qualifiers to get to the actual type. */
479+ while (tag == DW_TAG_typedef
480+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
481+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
482+ {
483+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
484+ typedie = dwarf_formref_die (attr, &die_mem);
485+ tag = dwarf_tag (typedie);
486+ }
487+
488+ switch (tag)
489+ {
490+ case -1:
491+ return -1;
492+
493+ case DW_TAG_subrange_type:
494+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
495+ {
496+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
497+ typedie = dwarf_formref_die (attr, &die_mem);
498+ tag = dwarf_tag (typedie);
499+ }
500+ /* Fall through. */
501+
502+ case DW_TAG_base_type:
503+ case DW_TAG_enumeration_type:
504+ case DW_TAG_pointer_type:
505+ case DW_TAG_ptr_to_member_type:
506+ {
507+ Dwarf_Word size;
508+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
509+ &attr_mem), &size) != 0)
510+ {
511+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
512+ size = 4;
513+ else
514+ return -1;
515+ }
516+ if (tag == DW_TAG_base_type)
517+ {
518+ Dwarf_Word encoding;
519+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
520+ &attr_mem), &encoding) != 0)
521+ return -1;
522+
523+ if (encoding == DW_ATE_float)
524+ {
525+ if (pa64) {
526+ *locp = loc_fpreg;
527+ if (size <= 8)
528+ return nloc_fpreg;
529+ }
530+ else {
531+ *locp = loc_fpreg32;
532+ if (size <= 4)
533+ return nloc_fpreg32;
534+ else if (size <= 8)
535+ return nloc_fpregpair32;
536+ }
537+ goto aggregate;
538+ }
539+ }
540+ if (pa64)
541+ *locp = loc_intreg;
542+ else
543+ *locp = loc_intreg32;
544+ if (size <= regsize)
545+ return nloc_intreg;
546+ if (size <= 2 * regsize)
547+ return nloc_intregpair;
548+
549+ /* Else fall through. */
550+ }
551+
552+ case DW_TAG_structure_type:
553+ case DW_TAG_class_type:
554+ case DW_TAG_union_type:
555+ case DW_TAG_array_type:
556+ aggregate: {
557+ Dwarf_Word size;
558+ if (dwarf_aggregate_size (typedie, &size) != 0)
559+ return -1;
560+ if (pa64)
561+ *locp = loc_intreg;
562+ else
563+ *locp = loc_intreg32;
564+ if (size <= regsize)
565+ return nloc_intreg;
566+ if (size <= 2 * regsize)
567+ return nloc_intregpair;
568+#if 0
569+ /* there should be some way to know this location... But I do not see it. */
570+ *locp = loc_aggregate;
571+ return nloc_aggregate;
572+#endif
573+ /* fall through. */
574+ }
575+ }
576+
577+ /* XXX We don't have a good way to return specific errors from ebl calls.
578+ This value means we do not understand the type, but it is well-formed
579+ DWARF and might be valid. */
580+ return -2;
581+}
582+
583+int
584+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
585+{
586+ return parisc_return_value_location_ (functypedie, locp, 0);
587+}
588+
589+int
590+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
591+{
592+ return parisc_return_value_location_ (functypedie, locp, 1);
593+}
594+
595Index: elfutils-0.146/backends/parisc_symbol.c
596===================================================================
597--- /dev/null 1970-01-01 00:00:00.000000000 +0000
598+++ elfutils-0.146/backends/parisc_symbol.c 2010-04-24 10:10:50.000000000 +0000
599@@ -0,0 +1,112 @@
600+/* PA-RISC specific symbolic name handling.
601+ Copyright (C) 2002, 2005 Red Hat, Inc.
602+ This file is part of Red Hat elfutils.
603+ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
604+
605+ Red Hat elfutils is free software; you can redistribute it and/or modify
606+ it under the terms of the GNU General Public License as published by the
607+ Free Software Foundation; version 2 of the License.
608+
609+ Red Hat elfutils is distributed in the hope that it will be useful, but
610+ WITHOUT ANY WARRANTY; without even the implied warranty of
611+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
612+ General Public License for more details.
613+
614+ You should have received a copy of the GNU General Public License along
615+ with Red Hat elfutils; if not, write to the Free Software Foundation,
616+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
617+
618+ Red Hat elfutils is an included package of the Open Invention Network.
619+ An included package of the Open Invention Network is a package for which
620+ Open Invention Network licensees cross-license their patents. No patent
621+ license is granted, either expressly or impliedly, by designation as an
622+ included package. Should you wish to participate in the Open Invention
623+ Network licensing program, please visit www.openinventionnetwork.com
624+ <http://www.openinventionnetwork.com>. */
625+
626+#ifdef HAVE_CONFIG_H
627+# include <config.h>
628+#endif
629+
630+#include <elf.h>
631+#include <stddef.h>
632+
633+#define BACKEND parisc_
634+#include "libebl_CPU.h"
635+
636+const char *
637+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
638+ size_t len __attribute__ ((unused)))
639+{
640+ switch (segment)
641+ {
642+ case PT_PARISC_ARCHEXT:
643+ return "PARISC_ARCHEXT";
644+ case PT_PARISC_UNWIND:
645+ return "PARISC_UNWIND";
646+ default:
647+ break;
648+ }
649+ return NULL;
650+}
651+
652+/* Return symbolic representation of symbol type. */
653+const char *
654+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
655+ size_t len __attribute__ ((unused)))
656+{
657+ if (symbol == STT_PARISC_MILLICODE)
658+ return "PARISC_MILLI";
659+ return NULL;
660+}
661+
662+/* Return symbolic representation of section type. */
663+const char *
664+parisc_section_type_name (int type,
665+ char *buf __attribute__ ((unused)),
666+ size_t len __attribute__ ((unused)))
667+{
668+ switch (type)
669+ {
670+ case SHT_PARISC_EXT:
671+ return "PARISC_EXT";
672+ case SHT_PARISC_UNWIND:
673+ return "PARISC_UNWIND";
674+ case SHT_PARISC_DOC:
675+ return "PARISC_DOC";
676+ }
677+
678+ return NULL;
679+}
680+
681+/* Check whether machine flags are valid. */
682+bool
683+parisc_machine_flag_check (GElf_Word flags)
684+{
685+ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
686+ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
687+ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
688+ return 0;
689+
690+ GElf_Word arch = flags & EF_PARISC_ARCH;
691+
692+ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
693+ (arch == EFA_PARISC_2_0));
694+}
695+
696+/* Check for the simple reloc types. */
697+Elf_Type
698+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
699+{
700+ switch (type)
701+ {
702+ case R_PARISC_DIR64:
703+ case R_PARISC_SECREL64:
704+ return ELF_T_XWORD;
705+ case R_PARISC_DIR32:
706+ case R_PARISC_SECREL32:
707+ return ELF_T_WORD;
708+ default:
709+ return ELF_T_NUM;
710+ }
711+}
712Index: elfutils-0.146/backends/libebl_parisc.h
713===================================================================
714--- /dev/null 1970-01-01 00:00:00.000000000 +0000
715+++ elfutils-0.146/backends/libebl_parisc.h 2010-04-24 10:10:50.000000000 +0000
716@@ -0,0 +1,9 @@
717+#ifndef _LIBEBL_HPPA_H
718+#define _LIBEBL_HPPA_H 1
719+
720+#include <libdw.h>
721+
722+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
723+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
724+
725+#endif
726Index: elfutils-0.146/backends/Makefile.am
727===================================================================
728--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:10:41.000000000 +0000
729+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:10:50.000000000 +0000
730@@ -29,11 +29,11 @@
731 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
732
733
734-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
735+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
736 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
737 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
738 libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
739- libebl_s390_pic.a
740+ libebl_s390_pic.a libebl_parisc_pic.a
741 noinst_LIBRARIES = $(libebl_pic)
742 noinst_DATA = $(libebl_pic:_pic.a=.so)
743
744@@ -95,6 +95,9 @@
745 libebl_s390_pic_a_SOURCES = $(s390_SRCS)
746 am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
747
748+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
749+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
750+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
751
752 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
753 @rm -f $(@:.so=.map)
754Index: elfutils-0.146/libelf/elf.h
755===================================================================
756--- elfutils-0.146.orig/libelf/elf.h 2010-04-13 20:08:02.000000000 +0000
757+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:10:50.000000000 +0000
758@@ -1789,16 +1789,24 @@
759 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
760 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
761 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
762+#define R_PARISC_DPREL14WR 19
763+#define R_PARISC_DPREL14DR 20
764 #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
765 #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
766 #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
767 #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
768 #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
769+#define R_PARISC_DLTIND14F 39
770+#define R_PARISC_SETBASE 40
771 #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
772+#define R_PARISC_BASEREL21L 42
773+#define R_PARISC_BASEREL17R 43
774+#define R_PARISC_BASEREL14R 46
775 #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
776 #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
777 #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
778 #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
779+#define R_PARISC_PLTOFF14F 55
780 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
781 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
782 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
783@@ -1807,6 +1815,7 @@
784 #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
785 #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
786 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
787+#define R_PARISC_PCREL22C 73
788 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
789 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
790 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
791@@ -1832,6 +1841,8 @@
792 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
793 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
794 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
795+#define R_PARISC_BASEREL14WR 107
796+#define R_PARISC_BASEREL14DR 108
797 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
798 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
799 #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h b/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h
new file mode 100644
index 0000000000..a5cc01f919
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h
@@ -0,0 +1,1657 @@
1#define MNEMONIC_BITS 10
2#define SUFFIX_BITS 3
3#define FCT1_BITS 7
4#define STR1_BITS 4
5#define OFF1_1_BITS 7
6#define OFF1_1_BIAS 3
7#define OFF1_2_BITS 7
8#define OFF1_2_BIAS 4
9#define OFF1_3_BITS 1
10#define OFF1_3_BIAS 7
11#define FCT2_BITS 6
12#define STR2_BITS 2
13#define OFF2_1_BITS 7
14#define OFF2_1_BIAS 5
15#define OFF2_2_BITS 7
16#define OFF2_2_BIAS 4
17#define OFF2_3_BITS 4
18#define OFF2_3_BIAS 7
19#define FCT3_BITS 4
20#define STR3_BITS 1
21#define OFF3_1_BITS 6
22#define OFF3_1_BIAS 10
23#define OFF3_2_BITS 1
24#define OFF3_2_BIAS 21
25
26#include <i386_data.h>
27
28#define suffix_none 0
29#define suffix_w 1
30#define suffix_w0 2
31#define suffix_W 3
32#define suffix_tttn 4
33#define suffix_D 7
34#define suffix_w1 5
35#define suffix_W1 6
36
37static const opfct_t op1_fct[] =
38{
39 NULL,
40 FCT_MOD$R_M,
41 FCT_Mod$R_m,
42 FCT_abs,
43 FCT_ax,
44 FCT_ax$w,
45 FCT_ccc,
46 FCT_ddd,
47 FCT_disp8,
48 FCT_ds_bx,
49 FCT_ds_si,
50 FCT_dx,
51 FCT_es_di,
52 FCT_freg,
53 FCT_imm$s,
54 FCT_imm$w,
55 FCT_imm16,
56 FCT_imm8,
57 FCT_imms8,
58 FCT_mmxreg,
59 FCT_mod$16r_m,
60 FCT_mod$64r_m,
61 FCT_mod$8r_m,
62 FCT_mod$r_m,
63 FCT_mod$r_m$w,
64 FCT_reg,
65 FCT_reg$w,
66 FCT_reg16,
67 FCT_reg64,
68 FCT_rel,
69 FCT_sel,
70 FCT_sreg2,
71 FCT_sreg3,
72 FCT_string,
73 FCT_xmmreg,
74};
75static const char op1_str[] =
76 "%ax\0"
77 "%cl\0"
78 "%eax\0"
79 "%st\0"
80 "%xmm0\0"
81 "*";
82static const uint8_t op1_str_idx[] = {
83 0,
84 4,
85 8,
86 13,
87 17,
88 23,
89};
90static const opfct_t op2_fct[] =
91{
92 NULL,
93 FCT_MOD$R_M,
94 FCT_Mod$R_m,
95 FCT_abs,
96 FCT_absval,
97 FCT_ax$w,
98 FCT_ccc,
99 FCT_ddd,
100 FCT_ds_si,
101 FCT_dx,
102 FCT_es_di,
103 FCT_freg,
104 FCT_imm8,
105 FCT_mmxreg,
106 FCT_mod$64r_m,
107 FCT_mod$r_m,
108 FCT_mod$r_m$w,
109 FCT_moda$r_m,
110 FCT_reg,
111 FCT_reg$w,
112 FCT_reg64,
113 FCT_sreg3,
114 FCT_string,
115 FCT_xmmreg,
116};
117static const char op2_str[] =
118 "%ecx\0"
119 "%st";
120static const uint8_t op2_str_idx[] = {
121 0,
122 5,
123};
124static const opfct_t op3_fct[] =
125{
126 NULL,
127 FCT_mmxreg,
128 FCT_mod$r_m,
129 FCT_reg,
130 FCT_string,
131 FCT_xmmreg,
132};
133static const char op3_str[] =
134 "%edx";
135static const uint8_t op3_str_idx[] = {
136 0,
137};
138static const struct instr_enc instrtab[] =
139{
140 { .mnemonic = MNE_aaa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
141 { .mnemonic = MNE_aad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
142 { .mnemonic = MNE_aam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
143 { .mnemonic = MNE_aas, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
144 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
145 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
146 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
147 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
148 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
149 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
150 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
151 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
152 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
153 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
154 { .mnemonic = MNE_addsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
155 { .mnemonic = MNE_addsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
156 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
157 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
158 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
159 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
160 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
161 { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
162 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
163 { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
164 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
165 { .mnemonic = MNE_arpl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
166 { .mnemonic = MNE_bound, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 17, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
167 { .mnemonic = MNE_bsf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
168 { .mnemonic = MNE_bsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
169 { .mnemonic = MNE_bswap, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
170 { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
171 { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
172 { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
173 { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
174 { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
175 { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
176 { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
177 { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
178 { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
179 { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
180 { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
181 { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
182 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
183 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
184 { .mnemonic = MNE_clc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
185 { .mnemonic = MNE_cld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
186 { .mnemonic = MNE_cli, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
187 { .mnemonic = MNE_syscall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
188 { .mnemonic = MNE_clts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
189 { .mnemonic = MNE_sysret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
190 { .mnemonic = MNE_sysenter, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
191 { .mnemonic = MNE_sysexit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
192 { .mnemonic = MNE_cmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
193 { .mnemonic = MNE_cmov, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
194 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
195 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
196 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
197 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
198 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
199 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
200 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
201 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
202 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
203 { .mnemonic = MNE_cmps, .rep = 0, .repe = 1, .suffix = 1, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 8, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
204 { .mnemonic = MNE_cmpxchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
205 { .mnemonic = MNE_cmpxchg8b, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
206 { .mnemonic = MNE_cpuid, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
207 { .mnemonic = MNE_cvtdq2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
208 { .mnemonic = MNE_cvtpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
209 { .mnemonic = MNE_cvttpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
210 { .mnemonic = MNE_daa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
211 { .mnemonic = MNE_das, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
212 { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
213 { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
214 { .mnemonic = MNE_div, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
215 { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
216 { .mnemonic = MNE_enter, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 19, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
217 { .mnemonic = MNE_fnop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
218 { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
219 { .mnemonic = MNE_fabs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
220 { .mnemonic = MNE_ftst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
221 { .mnemonic = MNE_fxam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
222 { .mnemonic = MNE_fld1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
223 { .mnemonic = MNE_fldl2t, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
224 { .mnemonic = MNE_fldl2e, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
225 { .mnemonic = MNE_fldpi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
226 { .mnemonic = MNE_fldlg2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
227 { .mnemonic = MNE_fldln2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
228 { .mnemonic = MNE_fldz, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
229 { .mnemonic = MNE_f2xm1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
230 { .mnemonic = MNE_fyl2x, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
231 { .mnemonic = MNE_fptan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
232 { .mnemonic = MNE_fpatan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
233 { .mnemonic = MNE_fxtract, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
234 { .mnemonic = MNE_fprem1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
235 { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
236 { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
237 { .mnemonic = MNE_fprem, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
238 { .mnemonic = MNE_fyl2xp1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
239 { .mnemonic = MNE_fsqrt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
240 { .mnemonic = MNE_fsincos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
241 { .mnemonic = MNE_frndint, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
242 { .mnemonic = MNE_fscale, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
243 { .mnemonic = MNE_fsin, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
244 { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
245 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
246 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
247 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
248 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
249 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
250 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
251 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
252 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
253 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
254 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
255 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
256 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
257 { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
258 { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
259 { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
260 { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
261 { .mnemonic = MNE_fldenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
262 { .mnemonic = MNE_fldcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
263 { .mnemonic = MNE_fnstenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
264 { .mnemonic = MNE_fnstcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
265 { .mnemonic = MNE_fxch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
266 { .mnemonic = MNE_faddp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
267 { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
268 { .mnemonic = MNE_fiadd, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
269 { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
270 { .mnemonic = MNE_fmulp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
271 { .mnemonic = MNE_fimul, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
272 { .mnemonic = MNE_fsubp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
273 { .mnemonic = MNE_fisub, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
274 { .mnemonic = MNE_fsubrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
275 { .mnemonic = MNE_fisubr, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
276 { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 1, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
277 { .mnemonic = MNE_fbld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
278 { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
279 { .mnemonic = MNE_fbstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
280 { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
281 { .mnemonic = MNE_fclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
282 { .mnemonic = MNE_finit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
283 { .mnemonic = MNE_fwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
284 { .mnemonic = MNE_fnclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
285 { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
286 { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
287 { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
288 { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
289 { .mnemonic = MNE_fcmovnb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
290 { .mnemonic = MNE_fcmovne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
291 { .mnemonic = MNE_fcmovnbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
292 { .mnemonic = MNE_fcmovnu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
293 { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
294 { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
295 { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
296 { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
297 { .mnemonic = MNE_fcompp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
298 { .mnemonic = MNE_fcomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
299 { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
300 { .mnemonic = MNE_fucomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
301 { .mnemonic = MNE_fucomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
302 { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
303 { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
304 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
305 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
306 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
307 { .mnemonic = MNE_fidivl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
308 { .mnemonic = MNE_fdivp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
309 { .mnemonic = MNE_fidiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
310 { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
311 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
312 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
313 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
314 { .mnemonic = MNE_fidivrl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
315 { .mnemonic = MNE_fidivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
316 { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
317 { .mnemonic = MNE_ffree, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
318 { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
319 { .mnemonic = MNE_ficom, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
320 { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
321 { .mnemonic = MNE_ficomp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
322 { .mnemonic = MNE_fild, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
323 { .mnemonic = MNE_fildl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
324 { .mnemonic = MNE_fildll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
325 { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
326 { .mnemonic = MNE_fninit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
327 { .mnemonic = MNE_fist, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
328 { .mnemonic = MNE_fistp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
329 { .mnemonic = MNE_fistpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
330 { .mnemonic = MNE_fisttp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
331 { .mnemonic = MNE_fisttpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
332 { .mnemonic = MNE_fldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
333 { .mnemonic = MNE_fstpt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
334 { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
335 { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
336 { .mnemonic = MNE_fucom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
337 { .mnemonic = MNE_frstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
338 { .mnemonic = MNE_fucomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
339 { .mnemonic = MNE_fnsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
340 { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
341 { .mnemonic = MNE_hlt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
342 { .mnemonic = MNE_idiv, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
343 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
344 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
345 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 14, .str1 = 0, .off1_1 = 13, .off1_2 = 2, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
346 { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
347 { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
348 { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
349 { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
350 { .mnemonic = MNE_ins, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
351 { .mnemonic = MNE_int, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
352 { .mnemonic = MNE_int3, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
353 { .mnemonic = MNE_into, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
354 { .mnemonic = MNE_invd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
355 { .mnemonic = MNE_swapgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
356 { .mnemonic = MNE_invlpg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
357 { .mnemonic = MNE_iret, .rep = 0, .repe = 0, .suffix = 6, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
358 { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
359 { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
360 { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
361 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
362 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
363 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
364 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
365 { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
366 { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 21, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
367 { .mnemonic = MNE_lahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
368 { .mnemonic = MNE_lar, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
369 { .mnemonic = MNE_lds, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
370 { .mnemonic = MNE_lea, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
371 { .mnemonic = MNE_leave, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
372 { .mnemonic = MNE_les, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
373 { .mnemonic = MNE_lfs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
374 { .mnemonic = MNE_lgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
375 { .mnemonic = MNE_lgdt, .rep = 0, .repe = 0, .suffix = 2, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
376 { .mnemonic = MNE_lidt, .rep = 0, .repe = 0, .suffix = 2, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
377 { .mnemonic = MNE_lldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
378 { .mnemonic = MNE_lmsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
379 { .mnemonic = MNE_lock, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
380 { .mnemonic = MNE_lods, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
381 { .mnemonic = MNE_loop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
382 { .mnemonic = MNE_loope, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
383 { .mnemonic = MNE_loopne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
384 { .mnemonic = MNE_lsl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
385 { .mnemonic = MNE_lss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
386 { .mnemonic = MNE_ltr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
387 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
388 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
389 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
390 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
391 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 3, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 35, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
392 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 37, .off1_2 = 3, .off1_3 = 0, .fct2 = 3, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
393 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 6, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
394 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 6, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
395 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 7, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
396 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 7, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
397 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
398 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
399 { .mnemonic = MNE_movs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
400 { .mnemonic = MNE_movsbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
401 { .mnemonic = MNE_movswl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
402 { .mnemonic = MNE_movzbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
403 { .mnemonic = MNE_movzwl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
404 { .mnemonic = MNE_mul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
405 { .mnemonic = MNE_neg, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
406 { .mnemonic = MNE_pause, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
407 { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
408 { .mnemonic = MNE_popcnt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
409 { .mnemonic = MNE_not, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
410 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
411 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
412 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
413 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
414 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
415 { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
416 { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
417 { .mnemonic = MNE_outs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
418 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
419 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
420 { .mnemonic = MNE_popf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
421 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
422 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
423 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 25, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
424 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 14, .str1 = 0, .off1_1 = 5, .off1_2 = 2, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
425 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
426 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
427 { .mnemonic = MNE_pusha, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
428 { .mnemonic = MNE_popa, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
429 { .mnemonic = MNE_pushf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
430 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
431 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
432 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
433 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
434 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
435 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
436 { .mnemonic = MNE_rdmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
437 { .mnemonic = MNE_rdpmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
438 { .mnemonic = MNE_rdtsc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
439 { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
440 { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
441 { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
442 { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
443 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
444 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
445 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
446 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
447 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
448 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
449 { .mnemonic = MNE_rsm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
450 { .mnemonic = MNE_sahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
451 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
452 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
453 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
454 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
455 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
456 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
457 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
458 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
459 { .mnemonic = MNE_scas, .rep = 0, .repe = 1, .suffix = 0, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
460 { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
461 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
462 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
463 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
464 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
465 { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
466 { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
467 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
468 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
469 { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
470 { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
471 { .mnemonic = MNE_vmcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
472 { .mnemonic = MNE_vmlaunch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
473 { .mnemonic = MNE_vmresume, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
474 { .mnemonic = MNE_vmxoff, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
475 { .mnemonic = MNE_vmread, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 28, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 14, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
476 { .mnemonic = MNE_vmwrite, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
477 { .mnemonic = MNE_sgdtl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
478 { .mnemonic = MNE_monitor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 4, .str3 = 1, .off3_1 = 0, .off3_2 = 0, },
479 { .mnemonic = MNE_mwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 22, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
480 { .mnemonic = MNE_sidtl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
481 { .mnemonic = MNE_sldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
482 { .mnemonic = MNE_smsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
483 { .mnemonic = MNE_stc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
484 { .mnemonic = MNE_std, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
485 { .mnemonic = MNE_sti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
486 { .mnemonic = MNE_stos, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
487 { .mnemonic = MNE_str, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
488 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
489 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
490 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
491 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
492 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
493 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
494 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
495 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
496 { .mnemonic = MNE_ud2a, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
497 { .mnemonic = MNE_verr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
498 { .mnemonic = MNE_verw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
499 { .mnemonic = MNE_wbinvd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
500 { .mnemonic = MNE_prefetch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
501 { .mnemonic = MNE_prefetchw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
502 { .mnemonic = MNE_prefetchnta, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
503 { .mnemonic = MNE_prefetcht0, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
504 { .mnemonic = MNE_prefetcht1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
505 { .mnemonic = MNE_prefetcht2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
506 { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
507 { .mnemonic = MNE_wrmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
508 { .mnemonic = MNE_xadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
509 { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
510 { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 4, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
511 { .mnemonic = MNE_xlat, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 9, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
512 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
513 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
514 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
515 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
516 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
517 { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
518 { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
519 { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
520 { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
521 { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
522 { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
523 { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
524 { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
525 { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
526 { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
527 { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
528 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
529 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
530 { .mnemonic = MNE_cmpeqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
531 { .mnemonic = MNE_cmpltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
532 { .mnemonic = MNE_cmpleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
533 { .mnemonic = MNE_cmpunordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
534 { .mnemonic = MNE_cmpneqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
535 { .mnemonic = MNE_cmpnltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
536 { .mnemonic = MNE_cmpnleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
537 { .mnemonic = MNE_cmpordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
538 { .mnemonic = MNE_cmpeqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
539 { .mnemonic = MNE_cmpltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
540 { .mnemonic = MNE_cmpless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
541 { .mnemonic = MNE_cmpunordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
542 { .mnemonic = MNE_cmpneqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
543 { .mnemonic = MNE_cmpnltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
544 { .mnemonic = MNE_cmpnless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
545 { .mnemonic = MNE_cmpordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
546 { .mnemonic = MNE_fxrstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
547 { .mnemonic = MNE_fxsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
548 { .mnemonic = MNE_ldmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
549 { .mnemonic = MNE_stmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
550 { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
551 { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
552 { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
553 { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
554 { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
555 { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
556 { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
557 { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
558 { .mnemonic = MNE_movddup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
559 { .mnemonic = MNE_movsldup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
560 { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
561 { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
562 { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
563 { .mnemonic = MNE_movhlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
564 { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
565 { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
566 { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
567 { .mnemonic = MNE_unpcklpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
568 { .mnemonic = MNE_unpcklps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
569 { .mnemonic = MNE_unpckhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
570 { .mnemonic = MNE_unpckhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
571 { .mnemonic = MNE_movshdup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
572 { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
573 { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
574 { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
575 { .mnemonic = MNE_movlhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
576 { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
577 { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
578 { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
579 { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
580 { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
581 { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
582 { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
583 { .mnemonic = MNE_cvtsi2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
584 { .mnemonic = MNE_cvtsi2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
585 { .mnemonic = MNE_cvtpi2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
586 { .mnemonic = MNE_cvtpi2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
587 { .mnemonic = MNE_movntpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
588 { .mnemonic = MNE_movntps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
589 { .mnemonic = MNE_cvttsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
590 { .mnemonic = MNE_cvttss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
591 { .mnemonic = MNE_cvttpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
592 { .mnemonic = MNE_cvttps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
593 { .mnemonic = MNE_cvtpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
594 { .mnemonic = MNE_cvtsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
595 { .mnemonic = MNE_cvtss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
596 { .mnemonic = MNE_cvtps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
597 { .mnemonic = MNE_ucomisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
598 { .mnemonic = MNE_ucomiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
599 { .mnemonic = MNE_comisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
600 { .mnemonic = MNE_comiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
601 { .mnemonic = MNE_getsec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
602 { .mnemonic = MNE_movmskpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
603 { .mnemonic = MNE_movmskps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
604 { .mnemonic = MNE_sqrtpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
605 { .mnemonic = MNE_sqrtsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
606 { .mnemonic = MNE_sqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
607 { .mnemonic = MNE_sqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
608 { .mnemonic = MNE_rsqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
609 { .mnemonic = MNE_rsqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
610 { .mnemonic = MNE_rcpss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
611 { .mnemonic = MNE_rcpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
612 { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
613 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
614 { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
615 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
616 { .mnemonic = MNE_orpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
617 { .mnemonic = MNE_orps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
618 { .mnemonic = MNE_xorpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
619 { .mnemonic = MNE_xorps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
620 { .mnemonic = MNE_addsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
621 { .mnemonic = MNE_addss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
622 { .mnemonic = MNE_addpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
623 { .mnemonic = MNE_addps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
624 { .mnemonic = MNE_mulsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
625 { .mnemonic = MNE_mulss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
626 { .mnemonic = MNE_mulpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
627 { .mnemonic = MNE_mulps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
628 { .mnemonic = MNE_cvtsd2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
629 { .mnemonic = MNE_cvtss2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
630 { .mnemonic = MNE_cvtpd2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
631 { .mnemonic = MNE_cvtps2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
632 { .mnemonic = MNE_cvtps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
633 { .mnemonic = MNE_cvttps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
634 { .mnemonic = MNE_cvtdq2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
635 { .mnemonic = MNE_subsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
636 { .mnemonic = MNE_subss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
637 { .mnemonic = MNE_subpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
638 { .mnemonic = MNE_subps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
639 { .mnemonic = MNE_minsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
640 { .mnemonic = MNE_minss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
641 { .mnemonic = MNE_minpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
642 { .mnemonic = MNE_minps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
643 { .mnemonic = MNE_divsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
644 { .mnemonic = MNE_divss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
645 { .mnemonic = MNE_divpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
646 { .mnemonic = MNE_divps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
647 { .mnemonic = MNE_maxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
648 { .mnemonic = MNE_maxss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
649 { .mnemonic = MNE_maxpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
650 { .mnemonic = MNE_maxps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
651 { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
652 { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
653 { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
654 { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
655 { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
656 { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
657 { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
658 { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
659 { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
660 { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
661 { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
662 { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
663 { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
664 { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
665 { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
666 { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
667 { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
668 { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
669 { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
670 { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
671 { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
672 { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
673 { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
674 { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
675 { .mnemonic = MNE_punpcklqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
676 { .mnemonic = MNE_punpckhqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
677 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
678 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
679 { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
680 { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
681 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
682 { .mnemonic = MNE_pshufd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
683 { .mnemonic = MNE_pshuflw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
684 { .mnemonic = MNE_pshufhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
685 { .mnemonic = MNE_pshufw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
686 { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
687 { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
688 { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
689 { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
690 { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
691 { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
692 { .mnemonic = MNE_haddpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
693 { .mnemonic = MNE_haddps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
694 { .mnemonic = MNE_hsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
695 { .mnemonic = MNE_hsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
696 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
697 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
698 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
699 { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
700 { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
701 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
702 { .mnemonic = MNE_movnti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
703 { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
704 { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
705 { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
706 { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
707 { .mnemonic = MNE_shufpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
708 { .mnemonic = MNE_shufps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
709 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
710 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
711 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
712 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
713 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
714 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
715 { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
716 { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
717 { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
718 { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
719 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
720 { .mnemonic = MNE_movdq2q, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
721 { .mnemonic = MNE_movq2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
722 { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
723 { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
724 { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
725 { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
726 { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
727 { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
728 { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
729 { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
730 { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
731 { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
732 { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
733 { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
734 { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
735 { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
736 { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
737 { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
738 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
739 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
740 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
741 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
742 { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
743 { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
744 { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
745 { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
746 { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
747 { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
748 { .mnemonic = MNE_movntdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
749 { .mnemonic = MNE_movntq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
750 { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
751 { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
752 { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
753 { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
754 { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
755 { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
756 { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
757 { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
758 { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
759 { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
760 { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
761 { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
762 { .mnemonic = MNE_lddqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
763 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
764 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
765 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
766 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
767 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
768 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
769 { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
770 { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
771 { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
772 { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
773 { .mnemonic = MNE_maskmovdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
774 { .mnemonic = MNE_maskmovq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 19, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
775 { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
776 { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
777 { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
778 { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
779 { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
780 { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
781 { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
782 { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
783 { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
784 { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
785 { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
786 { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
787 { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
788 { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
789 { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
790 { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
791 { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
792 { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
793 { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
794 { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
795 { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
796 { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
797 { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
798 { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
799 { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
800 { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
801 { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
802 { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
803 { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
804 { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
805 { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
806 { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
807 { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
808 { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
809 { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
810 { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
811 { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
812 { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
813 { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
814 { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
815 { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
816 { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
817 { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
818 { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
819 { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
820 { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
821 { .mnemonic = MNE_vmclear, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
822 { .mnemonic = MNE_vmxon, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
823 { .mnemonic = MNE_vmptrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
824 { .mnemonic = MNE_vmptrst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
825 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
826 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
827 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
828 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
829 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
830 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
831 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
832 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
833 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
834 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
835 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
836 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
837 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
838 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
839 { .mnemonic = MNE_psrldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
840 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
841 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
842 { .mnemonic = MNE_pslldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
843 { .mnemonic = MNE_lfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
844 { .mnemonic = MNE_mfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
845 { .mnemonic = MNE_sfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
846 { .mnemonic = MNE_clflush, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
847 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
848 { .mnemonic = MNE_blendps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
849 { .mnemonic = MNE_blendpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
850 { .mnemonic = MNE_blendvps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
851 { .mnemonic = MNE_blendvpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
852 { .mnemonic = MNE_dpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
853 { .mnemonic = MNE_dppd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
854 { .mnemonic = MNE_insertps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
855 { .mnemonic = MNE_movntdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
856 { .mnemonic = MNE_mpsadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
857 { .mnemonic = MNE_packusdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
858 { .mnemonic = MNE_pblendvb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
859 { .mnemonic = MNE_pblendw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
860 { .mnemonic = MNE_pcmpeqq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
861 { .mnemonic = MNE_pcmpestri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
862 { .mnemonic = MNE_pcmpestrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
863 { .mnemonic = MNE_pcmpistri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
864 { .mnemonic = MNE_pcmpistrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
865 { .mnemonic = MNE_pcmpgtq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
866 { .mnemonic = MNE_phminposuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
867 { .mnemonic = MNE_pinsrb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
868 { .mnemonic = MNE_pinsrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
869 { .mnemonic = MNE_pmaxsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
870 { .mnemonic = MNE_pmaxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
871 { .mnemonic = MNE_pmaxud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
872 { .mnemonic = MNE_pmaxuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
873 { .mnemonic = MNE_pminsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
874 { .mnemonic = MNE_pminsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
875 { .mnemonic = MNE_pminud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
876 { .mnemonic = MNE_pminuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
877 { .mnemonic = MNE_pmovsxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
878 { .mnemonic = MNE_pmovsxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
879 { .mnemonic = MNE_pmovsxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
880 { .mnemonic = MNE_pmovsxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
881 { .mnemonic = MNE_pmovsxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
882 { .mnemonic = MNE_pmovsxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
883 { .mnemonic = MNE_pmovzxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
884 { .mnemonic = MNE_pmovzxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
885 { .mnemonic = MNE_pmovzxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
886 { .mnemonic = MNE_pmovzxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
887 { .mnemonic = MNE_pmovzxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
888 { .mnemonic = MNE_pmovzxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
889 { .mnemonic = MNE_pmuldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
890 { .mnemonic = MNE_pmulld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
891 { .mnemonic = MNE_ptest, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 23, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
892 { .mnemonic = MNE_roundps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
893 { .mnemonic = MNE_roundpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
894 { .mnemonic = MNE_roundss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
895 { .mnemonic = MNE_roundsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 17, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
896 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
897};
898static const uint8_t match_data[] =
899{
900 0x11, 0x37,
901 0x22, 0xd5, 0xa,
902 0x22, 0xd4, 0xa,
903 0x11, 0x3f,
904 0x1, 0xfe, 0x14,
905 0x2, 0xfe, 0x80, 0x38, 0x10,
906 0x2, 0xfe, 0x82, 0x38, 0x10,
907 0x2, 0xfe, 0x10, 0, 0,
908 0x2, 0xfe, 0x12, 0, 0,
909 0x1, 0xfe, 0x4,
910 0x2, 0xfe, 0x80, 0x38, 0,
911 0x12, 0x83, 0x38, 0,
912 0x2, 0xfe, 0, 0, 0,
913 0x2, 0xfe, 0x2, 0, 0,
914 0x34, 0x66, 0xf, 0xd0, 0, 0,
915 0x34, 0xf2, 0xf, 0xd0, 0, 0,
916 0x1, 0xfe, 0x24,
917 0x2, 0xfe, 0x80, 0x38, 0x20,
918 0x2, 0xfe, 0x82, 0x38, 0x20,
919 0x2, 0xfe, 0x20, 0, 0,
920 0x2, 0xfe, 0x22, 0, 0,
921 0x34, 0x66, 0xf, 0x54, 0, 0,
922 0x23, 0xf, 0x54, 0, 0,
923 0x34, 0x66, 0xf, 0x55, 0, 0,
924 0x23, 0xf, 0x55, 0, 0,
925 0x12, 0x63, 0, 0,
926 0x12, 0x62, 0, 0,
927 0x23, 0xf, 0xbc, 0, 0,
928 0x23, 0xf, 0xbd, 0, 0,
929 0x12, 0xf, 0xf8, 0xc8,
930 0x23, 0xf, 0xa3, 0, 0,
931 0x23, 0xf, 0xba, 0x38, 0x20,
932 0x23, 0xf, 0xbb, 0, 0,
933 0x23, 0xf, 0xba, 0x38, 0x38,
934 0x23, 0xf, 0xb3, 0, 0,
935 0x23, 0xf, 0xba, 0x38, 0x30,
936 0x23, 0xf, 0xab, 0, 0,
937 0x23, 0xf, 0xba, 0x38, 0x28,
938 0x11, 0xe8,
939 0x12, 0xff, 0x38, 0x10,
940 0x11, 0x9a,
941 0x12, 0xff, 0x38, 0x18,
942 0x11, 0x98,
943 0x11, 0x99,
944 0x11, 0xf8,
945 0x11, 0xfc,
946 0x11, 0xfa,
947 0x22, 0xf, 0x5,
948 0x22, 0xf, 0x6,
949 0x22, 0xf, 0x7,
950 0x22, 0xf, 0x34,
951 0x22, 0xf, 0x35,
952 0x11, 0xf5,
953 0x13, 0xf, 0xf0, 0x40, 0, 0,
954 0x1, 0xfe, 0x3c,
955 0x2, 0xfe, 0x80, 0x38, 0x38,
956 0x12, 0x83, 0x38, 0x38,
957 0x2, 0xfe, 0x38, 0, 0,
958 0x2, 0xfe, 0x3a, 0, 0,
959 0x34, 0xf2, 0xf, 0xc2, 0, 0,
960 0x34, 0xf3, 0xf, 0xc2, 0, 0,
961 0x34, 0x66, 0xf, 0xc2, 0, 0,
962 0x23, 0xf, 0xc2, 0, 0,
963 0x1, 0xfe, 0xa6,
964 0x13, 0xf, 0xfe, 0xb0, 0, 0,
965 0x23, 0xf, 0xc7, 0x38, 0x8,
966 0x22, 0xf, 0xa2,
967 0x34, 0xf3, 0xf, 0xe6, 0, 0,
968 0x34, 0xf2, 0xf, 0xe6, 0, 0,
969 0x34, 0x66, 0xf, 0xe6, 0, 0,
970 0x11, 0x27,
971 0x11, 0x2f,
972 0x2, 0xfe, 0xfe, 0x38, 0x8,
973 0x1, 0xf8, 0x48,
974 0x2, 0xfe, 0xf6, 0x38, 0x30,
975 0x22, 0xf, 0x77,
976 0x11, 0xc8,
977 0x22, 0xd9, 0xd0,
978 0x22, 0xd9, 0xe0,
979 0x22, 0xd9, 0xe1,
980 0x22, 0xd9, 0xe4,
981 0x22, 0xd9, 0xe5,
982 0x22, 0xd9, 0xe8,
983 0x22, 0xd9, 0xe9,
984 0x22, 0xd9, 0xea,
985 0x22, 0xd9, 0xeb,
986 0x22, 0xd9, 0xec,
987 0x22, 0xd9, 0xed,
988 0x22, 0xd9, 0xee,
989 0x22, 0xd9, 0xf0,
990 0x22, 0xd9, 0xf1,
991 0x22, 0xd9, 0xf2,
992 0x22, 0xd9, 0xf3,
993 0x22, 0xd9, 0xf4,
994 0x22, 0xd9, 0xf5,
995 0x22, 0xd9, 0xf6,
996 0x22, 0xd9, 0xf7,
997 0x22, 0xd9, 0xf8,
998 0x22, 0xd9, 0xf9,
999 0x22, 0xd9, 0xfa,
1000 0x22, 0xd9, 0xfb,
1001 0x22, 0xd9, 0xfc,
1002 0x22, 0xd9, 0xfd,
1003 0x22, 0xd9, 0xfe,
1004 0x22, 0xd9, 0xff,
1005 0x12, 0xd8, 0xf8, 0xc0,
1006 0x12, 0xdc, 0xf8, 0xc0,
1007 0x2, 0xfb, 0xd8, 0x38, 0,
1008 0x12, 0xd8, 0xf8, 0xc8,
1009 0x12, 0xdc, 0xf8, 0xc8,
1010 0x2, 0xfb, 0xd8, 0x38, 0x8,
1011 0x12, 0xd8, 0xf8, 0xe0,
1012 0x12, 0xdc, 0xf8, 0xe0,
1013 0x2, 0xfb, 0xd8, 0x38, 0x20,
1014 0x12, 0xd8, 0xf8, 0xe8,
1015 0x12, 0xdc, 0xf8, 0xe8,
1016 0x2, 0xfb, 0xd8, 0x38, 0x28,
1017 0x12, 0xdd, 0xf8, 0xd0,
1018 0x2, 0xfb, 0xd9, 0x38, 0x10,
1019 0x12, 0xdd, 0xf8, 0xd8,
1020 0x2, 0xfb, 0xd9, 0x38, 0x18,
1021 0x12, 0xd9, 0x38, 0x20,
1022 0x12, 0xd9, 0x38, 0x28,
1023 0x12, 0xd9, 0x38, 0x30,
1024 0x12, 0xd9, 0x38, 0x38,
1025 0x12, 0xd9, 0xf8, 0xc8,
1026 0x12, 0xde, 0xf8, 0xc0,
1027 0x12, 0xda, 0xf8, 0xc0,
1028 0x2, 0xfb, 0xda, 0x38, 0,
1029 0x12, 0xda, 0xf8, 0xc8,
1030 0x12, 0xde, 0xf8, 0xc8,
1031 0x2, 0xfb, 0xda, 0x38, 0x8,
1032 0x12, 0xde, 0xf8, 0xe0,
1033 0x2, 0xfb, 0xda, 0x38, 0x20,
1034 0x12, 0xde, 0xf8, 0xe8,
1035 0x2, 0xfb, 0xda, 0x38, 0x28,
1036 0x22, 0xdf, 0xe0,
1037 0x12, 0xdf, 0x38, 0x20,
1038 0x12, 0xdf, 0xf8, 0xf0,
1039 0x12, 0xdf, 0x38, 0x30,
1040 0x22, 0xd9, 0xe0,
1041 0x33, 0x9b, 0xdb, 0xe2,
1042 0x33, 0x9b, 0xdb, 0xe3,
1043 0x11, 0x9b,
1044 0x22, 0xdb, 0xe2,
1045 0x12, 0xda, 0xf8, 0xc0,
1046 0x12, 0xda, 0xf8, 0xc8,
1047 0x12, 0xda, 0xf8, 0xd0,
1048 0x12, 0xda, 0xf8, 0xd8,
1049 0x12, 0xdb, 0xf8, 0xc0,
1050 0x12, 0xdb, 0xf8, 0xc8,
1051 0x12, 0xdb, 0xf8, 0xd0,
1052 0x12, 0xdb, 0xf8, 0xd8,
1053 0x12, 0xd8, 0xf8, 0xd0,
1054 0x2, 0xfb, 0xd8, 0x38, 0x10,
1055 0x12, 0xd8, 0xf8, 0xd8,
1056 0x2, 0xfb, 0xd8, 0x38, 0x18,
1057 0x22, 0xde, 0xd9,
1058 0x12, 0xdb, 0xf8, 0xf0,
1059 0x12, 0xdf, 0xf8, 0xf0,
1060 0x12, 0xdb, 0xf8, 0xe8,
1061 0x12, 0xdf, 0xf8, 0xe8,
1062 0x22, 0xd9, 0xff,
1063 0x22, 0xd9, 0xf6,
1064 0x12, 0xd8, 0xf8, 0xf0,
1065 0x12, 0xdc, 0xf8, 0xf0,
1066 0x2, 0xfb, 0xd8, 0x38, 0x30,
1067 0x12, 0xda, 0x38, 0x30,
1068 0x12, 0xde, 0xf8, 0xf0,
1069 0x12, 0xde, 0x38, 0x30,
1070 0x12, 0xde, 0xf8, 0xf8,
1071 0x12, 0xd8, 0xf8, 0xf8,
1072 0x12, 0xdc, 0xf8, 0xf8,
1073 0x2, 0xfb, 0xd8, 0x38, 0x38,
1074 0x12, 0xda, 0x38, 0x38,
1075 0x12, 0xde, 0x38, 0x38,
1076 0x12, 0xde, 0xf8, 0xf0,
1077 0x12, 0xdd, 0xf8, 0xc0,
1078 0x12, 0xda, 0xf8, 0xd0,
1079 0x2, 0xfb, 0xda, 0x38, 0x10,
1080 0x12, 0xda, 0xf8, 0xd8,
1081 0x2, 0xfb, 0xda, 0x38, 0x18,
1082 0x12, 0xdf, 0x38, 0,
1083 0x12, 0xdb, 0x38, 0,
1084 0x12, 0xdf, 0x38, 0x28,
1085 0x22, 0xd9, 0xf7,
1086 0x22, 0xdb, 0xe3,
1087 0x2, 0xfb, 0xdb, 0x38, 0x10,
1088 0x2, 0xfb, 0xdb, 0x38, 0x18,
1089 0x12, 0xdf, 0x38, 0x38,
1090 0x2, 0xfb, 0xdb, 0x38, 0x8,
1091 0x12, 0xdd, 0x38, 0x8,
1092 0x12, 0xdb, 0x38, 0x28,
1093 0x12, 0xdb, 0x38, 0x38,
1094 0x12, 0xd9, 0xf8, 0xc0,
1095 0x2, 0xfb, 0xd9, 0x38, 0,
1096 0x12, 0xdd, 0xf8, 0xe0,
1097 0x12, 0xdd, 0x38, 0x20,
1098 0x12, 0xdd, 0xf8, 0xe8,
1099 0x12, 0xdd, 0x38, 0x30,
1100 0x12, 0xdd, 0x38, 0x38,
1101 0x11, 0xf4,
1102 0x2, 0xfe, 0xf6, 0x38, 0x38,
1103 0x2, 0xfe, 0xf6, 0x38, 0x28,
1104 0x23, 0xf, 0xaf, 0, 0,
1105 0x2, 0xfd, 0x69, 0, 0,
1106 0x1, 0xfe, 0xe4,
1107 0x1, 0xfe, 0xec,
1108 0x2, 0xfe, 0xfe, 0x38, 0,
1109 0x1, 0xf8, 0x40,
1110 0x1, 0xfe, 0x6c,
1111 0x11, 0xcd,
1112 0x11, 0xcc,
1113 0x11, 0xce,
1114 0x22, 0xf, 0x8,
1115 0x33, 0xf, 0x1, 0xf8,
1116 0x23, 0xf, 0x1, 0x38, 0x38,
1117 0x11, 0xcf,
1118 0x1, 0xf0, 0x70,
1119 0x12, 0xf, 0xf0, 0x80,
1120 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
1121 0x11, 0xe3,
1122 0x11, 0xeb,
1123 0x11, 0xe9,
1124 0x12, 0xff, 0x38, 0x20,
1125 0x11, 0xea,
1126 0x12, 0xff, 0x38, 0x28,
1127 0x11, 0x9f,
1128 0x23, 0xf, 0x2, 0, 0,
1129 0x12, 0xc5, 0, 0,
1130 0x12, 0x8d, 0, 0,
1131 0x11, 0xc9,
1132 0x12, 0xc4, 0, 0,
1133 0x23, 0xf, 0xb4, 0, 0,
1134 0x23, 0xf, 0xb5, 0, 0,
1135 0x23, 0xf, 0x1, 0x38, 0x10,
1136 0x23, 0xf, 0x1, 0x38, 0x18,
1137 0x23, 0xf, 0, 0x38, 0x10,
1138 0x23, 0xf, 0x1, 0x38, 0x30,
1139 0x11, 0xf0,
1140 0x1, 0xfe, 0xac,
1141 0x11, 0xe2,
1142 0x11, 0xe1,
1143 0x11, 0xe0,
1144 0x23, 0xf, 0x3, 0, 0,
1145 0x23, 0xf, 0xb2, 0, 0,
1146 0x23, 0xf, 0, 0x38, 0x18,
1147 0x2, 0xfe, 0x88, 0, 0,
1148 0x2, 0xfe, 0x8a, 0, 0,
1149 0x2, 0xfe, 0xc6, 0x38, 0,
1150 0x1, 0xf0, 0xb0,
1151 0x1, 0xfe, 0xa0,
1152 0x1, 0xfe, 0xa2,
1153 0x23, 0xf, 0x20, 0xc0, 0xc0,
1154 0x23, 0xf, 0x22, 0xc0, 0xc0,
1155 0x23, 0xf, 0x21, 0xc0, 0xc0,
1156 0x23, 0xf, 0x23, 0xc0, 0xc0,
1157 0x12, 0x8c, 0, 0,
1158 0x12, 0x8e, 0, 0,
1159 0x1, 0xfe, 0xa4,
1160 0x23, 0xf, 0xbe, 0, 0,
1161 0x23, 0xf, 0xbf, 0, 0,
1162 0x23, 0xf, 0xb6, 0, 0,
1163 0x23, 0xf, 0xb7, 0, 0,
1164 0x2, 0xfe, 0xf6, 0x38, 0x20,
1165 0x2, 0xfe, 0xf6, 0x38, 0x18,
1166 0x22, 0xf3, 0x90,
1167 0x11, 0x90,
1168 0x34, 0xf3, 0xf, 0xb8, 0, 0,
1169 0x2, 0xfe, 0xf6, 0x38, 0x10,
1170 0x2, 0xfe, 0x8, 0, 0,
1171 0x2, 0xfe, 0xa, 0, 0,
1172 0x2, 0xfe, 0x80, 0x38, 0x8,
1173 0x2, 0xfe, 0x82, 0x38, 0x8,
1174 0x1, 0xfe, 0xc,
1175 0x1, 0xfe, 0xe6,
1176 0x1, 0xfe, 0xee,
1177 0x1, 0xfe, 0x6e,
1178 0x12, 0x8f, 0x38, 0,
1179 0x12, 0xf, 0xc7, 0x81,
1180 0x11, 0x9d,
1181 0x12, 0xff, 0x38, 0x30,
1182 0x1, 0xf8, 0x50,
1183 0x1, 0xf8, 0x58,
1184 0x1, 0xfd, 0x68,
1185 0x1, 0xe7, 0x6,
1186 0x12, 0xf, 0xc7, 0x80,
1187 0x11, 0x60,
1188 0x11, 0x61,
1189 0x11, 0x9c,
1190 0x2, 0xfe, 0xd0, 0x38, 0x10,
1191 0x2, 0xfe, 0xd2, 0x38, 0x10,
1192 0x2, 0xfe, 0xc0, 0x38, 0x10,
1193 0x2, 0xfe, 0xd0, 0x38, 0x18,
1194 0x2, 0xfe, 0xd2, 0x38, 0x18,
1195 0x2, 0xfe, 0xc0, 0x38, 0x18,
1196 0x22, 0xf, 0x32,
1197 0x22, 0xf, 0x33,
1198 0x22, 0xf, 0x31,
1199 0x11, 0xc3,
1200 0x11, 0xc2,
1201 0x11, 0xcb,
1202 0x11, 0xca,
1203 0x2, 0xfe, 0xd0, 0x38, 0,
1204 0x2, 0xfe, 0xd2, 0x38, 0,
1205 0x2, 0xfe, 0xc0, 0x38, 0,
1206 0x2, 0xfe, 0xd0, 0x38, 0x8,
1207 0x2, 0xfe, 0xd2, 0x38, 0x8,
1208 0x2, 0xfe, 0xc0, 0x38, 0x8,
1209 0x22, 0xf, 0xaa,
1210 0x11, 0x9e,
1211 0x2, 0xfe, 0xd0, 0x38, 0x38,
1212 0x2, 0xfe, 0xd2, 0x38, 0x38,
1213 0x2, 0xfe, 0xc0, 0x38, 0x38,
1214 0x2, 0xfe, 0x18, 0, 0,
1215 0x2, 0xfe, 0x1a, 0, 0,
1216 0x1, 0xfe, 0x1c,
1217 0x2, 0xfe, 0x80, 0x38, 0x18,
1218 0x2, 0xfe, 0x82, 0x38, 0x18,
1219 0x1, 0xfe, 0xae,
1220 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
1221 0x2, 0xfe, 0xd0, 0x38, 0x20,
1222 0x2, 0xfe, 0xd2, 0x38, 0x20,
1223 0x2, 0xfe, 0xc0, 0x38, 0x20,
1224 0x2, 0xfe, 0xd0, 0x38, 0x28,
1225 0x23, 0xf, 0xa4, 0, 0,
1226 0x23, 0xf, 0xa5, 0, 0,
1227 0x2, 0xfe, 0xd2, 0x38, 0x28,
1228 0x2, 0xfe, 0xc0, 0x38, 0x28,
1229 0x23, 0xf, 0xac, 0, 0,
1230 0x23, 0xf, 0xad, 0, 0,
1231 0x33, 0xf, 0x1, 0xc1,
1232 0x33, 0xf, 0x1, 0xc2,
1233 0x33, 0xf, 0x1, 0xc3,
1234 0x33, 0xf, 0x1, 0xc4,
1235 0x23, 0xf, 0x78, 0, 0,
1236 0x23, 0xf, 0x79, 0, 0,
1237 0x23, 0xf, 0x1, 0x38, 0,
1238 0x33, 0xf, 0x1, 0xc8,
1239 0x33, 0xf, 0x1, 0xc9,
1240 0x23, 0xf, 0x1, 0x38, 0x8,
1241 0x23, 0xf, 0, 0x38, 0,
1242 0x23, 0xf, 0x1, 0x38, 0x20,
1243 0x11, 0xf9,
1244 0x11, 0xfd,
1245 0x11, 0xfb,
1246 0x1, 0xfe, 0xaa,
1247 0x23, 0xf, 0, 0x38, 0x8,
1248 0x2, 0xfe, 0x28, 0, 0,
1249 0x2, 0xfe, 0x2a, 0, 0,
1250 0x1, 0xfe, 0x2c,
1251 0x2, 0xfe, 0x80, 0x38, 0x28,
1252 0x2, 0xfe, 0x82, 0x38, 0x28,
1253 0x2, 0xfe, 0x84, 0, 0,
1254 0x1, 0xfe, 0xa8,
1255 0x2, 0xfe, 0xf6, 0x38, 0,
1256 0x22, 0xf, 0xb,
1257 0x23, 0xf, 0, 0x38, 0x20,
1258 0x23, 0xf, 0, 0x38, 0x28,
1259 0x22, 0xf, 0x9,
1260 0x23, 0xf, 0xd, 0x38, 0,
1261 0x23, 0xf, 0xd, 0x38, 0x8,
1262 0x23, 0xf, 0x18, 0x38, 0,
1263 0x23, 0xf, 0x18, 0x38, 0x8,
1264 0x23, 0xf, 0x18, 0x38, 0x10,
1265 0x23, 0xf, 0x18, 0x38, 0x18,
1266 0x23, 0xf, 0x1f, 0, 0,
1267 0x22, 0xf, 0x30,
1268 0x13, 0xf, 0xfe, 0xc0, 0, 0,
1269 0x2, 0xfe, 0x86, 0, 0,
1270 0x1, 0xf8, 0x90,
1271 0x11, 0xd7,
1272 0x2, 0xfe, 0x30, 0, 0,
1273 0x2, 0xfe, 0x32, 0, 0,
1274 0x1, 0xfe, 0x34,
1275 0x2, 0xfe, 0x80, 0x38, 0x30,
1276 0x2, 0xfe, 0x82, 0x38, 0x30,
1277 0x22, 0xf, 0x77,
1278 0x34, 0x66, 0xf, 0xdb, 0, 0,
1279 0x23, 0xf, 0xdb, 0, 0,
1280 0x34, 0x66, 0xf, 0xdf, 0, 0,
1281 0x23, 0xf, 0xdf, 0, 0,
1282 0x34, 0x66, 0xf, 0xf5, 0, 0,
1283 0x23, 0xf, 0xf5, 0, 0,
1284 0x34, 0x66, 0xf, 0xeb, 0, 0,
1285 0x23, 0xf, 0xeb, 0, 0,
1286 0x34, 0x66, 0xf, 0xef, 0, 0,
1287 0x23, 0xf, 0xef, 0, 0,
1288 0x23, 0xf, 0x55, 0, 0,
1289 0x23, 0xf, 0x54, 0, 0,
1290 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
1291 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
1292 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
1293 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
1294 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
1295 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
1296 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
1297 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
1298 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
1299 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
1300 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
1301 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
1302 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
1303 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
1304 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
1305 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
1306 0x23, 0xf, 0xae, 0x38, 0x8,
1307 0x23, 0xf, 0xae, 0x38, 0,
1308 0x23, 0xf, 0xae, 0x38, 0x10,
1309 0x23, 0xf, 0xae, 0x38, 0x18,
1310 0x34, 0xf2, 0xf, 0x10, 0, 0,
1311 0x34, 0xf3, 0xf, 0x10, 0, 0,
1312 0x34, 0x66, 0xf, 0x10, 0, 0,
1313 0x23, 0xf, 0x10, 0, 0,
1314 0x34, 0xf2, 0xf, 0x11, 0, 0,
1315 0x34, 0xf3, 0xf, 0x11, 0, 0,
1316 0x34, 0x66, 0xf, 0x11, 0, 0,
1317 0x23, 0xf, 0x11, 0, 0,
1318 0x34, 0xf2, 0xf, 0x12, 0, 0,
1319 0x34, 0xf3, 0xf, 0x12, 0, 0,
1320 0x34, 0x66, 0xf, 0x12, 0, 0,
1321 0x23, 0xf, 0x12, 0xc0, 0xc0,
1322 0x23, 0xf, 0x12, 0, 0,
1323 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
1324 0x23, 0xf, 0x13, 0xc0, 0xc0,
1325 0x34, 0x66, 0xf, 0x13, 0, 0,
1326 0x23, 0xf, 0x13, 0, 0,
1327 0x34, 0x66, 0xf, 0x14, 0, 0,
1328 0x23, 0xf, 0x14, 0, 0,
1329 0x34, 0x66, 0xf, 0x15, 0, 0,
1330 0x23, 0xf, 0x15, 0, 0,
1331 0x34, 0xf3, 0xf, 0x16, 0, 0,
1332 0x34, 0x66, 0xf, 0x16, 0, 0,
1333 0x23, 0xf, 0x16, 0xc0, 0xc0,
1334 0x23, 0xf, 0x16, 0, 0,
1335 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
1336 0x23, 0xf, 0x17, 0xc0, 0xc0,
1337 0x34, 0x66, 0xf, 0x17, 0, 0,
1338 0x23, 0xf, 0x17, 0, 0,
1339 0x34, 0x66, 0xf, 0x28, 0, 0,
1340 0x23, 0xf, 0x28, 0, 0,
1341 0x34, 0x66, 0xf, 0x29, 0, 0,
1342 0x23, 0xf, 0x29, 0, 0,
1343 0x34, 0xf2, 0xf, 0x2a, 0, 0,
1344 0x34, 0xf3, 0xf, 0x2a, 0, 0,
1345 0x34, 0x66, 0xf, 0x2a, 0, 0,
1346 0x23, 0xf, 0x2a, 0, 0,
1347 0x34, 0x66, 0xf, 0x2b, 0, 0,
1348 0x23, 0xf, 0x2b, 0, 0,
1349 0x34, 0xf2, 0xf, 0x2c, 0, 0,
1350 0x34, 0xf3, 0xf, 0x2c, 0, 0,
1351 0x34, 0x66, 0xf, 0x2c, 0, 0,
1352 0x23, 0xf, 0x2c, 0, 0,
1353 0x34, 0x66, 0xf, 0x2d, 0, 0,
1354 0x34, 0xf2, 0xf, 0x2d, 0, 0,
1355 0x34, 0xf3, 0xf, 0x2d, 0, 0,
1356 0x23, 0xf, 0x2d, 0, 0,
1357 0x34, 0x66, 0xf, 0x2e, 0, 0,
1358 0x23, 0xf, 0x2e, 0, 0,
1359 0x34, 0x66, 0xf, 0x2f, 0, 0,
1360 0x23, 0xf, 0x2f, 0, 0,
1361 0x22, 0xf, 0x37,
1362 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
1363 0x23, 0xf, 0x50, 0xc0, 0xc0,
1364 0x34, 0x66, 0xf, 0x51, 0, 0,
1365 0x34, 0xf2, 0xf, 0x51, 0, 0,
1366 0x34, 0xf3, 0xf, 0x51, 0, 0,
1367 0x23, 0xf, 0x51, 0, 0,
1368 0x34, 0xf3, 0xf, 0x52, 0, 0,
1369 0x23, 0xf, 0x52, 0, 0,
1370 0x34, 0xf3, 0xf, 0x53, 0, 0,
1371 0x23, 0xf, 0x53, 0, 0,
1372 0x34, 0x66, 0xf, 0x54, 0, 0,
1373 0x23, 0xf, 0x54, 0, 0,
1374 0x34, 0x66, 0xf, 0x55, 0, 0,
1375 0x23, 0xf, 0x55, 0, 0,
1376 0x34, 0x66, 0xf, 0x56, 0, 0,
1377 0x23, 0xf, 0x56, 0, 0,
1378 0x34, 0x66, 0xf, 0x57, 0, 0,
1379 0x23, 0xf, 0x57, 0, 0,
1380 0x34, 0xf2, 0xf, 0x58, 0, 0,
1381 0x34, 0xf3, 0xf, 0x58, 0, 0,
1382 0x34, 0x66, 0xf, 0x58, 0, 0,
1383 0x23, 0xf, 0x58, 0, 0,
1384 0x34, 0xf2, 0xf, 0x59, 0, 0,
1385 0x34, 0xf3, 0xf, 0x59, 0, 0,
1386 0x34, 0x66, 0xf, 0x59, 0, 0,
1387 0x23, 0xf, 0x59, 0, 0,
1388 0x34, 0xf2, 0xf, 0x5a, 0, 0,
1389 0x34, 0xf3, 0xf, 0x5a, 0, 0,
1390 0x34, 0x66, 0xf, 0x5a, 0, 0,
1391 0x23, 0xf, 0x5a, 0, 0,
1392 0x34, 0x66, 0xf, 0x5b, 0, 0,
1393 0x34, 0xf3, 0xf, 0x5b, 0, 0,
1394 0x23, 0xf, 0x5b, 0, 0,
1395 0x34, 0xf2, 0xf, 0x5c, 0, 0,
1396 0x34, 0xf3, 0xf, 0x5c, 0, 0,
1397 0x34, 0x66, 0xf, 0x5c, 0, 0,
1398 0x23, 0xf, 0x5c, 0, 0,
1399 0x34, 0xf2, 0xf, 0x5d, 0, 0,
1400 0x34, 0xf3, 0xf, 0x5d, 0, 0,
1401 0x34, 0x66, 0xf, 0x5d, 0, 0,
1402 0x23, 0xf, 0x5d, 0, 0,
1403 0x34, 0xf2, 0xf, 0x5e, 0, 0,
1404 0x34, 0xf3, 0xf, 0x5e, 0, 0,
1405 0x34, 0x66, 0xf, 0x5e, 0, 0,
1406 0x23, 0xf, 0x5e, 0, 0,
1407 0x34, 0xf2, 0xf, 0x5f, 0, 0,
1408 0x34, 0xf3, 0xf, 0x5f, 0, 0,
1409 0x34, 0x66, 0xf, 0x5f, 0, 0,
1410 0x23, 0xf, 0x5f, 0, 0,
1411 0x34, 0x66, 0xf, 0x60, 0, 0,
1412 0x23, 0xf, 0x60, 0, 0,
1413 0x34, 0x66, 0xf, 0x61, 0, 0,
1414 0x23, 0xf, 0x61, 0, 0,
1415 0x34, 0x66, 0xf, 0x62, 0, 0,
1416 0x23, 0xf, 0x62, 0, 0,
1417 0x34, 0x66, 0xf, 0x63, 0, 0,
1418 0x23, 0xf, 0x63, 0, 0,
1419 0x34, 0x66, 0xf, 0x64, 0, 0,
1420 0x23, 0xf, 0x64, 0, 0,
1421 0x34, 0x66, 0xf, 0x65, 0, 0,
1422 0x23, 0xf, 0x65, 0, 0,
1423 0x34, 0x66, 0xf, 0x66, 0, 0,
1424 0x23, 0xf, 0x66, 0, 0,
1425 0x34, 0x66, 0xf, 0x67, 0, 0,
1426 0x23, 0xf, 0x67, 0, 0,
1427 0x34, 0x66, 0xf, 0x68, 0, 0,
1428 0x23, 0xf, 0x68, 0, 0,
1429 0x34, 0x66, 0xf, 0x69, 0, 0,
1430 0x23, 0xf, 0x69, 0, 0,
1431 0x34, 0x66, 0xf, 0x6a, 0, 0,
1432 0x23, 0xf, 0x6a, 0, 0,
1433 0x34, 0x66, 0xf, 0x6b, 0, 0,
1434 0x23, 0xf, 0x6b, 0, 0,
1435 0x34, 0x66, 0xf, 0x6c, 0, 0,
1436 0x34, 0x66, 0xf, 0x6d, 0, 0,
1437 0x34, 0x66, 0xf, 0x6e, 0, 0,
1438 0x23, 0xf, 0x6e, 0, 0,
1439 0x34, 0x66, 0xf, 0x6f, 0, 0,
1440 0x34, 0xf3, 0xf, 0x6f, 0, 0,
1441 0x23, 0xf, 0x6f, 0, 0,
1442 0x34, 0x66, 0xf, 0x70, 0, 0,
1443 0x34, 0xf2, 0xf, 0x70, 0, 0,
1444 0x34, 0xf3, 0xf, 0x70, 0, 0,
1445 0x23, 0xf, 0x70, 0, 0,
1446 0x34, 0x66, 0xf, 0x74, 0, 0,
1447 0x23, 0xf, 0x74, 0, 0,
1448 0x34, 0x66, 0xf, 0x75, 0, 0,
1449 0x23, 0xf, 0x75, 0, 0,
1450 0x34, 0x66, 0xf, 0x76, 0, 0,
1451 0x23, 0xf, 0x76, 0, 0,
1452 0x34, 0x66, 0xf, 0x7c, 0, 0,
1453 0x34, 0xf2, 0xf, 0x7c, 0, 0,
1454 0x34, 0x66, 0xf, 0x7d, 0, 0,
1455 0x34, 0xf2, 0xf, 0x7d, 0, 0,
1456 0x34, 0x66, 0xf, 0x7e, 0, 0,
1457 0x34, 0xf3, 0xf, 0x7e, 0, 0,
1458 0x23, 0xf, 0x7e, 0, 0,
1459 0x34, 0x66, 0xf, 0x7f, 0, 0,
1460 0x34, 0xf3, 0xf, 0x7f, 0, 0,
1461 0x23, 0xf, 0x7f, 0, 0,
1462 0x23, 0xf, 0xc3, 0, 0,
1463 0x34, 0x66, 0xf, 0xc4, 0, 0,
1464 0x23, 0xf, 0xc4, 0, 0,
1465 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
1466 0x23, 0xf, 0xc5, 0xc0, 0xc0,
1467 0x34, 0x66, 0xf, 0xc6, 0, 0,
1468 0x23, 0xf, 0xc6, 0, 0,
1469 0x34, 0x66, 0xf, 0xd1, 0, 0,
1470 0x23, 0xf, 0xd1, 0, 0,
1471 0x34, 0x66, 0xf, 0xd2, 0, 0,
1472 0x23, 0xf, 0xd2, 0, 0,
1473 0x34, 0x66, 0xf, 0xd3, 0, 0,
1474 0x23, 0xf, 0xd3, 0, 0,
1475 0x34, 0x66, 0xf, 0xd4, 0, 0,
1476 0x23, 0xf, 0xd4, 0, 0,
1477 0x34, 0x66, 0xf, 0xd5, 0, 0,
1478 0x23, 0xf, 0xd5, 0, 0,
1479 0x34, 0x66, 0xf, 0xd6, 0, 0,
1480 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
1481 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
1482 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
1483 0x23, 0xf, 0xd7, 0xc0, 0xc0,
1484 0x34, 0x66, 0xf, 0xd8, 0, 0,
1485 0x23, 0xf, 0xd8, 0, 0,
1486 0x34, 0x66, 0xf, 0xd9, 0, 0,
1487 0x23, 0xf, 0xd9, 0, 0,
1488 0x34, 0x66, 0xf, 0xda, 0, 0,
1489 0x23, 0xf, 0xda, 0, 0,
1490 0x34, 0x66, 0xf, 0xdc, 0, 0,
1491 0x23, 0xf, 0xdc, 0, 0,
1492 0x34, 0x66, 0xf, 0xdd, 0, 0,
1493 0x23, 0xf, 0xdd, 0, 0,
1494 0x34, 0x66, 0xf, 0xde, 0, 0,
1495 0x23, 0xf, 0xde, 0, 0,
1496 0x34, 0x66, 0xf, 0xe0, 0, 0,
1497 0x23, 0xf, 0xe0, 0, 0,
1498 0x34, 0x66, 0xf, 0xe1, 0, 0,
1499 0x23, 0xf, 0xe1, 0, 0,
1500 0x34, 0x66, 0xf, 0xe2, 0, 0,
1501 0x23, 0xf, 0xe2, 0, 0,
1502 0x34, 0x66, 0xf, 0xe3, 0, 0,
1503 0x23, 0xf, 0xe3, 0, 0,
1504 0x34, 0x66, 0xf, 0xe4, 0, 0,
1505 0x23, 0xf, 0xe4, 0, 0,
1506 0x34, 0x66, 0xf, 0xe5, 0, 0,
1507 0x23, 0xf, 0xe5, 0, 0,
1508 0x34, 0x66, 0xf, 0xe7, 0, 0,
1509 0x23, 0xf, 0xe7, 0, 0,
1510 0x34, 0x66, 0xf, 0xe8, 0, 0,
1511 0x23, 0xf, 0xe8, 0, 0,
1512 0x34, 0x66, 0xf, 0xe9, 0, 0,
1513 0x23, 0xf, 0xe9, 0, 0,
1514 0x34, 0x66, 0xf, 0xea, 0, 0,
1515 0x23, 0xf, 0xea, 0, 0,
1516 0x34, 0x66, 0xf, 0xec, 0, 0,
1517 0x23, 0xf, 0xec, 0, 0,
1518 0x34, 0x66, 0xf, 0xed, 0, 0,
1519 0x23, 0xf, 0xed, 0, 0,
1520 0x34, 0x66, 0xf, 0xee, 0, 0,
1521 0x23, 0xf, 0xee, 0, 0,
1522 0x34, 0xf2, 0xf, 0xf0, 0, 0,
1523 0x34, 0x66, 0xf, 0xf1, 0, 0,
1524 0x23, 0xf, 0xf1, 0, 0,
1525 0x34, 0x66, 0xf, 0xf2, 0, 0,
1526 0x23, 0xf, 0xf2, 0, 0,
1527 0x34, 0x66, 0xf, 0xf3, 0, 0,
1528 0x23, 0xf, 0xf3, 0, 0,
1529 0x34, 0x66, 0xf, 0xf4, 0, 0,
1530 0x23, 0xf, 0xf4, 0, 0,
1531 0x34, 0x66, 0xf, 0xf6, 0, 0,
1532 0x23, 0xf, 0xf6, 0, 0,
1533 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
1534 0x23, 0xf, 0xf7, 0xc0, 0xc0,
1535 0x34, 0x66, 0xf, 0xf8, 0, 0,
1536 0x23, 0xf, 0xf8, 0, 0,
1537 0x34, 0x66, 0xf, 0xf9, 0, 0,
1538 0x23, 0xf, 0xf9, 0, 0,
1539 0x34, 0x66, 0xf, 0xfa, 0, 0,
1540 0x23, 0xf, 0xfa, 0, 0,
1541 0x34, 0x66, 0xf, 0xfb, 0, 0,
1542 0x23, 0xf, 0xfb, 0, 0,
1543 0x34, 0x66, 0xf, 0xfc, 0, 0,
1544 0x23, 0xf, 0xfc, 0, 0,
1545 0x34, 0x66, 0xf, 0xfd, 0, 0,
1546 0x23, 0xf, 0xfd, 0, 0,
1547 0x34, 0x66, 0xf, 0xfe, 0, 0,
1548 0x23, 0xf, 0xfe, 0, 0,
1549 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
1550 0x34, 0xf, 0x38, 0, 0, 0,
1551 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
1552 0x34, 0xf, 0x38, 0x1, 0, 0,
1553 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
1554 0x34, 0xf, 0x38, 0x2, 0, 0,
1555 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
1556 0x34, 0xf, 0x38, 0x3, 0, 0,
1557 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
1558 0x34, 0xf, 0x38, 0x4, 0, 0,
1559 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
1560 0x34, 0xf, 0x38, 0x5, 0, 0,
1561 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
1562 0x34, 0xf, 0x38, 0x6, 0, 0,
1563 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
1564 0x34, 0xf, 0x38, 0x7, 0, 0,
1565 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
1566 0x34, 0xf, 0x38, 0x8, 0, 0,
1567 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
1568 0x34, 0xf, 0x38, 0x9, 0, 0,
1569 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
1570 0x34, 0xf, 0x38, 0xa, 0, 0,
1571 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
1572 0x34, 0xf, 0x38, 0xb, 0, 0,
1573 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
1574 0x34, 0xf, 0x38, 0x1c, 0, 0,
1575 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
1576 0x34, 0xf, 0x38, 0x1d, 0, 0,
1577 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
1578 0x34, 0xf, 0x38, 0x1e, 0, 0,
1579 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
1580 0x34, 0xf, 0x3a, 0xf, 0, 0,
1581 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
1582 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
1583 0x23, 0xf, 0xc7, 0x38, 0x30,
1584 0x23, 0xf, 0xc7, 0x38, 0x38,
1585 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
1586 0x23, 0xf, 0x71, 0xf8, 0xd0,
1587 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
1588 0x23, 0xf, 0x71, 0xf8, 0xe0,
1589 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
1590 0x23, 0xf, 0x71, 0xf8, 0xf0,
1591 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
1592 0x23, 0xf, 0x72, 0xf8, 0xd0,
1593 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
1594 0x23, 0xf, 0x72, 0xf8, 0xe0,
1595 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
1596 0x23, 0xf, 0x72, 0xf8, 0xf0,
1597 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
1598 0x23, 0xf, 0x73, 0xf8, 0xd0,
1599 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
1600 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
1601 0x23, 0xf, 0x73, 0xf8, 0xf0,
1602 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
1603 0x33, 0xf, 0xae, 0xe8,
1604 0x33, 0xf, 0xae, 0xf0,
1605 0x33, 0xf, 0xae, 0xf8,
1606 0x23, 0xf, 0xae, 0x38, 0x38,
1607 0x23, 0xf, 0xf, 0, 0,
1608 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
1609 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
1610 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
1611 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
1612 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
1613 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
1614 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
1615 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
1616 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
1617 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
1618 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
1619 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
1620 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
1621 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
1622 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
1623 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
1624 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
1625 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
1626 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
1627 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
1628 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
1629 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
1630 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
1631 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
1632 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
1633 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
1634 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
1635 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
1636 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
1637 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
1638 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
1639 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
1640 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
1641 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
1642 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
1643 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
1644 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
1645 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
1646 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
1647 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
1648 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
1649 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
1650 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
1651 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
1652 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
1653 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
1654 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
1655 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
1656 0x1, 0xe7, 0x7,
1657};
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
new file mode 100644
index 0000000000..4eb70baf7d
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
@@ -0,0 +1,307 @@
1Index: elfutils-0.146/backends/m68k_init.c
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ elfutils-0.146/backends/m68k_init.c 2010-04-24 10:11:38.000000000 +0000
5@@ -0,0 +1,49 @@
6+/* Initialization of m68k specific backend library.
7+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
8+
9+ This software is free software; you can redistribute it and/or modify
10+ it under the terms of the GNU General Public License as published by the
11+ Free Software Foundation; version 2 of the License.
12+
13+ This softare is distributed in the hope that it will be useful, but
14+ WITHOUT ANY WARRANTY; without even the implied warranty of
15+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+ General Public License for more details.
17+
18+ You should have received a copy of the GNU General Public License along
19+ with this software; if not, write to the Free Software Foundation,
20+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
21+
22+*/
23+
24+#ifdef HAVE_CONFIG_H
25+# include <config.h>
26+#endif
27+
28+#define BACKEND m68k_
29+#define RELOC_PREFIX R_68K_
30+#include "libebl_CPU.h"
31+
32+/* This defines the common reloc hooks based on m68k_reloc.def. */
33+#include "common-reloc.c"
34+
35+
36+const char *
37+m68k_init (elf, machine, eh, ehlen)
38+ Elf *elf __attribute__ ((unused));
39+ GElf_Half machine __attribute__ ((unused));
40+ Ebl *eh;
41+ size_t ehlen;
42+{
43+ /* Check whether the Elf_BH object has a sufficent size. */
44+ if (ehlen < sizeof (Ebl))
45+ return NULL;
46+
47+ /* We handle it. */
48+ eh->name = "m68k";
49+ m68k_init_reloc (eh);
50+ HOOK (eh, reloc_simple_type);
51+ HOOK (eh, register_info);
52+
53+ return MODVERSION;
54+}
55Index: elfutils-0.146/backends/m68k_regs.c
56===================================================================
57--- /dev/null 1970-01-01 00:00:00.000000000 +0000
58+++ elfutils-0.146/backends/m68k_regs.c 2010-04-24 10:11:38.000000000 +0000
59@@ -0,0 +1,106 @@
60+/* Register names and numbers for m68k DWARF.
61+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
62+
63+ This software is free software; you can redistribute it and/or modify
64+ it under the terms of the GNU General Public License as published by the
65+ Free Software Foundation; version 2 of the License.
66+
67+ This software is distributed in the hope that it will be useful, but
68+ WITHOUT ANY WARRANTY; without even the implied warranty of
69+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
70+ General Public License for more details.
71+
72+ You should have received a copy of the GNU General Public License along
73+ with this software; if not, write to the Free Software Foundation,
74+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
75+
76+ */
77+
78+#ifdef HAVE_CONFIG_H
79+# include <config.h>
80+#endif
81+
82+#include <string.h>
83+#include <dwarf.h>
84+
85+#define BACKEND m68k_
86+#include "libebl_CPU.h"
87+
88+ssize_t
89+m68k_register_info (Ebl *ebl __attribute__ ((unused)),
90+ int regno, char *name, size_t namelen,
91+ const char **prefix, const char **setname,
92+ int *bits, int *type)
93+{
94+ if (name == NULL)
95+ return 25;
96+
97+ if (regno < 0 || regno > 24 || namelen < 5)
98+ return -1;
99+
100+ *prefix = "%";
101+ *bits = 32;
102+ *type = (regno < 8 ? DW_ATE_signed
103+ : regno < 16 ? DW_ATE_address : DW_ATE_float);
104+
105+ if (regno < 8)
106+ {
107+ *setname = "integer";
108+ }
109+ else if (regno < 16)
110+ {
111+ *setname = "address";
112+ }
113+ else if (regno < 24)
114+ {
115+ *setname = "FPU";
116+ }
117+ else
118+ {
119+ *setname = "address";
120+ *type = DW_ATE_address;
121+ }
122+
123+ switch (regno)
124+ {
125+ case 0 ... 7:
126+ name[0] = 'd';
127+ name[1] = regno + '0';
128+ namelen = 2;
129+ break;
130+
131+ case 8 ... 13:
132+ name[0] = 'a';
133+ name[1] = regno - 8 + '0';
134+ namelen = 2;
135+ break;
136+
137+ case 14:
138+ name[0] = 'f';
139+ name[1] = 'p';
140+ namelen = 2;
141+ break;
142+
143+ case 15:
144+ name[0] = 's';
145+ name[1] = 'p';
146+ namelen = 2;
147+ break;
148+
149+ case 16 ... 23:
150+ name[0] = 'f';
151+ name[1] = 'p';
152+ name[2] = regno - 16 + '0';
153+ namelen = 3;
154+ break;
155+
156+ case 24:
157+ name[0] = 'p';
158+ name[1] = 'c';
159+ namelen = 2;
160+ }
161+
162+ name[namelen++] = '\0';
163+ return namelen;
164+}
165+
166Index: elfutils-0.146/backends/m68k_reloc.def
167===================================================================
168--- /dev/null 1970-01-01 00:00:00.000000000 +0000
169+++ elfutils-0.146/backends/m68k_reloc.def 2010-04-24 10:11:38.000000000 +0000
170@@ -0,0 +1,45 @@
171+/* List the relocation types for m68k. -*- C -*-
172+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
173+
174+ This software is free software; you can redistribute it and/or modify
175+ it under the terms of the GNU General Public License as published by the
176+ Free Software Foundation; version 2 of the License.
177+
178+ This software is distributed in the hope that it will be useful, but
179+ WITHOUT ANY WARRANTY; without even the implied warranty of
180+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
181+ General Public License for more details.
182+
183+ You should have received a copy of the GNU General Public License along
184+ with this software; if not, write to the Free Software Foundation,
185+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
186+*/
187+
188+/* NAME, REL|EXEC|DYN */
189+
190+RELOC_TYPE (NONE, 0)
191+RELOC_TYPE (32, REL|EXEC|DYN)
192+RELOC_TYPE (16, REL)
193+RELOC_TYPE (8, REL)
194+RELOC_TYPE (PC32, REL|EXEC|DYN)
195+RELOC_TYPE (PC16, REL)
196+RELOC_TYPE (PC8, REL)
197+RELOC_TYPE (GOT32, REL)
198+RELOC_TYPE (GOT16, REL)
199+RELOC_TYPE (GOT8, REL)
200+RELOC_TYPE (GOT32O, REL)
201+RELOC_TYPE (GOT16O, REL)
202+RELOC_TYPE (GOT8O, REL)
203+RELOC_TYPE (PLT32, REL)
204+RELOC_TYPE (PLT16, REL)
205+RELOC_TYPE (PLT8, REL)
206+RELOC_TYPE (PLT32O, REL)
207+RELOC_TYPE (PLT16O, REL)
208+RELOC_TYPE (PLT8O, REL)
209+RELOC_TYPE (COPY, EXEC)
210+RELOC_TYPE (GLOB_DAT, EXEC|DYN)
211+RELOC_TYPE (JMP_SLOT, EXEC|DYN)
212+RELOC_TYPE (RELATIVE, EXEC|DYN)
213+RELOC_TYPE (GNU_VTINHERIT, REL)
214+RELOC_TYPE (GNU_VTENTRY, REL)
215+
216Index: elfutils-0.146/libelf/elf.h
217===================================================================
218--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
219+++ elfutils-0.146/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
220@@ -1125,6 +1125,9 @@
221 #define R_68K_GLOB_DAT 20 /* Create GOT entry */
222 #define R_68K_JMP_SLOT 21 /* Create PLT entry */
223 #define R_68K_RELATIVE 22 /* Adjust by program base */
224+/* The next 2 are GNU extensions to enable C++ vtable garbage collection. */
225+#define R_68K_GNU_VTINHERIT 23
226+#define R_68K_GNU_VTENTRY 24
227 #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
228 #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
229 #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
230Index: elfutils-0.146/backends/Makefile.am
231===================================================================
232--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:11:23.000000000 +0000
233+++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:11:38.000000000 +0000
234@@ -29,11 +29,12 @@
235 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
236
237
238-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
239+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
240 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
241 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
242 libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
243- libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
244+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
245+ libebl_m68k_pic.a
246 noinst_LIBRARIES = $(libebl_pic)
247 noinst_DATA = $(libebl_pic:_pic.a=.so)
248
249@@ -103,6 +104,10 @@
250 libebl_mips_pic_a_SOURCES = $(mips_SRCS)
251 am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
252
253+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
254+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
255+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
256+
257 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
258 @rm -f $(@:.so=.map)
259 echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
260Index: elfutils-0.146/backends/m68k_symbol.c
261===================================================================
262--- /dev/null 1970-01-01 00:00:00.000000000 +0000
263+++ elfutils-0.146/backends/m68k_symbol.c 2010-04-24 10:11:38.000000000 +0000
264@@ -0,0 +1,43 @@
265+/* m68k specific symbolic name handling.
266+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
267+
268+ This software is free software; you can redistribute it and/or modify
269+ it under the terms of the GNU General Public License as published by the
270+ Free Software Foundation; version 2 of the License.
271+
272+ This software distributed in the hope that it will be useful, but
273+ WITHOUT ANY WARRANTY; without even the implied warranty of
274+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
275+ General Public License for more details.
276+
277+ You should have received a copy of the GNU General Public License along
278+ with this software; if not, write to the Free Software Foundation,
279+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
280+*/
281+
282+#ifdef HAVE_CONFIG_H
283+# include <config.h>
284+#endif
285+
286+#include <elf.h>
287+#include <stddef.h>
288+
289+#define BACKEND m68k_
290+#include "libebl_CPU.h"
291+
292+/* Check for the simple reloc types. */
293+Elf_Type
294+m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
295+{
296+ switch (type)
297+ {
298+ case R_68K_32:
299+ return ELF_T_SWORD;
300+ case R_68K_16:
301+ return ELF_T_HALF;
302+ case R_68K_8:
303+ return ELF_T_BYTE;
304+ default:
305+ return ELF_T_NUM;
306+ }
307+}
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
new file mode 100644
index 0000000000..ffdff90768
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
@@ -0,0 +1,711 @@
1Index: elfutils-0.145/backends/mips_init.c
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ elfutils-0.145/backends/mips_init.c 2010-02-24 18:57:35.000000000 +0000
5@@ -0,0 +1,60 @@
6+/* Initialization of mips specific backend library.
7+ Copyright (C) 2006 Red Hat, Inc.
8+ This file is part of Red Hat elfutils.
9+
10+ Red Hat elfutils is free software; you can redistribute it and/or modify
11+ it under the terms of the GNU General Public License as published by the
12+ Free Software Foundation; version 2 of the License.
13+
14+ Red Hat elfutils is distributed in the hope that it will be useful, but
15+ WITHOUT ANY WARRANTY; without even the implied warranty of
16+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17+ General Public License for more details.
18+
19+ You should have received a copy of the GNU General Public License along
20+ with Red Hat elfutils; if not, write to the Free Software Foundation,
21+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
22+
23+ Red Hat elfutils is an included package of the Open Invention Network.
24+ An included package of the Open Invention Network is a package for which
25+ Open Invention Network licensees cross-license their patents. No patent
26+ license is granted, either expressly or impliedly, by designation as an
27+ included package. Should you wish to participate in the Open Invention
28+ Network licensing program, please visit www.openinventionnetwork.com
29+ <http://www.openinventionnetwork.com>. */
30+
31+#ifdef HAVE_CONFIG_H
32+# include <config.h>
33+#endif
34+
35+#define BACKEND mips_
36+#define RELOC_PREFIX R_MIPS_
37+#include "libebl_CPU.h"
38+
39+/* This defines the common reloc hooks based on mips_reloc.def. */
40+#include "common-reloc.c"
41+
42+const char *
43+mips_init (elf, machine, eh, ehlen)
44+ Elf *elf __attribute__ ((unused));
45+ GElf_Half machine __attribute__ ((unused));
46+ Ebl *eh;
47+ size_t ehlen;
48+{
49+ /* Check whether the Elf_BH object has a sufficent size. */
50+ if (ehlen < sizeof (Ebl))
51+ return NULL;
52+
53+ /* We handle it. */
54+ if (machine == EM_MIPS)
55+ eh->name = "MIPS R3000 big-endian";
56+ else if (machine == EM_MIPS_RS3_LE)
57+ eh->name = "MIPS R3000 little-endian";
58+
59+ mips_init_reloc (eh);
60+ HOOK (eh, reloc_simple_type);
61+ HOOK (eh, return_value_location);
62+ HOOK (eh, register_info);
63+
64+ return MODVERSION;
65+}
66Index: elfutils-0.145/backends/mips_regs.c
67===================================================================
68--- /dev/null 1970-01-01 00:00:00.000000000 +0000
69+++ elfutils-0.145/backends/mips_regs.c 2010-02-24 18:57:35.000000000 +0000
70@@ -0,0 +1,104 @@
71+/* Register names and numbers for MIPS DWARF.
72+ Copyright (C) 2006 Red Hat, Inc.
73+ This file is part of Red Hat elfutils.
74+
75+ Red Hat elfutils is free software; you can redistribute it and/or modify
76+ it under the terms of the GNU General Public License as published by the
77+ Free Software Foundation; version 2 of the License.
78+
79+ Red Hat elfutils is distributed in the hope that it will be useful, but
80+ WITHOUT ANY WARRANTY; without even the implied warranty of
81+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
82+ General Public License for more details.
83+
84+ You should have received a copy of the GNU General Public License along
85+ with Red Hat elfutils; if not, write to the Free Software Foundation,
86+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
87+
88+ Red Hat elfutils is an included package of the Open Invention Network.
89+ An included package of the Open Invention Network is a package for which
90+ Open Invention Network licensees cross-license their patents. No patent
91+ license is granted, either expressly or impliedly, by designation as an
92+ included package. Should you wish to participate in the Open Invention
93+ Network licensing program, please visit www.openinventionnetwork.com
94+ <http://www.openinventionnetwork.com>. */
95+
96+#ifdef HAVE_CONFIG_H
97+# include <config.h>
98+#endif
99+
100+#include <string.h>
101+#include <dwarf.h>
102+
103+#define BACKEND mips_
104+#include "libebl_CPU.h"
105+
106+ssize_t
107+mips_register_info (Ebl *ebl __attribute__((unused)),
108+ int regno, char *name, size_t namelen,
109+ const char **prefix, const char **setname,
110+ int *bits, int *type)
111+{
112+ if (name == NULL)
113+ return 66;
114+
115+ if (regno < 0 || regno > 65 || namelen < 4)
116+ return -1;
117+
118+ *prefix = "$";
119+
120+ if (regno < 32)
121+ {
122+ *setname = "integer";
123+ *type = DW_ATE_signed;
124+ *bits = 32;
125+ if (regno < 32 + 10)
126+ {
127+ name[0] = regno + '0';
128+ namelen = 1;
129+ }
130+ else
131+ {
132+ name[0] = (regno / 10) + '0';
133+ name[1] = (regno % 10) + '0';
134+ namelen = 2;
135+ }
136+ }
137+ else if (regno < 64)
138+ {
139+ *setname = "FPU";
140+ *type = DW_ATE_float;
141+ *bits = 32;
142+ name[0] = 'f';
143+ if (regno < 32 + 10)
144+ {
145+ name[1] = (regno - 32) + '0';
146+ namelen = 2;
147+ }
148+ else
149+ {
150+ name[1] = (regno - 32) / 10 + '0';
151+ name[2] = (regno - 32) % 10 + '0';
152+ namelen = 3;
153+ }
154+ }
155+ else if (regno == 64)
156+ {
157+ *type = DW_ATE_signed;
158+ *bits = 32;
159+ name[0] = 'h';
160+ name[1] = 'i';
161+ namelen = 2;
162+ }
163+ else
164+ {
165+ *type = DW_ATE_signed;
166+ *bits = 32;
167+ name[0] = 'l';
168+ name[1] = 'o';
169+ namelen = 2;
170+ }
171+
172+ name[namelen++] = '\0';
173+ return namelen;
174+}
175Index: elfutils-0.145/backends/mips_reloc.def
176===================================================================
177--- /dev/null 1970-01-01 00:00:00.000000000 +0000
178+++ elfutils-0.145/backends/mips_reloc.def 2010-02-24 18:57:35.000000000 +0000
179@@ -0,0 +1,79 @@
180+/* List the relocation types for mips. -*- C -*-
181+ Copyright (C) 2006 Red Hat, Inc.
182+ This file is part of Red Hat elfutils.
183+
184+ Red Hat elfutils is free software; you can redistribute it and/or modify
185+ it under the terms of the GNU General Public License as published by the
186+ Free Software Foundation; version 2 of the License.
187+
188+ Red Hat elfutils is distributed in the hope that it will be useful, but
189+ WITHOUT ANY WARRANTY; without even the implied warranty of
190+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
191+ General Public License for more details.
192+
193+ You should have received a copy of the GNU General Public License along
194+ with Red Hat elfutils; if not, write to the Free Software Foundation,
195+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
196+
197+ Red Hat elfutils is an included package of the Open Invention Network.
198+ An included package of the Open Invention Network is a package for which
199+ Open Invention Network licensees cross-license their patents. No patent
200+ license is granted, either expressly or impliedly, by designation as an
201+ included package. Should you wish to participate in the Open Invention
202+ Network licensing program, please visit www.openinventionnetwork.com
203+ <http://www.openinventionnetwork.com>. */
204+
205+/* NAME, REL|EXEC|DYN */
206+
207+RELOC_TYPE (NONE, 0)
208+RELOC_TYPE (16, 0)
209+RELOC_TYPE (32, 0)
210+RELOC_TYPE (REL32, 0)
211+RELOC_TYPE (26, 0)
212+RELOC_TYPE (HI16, 0)
213+RELOC_TYPE (LO16, 0)
214+RELOC_TYPE (GPREL16, 0)
215+RELOC_TYPE (LITERAL, 0)
216+RELOC_TYPE (GOT16, 0)
217+RELOC_TYPE (PC16, 0)
218+RELOC_TYPE (CALL16, 0)
219+RELOC_TYPE (GPREL32, 0)
220+
221+RELOC_TYPE (SHIFT5, 0)
222+RELOC_TYPE (SHIFT6, 0)
223+RELOC_TYPE (64, 0)
224+RELOC_TYPE (GOT_DISP, 0)
225+RELOC_TYPE (GOT_PAGE, 0)
226+RELOC_TYPE (GOT_OFST, 0)
227+RELOC_TYPE (GOT_HI16, 0)
228+RELOC_TYPE (GOT_LO16, 0)
229+RELOC_TYPE (SUB, 0)
230+RELOC_TYPE (INSERT_A, 0)
231+RELOC_TYPE (INSERT_B, 0)
232+RELOC_TYPE (DELETE, 0)
233+RELOC_TYPE (HIGHER, 0)
234+RELOC_TYPE (HIGHEST, 0)
235+RELOC_TYPE (CALL_HI16, 0)
236+RELOC_TYPE (CALL_LO16, 0)
237+RELOC_TYPE (SCN_DISP, 0)
238+RELOC_TYPE (REL16, 0)
239+RELOC_TYPE (ADD_IMMEDIATE, 0)
240+RELOC_TYPE (PJUMP, 0)
241+RELOC_TYPE (RELGOT, 0)
242+RELOC_TYPE (JALR, 0)
243+RELOC_TYPE (TLS_DTPMOD32, 0)
244+RELOC_TYPE (TLS_DTPREL32, 0)
245+RELOC_TYPE (TLS_DTPMOD64, 0)
246+RELOC_TYPE (TLS_DTPREL64, 0)
247+RELOC_TYPE (TLS_GD, 0)
248+RELOC_TYPE (TLS_LDM, 0)
249+RELOC_TYPE (TLS_DTPREL_HI16, 0)
250+RELOC_TYPE (TLS_DTPREL_LO16, 0)
251+RELOC_TYPE (TLS_GOTTPREL, 0)
252+RELOC_TYPE (TLS_TPREL32, 0)
253+RELOC_TYPE (TLS_TPREL64, 0)
254+RELOC_TYPE (TLS_TPREL_HI16, 0)
255+RELOC_TYPE (TLS_TPREL_LO16, 0)
256+
257+#define NO_COPY_RELOC 1
258+#define NO_RELATIVE_RELOC 1
259Index: elfutils-0.145/backends/mips_retval.c
260===================================================================
261--- /dev/null 1970-01-01 00:00:00.000000000 +0000
262+++ elfutils-0.145/backends/mips_retval.c 2010-02-24 18:57:35.000000000 +0000
263@@ -0,0 +1,321 @@
264+/* Function return value location for Linux/mips ABI.
265+ Copyright (C) 2005 Red Hat, Inc.
266+ This file is part of Red Hat elfutils.
267+
268+ Red Hat elfutils is free software; you can redistribute it and/or modify
269+ it under the terms of the GNU General Public License as published by the
270+ Free Software Foundation; version 2 of the License.
271+
272+ Red Hat elfutils is distributed in the hope that it will be useful, but
273+ WITHOUT ANY WARRANTY; without even the implied warranty of
274+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
275+ General Public License for more details.
276+
277+ You should have received a copy of the GNU General Public License along
278+ with Red Hat elfutils; if not, write to the Free Software Foundation,
279+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
280+
281+ Red Hat elfutils is an included package of the Open Invention Network.
282+ An included package of the Open Invention Network is a package for which
283+ Open Invention Network licensees cross-license their patents. No patent
284+ license is granted, either expressly or impliedly, by designation as an
285+ included package. Should you wish to participate in the Open Invention
286+ Network licensing program, please visit www.openinventionnetwork.com
287+ <http://www.openinventionnetwork.com>. */
288+
289+#ifdef HAVE_CONFIG_H
290+# include <config.h>
291+#endif
292+
293+#include <string.h>
294+#include <assert.h>
295+#include <dwarf.h>
296+#include <elf.h>
297+
298+#include "../libebl/libeblP.h"
299+#include "../libdw/libdwP.h"
300+
301+#define BACKEND mips_
302+#include "libebl_CPU.h"
303+
304+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
305+#define EF_MIPS_ABI 0x0000F000
306+
307+/* The original o32 abi. */
308+#define E_MIPS_ABI_O32 0x00001000
309+
310+/* O32 extended to work on 64 bit architectures */
311+#define E_MIPS_ABI_O64 0x00002000
312+
313+/* EABI in 32 bit mode */
314+#define E_MIPS_ABI_EABI32 0x00003000
315+
316+/* EABI in 64 bit mode */
317+#define E_MIPS_ABI_EABI64 0x00004000
318+
319+/* All the possible MIPS ABIs. */
320+enum mips_abi
321+ {
322+ MIPS_ABI_UNKNOWN = 0,
323+ MIPS_ABI_N32,
324+ MIPS_ABI_O32,
325+ MIPS_ABI_N64,
326+ MIPS_ABI_O64,
327+ MIPS_ABI_EABI32,
328+ MIPS_ABI_EABI64,
329+ MIPS_ABI_LAST
330+ };
331+
332+/* Find the mips ABI of the current file */
333+enum mips_abi find_mips_abi(Elf *elf)
334+{
335+ GElf_Ehdr ehdr_mem;
336+ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
337+
338+ if (ehdr == NULL)
339+ return MIPS_ABI_LAST;
340+
341+ GElf_Word elf_flags = ehdr->e_flags;
342+
343+ /* Check elf_flags to see if it specifies the ABI being used. */
344+ switch ((elf_flags & EF_MIPS_ABI))
345+ {
346+ case E_MIPS_ABI_O32:
347+ return MIPS_ABI_O32;
348+ case E_MIPS_ABI_O64:
349+ return MIPS_ABI_O64;
350+ case E_MIPS_ABI_EABI32:
351+ return MIPS_ABI_EABI32;
352+ case E_MIPS_ABI_EABI64:
353+ return MIPS_ABI_EABI64;
354+ default:
355+ if ((elf_flags & EF_MIPS_ABI2))
356+ return MIPS_ABI_N32;
357+ }
358+
359+ /* GCC creates a pseudo-section whose name describes the ABI. */
360+ size_t shstrndx;
361+ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
362+ return MIPS_ABI_LAST;
363+
364+ const char *name;
365+ Elf_Scn *scn = NULL;
366+ while ((scn = elf_nextscn (elf, scn)) != NULL)
367+ {
368+ GElf_Shdr shdr_mem;
369+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
370+ if (shdr == NULL)
371+ return MIPS_ABI_LAST;
372+
373+ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
374+ if (strncmp (name, ".mdebug.", 8) != 0)
375+ continue;
376+
377+ if (strcmp (name, ".mdebug.abi32") == 0)
378+ return MIPS_ABI_O32;
379+ else if (strcmp (name, ".mdebug.abiN32") == 0)
380+ return MIPS_ABI_N32;
381+ else if (strcmp (name, ".mdebug.abi64") == 0)
382+ return MIPS_ABI_N64;
383+ else if (strcmp (name, ".mdebug.abiO64") == 0)
384+ return MIPS_ABI_O64;
385+ else if (strcmp (name, ".mdebug.eabi32") == 0)
386+ return MIPS_ABI_EABI32;
387+ else if (strcmp (name, ".mdebug.eabi64") == 0)
388+ return MIPS_ABI_EABI64;
389+ else
390+ return MIPS_ABI_UNKNOWN;
391+ }
392+
393+ return MIPS_ABI_UNKNOWN;
394+}
395+
396+unsigned int
397+mips_abi_regsize (enum mips_abi abi)
398+{
399+ switch (abi)
400+ {
401+ case MIPS_ABI_EABI32:
402+ case MIPS_ABI_O32:
403+ return 4;
404+ case MIPS_ABI_N32:
405+ case MIPS_ABI_N64:
406+ case MIPS_ABI_O64:
407+ case MIPS_ABI_EABI64:
408+ return 8;
409+ case MIPS_ABI_UNKNOWN:
410+ case MIPS_ABI_LAST:
411+ default:
412+ return 0;
413+ }
414+}
415+
416+
417+/* $v0 or pair $v0, $v1 */
418+static const Dwarf_Op loc_intreg_o32[] =
419+ {
420+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
421+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
422+ };
423+
424+static const Dwarf_Op loc_intreg[] =
425+ {
426+ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
427+ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
428+ };
429+#define nloc_intreg 1
430+#define nloc_intregpair 4
431+
432+/* $f0 (float), or pair $f0, $f1 (double).
433+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
434+static const Dwarf_Op loc_fpreg_o32[] =
435+ {
436+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
437+ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
438+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
439+ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
440+ };
441+
442+/* $f0, or pair $f0, $f2. */
443+static const Dwarf_Op loc_fpreg[] =
444+ {
445+ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
446+ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
447+ };
448+#define nloc_fpreg 1
449+#define nloc_fpregpair 4
450+#define nloc_fpregquad 8
451+
452+/* The return value is a structure and is actually stored in stack space
453+ passed in a hidden argument by the caller. But, the compiler
454+ helpfully returns the address of that space in $v0. */
455+static const Dwarf_Op loc_aggregate[] =
456+ {
457+ { .atom = DW_OP_breg2, .number = 0 }
458+ };
459+#define nloc_aggregate 1
460+
461+int
462+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
463+{
464+ /* First find the ABI used by the elf object */
465+ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
466+
467+ /* Something went seriously wrong while trying to figure out the ABI */
468+ if (abi == MIPS_ABI_LAST)
469+ return -1;
470+
471+ /* We couldn't identify the ABI, but the file seems valid */
472+ if (abi == MIPS_ABI_UNKNOWN)
473+ return -2;
474+
475+ /* Can't handle EABI variants */
476+ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
477+ return -2;
478+
479+ unsigned int regsize = mips_abi_regsize (abi);
480+ if (!regsize)
481+ return -2;
482+
483+ /* Start with the function's type, and get the DW_AT_type attribute,
484+ which is the type of the return value. */
485+
486+ Dwarf_Attribute attr_mem;
487+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
488+ if (attr == NULL)
489+ /* The function has no return value, like a `void' function in C. */
490+ return 0;
491+
492+ Dwarf_Die die_mem;
493+ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
494+ int tag = dwarf_tag (typedie);
495+
496+ /* Follow typedefs and qualifiers to get to the actual type. */
497+ while (tag == DW_TAG_typedef
498+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
499+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
500+ {
501+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
502+ typedie = dwarf_formref_die (attr, &die_mem);
503+ tag = dwarf_tag (typedie);
504+ }
505+
506+ switch (tag)
507+ {
508+ case -1:
509+ return -1;
510+
511+ case DW_TAG_subrange_type:
512+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
513+ {
514+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
515+ typedie = dwarf_formref_die (attr, &die_mem);
516+ tag = dwarf_tag (typedie);
517+ }
518+ /* Fall through. */
519+
520+ case DW_TAG_base_type:
521+ case DW_TAG_enumeration_type:
522+ case DW_TAG_pointer_type:
523+ case DW_TAG_ptr_to_member_type:
524+ {
525+ Dwarf_Word size;
526+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
527+ &attr_mem), &size) != 0)
528+ {
529+ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
530+ size = regsize;
531+ else
532+ return -1;
533+ }
534+ if (tag == DW_TAG_base_type)
535+ {
536+ Dwarf_Word encoding;
537+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
538+ &attr_mem), &encoding) != 0)
539+ return -1;
540+
541+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
542+
543+ if (encoding == DW_ATE_float)
544+ {
545+ *locp = ABI_LOC(loc_fpreg, regsize);
546+ if (size <= regsize)
547+ return nloc_fpreg;
548+
549+ if (size <= 2*regsize)
550+ return nloc_fpregpair;
551+
552+ if (size <= 4*regsize && abi == MIPS_ABI_O32)
553+ return nloc_fpregquad;
554+
555+ goto aggregate;
556+ }
557+ }
558+ *locp = ABI_LOC(loc_intreg, regsize);
559+ if (size <= regsize)
560+ return nloc_intreg;
561+ if (size <= 2*regsize)
562+ return nloc_intregpair;
563+
564+ /* Else fall through. Shouldn't happen though (at least with gcc) */
565+ }
566+
567+ case DW_TAG_structure_type:
568+ case DW_TAG_class_type:
569+ case DW_TAG_union_type:
570+ case DW_TAG_array_type:
571+ aggregate:
572+ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
573+ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
574+ return -2;
575+
576+ *locp = loc_aggregate;
577+ return nloc_aggregate;
578+ }
579+
580+ /* XXX We don't have a good way to return specific errors from ebl calls.
581+ This value means we do not understand the type, but it is well-formed
582+ DWARF and might be valid. */
583+ return -2;
584+}
585Index: elfutils-0.145/backends/mips_symbol.c
586===================================================================
587--- /dev/null 1970-01-01 00:00:00.000000000 +0000
588+++ elfutils-0.145/backends/mips_symbol.c 2010-02-24 18:57:35.000000000 +0000
589@@ -0,0 +1,52 @@
590+/* MIPS specific symbolic name handling.
591+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
592+ This file is part of Red Hat elfutils.
593+ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
594+
595+ Red Hat elfutils is free software; you can redistribute it and/or modify
596+ it under the terms of the GNU General Public License as published by the
597+ Free Software Foundation; version 2 of the License.
598+
599+ Red Hat elfutils is distributed in the hope that it will be useful, but
600+ WITHOUT ANY WARRANTY; without even the implied warranty of
601+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
602+ General Public License for more details.
603+
604+ You should have received a copy of the GNU General Public License along
605+ with Red Hat elfutils; if not, write to the Free Software Foundation,
606+ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
607+
608+ Red Hat elfutils is an included package of the Open Invention Network.
609+ An included package of the Open Invention Network is a package for which
610+ Open Invention Network licensees cross-license their patents. No patent
611+ license is granted, either expressly or impliedly, by designation as an
612+ included package. Should you wish to participate in the Open Invention
613+ Network licensing program, please visit www.openinventionnetwork.com
614+ <http://www.openinventionnetwork.com>. */
615+
616+#ifdef HAVE_CONFIG_H
617+# include <config.h>
618+#endif
619+
620+#include <elf.h>
621+#include <stddef.h>
622+
623+#define BACKEND mips_
624+#include "libebl_CPU.h"
625+
626+/* Check for the simple reloc types. */
627+Elf_Type
628+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
629+{
630+ switch (type)
631+ {
632+ case R_MIPS_16:
633+ return ELF_T_HALF;
634+ case R_MIPS_32:
635+ return ELF_T_WORD;
636+ case R_MIPS_64:
637+ return ELF_T_XWORD;
638+ default:
639+ return ELF_T_NUM;
640+ }
641+}
642Index: elfutils-0.145/libebl/eblopenbackend.c
643===================================================================
644--- elfutils-0.145.orig/libebl/eblopenbackend.c 2010-02-24 18:55:51.000000000 +0000
645+++ elfutils-0.145/libebl/eblopenbackend.c 2010-02-24 18:57:35.000000000 +0000
646@@ -91,6 +91,8 @@
647 { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
648 { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
649 { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
650+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
651+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
652
653 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
654 { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
655Index: elfutils-0.145/backends/common-reloc.c
656===================================================================
657--- elfutils-0.145.orig/backends/common-reloc.c 2010-02-24 18:55:51.000000000 +0000
658+++ elfutils-0.145/backends/common-reloc.c 2010-02-24 18:57:35.000000000 +0000
659@@ -109,11 +109,13 @@
660 }
661
662
663+#ifndef NO_COPY_RELOC
664 bool
665 EBLHOOK(copy_reloc_p) (int reloc)
666 {
667 return reloc == R_TYPE (COPY);
668 }
669+#endif
670
671 bool
672 EBLHOOK(none_reloc_p) (int reloc)
673@@ -135,7 +137,9 @@
674 ebl->reloc_type_name = EBLHOOK(reloc_type_name);
675 ebl->reloc_type_check = EBLHOOK(reloc_type_check);
676 ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
677+#ifndef NO_COPY_RELOC
678 ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
679+#endif
680 ebl->none_reloc_p = EBLHOOK(none_reloc_p);
681 #ifndef NO_RELATIVE_RELOC
682 ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
683Index: elfutils-0.145/backends/Makefile.am
684===================================================================
685--- elfutils-0.145.orig/backends/Makefile.am 2010-02-24 18:57:26.000000000 +0000
686+++ elfutils-0.145/backends/Makefile.am 2010-02-24 18:57:57.000000000 +0000
687@@ -29,11 +29,11 @@
688 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
689
690
691-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
692+modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
693 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
694 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
695 libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
696- libebl_s390_pic.a libebl_parisc_pic.a
697+ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
698 noinst_LIBRARIES = $(libebl_pic)
699 noinst_DATA = $(libebl_pic:_pic.a=.so)
700
701@@ -99,6 +99,10 @@
702 libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
703 am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
704
705+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
706+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
707+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
708+
709 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
710 @rm -f $(@:.so=.map)
711 echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
new file mode 100644
index 0000000000..d3a7246220
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
@@ -0,0 +1,1122 @@
1Index: elfutils-0.148/backends/ChangeLog
2===================================================================
3--- elfutils-0.148.orig/backends/ChangeLog 2010-04-13 20:08:02.000000000 +0000
4+++ elfutils-0.148/backends/ChangeLog 2010-07-03 13:04:07.000000000 +0000
5@@ -106,6 +106,10 @@
6 * ppc_attrs.c (ppc_check_object_attribute): Handle tag
7 GNU_Power_ABI_Struct_Return.
8
9+2009-01-23 Roland McGrath <roland@redhat.com>
10+
11+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
12+
13 2008-10-04 Ulrich Drepper <drepper@redhat.com>
14
15 * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
16@@ -433,6 +437,11 @@
17 * sparc_init.c: Likewise.
18 * x86_64_init.c: Likewise.
19
20+2005-11-22 Roland McGrath <roland@redhat.com>
21+
22+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
23+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
24+
25 2005-11-19 Roland McGrath <roland@redhat.com>
26
27 * ppc64_reloc.def: REL30 -> ADDR30.
28@@ -455,6 +464,9 @@
29 * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
30 (CLEANFILES): Add libebl_$(m).so.
31
32+ * Makefile.am (WEXTRA): New variable, substituted by configure.
33+ (AM_CFLAGS): Use it in place of -Wextra.
34+
35 * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
36 * ppc64_reloc.def: Likewise.
37
38Index: elfutils-0.148/backends/Makefile.am
39===================================================================
40--- elfutils-0.148.orig/backends/Makefile.am 2010-04-13 20:08:02.000000000 +0000
41+++ elfutils-0.148/backends/Makefile.am 2010-07-03 13:04:07.000000000 +0000
42@@ -103,7 +103,7 @@
43 $(LINK) -shared -o $(@:.map=.so) \
44 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
45 -Wl,--version-script,$(@:.so=.map) \
46- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
47+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
48 $(textrel_check)
49
50 libebl_i386.so: $(cpu_i386)
51Index: elfutils-0.148/backends/Makefile.in
52===================================================================
53--- elfutils-0.148.orig/backends/Makefile.in 2010-06-28 19:07:33.000000000 +0000
54+++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:04:07.000000000 +0000
55@@ -165,6 +165,7 @@
56 INSTALL_SCRIPT = @INSTALL_SCRIPT@
57 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
58 LDFLAGS = @LDFLAGS@
59+LD_AS_NEEDED = @LD_AS_NEEDED@
60 LEX = @LEX@
61 LEXLIB = @LEXLIB@
62 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
63@@ -194,6 +195,7 @@
64 STRIP = @STRIP@
65 USE_NLS = @USE_NLS@
66 VERSION = @VERSION@
67+WEXTRA = @WEXTRA@
68 XGETTEXT = @XGETTEXT@
69 XGETTEXT_015 = @XGETTEXT_015@
70 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
71@@ -257,7 +259,7 @@
72 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
73 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
74 $($(*F)_no_Werror),,-Werror) $(if \
75- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
76+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
77 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
78 $(am__append_1)
79 @MUDFLAP_FALSE@libmudflap =
80@@ -698,7 +700,7 @@
81 $(LINK) -shared -o $(@:.map=.so) \
82 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
83 -Wl,--version-script,$(@:.so=.map) \
84- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
85+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
86 $(textrel_check)
87
88 libebl_i386.so: $(cpu_i386)
89Index: elfutils-0.148/ChangeLog
90===================================================================
91--- elfutils-0.148.orig/ChangeLog 2010-04-21 14:26:40.000000000 +0000
92+++ elfutils-0.148/ChangeLog 2010-07-03 13:04:07.000000000 +0000
93@@ -2,6 +2,10 @@
94
95 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
96
97+2009-11-22 Roland McGrath <roland@redhat.com>
98+
99+ * configure.ac: Use sed and expr instead of modern bash extensions.
100+
101 2009-09-21 Ulrich Drepper <drepper@redhat.com>
102
103 * configure.ac: Update for more modern autoconf.
104@@ -10,6 +14,10 @@
105
106 * configure.ac (zip_LIBS): Check for liblzma too.
107
108+2009-08-17 Roland McGrath <roland@redhat.com>
109+
110+ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
111+
112 2009-04-19 Roland McGrath <roland@redhat.com>
113
114 * configure.ac (eu_version): Round down here, not in version.h macros.
115@@ -21,6 +29,8 @@
116
117 2009-01-23 Roland McGrath <roland@redhat.com>
118
119+ * configure.ac: Check for __builtin_popcount.
120+
121 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
122
123 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
124@@ -101,6 +111,10 @@
125 * configure.ac: Add dummy automake conditional to get dependencies
126 for non-generic linker right. See src/Makefile.am.
127
128+2005-11-22 Roland McGrath <roland@redhat.com>
129+
130+ * configure.ac: Check for --as-needed linker option.
131+
132 2005-11-18 Roland McGrath <roland@redhat.com>
133
134 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
135@@ -148,6 +162,17 @@
136 * Makefile.am (all_SUBDIRS): Add libdwfl.
137 * configure.ac: Write libdwfl/Makefile.
138
139+2005-05-31 Roland McGrath <roland@redhat.com>
140+
141+ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
142+
143+ * configure.ac: Check for struct stat st_?tim members.
144+ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
145+
146+ * configure.ac: Check for futimes function.
147+ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
148+ (handle_ar) [! HAVE_FUTIMES]: Likewise.
149+
150 2005-05-19 Roland McGrath <roland@redhat.com>
151
152 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
153Index: elfutils-0.148/config/eu.am
154===================================================================
155--- elfutils-0.148.orig/config/eu.am 2010-04-21 14:26:40.000000000 +0000
156+++ elfutils-0.148/config/eu.am 2010-07-03 13:04:07.000000000 +0000
157@@ -25,11 +25,14 @@
158 ## <http://www.openinventionnetwork.com>.
159 ##
160
161+WEXTRA = @WEXTRA@
162+LD_AS_NEEDED = @LD_AS_NEEDED@
163+
164 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
165 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
166 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
167 $(if $($(*F)_no_Werror),,-Werror) \
168- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
169+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
170 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
171 $($(*F)_CFLAGS)
172
173Index: elfutils-0.148/config/Makefile.in
174===================================================================
175--- elfutils-0.148.orig/config/Makefile.in 2010-06-28 19:07:34.000000000 +0000
176+++ elfutils-0.148/config/Makefile.in 2010-07-03 13:04:07.000000000 +0000
177@@ -76,6 +76,7 @@
178 INSTALL_SCRIPT = @INSTALL_SCRIPT@
179 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
180 LDFLAGS = @LDFLAGS@
181+LD_AS_NEEDED = @LD_AS_NEEDED@
182 LEX = @LEX@
183 LEXLIB = @LEXLIB@
184 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
185@@ -105,6 +106,7 @@
186 STRIP = @STRIP@
187 USE_NLS = @USE_NLS@
188 VERSION = @VERSION@
189+WEXTRA = @WEXTRA@
190 XGETTEXT = @XGETTEXT@
191 XGETTEXT_015 = @XGETTEXT_015@
192 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
193Index: elfutils-0.148/config.h.in
194===================================================================
195--- elfutils-0.148.orig/config.h.in 2010-06-28 19:07:37.000000000 +0000
196+++ elfutils-0.148/config.h.in 2010-07-03 13:04:07.000000000 +0000
197@@ -1,5 +1,8 @@
198 /* config.h.in. Generated from configure.ac by autoheader. */
199
200+/* Have __builtin_popcount. */
201+#undef HAVE_BUILTIN_POPCOUNT
202+
203 /* $libdir subdirectory containing libebl modules. */
204 #undef LIBEBL_SUBDIR
205
206@@ -55,4 +58,7 @@
207 /* Define for large files, on AIX-style hosts. */
208 #undef _LARGE_FILES
209
210+/* Stubbed out if missing compiler support. */
211+#undef __thread
212+
213 #include <eu-config.h>
214Index: elfutils-0.148/configure.ac
215===================================================================
216--- elfutils-0.148.orig/configure.ac 2010-06-28 19:07:26.000000000 +0000
217+++ elfutils-0.148/configure.ac 2010-07-03 13:04:07.000000000 +0000
218@@ -73,6 +73,54 @@
219 AS_IF([test "x$ac_cv_c99" != xyes],
220 AC_MSG_ERROR([gcc with C99 support required]))
221
222+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
223+old_CFLAGS="$CFLAGS"
224+CFLAGS="$CFLAGS -Wextra"
225+AC_COMPILE_IFELSE([void foo (void) { }],
226+ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
227+CFLAGS="$old_CFLAGS"])
228+AC_SUBST(WEXTRA)
229+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
230+
231+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
232+old_CFLAGS="$CFLAGS"
233+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
234+AC_COMPILE_IFELSE([
235+void foo (void)
236+{
237+ inline void bar (void) {}
238+ bar ();
239+}
240+extern inline void baz (void) {}
241+], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
242+CFLAGS="$old_CFLAGS"])
243+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
244+ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
245+
246+AC_CACHE_CHECK([for --as-needed linker option],
247+ ac_cv_as_needed, [dnl
248+cat > conftest.c <<EOF
249+int main (void) { return 0; }
250+EOF
251+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
252+ -fPIC -shared -o conftest.so conftest.c
253+ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
254+then
255+ ac_cv_as_needed=yes
256+else
257+ ac_cv_as_needed=no
258+fi
259+rm -f conftest*])
260+AS_IF([test "x$ac_cv_as_needed" = xyes],
261+ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
262+AC_SUBST(LD_AS_NEEDED)
263+
264+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
265+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
266+ ac_cv_popcount=yes, ac_cv_popcount=no)])
267+AS_IF([test "x$ac_cv_popcount" = xyes],
268+ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
269+
270 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
271 # Use the same flags that we use for our DSOs, so the test is representative.
272 # Some old compiler/linker/libc combinations fail some ways and not others.
273@@ -88,7 +136,10 @@
274 CFLAGS="$save_CFLAGS"
275 LDFLAGS="$save_LDFLAGS"])
276 AS_IF([test "x$ac_cv_tls" != xyes],
277- AC_MSG_ERROR([__thread support required]))
278+ [AS_IF([test "$use_locks" = yes],
279+ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
280+ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
281+ [Stubbed out if missing compiler support.])])])
282
283 dnl This test must come as early as possible after the compiler configuration
284 dnl tests, because the choice of the file model can (in principle) affect
285@@ -251,7 +302,7 @@
286
287 # 1.234<whatever> -> 1234<whatever>
288 case "$PACKAGE_VERSION" in
289-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
290+[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
291 *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
292 esac
293 case "$eu_version" in
294@@ -280,6 +331,6 @@
295 esac
296
297 # Round up to the next release API (x.y) version.
298-[eu_version=$[($eu_version + 999) / 1000]]
299+eu_version=`expr \( $eu_version + 999 \) / 1000`
300
301 AC_OUTPUT
302Index: elfutils-0.148/lib/ChangeLog
303===================================================================
304--- elfutils-0.148.orig/lib/ChangeLog 2010-06-28 19:05:56.000000000 +0000
305+++ elfutils-0.148/lib/ChangeLog 2010-07-03 13:04:07.000000000 +0000
306@@ -14,6 +14,9 @@
307
308 2009-01-23 Roland McGrath <roland@redhat.com>
309
310+ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
311+ (__builtin_popcount): New inline function.
312+
313 * eu-config.h: Add multiple inclusion protection.
314
315 2009-01-17 Ulrich Drepper <drepper@redhat.com>
316@@ -70,6 +73,11 @@
317 * Makefile.am (libeu_a_SOURCES): Add it.
318 * system.h: Declare crc32_file.
319
320+2005-02-07 Roland McGrath <roland@redhat.com>
321+
322+ * Makefile.am (WEXTRA): New variable, substituted by configure.
323+ (AM_CFLAGS): Use it in place of -Wextra.
324+
325 2005-04-30 Ulrich Drepper <drepper@redhat.com>
326
327 * Makefile.am: Use -ffunction-sections for xmalloc.c.
328Index: elfutils-0.148/lib/eu-config.h
329===================================================================
330--- elfutils-0.148.orig/lib/eu-config.h 2009-08-12 14:23:22.000000000 +0000
331+++ elfutils-0.148/lib/eu-config.h 2010-07-03 13:04:07.000000000 +0000
332@@ -182,6 +182,17 @@
333 /* This macro is used by the tests conditionalize for standalone building. */
334 #define ELFUTILS_HEADER(name) <lib##name.h>
335
336+#ifndef HAVE_BUILTIN_POPCOUNT
337+# define __builtin_popcount hakmem_popcount
338+static inline unsigned int __attribute__ ((unused))
339+hakmem_popcount (unsigned int x)
340+{
341+ /* HAKMEM 169 */
342+ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
343+ return ((n + (n >> 3)) & 030707070707) % 63;
344+}
345+#endif /* HAVE_BUILTIN_POPCOUNT */
346+
347
348 #ifdef SHARED
349 # define OLD_VERSION(name, version) \
350Index: elfutils-0.148/lib/Makefile.in
351===================================================================
352--- elfutils-0.148.orig/lib/Makefile.in 2010-06-28 19:07:33.000000000 +0000
353+++ elfutils-0.148/lib/Makefile.in 2010-07-03 13:04:07.000000000 +0000
354@@ -99,6 +99,7 @@
355 INSTALL_SCRIPT = @INSTALL_SCRIPT@
356 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
357 LDFLAGS = @LDFLAGS@
358+LD_AS_NEEDED = @LD_AS_NEEDED@
359 LEX = @LEX@
360 LEXLIB = @LEXLIB@
361 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
362@@ -128,6 +129,7 @@
363 STRIP = @STRIP@
364 USE_NLS = @USE_NLS@
365 VERSION = @VERSION@
366+WEXTRA = @WEXTRA@
367 XGETTEXT = @XGETTEXT@
368 XGETTEXT_015 = @XGETTEXT_015@
369 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
370@@ -190,7 +192,7 @@
371 -I$(srcdir)/../libelf
372 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
373 $($(*F)_no_Werror),,-Werror) $(if \
374- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
375+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
376 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
377 $(am__append_1) -fpic
378 @MUDFLAP_FALSE@libmudflap =
379Index: elfutils-0.148/libasm/ChangeLog
380===================================================================
381--- elfutils-0.148.orig/libasm/ChangeLog 2010-03-05 05:48:23.000000000 +0000
382+++ elfutils-0.148/libasm/ChangeLog 2010-07-03 13:04:07.000000000 +0000
383@@ -67,6 +67,11 @@
384 * asm_error.c: Add new error ASM_E_IOERROR.
385 * libasmP.h: Add ASM_E_IOERROR definition.
386
387+2005-05-31 Roland McGrath <roland@redhat.com>
388+
389+ * Makefile.am (WEXTRA): New variable, substituted by configure.
390+ (AM_CFLAGS): Use it in place of -Wextra.
391+
392 2005-02-15 Ulrich Drepper <drepper@redhat.com>
393
394 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
395Index: elfutils-0.148/libasm/Makefile.in
396===================================================================
397--- elfutils-0.148.orig/libasm/Makefile.in 2010-06-28 19:07:33.000000000 +0000
398+++ elfutils-0.148/libasm/Makefile.in 2010-07-03 13:04:07.000000000 +0000
399@@ -147,6 +147,7 @@
400 INSTALL_SCRIPT = @INSTALL_SCRIPT@
401 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
402 LDFLAGS = @LDFLAGS@
403+LD_AS_NEEDED = @LD_AS_NEEDED@
404 LEX = @LEX@
405 LEXLIB = @LEXLIB@
406 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
407@@ -176,6 +177,7 @@
408 STRIP = @STRIP@
409 USE_NLS = @USE_NLS@
410 VERSION = 1
411+WEXTRA = @WEXTRA@
412 XGETTEXT = @XGETTEXT@
413 XGETTEXT_015 = @XGETTEXT_015@
414 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
415@@ -239,7 +241,7 @@
416 -I$(top_srcdir)/libdw
417 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
418 $($(*F)_no_Werror),,-Werror) $(if \
419- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
420+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
421 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
422 $(am__append_1)
423 @MUDFLAP_FALSE@libmudflap =
424Index: elfutils-0.148/libcpu/ChangeLog
425===================================================================
426--- elfutils-0.148.orig/libcpu/ChangeLog 2010-03-05 05:48:23.000000000 +0000
427+++ elfutils-0.148/libcpu/ChangeLog 2010-07-03 13:04:07.000000000 +0000
428@@ -9,6 +9,9 @@
429
430 2009-01-23 Roland McGrath <roland@redhat.com>
431
432+ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
433+ compilers that don't realize it's noreturn.
434+
435 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
436 substitution that can produce leading whitespace.
437
438@@ -338,6 +341,11 @@
439 * defs/i386.doc: New file.
440 * defs/x86_64: New file.
441
442+2005-04-04 Roland McGrath <roland@redhat.com>
443+
444+ * Makefile.am (WEXTRA): New variable, substituted by configure.
445+ (AM_CFLAGS): Use it instead of -Wextra.
446+
447 2005-02-15 Ulrich Drepper <drepper@redhat.com>
448
449 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
450Index: elfutils-0.148/libcpu/i386_disasm.c
451===================================================================
452--- elfutils-0.148.orig/libcpu/i386_disasm.c 2009-01-08 20:56:36.000000000 +0000
453+++ elfutils-0.148/libcpu/i386_disasm.c 2010-07-03 13:04:07.000000000 +0000
454@@ -791,6 +791,7 @@
455
456 default:
457 assert (! "INVALID not handled");
458+ abort ();
459 }
460 }
461 else
462Index: elfutils-0.148/libcpu/Makefile.in
463===================================================================
464--- elfutils-0.148.orig/libcpu/Makefile.in 2010-06-28 19:07:33.000000000 +0000
465+++ elfutils-0.148/libcpu/Makefile.in 2010-07-03 13:04:07.000000000 +0000
466@@ -116,6 +116,7 @@
467 INSTALL_SCRIPT = @INSTALL_SCRIPT@
468 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
469 LDFLAGS = @LDFLAGS@
470+LD_AS_NEEDED = @LD_AS_NEEDED@
471 LEX = @LEX@
472 LEXLIB = @LEXLIB@
473 LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
474@@ -145,6 +146,7 @@
475 STRIP = @STRIP@
476 USE_NLS = @USE_NLS@
477 VERSION = @VERSION@
478+WEXTRA = @WEXTRA@
479 XGETTEXT = @XGETTEXT@
480 XGETTEXT_015 = @XGETTEXT_015@
481 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
482@@ -208,7 +210,7 @@
483 -I$(srcdir)/../libdw -I$(srcdir)/../libasm
484 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
485 $($(*F)_no_Werror),,-Werror) $(if \
486- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
487+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
488 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
489 $(am__append_1) -fpic -fdollars-in-identifiers
490 @MUDFLAP_FALSE@libmudflap =
491Index: elfutils-0.148/libdw/ChangeLog
492===================================================================
493--- elfutils-0.148.orig/libdw/ChangeLog 2010-06-28 19:05:56.000000000 +0000
494+++ elfutils-0.148/libdw/ChangeLog 2010-07-03 13:04:07.000000000 +0000
495@@ -276,6 +276,10 @@
496
497 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
498
499+2009-08-17 Roland McGrath <roland@redhat.com>
500+
501+ * libdw.h: Disable extern inlines for GCC 4.2.
502+
503 2009-08-10 Roland McGrath <roland@redhat.com>
504
505 * dwarf_getscopevar.c: Use dwarf_diename.
506@@ -1044,6 +1048,11 @@
507
508 2005-05-31 Roland McGrath <roland@redhat.com>
509
510+ * Makefile.am (WEXTRA): New variable, substituted by configure.
511+ (AM_CFLAGS): Use it in place of -Wextra.
512+
513+2005-05-31 Roland McGrath <roland@redhat.com>
514+
515 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
516 formref offset.
517
518Index: elfutils-0.148/libdw/libdw.h
519===================================================================
520--- elfutils-0.148.orig/libdw/libdw.h 2010-06-28 19:05:56.000000000 +0000
521+++ elfutils-0.148/libdw/libdw.h 2010-07-03 13:04:07.000000000 +0000
522@@ -842,7 +842,7 @@
523
524
525 /* Inline optimizations. */
526-#ifdef __OPTIMIZE__
527+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
528 /* Return attribute code of given attribute. */
529 __libdw_extern_inline unsigned int
530 dwarf_whatattr (Dwarf_Attribute *attr)
531Index: elfutils-0.148/libdw/Makefile.in
532===================================================================
533--- elfutils-0.148.orig/libdw/Makefile.in 2010-06-28 19:07:33.000000000 +0000
534+++ elfutils-0.148/libdw/Makefile.in 2010-07-03 13:04:07.000000000 +0000
535@@ -191,6 +191,7 @@
536 INSTALL_SCRIPT = @INSTALL_SCRIPT@
537 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
538 LDFLAGS = @LDFLAGS@
539+LD_AS_NEEDED = @LD_AS_NEEDED@
540 LEX = @LEX@
541 LEXLIB = @LEXLIB@
542 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
543@@ -220,6 +221,7 @@
544 STRIP = @STRIP@
545 USE_NLS = @USE_NLS@
546 VERSION = 1
547+WEXTRA = @WEXTRA@
548 XGETTEXT = @XGETTEXT@
549 XGETTEXT_015 = @XGETTEXT_015@
550 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
551@@ -282,7 +284,7 @@
552 -I$(srcdir)/../libelf
553 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
554 $($(*F)_no_Werror),,-Werror) $(if \
555- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
556+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
557 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
558 $(am__append_1) $(am__append_2)
559 @MUDFLAP_FALSE@libmudflap =
560Index: elfutils-0.148/libdwfl/ChangeLog
561===================================================================
562--- elfutils-0.148.orig/libdwfl/ChangeLog 2010-06-28 19:05:56.000000000 +0000
563+++ elfutils-0.148/libdwfl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
564@@ -1265,6 +1265,11 @@
565
566 2005-07-21 Roland McGrath <roland@redhat.com>
567
568+ * Makefile.am (WEXTRA): New variable, substituted by configure.
569+ (AM_CFLAGS): Use it in place of -Wextra.
570+
571+2005-07-21 Roland McGrath <roland@redhat.com>
572+
573 * Makefile.am (noinst_HEADERS): Add loc2c.c.
574
575 * test2.c (main): Check sscanf result to quiet warning.
576Index: elfutils-0.148/libdwfl/Makefile.in
577===================================================================
578--- elfutils-0.148.orig/libdwfl/Makefile.in 2010-06-28 19:07:33.000000000 +0000
579+++ elfutils-0.148/libdwfl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
580@@ -181,6 +181,7 @@
581 INSTALL_SCRIPT = @INSTALL_SCRIPT@
582 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
583 LDFLAGS = @LDFLAGS@
584+LD_AS_NEEDED = @LD_AS_NEEDED@
585 LEX = @LEX@
586 LEXLIB = @LEXLIB@
587 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
588@@ -210,6 +211,7 @@
589 STRIP = @STRIP@
590 USE_NLS = @USE_NLS@
591 VERSION = 1
592+WEXTRA = @WEXTRA@
593 XGETTEXT = @XGETTEXT@
594 XGETTEXT_015 = @XGETTEXT_015@
595 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
596@@ -273,7 +275,7 @@
597 -I$(srcdir)/../libdw
598 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
599 $($(*F)_no_Werror),,-Werror) $(if \
600- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
601+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
602 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
603 $(am__append_1)
604 @MUDFLAP_FALSE@libmudflap =
605Index: elfutils-0.148/libebl/ChangeLog
606===================================================================
607--- elfutils-0.148.orig/libebl/ChangeLog 2010-03-05 05:48:23.000000000 +0000
608+++ elfutils-0.148/libebl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
609@@ -624,6 +624,11 @@
610 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
611 tracking works right.
612
613+2005-05-31 Roland McGrath <roland@redhat.com>
614+
615+ * Makefile.am (WEXTRA): New variable, substituted by configure.
616+ (AM_CFLAGS): Use it in place of -Wextra.
617+
618 2005-05-21 Ulrich Drepper <drepper@redhat.com>
619
620 * libebl_x86_64.map: Add x86_64_core_note.
621Index: elfutils-0.148/libebl/Makefile.in
622===================================================================
623--- elfutils-0.148.orig/libebl/Makefile.in 2010-06-28 19:07:34.000000000 +0000
624+++ elfutils-0.148/libebl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
625@@ -143,6 +143,7 @@
626 INSTALL_SCRIPT = @INSTALL_SCRIPT@
627 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
628 LDFLAGS = @LDFLAGS@
629+LD_AS_NEEDED = @LD_AS_NEEDED@
630 LEX = @LEX@
631 LEXLIB = @LEXLIB@
632 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
633@@ -172,6 +173,7 @@
634 STRIP = @STRIP@
635 USE_NLS = @USE_NLS@
636 VERSION = 1
637+WEXTRA = @WEXTRA@
638 XGETTEXT = @XGETTEXT@
639 XGETTEXT_015 = @XGETTEXT_015@
640 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
641@@ -235,7 +237,7 @@
642 -I$(srcdir)/../libasm
643 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
644 $($(*F)_no_Werror),,-Werror) $(if \
645- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
646+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
647 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
648 $(am__append_1) -fpic
649 @MUDFLAP_FALSE@libmudflap =
650Index: elfutils-0.148/libelf/ChangeLog
651===================================================================
652--- elfutils-0.148.orig/libelf/ChangeLog 2010-06-14 21:17:20.000000000 +0000
653+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:04:07.000000000 +0000
654@@ -657,6 +657,11 @@
655
656 * elf.h: Update from glibc.
657
658+2005-05-31 Roland McGrath <roland@redhat.com>
659+
660+ * Makefile.am (WEXTRA): New variable, substituted by configure.
661+ (AM_CFLAGS): Use it in place of -Wextra.
662+
663 2005-05-08 Roland McGrath <roland@redhat.com>
664
665 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
666Index: elfutils-0.148/libelf/common.h
667===================================================================
668--- elfutils-0.148.orig/libelf/common.h 2009-01-08 20:56:36.000000000 +0000
669+++ elfutils-0.148/libelf/common.h 2010-07-03 13:04:07.000000000 +0000
670@@ -160,7 +160,7 @@
671 (Var) = (sizeof (Var) == 1 \
672 ? (unsigned char) (Var) \
673 : (sizeof (Var) == 2 \
674- ? bswap_16 (Var) \
675+ ? (unsigned short int) bswap_16 (Var) \
676 : (sizeof (Var) == 4 \
677 ? bswap_32 (Var) \
678 : bswap_64 (Var))))
679@@ -169,7 +169,7 @@
680 (Dst) = (sizeof (Var) == 1 \
681 ? (unsigned char) (Var) \
682 : (sizeof (Var) == 2 \
683- ? bswap_16 (Var) \
684+ ? (unsigned short int) bswap_16 (Var) \
685 : (sizeof (Var) == 4 \
686 ? bswap_32 (Var) \
687 : bswap_64 (Var))))
688Index: elfutils-0.148/libelf/Makefile.in
689===================================================================
690--- elfutils-0.148.orig/libelf/Makefile.in 2010-06-28 19:07:34.000000000 +0000
691+++ elfutils-0.148/libelf/Makefile.in 2010-07-03 13:04:07.000000000 +0000
692@@ -189,6 +189,7 @@
693 INSTALL_SCRIPT = @INSTALL_SCRIPT@
694 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
695 LDFLAGS = @LDFLAGS@
696+LD_AS_NEEDED = @LD_AS_NEEDED@
697 LEX = @LEX@
698 LEXLIB = @LEXLIB@
699 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
700@@ -218,6 +219,7 @@
701 STRIP = @STRIP@
702 USE_NLS = @USE_NLS@
703 VERSION = 1
704+WEXTRA = @WEXTRA@
705 XGETTEXT = @XGETTEXT@
706 XGETTEXT_015 = @XGETTEXT_015@
707 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
708@@ -279,7 +281,7 @@
709 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
710 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
711 $($(*F)_no_Werror),,-Werror) $(if \
712- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
713+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
714 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
715 $(am__append_1) $(am__append_2)
716 @MUDFLAP_FALSE@libmudflap =
717Index: elfutils-0.148/m4/Makefile.in
718===================================================================
719--- elfutils-0.148.orig/m4/Makefile.in 2010-06-28 19:07:34.000000000 +0000
720+++ elfutils-0.148/m4/Makefile.in 2010-07-03 13:04:07.000000000 +0000
721@@ -75,6 +75,7 @@
722 INSTALL_SCRIPT = @INSTALL_SCRIPT@
723 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
724 LDFLAGS = @LDFLAGS@
725+LD_AS_NEEDED = @LD_AS_NEEDED@
726 LEX = @LEX@
727 LEXLIB = @LEXLIB@
728 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
729@@ -104,6 +105,7 @@
730 STRIP = @STRIP@
731 USE_NLS = @USE_NLS@
732 VERSION = @VERSION@
733+WEXTRA = @WEXTRA@
734 XGETTEXT = @XGETTEXT@
735 XGETTEXT_015 = @XGETTEXT_015@
736 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
737Index: elfutils-0.148/Makefile.in
738===================================================================
739--- elfutils-0.148.orig/Makefile.in 2010-06-28 19:07:33.000000000 +0000
740+++ elfutils-0.148/Makefile.in 2010-07-03 13:04:07.000000000 +0000
741@@ -155,6 +155,7 @@
742 INSTALL_SCRIPT = @INSTALL_SCRIPT@
743 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
744 LDFLAGS = @LDFLAGS@
745+LD_AS_NEEDED = @LD_AS_NEEDED@
746 LEX = @LEX@
747 LEXLIB = @LEXLIB@
748 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
749@@ -184,6 +185,7 @@
750 STRIP = @STRIP@
751 USE_NLS = @USE_NLS@
752 VERSION = @VERSION@
753+WEXTRA = @WEXTRA@
754 XGETTEXT = @XGETTEXT@
755 XGETTEXT_015 = @XGETTEXT_015@
756 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
757Index: elfutils-0.148/src/addr2line.c
758===================================================================
759--- elfutils-0.148.orig/src/addr2line.c 2010-05-28 14:38:30.000000000 +0000
760+++ elfutils-0.148/src/addr2line.c 2010-07-03 13:05:40.000000000 +0000
761@@ -447,10 +447,10 @@
762 bool parsed = false;
763 int i, j;
764 char *name = NULL;
765- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
766+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
767 && string[i] == '\0')
768 parsed = adjust_to_section (name, &addr, dwfl);
769- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
770+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
771 {
772 default:
773 break;
774Index: elfutils-0.148/src/ChangeLog
775===================================================================
776--- elfutils-0.148.orig/src/ChangeLog 2010-06-28 19:05:56.000000000 +0000
777+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:04:08.000000000 +0000
778@@ -165,8 +165,16 @@
779 * readelf.c (attr_callback): Use print_block only when we don't use
780 print_ops.
781
782+2009-08-17 Roland McGrath <roland@redhat.com>
783+
784+ * ld.h: Disable extern inlines for GCC 4.2.
785+
786 2009-08-14 Roland McGrath <roland@redhat.com>
787
788+ * strings.c (read_block): Conditionalize posix_fadvise use
789+ on [POSIX_FADV_SEQUENTIAL].
790+ From Petr Salinger <Petr.Salinger@seznam.cz>.
791+
792 * ar.c (do_oper_extract): Use pathconf instead of statfs.
793
794 2009-08-01 Ulrich Drepper <drepper@redhat.com>
795@@ -330,6 +338,8 @@
796 * readelf.c (print_debug_frame_section): Use t instead of j formats
797 for ptrdiff_t OFFSET.
798
799+ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
800+
801 2009-01-21 Ulrich Drepper <drepper@redhat.com>
802
803 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
804@@ -513,6 +523,11 @@
805 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
806 is valid in RELRO.
807
808+2008-03-01 Roland McGrath <roland@redhat.com>
809+
810+ * readelf.c (dump_archive_index): Tweak portability hack
811+ to match [__GNUC__ < 4] too.
812+
813 2008-02-29 Roland McGrath <roland@redhat.com>
814
815 * readelf.c (print_attributes): Add a cast.
816@@ -764,6 +779,8 @@
817
818 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
819
820+ * Makefile.am (readelf_no_Werror): New variable.
821+
822 2007-10-15 Roland McGrath <roland@redhat.com>
823
824 * make-debug-archive.in: New file.
825@@ -1203,6 +1220,10 @@
826 * elflint.c (valid_e_machine): Add EM_ALPHA.
827 Reported by Christian Aichinger <Greek0@gmx.net>.
828
829+ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
830+ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
831+ if neither is defined.
832+
833 2006-08-08 Ulrich Drepper <drepper@redhat.com>
834
835 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
836@@ -1279,6 +1300,10 @@
837 * Makefile.am: Add hacks to create dependency files for non-generic
838 linker.
839
840+2006-04-05 Roland McGrath <roland@redhat.com>
841+
842+ * strings.c (MAP_POPULATE): Define to 0 if undefined.
843+
844 2006-06-12 Ulrich Drepper <drepper@redhat.com>
845
846 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
847@@ -1627,6 +1652,11 @@
848 * readelf.c (print_debug_loc_section): Fix indentation for larger
849 address size.
850
851+2005-05-31 Roland McGrath <roland@redhat.com>
852+
853+ * Makefile.am (WEXTRA): New variable, substituted by configure.
854+ (AM_CFLAGS): Use it in place of -Wextra.
855+
856 2005-05-30 Roland McGrath <roland@redhat.com>
857
858 * readelf.c (print_debug_line_section): Print section offset of each
859Index: elfutils-0.148/src/findtextrel.c
860===================================================================
861--- elfutils-0.148.orig/src/findtextrel.c 2009-02-11 01:12:59.000000000 +0000
862+++ elfutils-0.148/src/findtextrel.c 2010-07-03 13:04:08.000000000 +0000
863@@ -490,7 +490,11 @@
864
865
866 static void
867-check_rel (size_t nsegments, struct segments segments[nsegments],
868+check_rel (size_t nsegments, struct segments segments[
869+#if __GNUC__ >= 4
870+ nsegments
871+#endif
872+ ],
873 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
874 const char *fname, bool more_than_one, void **knownsrcs)
875 {
876Index: elfutils-0.148/src/ld.h
877===================================================================
878--- elfutils-0.148.orig/src/ld.h 2009-06-13 22:39:51.000000000 +0000
879+++ elfutils-0.148/src/ld.h 2010-07-03 13:04:08.000000000 +0000
880@@ -1122,6 +1122,7 @@
881
882 /* Checked whether the symbol is undefined and referenced from a DSO. */
883 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
884+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
885 #ifdef __GNUC_STDC_INLINE__
886 __attribute__ ((__gnu_inline__))
887 #endif
888@@ -1139,5 +1140,6 @@
889
890 return sym->defined && sym->in_dso;
891 }
892+#endif /* Optimizing and not GCC 4.2. */
893
894 #endif /* ld.h */
895Index: elfutils-0.148/src/Makefile.am
896===================================================================
897--- elfutils-0.148.orig/src/Makefile.am 2010-03-05 05:48:23.000000000 +0000
898+++ elfutils-0.148/src/Makefile.am 2010-07-03 13:04:08.000000000 +0000
899@@ -99,6 +99,9 @@
900 # XXX While the file is not finished, don't warn about this
901 ldgeneric_no_Wunused = yes
902
903+# Buggy old compilers.
904+readelf_no_Werror = yes
905+
906 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
907 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
908 size_LDADD = $(libelf) $(libeu) $(libmudflap)
909Index: elfutils-0.148/src/Makefile.in
910===================================================================
911--- elfutils-0.148.orig/src/Makefile.in 2010-06-28 19:07:34.000000000 +0000
912+++ elfutils-0.148/src/Makefile.in 2010-07-03 13:04:08.000000000 +0000
913@@ -228,6 +228,7 @@
914 INSTALL_SCRIPT = @INSTALL_SCRIPT@
915 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
916 LDFLAGS = @LDFLAGS@
917+LD_AS_NEEDED = @LD_AS_NEEDED@
918 LEX = @LEX@
919 LEXLIB = @LEXLIB@
920 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
921@@ -257,6 +258,7 @@
922 STRIP = @STRIP@
923 USE_NLS = @USE_NLS@
924 VERSION = @VERSION@
925+WEXTRA = @WEXTRA@
926 XGETTEXT = @XGETTEXT@
927 XGETTEXT_015 = @XGETTEXT_015@
928 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
929@@ -321,7 +323,7 @@
930 -I$(srcdir)/../libasm
931 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
932 $($(*F)_no_Werror),,-Werror) $(if \
933- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
934+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
935 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
936 $(am__append_1)
937 @MUDFLAP_FALSE@libmudflap =
938@@ -368,6 +370,9 @@
939 addr2line_no_Wformat = yes
940 # XXX While the file is not finished, don't warn about this
941 ldgeneric_no_Wunused = yes
942+
943+# Buggy old compilers.
944+readelf_no_Werror = yes
945 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
946 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
947 size_LDADD = $(libelf) $(libeu) $(libmudflap)
948Index: elfutils-0.148/src/readelf.c
949===================================================================
950--- elfutils-0.148.orig/src/readelf.c 2010-06-28 19:05:56.000000000 +0000
951+++ elfutils-0.148/src/readelf.c 2010-07-03 13:04:08.000000000 +0000
952@@ -7845,7 +7845,7 @@
953 if (unlikely (elf_rand (elf, as_off) == 0)
954 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
955 == NULL))
956-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
957+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
958 while (1)
959 #endif
960 error (EXIT_FAILURE, 0,
961Index: elfutils-0.148/src/strings.c
962===================================================================
963--- elfutils-0.148.orig/src/strings.c 2009-02-11 01:12:59.000000000 +0000
964+++ elfutils-0.148/src/strings.c 2010-07-03 13:04:08.000000000 +0000
965@@ -51,6 +51,10 @@
966
967 #include <system.h>
968
969+#ifndef MAP_POPULATE
970+# define MAP_POPULATE 0
971+#endif
972+
973
974 /* Prototypes of local functions. */
975 static int read_fd (int fd, const char *fname, off64_t fdlen);
976@@ -491,8 +495,13 @@
977 fd, start_off);
978 if (mem != MAP_FAILED)
979 {
980+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
981+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
982+#endif
983+#ifdef POSIX_MADV_SEQUENTIAL
984 /* We will go through the mapping sequentially. */
985 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
986+#endif
987 break;
988 }
989 if (errno != EINVAL && errno != ENOMEM)
990@@ -586,9 +595,11 @@
991 elfmap_off = from & ~(ps - 1);
992 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
993
994+#ifdef POSIX_FADV_SEQUENTIAL
995 if (unlikely (elfmap == MAP_FAILED))
996 /* Let the kernel know we are going to read everything in sequence. */
997 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
998+#endif
999 }
1000
1001 if (unlikely (elfmap == MAP_FAILED))
1002Index: elfutils-0.148/src/strip.c
1003===================================================================
1004--- elfutils-0.148.orig/src/strip.c 2010-01-15 09:05:55.000000000 +0000
1005+++ elfutils-0.148/src/strip.c 2010-07-03 13:04:08.000000000 +0000
1006@@ -53,6 +53,12 @@
1007 #include <libebl.h>
1008 #include <system.h>
1009
1010+#ifdef HAVE_FUTIMES
1011+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
1012+#else
1013+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
1014+#endif
1015+
1016
1017 /* Name and version of program. */
1018 static void print_version (FILE *stream, struct argp_state *state);
1019@@ -301,8 +307,18 @@
1020
1021 /* If we have to preserve the timestamp, we need it in the
1022 format utimes() understands. */
1023+#ifdef HAVE_STRUCT_STAT_ST_ATIM
1024 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
1025+#else
1026+ tv[0].tv_sec = pre_st.st_atime;
1027+ tv[0].tv_usec = 0;
1028+#endif
1029+#ifdef HAVE_STRUCT_STAT_ST_MTIM
1030 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
1031+#else
1032+ tv[1].tv_sec = pre_st.st_atime;
1033+ tv[1].tv_usec = 0;
1034+#endif
1035 }
1036
1037 /* Open the file. */
1038@@ -1747,7 +1763,7 @@
1039 /* If requested, preserve the timestamp. */
1040 if (tvp != NULL)
1041 {
1042- if (futimes (fd, tvp) != 0)
1043+ if (FUTIMES (fd, output_fname, tvp) != 0)
1044 {
1045 error (0, errno, gettext ("\
1046 cannot set access and modification date of '%s'"),
1047@@ -1804,7 +1820,7 @@
1048
1049 if (tvp != NULL)
1050 {
1051- if (unlikely (futimes (fd, tvp) != 0))
1052+ if (unlikely (FUTIMES (fd, fname, tvp) != 0))
1053 {
1054 error (0, errno, gettext ("\
1055 cannot set access and modification date of '%s'"), fname);
1056Index: elfutils-0.148/tests/ChangeLog
1057===================================================================
1058--- elfutils-0.148.orig/tests/ChangeLog 2010-06-28 19:05:56.000000000 +0000
1059+++ elfutils-0.148/tests/ChangeLog 2010-07-03 13:04:08.000000000 +0000
1060@@ -154,6 +154,8 @@
1061
1062 2008-01-21 Roland McGrath <roland@redhat.com>
1063
1064+ * line2addr.c (main): Revert last change.
1065+
1066 * testfile45.S.bz2: Add tests for cltq, cqto.
1067 * testfile45.expect.bz2: Adjust.
1068
1069@@ -862,6 +864,11 @@
1070 * Makefile.am (TESTS): Add run-elflint-test.sh.
1071 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
1072
1073+2005-05-31 Roland McGrath <roland@redhat.com>
1074+
1075+ * Makefile.am (WEXTRA): New variable, substituted by configure.
1076+ (AM_CFLAGS): Use it in place of -Wextra.
1077+
1078 2005-05-24 Ulrich Drepper <drepper@redhat.com>
1079
1080 * get-files.c (main): Use correct format specifier.
1081Index: elfutils-0.148/tests/line2addr.c
1082===================================================================
1083--- elfutils-0.148.orig/tests/line2addr.c 2009-01-08 20:56:37.000000000 +0000
1084+++ elfutils-0.148/tests/line2addr.c 2010-07-03 13:04:08.000000000 +0000
1085@@ -132,7 +132,7 @@
1086 {
1087 struct args a = { .arg = argv[cnt] };
1088
1089- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
1090+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
1091 {
1092 default:
1093 case 0:
1094Index: elfutils-0.148/tests/Makefile.in
1095===================================================================
1096--- elfutils-0.148.orig/tests/Makefile.in 2010-06-28 19:07:34.000000000 +0000
1097+++ elfutils-0.148/tests/Makefile.in 2010-07-03 13:04:08.000000000 +0000
1098@@ -372,6 +372,7 @@
1099 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1100 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1101 LDFLAGS = @LDFLAGS@
1102+LD_AS_NEEDED = @LD_AS_NEEDED@
1103 LEX = @LEX@
1104 LEXLIB = @LEXLIB@
1105 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1106@@ -401,6 +402,7 @@
1107 STRIP = @STRIP@
1108 USE_NLS = @USE_NLS@
1109 VERSION = @VERSION@
1110+WEXTRA = @WEXTRA@
1111 XGETTEXT = @XGETTEXT@
1112 XGETTEXT_015 = @XGETTEXT_015@
1113 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1114@@ -462,7 +464,7 @@
1115 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
1116 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1117 $($(*F)_no_Werror),,-Werror) $(if \
1118- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1119+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1120 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1121 $(am__append_1)
1122 @MUDFLAP_FALSE@libmudflap =
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
new file mode 100644
index 0000000000..a186308f17
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
@@ -0,0 +1,1707 @@
1Index: elfutils-0.148/libelf/ChangeLog
2===================================================================
3--- elfutils-0.148.orig/libelf/ChangeLog 2010-07-03 13:07:10.000000000 +0000
4+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:07:11.000000000 +0000
5@@ -649,10 +649,53 @@
6 If section content hasn't been read yet, do it before looking for the
7 block size. If no section data present, infer size of section header.
8
9+2005-05-14 Jakub Jelinek <jakub@redhat.com>
10+
11+ * libelfP.h (INVALID_NDX): Define.
12+ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
13+ * gelf_getlib.c (gelf_getlib): Likewise.
14+ * gelf_getmove.c (gelf_getmove): Likewise.
15+ * gelf_getrel.c (gelf_getrel): Likewise.
16+ * gelf_getrela.c (gelf_getrela): Likewise.
17+ * gelf_getsym.c (gelf_getsym): Likewise.
18+ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
19+ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
20+ * gelf_getversym.c (gelf_getversym): Likewise.
21+ * gelf_update_dyn.c (gelf_update_dyn): Likewise.
22+ * gelf_update_lib.c (gelf_update_lib): Likewise.
23+ * gelf_update_move.c (gelf_update_move): Likewise.
24+ * gelf_update_rel.c (gelf_update_rel): Likewise.
25+ * gelf_update_rela.c (gelf_update_rela): Likewise.
26+ * gelf_update_sym.c (gelf_update_sym): Likewise.
27+ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
28+ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
29+ * gelf_update_versym.c (gelf_update_versym): Likewise.
30+ * elf_newscn.c (elf_newscn): Check for overflow.
31+ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
32+ (__elfw2(LIBELFBITS,updatefile)): Likewise.
33+ * elf_begin.c (file_read_elf): Likewise.
34+ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
35+ * elf_getarsym.c (elf_getarsym): Likewise.
36+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise.
37 2005-05-11 Ulrich Drepper <drepper@redhat.com>
38
39 * elf.h: Update again.
40
41+2005-05-17 Jakub Jelinek <jakub@redhat.com>
42+
43+ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
44+ table fits into object's bounds.
45+ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to
46+ elf->map_address. Check if first section header fits into object's
47+ bounds.
48+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
49+ Check if section header table fits into object's bounds.
50+ * elf_begin.c (get_shnum): Ensure section headers fits into
51+ object's bounds.
52+ (file_read_elf): Make sure scncnt is small enough to allocate both
53+ ElfXX_Shdr and Elf_Scn array. Make sure section and program header
54+ tables fit into object's bounds. Avoid memory leak on failure.
55+
56 2005-05-09 Ulrich Drepper <drepper@redhat.com>
57
58 * elf.h: Update from glibc.
59Index: elfutils-0.148/libelf/elf32_getphdr.c
60===================================================================
61--- elfutils-0.148.orig/libelf/elf32_getphdr.c 2010-04-21 14:26:40.000000000 +0000
62+++ elfutils-0.148/libelf/elf32_getphdr.c 2010-07-03 13:07:11.000000000 +0000
63@@ -114,6 +114,16 @@
64
65 if (elf->map_address != NULL)
66 {
67+ /* First see whether the information in the ELF header is
68+ valid and it does not ask for too much. */
69+ if (unlikely (ehdr->e_phoff >= elf->maximum_size)
70+ || unlikely (elf->maximum_size - ehdr->e_phoff < size))
71+ {
72+ /* Something is wrong. */
73+ __libelf_seterrno (ELF_E_INVALID_PHDR);
74+ goto out;
75+ }
76+
77 /* All the data is already mapped. Use it. */
78 void *file_phdr = ((char *) elf->map_address
79 + elf->start_offset + ehdr->e_phoff);
80Index: elfutils-0.148/libelf/elf32_getshdr.c
81===================================================================
82--- elfutils-0.148.orig/libelf/elf32_getshdr.c 2009-06-13 22:41:42.000000000 +0000
83+++ elfutils-0.148/libelf/elf32_getshdr.c 2010-07-03 13:07:11.000000000 +0000
84@@ -1,5 +1,5 @@
85 /* Return section header.
86- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2009 Red Hat, Inc.
87+ Copyright (C) 1998-2009 Red Hat, Inc.
88 This file is part of Red Hat elfutils.
89 Written by Ulrich Drepper <drepper@redhat.com>, 1998.
90
91@@ -81,7 +81,8 @@
92 goto out;
93
94 size_t shnum;
95- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0)
96+ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0
97+ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
98 goto out;
99 size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
100
101@@ -98,6 +99,16 @@
102
103 if (elf->map_address != NULL)
104 {
105+ /* First see whether the information in the ELF header is
106+ valid and it does not ask for too much. */
107+ if (unlikely (ehdr->e_shoff >= elf->maximum_size)
108+ || unlikely (elf->maximum_size - ehdr->e_shoff < size))
109+ {
110+ /* Something is wrong. */
111+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
112+ goto free_and_out;
113+ }
114+
115 ElfW2(LIBELFBITS,Shdr) *notcvt;
116
117 /* All the data is already mapped. If we could use it
118Index: elfutils-0.148/libelf/elf32_newphdr.c
119===================================================================
120--- elfutils-0.148.orig/libelf/elf32_newphdr.c 2010-01-12 16:57:54.000000000 +0000
121+++ elfutils-0.148/libelf/elf32_newphdr.c 2010-07-03 13:07:11.000000000 +0000
122@@ -135,6 +135,12 @@
123 || count == PN_XNUM
124 || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
125 {
126+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
127+ {
128+ result = NULL;
129+ goto out;
130+ }
131+
132 /* Allocate a new program header with the appropriate number of
133 elements. */
134 result = (ElfW2(LIBELFBITS,Phdr) *)
135Index: elfutils-0.148/libelf/elf32_updatefile.c
136===================================================================
137--- elfutils-0.148.orig/libelf/elf32_updatefile.c 2010-01-12 16:57:54.000000000 +0000
138+++ elfutils-0.148/libelf/elf32_updatefile.c 2010-07-03 13:07:11.000000000 +0000
139@@ -223,6 +223,9 @@
140 /* Write all the sections. Well, only those which are modified. */
141 if (shnum > 0)
142 {
143+ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
144+ return 1;
145+
146 Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
147 Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
148 char *const shdr_start = ((char *) elf->map_address + elf->start_offset
149@@ -645,6 +648,10 @@
150 /* Write all the sections. Well, only those which are modified. */
151 if (shnum > 0)
152 {
153+ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
154+ + sizeof (ElfW2(LIBELFBITS,Shdr)))))
155+ return 1;
156+
157 off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
158 #if EV_NUM != 2
159 xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
160Index: elfutils-0.148/libelf/elf_begin.c
161===================================================================
162--- elfutils-0.148.orig/libelf/elf_begin.c 2010-04-21 14:26:40.000000000 +0000
163+++ elfutils-0.148/libelf/elf_begin.c 2010-07-03 13:07:11.000000000 +0000
164@@ -165,7 +165,8 @@
165
166 if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
167 {
168- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
169+ if (unlikely (ehdr.e32->e_shoff >= maxsize)
170+ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr)))
171 /* Cannot read the first section header. */
172 return 0;
173
174@@ -213,7 +214,8 @@
175
176 if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
177 {
178- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
179+ if (unlikely (ehdr.e64->e_shoff >= maxsize)
180+ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
181 /* Cannot read the first section header. */
182 return 0;
183
184@@ -285,6 +287,15 @@
185 /* Could not determine the number of sections. */
186 return NULL;
187
188+ /* Check for too many sections. */
189+ if (e_ident[EI_CLASS] == ELFCLASS32)
190+ {
191+ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
192+ return NULL;
193+ }
194+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
195+ return NULL;
196+
197 /* We can now allocate the memory. Even if there are no section headers,
198 we allocate space for a zeroth section in case we need it later. */
199 const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
200@@ -324,6 +335,16 @@
201 {
202 /* We can use the mmapped memory. */
203 elf->state.elf32.ehdr = ehdr;
204+
205+ if (unlikely (ehdr->e_shoff >= maxsize)
206+ || unlikely (maxsize - ehdr->e_shoff
207+ < scncnt * sizeof (Elf32_Shdr)))
208+ {
209+ free_and_out:
210+ free (elf);
211+ __libelf_seterrno (ELF_E_INVALID_FILE);
212+ return NULL;
213+ }
214 elf->state.elf32.shdr
215 = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
216
217@@ -410,6 +431,11 @@
218 {
219 /* We can use the mmapped memory. */
220 elf->state.elf64.ehdr = ehdr;
221+
222+ if (unlikely (ehdr->e_shoff >= maxsize)
223+ || unlikely (ehdr->e_shoff
224+ + scncnt * sizeof (Elf32_Shdr) > maxsize))
225+ goto free_and_out;
226 elf->state.elf64.shdr
227 = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
228
229Index: elfutils-0.148/libelf/elf_getarsym.c
230===================================================================
231--- elfutils-0.148.orig/libelf/elf_getarsym.c 2009-01-08 20:56:37.000000000 +0000
232+++ elfutils-0.148/libelf/elf_getarsym.c 2010-07-03 13:07:11.000000000 +0000
233@@ -179,6 +179,9 @@
234 size_t index_size = atol (tmpbuf);
235
236 if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
237+#if SIZE_MAX <= 4294967295U
238+ || n >= SIZE_MAX / sizeof (Elf_Arsym)
239+#endif
240 || n * sizeof (uint32_t) > index_size)
241 {
242 /* This index table cannot be right since it does not fit into
243Index: elfutils-0.148/libelf/elf_getshdrstrndx.c
244===================================================================
245--- elfutils-0.148.orig/libelf/elf_getshdrstrndx.c 2009-06-13 22:31:35.000000000 +0000
246+++ elfutils-0.148/libelf/elf_getshdrstrndx.c 2010-07-03 13:07:11.000000000 +0000
247@@ -125,10 +125,25 @@
248 if (elf->map_address != NULL
249 && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
250 && (ALLOW_UNALIGNED
251- || (((size_t) ((char *) elf->map_address + offset))
252+ || (((size_t) ((char *) elf->map_address
253+ + elf->start_offset + offset))
254 & (__alignof__ (Elf32_Shdr) - 1)) == 0))
255- /* We can directly access the memory. */
256- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
257+ {
258+ /* First see whether the information in the ELF header is
259+ valid and it does not ask for too much. */
260+ if (unlikely (elf->maximum_size - offset
261+ < sizeof (Elf32_Shdr)))
262+ {
263+ /* Something is wrong. */
264+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
265+ result = -1;
266+ goto out;
267+ }
268+
269+ /* We can directly access the memory. */
270+ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
271+ + offset))->sh_link;
272+ }
273 else
274 {
275 /* We avoid reading in all the section headers. Just read
276@@ -163,10 +178,25 @@
277 if (elf->map_address != NULL
278 && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
279 && (ALLOW_UNALIGNED
280- || (((size_t) ((char *) elf->map_address + offset))
281+ || (((size_t) ((char *) elf->map_address
282+ + elf->start_offset + offset))
283 & (__alignof__ (Elf64_Shdr) - 1)) == 0))
284- /* We can directly access the memory. */
285- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
286+ {
287+ /* First see whether the information in the ELF header is
288+ valid and it does not ask for too much. */
289+ if (unlikely (elf->maximum_size - offset
290+ < sizeof (Elf64_Shdr)))
291+ {
292+ /* Something is wrong. */
293+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
294+ result = -1;
295+ goto out;
296+ }
297+
298+ /* We can directly access the memory. */
299+ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset
300+ + offset))->sh_link;
301+ }
302 else
303 {
304 /* We avoid reading in all the section headers. Just read
305Index: elfutils-0.148/libelf/elf_newscn.c
306===================================================================
307--- elfutils-0.148.orig/libelf/elf_newscn.c 2009-01-08 20:56:37.000000000 +0000
308+++ elfutils-0.148/libelf/elf_newscn.c 2010-07-03 13:07:11.000000000 +0000
309@@ -104,10 +104,18 @@
310 else
311 {
312 /* We must allocate a new element. */
313- Elf_ScnList *newp;
314+ Elf_ScnList *newp = NULL;
315
316 assert (elf->state.elf.scnincr > 0);
317
318+ if (
319+#if SIZE_MAX <= 4294967295U
320+ likely (elf->state.elf.scnincr
321+ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
322+#else
323+ 1
324+#endif
325+ )
326 newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
327 + ((elf->state.elf.scnincr *= 2)
328 * sizeof (Elf_Scn)), 1);
329Index: elfutils-0.148/libelf/gelf_getdyn.c
330===================================================================
331--- elfutils-0.148.orig/libelf/gelf_getdyn.c 2009-01-08 20:56:37.000000000 +0000
332+++ elfutils-0.148/libelf/gelf_getdyn.c 2010-07-03 13:07:11.000000000 +0000
333@@ -1,5 +1,5 @@
334 /* Get information from dynamic table at the given index.
335- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
336+ Copyright (C) 2000-2009 Red Hat, Inc.
337 This file is part of Red Hat elfutils.
338 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
339
340@@ -93,7 +93,7 @@
341 table entries has to be adopted. The user better has provided
342 a buffer where we can store the information. While copying the
343 data we are converting the format. */
344- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
345+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
346 {
347 __libelf_seterrno (ELF_E_INVALID_INDEX);
348 goto out;
349@@ -114,7 +114,7 @@
350
351 /* The data is already in the correct form. Just make sure the
352 index is OK. */
353- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
354+ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d))
355 {
356 __libelf_seterrno (ELF_E_INVALID_INDEX);
357 goto out;
358Index: elfutils-0.148/libelf/gelf_getlib.c
359===================================================================
360--- elfutils-0.148.orig/libelf/gelf_getlib.c 2009-01-08 20:56:37.000000000 +0000
361+++ elfutils-0.148/libelf/gelf_getlib.c 2010-07-03 13:07:11.000000000 +0000
362@@ -1,5 +1,5 @@
363 /* Get library from table at the given index.
364- Copyright (C) 2004 Red Hat, Inc.
365+ Copyright (C) 2004-2009 Red Hat, Inc.
366 This file is part of Red Hat elfutils.
367 Written by Ulrich Drepper <drepper@redhat.com>, 2004.
368
369@@ -86,7 +86,7 @@
370 /* The data is already in the correct form. Just make sure the
371 index is OK. */
372 GElf_Lib *result = NULL;
373- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
374+ if (INVALID_NDX (ndx, GElf_Lib, data))
375 __libelf_seterrno (ELF_E_INVALID_INDEX);
376 else
377 {
378Index: elfutils-0.148/libelf/gelf_getmove.c
379===================================================================
380--- elfutils-0.148.orig/libelf/gelf_getmove.c 2009-01-08 20:56:37.000000000 +0000
381+++ elfutils-0.148/libelf/gelf_getmove.c 2010-07-03 13:07:11.000000000 +0000
382@@ -1,5 +1,5 @@
383 /* Get move structure at the given index.
384- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
385+ Copyright (C) 2000-2009 Red Hat, Inc.
386 This file is part of Red Hat elfutils.
387 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
388
389@@ -83,7 +83,7 @@
390
391 /* The data is already in the correct form. Just make sure the
392 index is OK. */
393- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
394+ if (INVALID_NDX (ndx, GElf_Move, data))
395 {
396 __libelf_seterrno (ELF_E_INVALID_INDEX);
397 goto out;
398Index: elfutils-0.148/libelf/gelf_getrela.c
399===================================================================
400--- elfutils-0.148.orig/libelf/gelf_getrela.c 2009-01-08 20:56:37.000000000 +0000
401+++ elfutils-0.148/libelf/gelf_getrela.c 2010-07-03 13:07:11.000000000 +0000
402@@ -1,5 +1,5 @@
403 /* Get RELA relocation information at given index.
404- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
405+ Copyright (C) 2000-2009 Red Hat, Inc.
406 This file is part of Red Hat elfutils.
407 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
408
409@@ -71,12 +71,6 @@
410 if (data_scn == NULL)
411 return NULL;
412
413- if (unlikely (ndx < 0))
414- {
415- __libelf_seterrno (ELF_E_INVALID_INDEX);
416- return NULL;
417- }
418-
419 if (unlikely (data_scn->d.d_type != ELF_T_RELA))
420 {
421 __libelf_seterrno (ELF_E_INVALID_HANDLE);
422@@ -93,7 +87,7 @@
423 if (scn->elf->class == ELFCLASS32)
424 {
425 /* We have to convert the data. */
426- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
427+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
428 {
429 __libelf_seterrno (ELF_E_INVALID_INDEX);
430 result = NULL;
431@@ -114,7 +108,7 @@
432 {
433 /* Simply copy the data after we made sure we are actually getting
434 correct data. */
435- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
436+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
437 {
438 __libelf_seterrno (ELF_E_INVALID_INDEX);
439 result = NULL;
440Index: elfutils-0.148/libelf/gelf_getrel.c
441===================================================================
442--- elfutils-0.148.orig/libelf/gelf_getrel.c 2009-01-08 20:56:37.000000000 +0000
443+++ elfutils-0.148/libelf/gelf_getrel.c 2010-07-03 13:07:11.000000000 +0000
444@@ -1,5 +1,5 @@
445 /* Get REL relocation information at given index.
446- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
447+ Copyright (C) 2000-2009 Red Hat, Inc.
448 This file is part of Red Hat elfutils.
449 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
450
451@@ -71,12 +71,6 @@
452 if (data_scn == NULL)
453 return NULL;
454
455- if (unlikely (ndx < 0))
456- {
457- __libelf_seterrno (ELF_E_INVALID_INDEX);
458- return NULL;
459- }
460-
461 if (unlikely (data_scn->d.d_type != ELF_T_REL))
462 {
463 __libelf_seterrno (ELF_E_INVALID_HANDLE);
464@@ -93,7 +87,7 @@
465 if (scn->elf->class == ELFCLASS32)
466 {
467 /* We have to convert the data. */
468- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
469+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
470 {
471 __libelf_seterrno (ELF_E_INVALID_INDEX);
472 result = NULL;
473@@ -113,7 +107,7 @@
474 {
475 /* Simply copy the data after we made sure we are actually getting
476 correct data. */
477- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
478+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
479 {
480 __libelf_seterrno (ELF_E_INVALID_INDEX);
481 result = NULL;
482Index: elfutils-0.148/libelf/gelf_getsym.c
483===================================================================
484--- elfutils-0.148.orig/libelf/gelf_getsym.c 2009-01-08 20:56:37.000000000 +0000
485+++ elfutils-0.148/libelf/gelf_getsym.c 2010-07-03 13:07:11.000000000 +0000
486@@ -1,5 +1,5 @@
487 /* Get symbol information from symbol table at the given index.
488- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
489+ Copyright (C) 1999-2009 Red Hat, Inc.
490 This file is part of Red Hat elfutils.
491 Written by Ulrich Drepper <drepper@redhat.com>, 1999.
492
493@@ -90,7 +90,7 @@
494 table entries has to be adopted. The user better has provided
495 a buffer where we can store the information. While copying the
496 data we are converting the format. */
497- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
498+ if (INVALID_NDX (ndx, Elf32_Sym, data))
499 {
500 __libelf_seterrno (ELF_E_INVALID_INDEX);
501 goto out;
502@@ -119,7 +119,7 @@
503
504 /* The data is already in the correct form. Just make sure the
505 index is OK. */
506- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
507+ if (INVALID_NDX (ndx, GElf_Sym, data))
508 {
509 __libelf_seterrno (ELF_E_INVALID_INDEX);
510 goto out;
511Index: elfutils-0.148/libelf/gelf_getsyminfo.c
512===================================================================
513--- elfutils-0.148.orig/libelf/gelf_getsyminfo.c 2009-01-08 20:56:37.000000000 +0000
514+++ elfutils-0.148/libelf/gelf_getsyminfo.c 2010-07-03 13:07:11.000000000 +0000
515@@ -1,5 +1,5 @@
516 /* Get additional symbol information from symbol table at the given index.
517- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
518+ Copyright (C) 2000-2009 Red Hat, Inc.
519 This file is part of Red Hat elfutils.
520 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
521
522@@ -84,7 +84,7 @@
523
524 /* The data is already in the correct form. Just make sure the
525 index is OK. */
526- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
527+ if (INVALID_NDX (ndx, GElf_Syminfo, data))
528 {
529 __libelf_seterrno (ELF_E_INVALID_INDEX);
530 goto out;
531Index: elfutils-0.148/libelf/gelf_getsymshndx.c
532===================================================================
533--- elfutils-0.148.orig/libelf/gelf_getsymshndx.c 2009-01-08 20:56:37.000000000 +0000
534+++ elfutils-0.148/libelf/gelf_getsymshndx.c 2010-07-03 13:07:11.000000000 +0000
535@@ -1,6 +1,6 @@
536 /* Get symbol information and separate section index from symbol table
537 at the given index.
538- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
539+ Copyright (C) 2000-2009 Red Hat, Inc.
540 This file is part of Red Hat elfutils.
541 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
542
543@@ -90,7 +90,7 @@
544 section index table. */
545 if (likely (shndxdata_scn != NULL))
546 {
547- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
548+ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d))
549 {
550 __libelf_seterrno (ELF_E_INVALID_INDEX);
551 goto out;
552@@ -110,7 +110,7 @@
553 table entries has to be adopted. The user better has provided
554 a buffer where we can store the information. While copying the
555 data we are converting the format. */
556- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
557+ if (INVALID_NDX (ndx, Elf32_Sym, symdata))
558 {
559 __libelf_seterrno (ELF_E_INVALID_INDEX);
560 goto out;
561@@ -139,7 +139,7 @@
562
563 /* The data is already in the correct form. Just make sure the
564 index is OK. */
565- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
566+ if (INVALID_NDX (ndx, GElf_Sym, symdata))
567 {
568 __libelf_seterrno (ELF_E_INVALID_INDEX);
569 goto out;
570Index: elfutils-0.148/libelf/gelf_getversym.c
571===================================================================
572--- elfutils-0.148.orig/libelf/gelf_getversym.c 2009-01-08 20:56:37.000000000 +0000
573+++ elfutils-0.148/libelf/gelf_getversym.c 2010-07-03 13:07:11.000000000 +0000
574@@ -1,5 +1,5 @@
575 /* Get symbol version information at the given index.
576- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
577+ Copyright (C) 1999-2009 Red Hat, Inc.
578 This file is part of Red Hat elfutils.
579 Written by Ulrich Drepper <drepper@redhat.com>, 1999.
580
581@@ -92,7 +92,7 @@
582
583 /* The data is already in the correct form. Just make sure the
584 index is OK. */
585- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
586+ if (INVALID_NDX (ndx, GElf_Versym, data))
587 {
588 __libelf_seterrno (ELF_E_INVALID_INDEX);
589 result = NULL;
590Index: elfutils-0.148/libelf/gelf_update_dyn.c
591===================================================================
592--- elfutils-0.148.orig/libelf/gelf_update_dyn.c 2009-01-08 20:56:37.000000000 +0000
593+++ elfutils-0.148/libelf/gelf_update_dyn.c 2010-07-03 13:07:11.000000000 +0000
594@@ -1,5 +1,5 @@
595 /* Update information in dynamic table at the given index.
596- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
597+ Copyright (C) 2000-2009 Red Hat, Inc.
598 This file is part of Red Hat elfutils.
599 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
600
601@@ -71,12 +71,6 @@
602 if (data == NULL)
603 return 0;
604
605- if (unlikely (ndx < 0))
606- {
607- __libelf_seterrno (ELF_E_INVALID_INDEX);
608- return 0;
609- }
610-
611 if (unlikely (data_scn->d.d_type != ELF_T_DYN))
612 {
613 /* The type of the data better should match. */
614@@ -102,7 +96,7 @@
615 }
616
617 /* Check whether we have to resize the data buffer. */
618- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
619+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
620 {
621 __libelf_seterrno (ELF_E_INVALID_INDEX);
622 goto out;
623@@ -116,7 +110,7 @@
624 else
625 {
626 /* Check whether we have to resize the data buffer. */
627- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
628+ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d))
629 {
630 __libelf_seterrno (ELF_E_INVALID_INDEX);
631 goto out;
632Index: elfutils-0.148/libelf/gelf_update_lib.c
633===================================================================
634--- elfutils-0.148.orig/libelf/gelf_update_lib.c 2009-01-08 20:56:37.000000000 +0000
635+++ elfutils-0.148/libelf/gelf_update_lib.c 2010-07-03 13:07:11.000000000 +0000
636@@ -1,5 +1,5 @@
637 /* Update library in table at the given index.
638- Copyright (C) 2004 Red Hat, Inc.
639+ Copyright (C) 2004-2009 Red Hat, Inc.
640 This file is part of Red Hat elfutils.
641 Written by Ulrich Drepper <drepper@redhat.com>, 2004.
642
643@@ -68,12 +68,6 @@
644 if (data == NULL)
645 return 0;
646
647- if (unlikely (ndx < 0))
648- {
649- __libelf_seterrno (ELF_E_INVALID_INDEX);
650- return 0;
651- }
652-
653 Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
654 if (unlikely (data_scn->d.d_type != ELF_T_LIB))
655 {
656@@ -87,7 +81,7 @@
657
658 /* Check whether we have to resize the data buffer. */
659 int result = 0;
660- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
661+ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d))
662 __libelf_seterrno (ELF_E_INVALID_INDEX);
663 else
664 {
665Index: elfutils-0.148/libelf/gelf_update_move.c
666===================================================================
667--- elfutils-0.148.orig/libelf/gelf_update_move.c 2009-01-08 20:56:37.000000000 +0000
668+++ elfutils-0.148/libelf/gelf_update_move.c 2010-07-03 13:07:11.000000000 +0000
669@@ -1,5 +1,5 @@
670 /* Update move structure at the given index.
671- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
672+ Copyright (C) 2000-2009 Red Hat, Inc.
673 This file is part of Red Hat elfutils.
674 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
675
676@@ -75,8 +75,7 @@
677 assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
678
679 /* Check whether we have to resize the data buffer. */
680- if (unlikely (ndx < 0)
681- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
682+ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d))
683 {
684 __libelf_seterrno (ELF_E_INVALID_INDEX);
685 return 0;
686Index: elfutils-0.148/libelf/gelf_update_rela.c
687===================================================================
688--- elfutils-0.148.orig/libelf/gelf_update_rela.c 2009-01-08 20:56:37.000000000 +0000
689+++ elfutils-0.148/libelf/gelf_update_rela.c 2010-07-03 13:07:11.000000000 +0000
690@@ -1,5 +1,5 @@
691 /* Update RELA relocation information at given index.
692- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
693+ Copyright (C) 2000-2009 Red Hat, Inc.
694 This file is part of Red Hat elfutils.
695 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
696
697@@ -68,12 +68,6 @@
698 if (dst == NULL)
699 return 0;
700
701- if (unlikely (ndx < 0))
702- {
703- __libelf_seterrno (ELF_E_INVALID_INDEX);
704- return 0;
705- }
706-
707 if (unlikely (data_scn->d.d_type != ELF_T_RELA))
708 {
709 /* The type of the data better should match. */
710@@ -101,7 +95,7 @@
711 }
712
713 /* Check whether we have to resize the data buffer. */
714- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
715+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
716 {
717 __libelf_seterrno (ELF_E_INVALID_INDEX);
718 goto out;
719@@ -117,7 +111,7 @@
720 else
721 {
722 /* Check whether we have to resize the data buffer. */
723- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
724+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
725 {
726 __libelf_seterrno (ELF_E_INVALID_INDEX);
727 goto out;
728Index: elfutils-0.148/libelf/gelf_update_rel.c
729===================================================================
730--- elfutils-0.148.orig/libelf/gelf_update_rel.c 2009-01-08 20:56:37.000000000 +0000
731+++ elfutils-0.148/libelf/gelf_update_rel.c 2010-07-03 13:07:11.000000000 +0000
732@@ -1,5 +1,5 @@
733 /* Update REL relocation information at given index.
734- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
735+ Copyright (C) 2000-2009 Red Hat, Inc.
736 This file is part of Red Hat elfutils.
737 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
738
739@@ -68,12 +68,6 @@
740 if (dst == NULL)
741 return 0;
742
743- if (unlikely (ndx < 0))
744- {
745- __libelf_seterrno (ELF_E_INVALID_INDEX);
746- return 0;
747- }
748-
749 if (unlikely (data_scn->d.d_type != ELF_T_REL))
750 {
751 /* The type of the data better should match. */
752@@ -99,7 +93,7 @@
753 }
754
755 /* Check whether we have to resize the data buffer. */
756- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
757+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
758 {
759 __libelf_seterrno (ELF_E_INVALID_INDEX);
760 goto out;
761@@ -114,7 +108,7 @@
762 else
763 {
764 /* Check whether we have to resize the data buffer. */
765- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
766+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
767 {
768 __libelf_seterrno (ELF_E_INVALID_INDEX);
769 goto out;
770Index: elfutils-0.148/libelf/gelf_update_sym.c
771===================================================================
772--- elfutils-0.148.orig/libelf/gelf_update_sym.c 2009-01-08 20:56:37.000000000 +0000
773+++ elfutils-0.148/libelf/gelf_update_sym.c 2010-07-03 13:07:11.000000000 +0000
774@@ -1,5 +1,5 @@
775 /* Update symbol information in symbol table at the given index.
776- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
777+ Copyright (C) 2000-2009 Red Hat, Inc.
778 This file is part of Red Hat elfutils.
779 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
780
781@@ -72,12 +72,6 @@
782 if (data == NULL)
783 return 0;
784
785- if (unlikely (ndx < 0))
786- {
787- __libelf_seterrno (ELF_E_INVALID_INDEX);
788- return 0;
789- }
790-
791 if (unlikely (data_scn->d.d_type != ELF_T_SYM))
792 {
793 /* The type of the data better should match. */
794@@ -102,7 +96,7 @@
795 }
796
797 /* Check whether we have to resize the data buffer. */
798- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
799+ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d))
800 {
801 __libelf_seterrno (ELF_E_INVALID_INDEX);
802 goto out;
803@@ -125,7 +119,7 @@
804 else
805 {
806 /* Check whether we have to resize the data buffer. */
807- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
808+ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d))
809 {
810 __libelf_seterrno (ELF_E_INVALID_INDEX);
811 goto out;
812Index: elfutils-0.148/libelf/gelf_update_syminfo.c
813===================================================================
814--- elfutils-0.148.orig/libelf/gelf_update_syminfo.c 2009-01-08 20:56:37.000000000 +0000
815+++ elfutils-0.148/libelf/gelf_update_syminfo.c 2010-07-03 13:07:11.000000000 +0000
816@@ -1,5 +1,5 @@
817 /* Update additional symbol information in symbol table at the given index.
818- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
819+ Copyright (C) 2000-2009 Red Hat, Inc.
820 This file is part of Red Hat elfutils.
821 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
822
823@@ -72,12 +72,6 @@
824 if (data == NULL)
825 return 0;
826
827- if (unlikely (ndx < 0))
828- {
829- __libelf_seterrno (ELF_E_INVALID_INDEX);
830- return 0;
831- }
832-
833 if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
834 {
835 /* The type of the data better should match. */
836@@ -93,7 +87,7 @@
837 rwlock_wrlock (scn->elf->lock);
838
839 /* Check whether we have to resize the data buffer. */
840- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
841+ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d))
842 {
843 __libelf_seterrno (ELF_E_INVALID_INDEX);
844 goto out;
845Index: elfutils-0.148/libelf/gelf_update_symshndx.c
846===================================================================
847--- elfutils-0.148.orig/libelf/gelf_update_symshndx.c 2009-01-08 20:56:37.000000000 +0000
848+++ elfutils-0.148/libelf/gelf_update_symshndx.c 2010-07-03 13:07:11.000000000 +0000
849@@ -1,6 +1,6 @@
850 /* Update symbol information and section index in symbol table at the
851 given index.
852- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
853+ Copyright (C) 2000-2009 Red Hat, Inc.
854 This file is part of Red Hat elfutils.
855 Written by Ulrich Drepper <drepper@redhat.com>, 2000.
856
857@@ -77,12 +77,6 @@
858 if (symdata == NULL)
859 return 0;
860
861- if (unlikely (ndx < 0))
862- {
863- __libelf_seterrno (ELF_E_INVALID_INDEX);
864- return 0;
865- }
866-
867 if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
868 {
869 /* The type of the data better should match. */
870@@ -128,7 +122,7 @@
871 }
872
873 /* Check whether we have to resize the data buffer. */
874- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
875+ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d))
876 {
877 __libelf_seterrno (ELF_E_INVALID_INDEX);
878 goto out;
879@@ -151,7 +145,7 @@
880 else
881 {
882 /* Check whether we have to resize the data buffer. */
883- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
884+ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d))
885 {
886 __libelf_seterrno (ELF_E_INVALID_INDEX);
887 goto out;
888Index: elfutils-0.148/libelf/gelf_update_versym.c
889===================================================================
890--- elfutils-0.148.orig/libelf/gelf_update_versym.c 2009-01-08 20:56:37.000000000 +0000
891+++ elfutils-0.148/libelf/gelf_update_versym.c 2010-07-03 13:07:11.000000000 +0000
892@@ -1,5 +1,5 @@
893 /* Update symbol version information.
894- Copyright (C) 2001, 2002 Red Hat, Inc.
895+ Copyright (C) 2001-2009 Red Hat, Inc.
896 This file is part of Red Hat elfutils.
897 Written by Ulrich Drepper <drepper@redhat.com>, 2001.
898
899@@ -75,8 +75,7 @@
900 assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
901
902 /* Check whether we have to resize the data buffer. */
903- if (unlikely (ndx < 0)
904- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
905+ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d))
906 {
907 __libelf_seterrno (ELF_E_INVALID_INDEX);
908 return 0;
909Index: elfutils-0.148/libelf/libelfP.h
910===================================================================
911--- elfutils-0.148.orig/libelf/libelfP.h 2010-01-12 16:57:54.000000000 +0000
912+++ elfutils-0.148/libelf/libelfP.h 2010-07-03 13:07:11.000000000 +0000
913@@ -608,4 +608,8 @@
914 /* Align offset to 4 bytes as needed for note name and descriptor data. */
915 #define NOTE_ALIGN(n) (((n) + 3) & -4U)
916
917+/* Convenience macro. */
918+#define INVALID_NDX(ndx, type, data) \
919+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
920+
921 #endif /* libelfP.h */
922Index: elfutils-0.148/src/ChangeLog
923===================================================================
924--- elfutils-0.148.orig/src/ChangeLog 2010-07-03 13:07:10.000000000 +0000
925+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:07:11.000000000 +0000
926@@ -1640,6 +1640,16 @@
927 object symbols or symbols with unknown type.
928 (check_rel): Likewise.
929
930+2005-06-09 Roland McGrath <roland@redhat.com>
931+
932+ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
933+ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
934+ (handle_scngrp): Check for bogus sh_info.
935+
936+ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
937+ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
938+ Don't use assert on input values, instead bail with "illformed" error.
939+
940 2005-06-08 Roland McGrath <roland@redhat.com>
941
942 * readelf.c (print_ops): Add consts.
943@@ -1690,6 +1700,19 @@
944
945 * readelf.c (dwarf_tag_string): Add new tags.
946
947+2005-05-17 Jakub Jelinek <jakub@redhat.com>
948+
949+ * elflint.c (check_hash): Don't check entries beyond end of section.
950+ (check_note): Don't crash if gelf_rawchunk fails.
951+ (section_name): Return <invalid> if gelf_getshdr returns NULL.
952+
953+2005-05-14 Jakub Jelinek <jakub@redhat.com>
954+
955+ * elflint.c (section_name): Return "<invalid>" instead of
956+ crashing on invalid section name.
957+ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
958+ check_symtab_shndx, check_hash, check_versym): Robustify.
959+
960 2005-05-08 Roland McGrath <roland@redhat.com>
961
962 * strip.c (handle_elf): Don't translate hash and versym data formats,
963Index: elfutils-0.148/src/elflint.c
964===================================================================
965--- elfutils-0.148.orig/src/elflint.c 2010-04-13 20:08:02.000000000 +0000
966+++ elfutils-0.148/src/elflint.c 2010-07-03 13:07:11.000000000 +0000
967@@ -131,6 +131,10 @@
968 /* Array to count references in section groups. */
969 static int *scnref;
970
971+/* Numbers of sections and program headers. */
972+static unsigned int shnum;
973+static unsigned int phnum;
974+
975
976 int
977 main (int argc, char *argv[])
978@@ -319,10 +323,19 @@
979 {
980 GElf_Shdr shdr_mem;
981 GElf_Shdr *shdr;
982+ const char *ret;
983+
984+ if ((unsigned int) idx > shnum)
985+ return "<invalid>";
986
987 shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
988+ if (shdr == NULL)
989+ return "<invalid>";
990
991- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
992+ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
993+ if (ret == NULL)
994+ return "<invalid>";
995+ return ret;
996 }
997
998
999@@ -344,11 +357,6 @@
1000 (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
1001
1002
1003-/* Numbers of sections and program headers. */
1004-static unsigned int shnum;
1005-static unsigned int phnum;
1006-
1007-
1008 static void
1009 check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
1010 {
1011@@ -632,7 +640,8 @@
1012 }
1013 }
1014
1015- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
1016+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
1017+ if (shdr->sh_entsize != sh_entsize)
1018 ERROR (gettext ("\
1019 section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
1020 idx, section_name (ebl, idx));
1021@@ -670,7 +679,7 @@
1022 xndxscnidx, section_name (ebl, xndxscnidx));
1023 }
1024
1025- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1026+ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
1027 {
1028 sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
1029 if (sym == NULL)
1030@@ -690,7 +699,8 @@
1031 else
1032 {
1033 name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
1034- assert (name != NULL);
1035+ assert (name != NULL
1036+ || strshdr->sh_type != SHT_STRTAB);
1037 }
1038
1039 if (sym->st_shndx == SHN_XINDEX)
1040@@ -1038,9 +1048,11 @@
1041 {
1042 GElf_Shdr rcshdr_mem;
1043 const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
1044- assert (rcshdr != NULL);
1045
1046- if (rcshdr->sh_type == SHT_DYNAMIC)
1047+ if (rcshdr == NULL)
1048+ break;
1049+
1050+ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
1051 {
1052 /* Found the dynamic section. Look through it. */
1053 Elf_Data *d = elf_getdata (scn, NULL);
1054@@ -1050,7 +1062,9 @@
1055 {
1056 GElf_Dyn dyn_mem;
1057 GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
1058- assert (dyn != NULL);
1059+
1060+ if (dyn == NULL)
1061+ break;
1062
1063 if (dyn->d_tag == DT_RELCOUNT)
1064 {
1065@@ -1064,7 +1078,9 @@
1066 /* Does the number specified number of relative
1067 relocations exceed the total number of
1068 relocations? */
1069- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
1070+ if (shdr->sh_entsize != 0
1071+ && dyn->d_un.d_val > (shdr->sh_size
1072+ / shdr->sh_entsize))
1073 ERROR (gettext ("\
1074 section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
1075 idx, section_name (ebl, idx),
1076@@ -1224,7 +1240,8 @@
1077 }
1078 }
1079
1080- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
1081+ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
1082+ if (shdr->sh_entsize != sh_entsize)
1083 ERROR (gettext (reltype == ELF_T_RELA ? "\
1084 section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
1085 section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
1086@@ -1447,7 +1464,8 @@
1087 Elf_Data *symdata = elf_getdata (symscn, NULL);
1088 enum load_state state = state_undecided;
1089
1090- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1091+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
1092+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
1093 {
1094 GElf_Rela rela_mem;
1095 GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
1096@@ -1497,7 +1515,8 @@
1097 Elf_Data *symdata = elf_getdata (symscn, NULL);
1098 enum load_state state = state_undecided;
1099
1100- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1101+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
1102+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
1103 {
1104 GElf_Rel rel_mem;
1105 GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
1106@@ -1600,7 +1619,8 @@
1107 shdr->sh_link, section_name (ebl, shdr->sh_link),
1108 idx, section_name (ebl, idx));
1109
1110- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
1111+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
1112+ if (shdr->sh_entsize != sh_entsize)
1113 ERROR (gettext ("\
1114 section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
1115 idx, section_name (ebl, idx));
1116@@ -1610,7 +1630,7 @@
1117 idx, section_name (ebl, idx));
1118
1119 bool non_null_warned = false;
1120- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1121+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
1122 {
1123 GElf_Dyn dyn_mem;
1124 GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
1125@@ -1891,6 +1911,8 @@
1126 idx, section_name (ebl, idx));
1127
1128 if (symshdr != NULL
1129+ && shdr->sh_entsize
1130+ && symshdr->sh_entsize
1131 && (shdr->sh_size / shdr->sh_entsize
1132 < symshdr->sh_size / symshdr->sh_entsize))
1133 ERROR (gettext ("\
1134@@ -1917,6 +1939,12 @@
1135 }
1136
1137 Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
1138+ if (data == NULL)
1139+ {
1140+ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
1141+ idx, section_name (ebl, idx));
1142+ return;
1143+ }
1144
1145 if (*((Elf32_Word *) data->d_buf) != 0)
1146 ERROR (gettext ("symbol 0 should have zero extended section index\n"));
1147@@ -1959,7 +1987,7 @@
1148
1149 size_t maxidx = nchain;
1150
1151- if (symshdr != NULL)
1152+ if (symshdr != NULL && symshdr->sh_entsize != 0)
1153 {
1154 size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
1155
1156@@ -1970,18 +1998,28 @@
1157 maxidx = symsize;
1158 }
1159
1160+ Elf32_Word *buf = (Elf32_Word *) data->d_buf;
1161+ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
1162 size_t cnt;
1163 for (cnt = 2; cnt < 2 + nbucket; ++cnt)
1164- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
1165+ {
1166+ if (buf + cnt >= end)
1167+ break;
1168+ else if (buf[cnt] >= maxidx)
1169 ERROR (gettext ("\
1170 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
1171 idx, section_name (ebl, idx), cnt - 2);
1172+ }
1173
1174 for (; cnt < 2 + nbucket + nchain; ++cnt)
1175- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
1176+ {
1177+ if (buf + cnt >= end)
1178+ break;
1179+ else if (buf[cnt] >= maxidx)
1180 ERROR (gettext ("\
1181 section [%2d] '%s': hash chain reference %zu out of bounds\n"),
1182 idx, section_name (ebl, idx), cnt - 2 - nbucket);
1183+ }
1184 }
1185
1186
1187@@ -2011,18 +2049,28 @@
1188 maxidx = symsize;
1189 }
1190
1191+ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
1192+ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
1193 size_t cnt;
1194 for (cnt = 2; cnt < 2 + nbucket; ++cnt)
1195- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
1196+ {
1197+ if (buf + cnt >= end)
1198+ break;
1199+ else if (buf[cnt] >= maxidx)
1200 ERROR (gettext ("\
1201 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
1202 idx, section_name (ebl, idx), cnt - 2);
1203+ }
1204
1205 for (; cnt < 2 + nbucket + nchain; ++cnt)
1206- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
1207+ {
1208+ if (buf + cnt >= end)
1209+ break;
1210+ else if (buf[cnt] >= maxidx)
1211 ERROR (gettext ("\
1212 section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
1213- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
1214+ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
1215+ }
1216 }
1217
1218
1219@@ -2047,7 +2095,7 @@
1220 if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
1221 {
1222 ERROR (gettext ("\
1223-section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
1224+section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
1225 idx, section_name (ebl, idx), (long int) shdr->sh_size,
1226 (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
1227 return;
1228@@ -2719,8 +2767,9 @@
1229
1230 /* The number of elements in the version symbol table must be the
1231 same as the number of symbols. */
1232- if (shdr->sh_size / shdr->sh_entsize
1233- != symshdr->sh_size / symshdr->sh_entsize)
1234+ if (shdr->sh_entsize && symshdr->sh_entsize
1235+ && (shdr->sh_size / shdr->sh_entsize
1236+ != symshdr->sh_size / symshdr->sh_entsize))
1237 ERROR (gettext ("\
1238 section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
1239 idx, section_name (ebl, idx),
1240Index: elfutils-0.148/src/readelf.c
1241===================================================================
1242--- elfutils-0.148.orig/src/readelf.c 2010-07-03 13:07:10.000000000 +0000
1243+++ elfutils-0.148/src/readelf.c 2010-07-03 13:07:11.000000000 +0000
1244@@ -1172,6 +1172,8 @@
1245 Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
1246
1247 GElf_Sym sym_mem;
1248+ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
1249+
1250 printf ((grpref[0] & GRP_COMDAT)
1251 ? ngettext ("\
1252 \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
1253@@ -1184,8 +1186,8 @@
1254 data->d_size / sizeof (Elf32_Word) - 1),
1255 elf_ndxscn (scn),
1256 elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
1257- elf_strptr (ebl->elf, symshdr->sh_link,
1258- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
1259+ (sym == NULL ? NULL
1260+ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
1261 ?: gettext ("<INVALID SYMBOL>"),
1262 data->d_size / sizeof (Elf32_Word) - 1);
1263
1264@@ -1336,7 +1338,8 @@
1265 handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
1266 {
1267 int class = gelf_getclass (ebl->elf);
1268- GElf_Shdr glink;
1269+ GElf_Shdr glink_mem;
1270+ GElf_Shdr *glink;
1271 Elf_Data *data;
1272 size_t cnt;
1273 size_t shstrndx;
1274@@ -1351,6 +1354,11 @@
1275 error (EXIT_FAILURE, 0,
1276 gettext ("cannot get section header string table index"));
1277
1278+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
1279+ if (glink == NULL)
1280+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
1281+ elf_ndxscn (scn));
1282+
1283 printf (ngettext ("\
1284 \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
1285 "\
1286@@ -1360,9 +1368,7 @@
1287 class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
1288 shdr->sh_offset,
1289 (int) shdr->sh_link,
1290- elf_strptr (ebl->elf, shstrndx,
1291- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1292- &glink)->sh_name));
1293+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1294 fputs_unlocked (gettext (" Type Value\n"), stdout);
1295
1296 for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1297@@ -1945,6 +1951,13 @@
1298 error (EXIT_FAILURE, 0,
1299 gettext ("cannot get section header string table index"));
1300
1301+ GElf_Shdr glink_mem;
1302+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1303+ &glink_mem);
1304+ if (glink == NULL)
1305+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
1306+ elf_ndxscn (scn));
1307+
1308 /* Now we can compute the number of entries in the section. */
1309 unsigned int nsyms = data->d_size / (class == ELFCLASS32
1310 ? sizeof (Elf32_Sym)
1311@@ -1955,15 +1968,12 @@
1312 nsyms),
1313 (unsigned int) elf_ndxscn (scn),
1314 elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
1315- GElf_Shdr glink;
1316 printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n",
1317 " %lu local symbols String table: [%2u] '%s'\n",
1318 shdr->sh_info),
1319 (unsigned long int) shdr->sh_info,
1320 (unsigned int) shdr->sh_link,
1321- elf_strptr (ebl->elf, shstrndx,
1322- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1323- &glink)->sh_name));
1324+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1325
1326 fputs_unlocked (class == ELFCLASS32
1327 ? gettext ("\
1328@@ -2199,7 +2209,13 @@
1329 error (EXIT_FAILURE, 0,
1330 gettext ("cannot get section header string table index"));
1331
1332- GElf_Shdr glink;
1333+ GElf_Shdr glink_mem;
1334+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1335+ &glink_mem);
1336+ if (glink == NULL)
1337+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
1338+ elf_ndxscn (scn));
1339+
1340 printf (ngettext ("\
1341 \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
1342 "\
1343@@ -2210,9 +2226,7 @@
1344 class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
1345 shdr->sh_offset,
1346 (unsigned int) shdr->sh_link,
1347- elf_strptr (ebl->elf, shstrndx,
1348- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1349- &glink)->sh_name));
1350+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1351
1352 unsigned int offset = 0;
1353 for (int cnt = shdr->sh_info; --cnt >= 0; )
1354@@ -2265,8 +2279,14 @@
1355 error (EXIT_FAILURE, 0,
1356 gettext ("cannot get section header string table index"));
1357
1358+ GElf_Shdr glink_mem;
1359+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1360+ &glink_mem);
1361+ if (glink == NULL)
1362+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
1363+ elf_ndxscn (scn));
1364+
1365 int class = gelf_getclass (ebl->elf);
1366- GElf_Shdr glink;
1367 printf (ngettext ("\
1368 \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
1369 "\
1370@@ -2278,9 +2298,7 @@
1371 class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
1372 shdr->sh_offset,
1373 (unsigned int) shdr->sh_link,
1374- elf_strptr (ebl->elf, shstrndx,
1375- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1376- &glink)->sh_name));
1377+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1378
1379 unsigned int offset = 0;
1380 for (int cnt = shdr->sh_info; --cnt >= 0; )
1381@@ -2542,8 +2560,14 @@
1382 filename = NULL;
1383 }
1384
1385+ GElf_Shdr glink_mem;
1386+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1387+ &glink_mem);
1388+ if (glink == NULL)
1389+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
1390+ elf_ndxscn (scn));
1391+
1392 /* Print the header. */
1393- GElf_Shdr glink;
1394 printf (ngettext ("\
1395 \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
1396 "\
1397@@ -2555,9 +2579,7 @@
1398 class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
1399 shdr->sh_offset,
1400 (unsigned int) shdr->sh_link,
1401- elf_strptr (ebl->elf, shstrndx,
1402- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1403- &glink)->sh_name));
1404+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1405
1406 /* Now we can finally look at the actual contents of this section. */
1407 for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
1408@@ -2609,7 +2631,17 @@
1409 for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
1410 ++counts[lengths[cnt]];
1411
1412- GElf_Shdr glink;
1413+ GElf_Shdr glink_mem;
1414+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
1415+ shdr->sh_link),
1416+ &glink_mem);
1417+ if (glink == NULL)
1418+ {
1419+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
1420+ elf_ndxscn (scn));
1421+ return;
1422+ }
1423+
1424 printf (ngettext ("\
1425 \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
1426 "\
1427@@ -2622,9 +2654,7 @@
1428 shdr->sh_addr,
1429 shdr->sh_offset,
1430 (unsigned int) shdr->sh_link,
1431- elf_strptr (ebl->elf, shstrndx,
1432- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
1433- &glink)->sh_name));
1434+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
1435
1436 if (extrastr != NULL)
1437 fputs (extrastr, stdout);
1438@@ -4312,6 +4342,16 @@
1439 return;
1440 }
1441
1442+ GElf_Shdr glink_mem;
1443+ GElf_Shdr *glink;
1444+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
1445+ if (glink == NULL)
1446+ {
1447+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
1448+ elf_ndxscn (scn));
1449+ return;
1450+ }
1451+
1452 printf (ngettext ("\
1453 \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
1454 "\
1455Index: elfutils-0.148/src/strip.c
1456===================================================================
1457--- elfutils-0.148.orig/src/strip.c 2010-07-03 13:07:10.000000000 +0000
1458+++ elfutils-0.148/src/strip.c 2010-07-03 13:07:11.000000000 +0000
1459@@ -561,6 +561,11 @@
1460 goto fail_close;
1461 }
1462
1463+ if (shstrndx >= shnum)
1464+ goto illformed;
1465+
1466+#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
1467+
1468 /* Storage for section information. We leave room for two more
1469 entries since we unconditionally create a section header string
1470 table. Maybe some weird tool created an ELF file without one.
1471@@ -582,7 +587,7 @@
1472 {
1473 /* This should always be true (i.e., there should not be any
1474 holes in the numbering). */
1475- assert (elf_ndxscn (scn) == cnt);
1476+ elf_assert (elf_ndxscn (scn) == cnt);
1477
1478 shdr_info[cnt].scn = scn;
1479
1480@@ -595,6 +600,7 @@
1481 shdr_info[cnt].shdr.sh_name);
1482 if (shdr_info[cnt].name == NULL)
1483 {
1484+ illformed:
1485 error (0, 0, gettext ("illformed file '%s'"), fname);
1486 goto fail_close;
1487 }
1488@@ -604,6 +610,8 @@
1489
1490 /* Remember the shdr.sh_link value. */
1491 shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
1492+ if (shdr_info[cnt].old_sh_link >= shnum)
1493+ goto illformed;
1494
1495 /* Sections in files other than relocatable object files which
1496 are not loaded can be freely moved by us. In relocatable
1497@@ -616,7 +624,7 @@
1498 appropriate reference. */
1499 if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
1500 {
1501- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
1502+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
1503 shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
1504 }
1505 else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
1506@@ -633,7 +641,12 @@
1507 for (inner = 1;
1508 inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
1509 ++inner)
1510+ {
1511+ if (grpref[inner] < shnum)
1512 shdr_info[grpref[inner]].group_idx = cnt;
1513+ else
1514+ goto illformed;
1515+ }
1516
1517 if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
1518 /* If the section group contains only one element and this
1519@@ -644,7 +657,7 @@
1520 }
1521 else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
1522 {
1523- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
1524+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
1525 shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
1526 }
1527
1528@@ -652,7 +665,7 @@
1529 discarded right away. */
1530 if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
1531 {
1532- assert (shdr_info[cnt].group_idx != 0);
1533+ elf_assert (shdr_info[cnt].group_idx != 0);
1534
1535 if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
1536 {
1537@@ -727,11 +740,15 @@
1538 {
1539 /* If a relocation section is marked as being removed make
1540 sure the section it is relocating is removed, too. */
1541- if ((shdr_info[cnt].shdr.sh_type == SHT_REL
1542+ if (shdr_info[cnt].shdr.sh_type == SHT_REL
1543 || shdr_info[cnt].shdr.sh_type == SHT_RELA)
1544- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
1545+ {
1546+ if (shdr_info[cnt].shdr.sh_info >= shnum)
1547+ goto illformed;
1548+ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
1549 shdr_info[cnt].idx = 1;
1550 }
1551+ }
1552
1553 if (shdr_info[cnt].idx == 1)
1554 {
1555@@ -758,7 +775,7 @@
1556 if (shdr_info[cnt].symtab_idx != 0
1557 && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
1558 {
1559- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
1560+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
1561
1562 shdr_info[shdr_info[cnt].symtab_idx].data
1563 = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
1564@@ -798,6 +815,9 @@
1565 else if (scnidx == SHN_XINDEX)
1566 scnidx = xndx;
1567
1568+ if (scnidx >= shnum)
1569+ goto illformed;
1570+
1571 if (shdr_info[scnidx].idx == 0)
1572 /* This symbol table has a real symbol in
1573 a discarded section. So preserve the
1574@@ -828,12 +848,16 @@
1575 }
1576
1577 /* Handle references through sh_info. */
1578- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
1579- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
1580+ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
1581+ {
1582+ if (shdr_info[cnt].shdr.sh_info >= shnum)
1583+ goto illformed;
1584+ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
1585 {
1586 shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
1587 changes |= shdr_info[cnt].shdr.sh_info < cnt;
1588 }
1589+ }
1590
1591 /* Mark the section as investigated. */
1592 shdr_info[cnt].idx = 2;
1593@@ -972,7 +996,7 @@
1594 error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
1595 elf_errmsg (-1));
1596
1597- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
1598+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
1599
1600 /* Add this name to the section header string table. */
1601 shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
1602@@ -1009,7 +1033,7 @@
1603 error (EXIT_FAILURE, 0,
1604 gettext ("while create section header section: %s"),
1605 elf_errmsg (-1));
1606- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
1607+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
1608
1609 shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
1610 if (shdr_info[cnt].data == NULL)
1611@@ -1065,7 +1089,7 @@
1612 error (EXIT_FAILURE, 0,
1613 gettext ("while create section header section: %s"),
1614 elf_errmsg (-1));
1615- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
1616+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
1617
1618 /* Finalize the string table and fill in the correct indices in the
1619 section headers. */
1620@@ -1155,20 +1179,20 @@
1621 shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
1622 NULL);
1623
1624- assert ((versiondata->d_size / sizeof (Elf32_Word))
1625+ elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
1626 >= shdr_info[cnt].data->d_size / elsize);
1627 }
1628
1629 if (shdr_info[cnt].version_idx != 0)
1630 {
1631- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
1632+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
1633 /* This section has associated version
1634 information. We have to modify that
1635 information, too. */
1636 versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
1637 NULL);
1638
1639- assert ((versiondata->d_size / sizeof (GElf_Versym))
1640+ elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
1641 >= shdr_info[cnt].data->d_size / elsize);
1642 }
1643
1644@@ -1223,7 +1247,7 @@
1645 sec = shdr_info[sym->st_shndx].idx;
1646 else
1647 {
1648- assert (shndxdata != NULL);
1649+ elf_assert (shndxdata != NULL);
1650
1651 sec = shdr_info[xshndx].idx;
1652 }
1653@@ -1244,7 +1268,7 @@
1654 nxshndx = sec;
1655 }
1656
1657- assert (sec < SHN_LORESERVE || shndxdata != NULL);
1658+ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
1659
1660 if ((inner != destidx || nshndx != sym->st_shndx
1661 || (shndxdata != NULL && nxshndx != xshndx))
1662@@ -1268,7 +1292,7 @@
1663 || shdr_info[cnt].debug_data == NULL)
1664 /* This is a section symbol for a section which has
1665 been removed. */
1666- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
1667+ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
1668 }
1669
1670 if (destidx != inner)
1671@@ -1455,11 +1479,11 @@
1672 {
1673 GElf_Sym sym_mem;
1674 GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
1675- assert (sym != NULL);
1676+ elf_assert (sym != NULL);
1677
1678 const char *name = elf_strptr (elf, strshndx,
1679 sym->st_name);
1680- assert (name != NULL);
1681+ elf_assert (name != NULL);
1682 size_t hidx = elf_hash (name) % nbucket;
1683
1684 if (bucket[hidx] == 0)
1685@@ -1478,7 +1502,7 @@
1686 else
1687 {
1688 /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
1689- assert (shdr_info[cnt].shdr.sh_entsize
1690+ elf_assert (shdr_info[cnt].shdr.sh_entsize
1691 == sizeof (Elf64_Xword));
1692
1693 Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
1694@@ -1509,11 +1533,11 @@
1695 {
1696 GElf_Sym sym_mem;
1697 GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
1698- assert (sym != NULL);
1699+ elf_assert (sym != NULL);
1700
1701 const char *name = elf_strptr (elf, strshndx,
1702 sym->st_name);
1703- assert (name != NULL);
1704+ elf_assert (name != NULL);
1705 size_t hidx = elf_hash (name) % nbucket;
1706
1707 if (bucket[hidx] == 0)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
new file mode 100644
index 0000000000..20f03b86db
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
@@ -0,0 +1,19 @@
1On many architectures this test fails because binaries/libs produced by
2binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
3
4So we run the tests on all archs to see what breaks, but if it breaks we ignore
5the result (exitcode 77 means: this test was skipped).
6
7Index: elfutils-0.128/tests/run-elflint-self.sh
8===================================================================
9--- elfutils-0.128.orig/tests/run-elflint-self.sh 2007-07-08 21:46:16.000000000 +0000
10+++ elfutils-0.128/tests/run-elflint-self.sh 2007-07-08 21:46:49.000000000 +0000
11@@ -32,7 +32,7 @@
12 # echo $1
13 if [ -f $1 ]; then
14 testrun ../src/elflint --quiet --gnu-ld $1 ||
15- { echo "*** failure in $1"; status=1; }
16+ { echo "*** failure in $1"; status=77; }
17 fi
18 }
19
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h b/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h
new file mode 100644
index 0000000000..a0198bed97
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h
@@ -0,0 +1,1632 @@
1#define MNEMONIC_BITS 10
2#define SUFFIX_BITS 3
3#define FCT1_BITS 7
4#define STR1_BITS 4
5#define OFF1_1_BITS 7
6#define OFF1_1_BIAS 3
7#define OFF1_2_BITS 7
8#define OFF1_2_BIAS 4
9#define OFF1_3_BITS 1
10#define OFF1_3_BIAS 7
11#define FCT2_BITS 6
12#define STR2_BITS 2
13#define OFF2_1_BITS 7
14#define OFF2_1_BIAS 5
15#define OFF2_2_BITS 7
16#define OFF2_2_BIAS 4
17#define OFF2_3_BITS 4
18#define OFF2_3_BIAS 7
19#define FCT3_BITS 4
20#define STR3_BITS 1
21#define OFF3_1_BITS 6
22#define OFF3_1_BIAS 10
23#define OFF3_2_BITS 1
24#define OFF3_2_BIAS 21
25
26#include <i386_data.h>
27
28#define suffix_none 0
29#define suffix_w 1
30#define suffix_w0 2
31#define suffix_W 3
32#define suffix_tttn 4
33#define suffix_D 7
34#define suffix_w1 5
35#define suffix_W1 6
36
37static const opfct_t op1_fct[] =
38{
39 NULL,
40 FCT_MOD$R_M,
41 FCT_Mod$R_m,
42 FCT_abs,
43 FCT_ax,
44 FCT_ax$w,
45 FCT_ccc,
46 FCT_ddd,
47 FCT_disp8,
48 FCT_ds_bx,
49 FCT_ds_si,
50 FCT_dx,
51 FCT_es_di,
52 FCT_freg,
53 FCT_imm$s,
54 FCT_imm$w,
55 FCT_imm16,
56 FCT_imm64$w,
57 FCT_imm8,
58 FCT_imms8,
59 FCT_mmxreg,
60 FCT_mod$16r_m,
61 FCT_mod$64r_m,
62 FCT_mod$8r_m,
63 FCT_mod$r_m,
64 FCT_mod$r_m$w,
65 FCT_reg,
66 FCT_reg$w,
67 FCT_reg64,
68 FCT_rel,
69 FCT_sel,
70 FCT_sreg2,
71 FCT_sreg3,
72 FCT_string,
73 FCT_xmmreg,
74};
75static const char op1_str[] =
76 "%ax\0"
77 "%cl\0"
78 "%rax\0"
79 "%st\0"
80 "%xmm0\0"
81 "*";
82static const uint8_t op1_str_idx[] = {
83 0,
84 4,
85 8,
86 13,
87 17,
88 23,
89};
90static const opfct_t op2_fct[] =
91{
92 NULL,
93 FCT_MOD$R_M,
94 FCT_Mod$R_m,
95 FCT_abs,
96 FCT_absval,
97 FCT_ax$w,
98 FCT_ccc,
99 FCT_ddd,
100 FCT_ds_si,
101 FCT_dx,
102 FCT_es_di,
103 FCT_freg,
104 FCT_imm8,
105 FCT_mmxreg,
106 FCT_mod$64r_m,
107 FCT_mod$r_m,
108 FCT_mod$r_m$w,
109 FCT_oreg,
110 FCT_oreg$w,
111 FCT_reg,
112 FCT_reg$w,
113 FCT_reg64,
114 FCT_sreg3,
115 FCT_string,
116 FCT_xmmreg,
117};
118static const char op2_str[] =
119 "%rcx\0"
120 "%st";
121static const uint8_t op2_str_idx[] = {
122 0,
123 5,
124};
125static const opfct_t op3_fct[] =
126{
127 NULL,
128 FCT_mmxreg,
129 FCT_mod$r_m,
130 FCT_reg,
131 FCT_string,
132 FCT_xmmreg,
133};
134static const char op3_str[] =
135 "%rdx";
136static const uint8_t op3_str_idx[] = {
137 0,
138};
139static const struct instr_enc instrtab[] =
140{
141 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
142 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
143 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
144 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
145 { .mnemonic = MNE_adc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
146 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
147 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
148 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
149 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
150 { .mnemonic = MNE_add, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
151 { .mnemonic = MNE_addsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
152 { .mnemonic = MNE_addsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
153 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
154 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
155 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
156 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
157 { .mnemonic = MNE_and, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
158 { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
159 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
160 { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
161 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
162 { .mnemonic = MNE_movslq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
163 { .mnemonic = MNE_bsf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
164 { .mnemonic = MNE_bsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
165 { .mnemonic = MNE_bswap, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 26, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
166 { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
167 { .mnemonic = MNE_bt, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
168 { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
169 { .mnemonic = MNE_btc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
170 { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
171 { .mnemonic = MNE_btr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
172 { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
173 { .mnemonic = MNE_bts, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
174 { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
175 { .mnemonic = MNE_call, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
176 { .mnemonic = MNE_lcall, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
177 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
178 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
179 { .mnemonic = MNE_clc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
180 { .mnemonic = MNE_cld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
181 { .mnemonic = MNE_cli, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
182 { .mnemonic = MNE_syscall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
183 { .mnemonic = MNE_clts, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
184 { .mnemonic = MNE_sysret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
185 { .mnemonic = MNE_sysenter, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
186 { .mnemonic = MNE_sysexit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
187 { .mnemonic = MNE_cmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
188 { .mnemonic = MNE_cmov, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
189 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
190 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
191 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
192 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
193 { .mnemonic = MNE_cmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
194 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
195 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
196 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
197 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
198 { .mnemonic = MNE_cmps, .rep = 0, .repe = 1, .suffix = 1, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 8, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
199 { .mnemonic = MNE_cmpxchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
200 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
201 { .mnemonic = MNE_cpuid, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
202 { .mnemonic = MNE_cvtdq2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
203 { .mnemonic = MNE_cvtpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
204 { .mnemonic = MNE_cvttpd2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
205 { .mnemonic = MNE_dec, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
206 { .mnemonic = MNE_div, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
207 { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
208 { .mnemonic = MNE_enter, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 19, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
209 { .mnemonic = MNE_fnop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
210 { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
211 { .mnemonic = MNE_fabs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
212 { .mnemonic = MNE_ftst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
213 { .mnemonic = MNE_fxam, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
214 { .mnemonic = MNE_fld1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
215 { .mnemonic = MNE_fldl2t, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
216 { .mnemonic = MNE_fldl2e, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
217 { .mnemonic = MNE_fldpi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
218 { .mnemonic = MNE_fldlg2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
219 { .mnemonic = MNE_fldln2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
220 { .mnemonic = MNE_fldz, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
221 { .mnemonic = MNE_f2xm1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
222 { .mnemonic = MNE_fyl2x, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
223 { .mnemonic = MNE_fptan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
224 { .mnemonic = MNE_fpatan, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
225 { .mnemonic = MNE_fxtract, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
226 { .mnemonic = MNE_fprem1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
227 { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
228 { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
229 { .mnemonic = MNE_fprem, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
230 { .mnemonic = MNE_fyl2xp1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
231 { .mnemonic = MNE_fsqrt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
232 { .mnemonic = MNE_fsincos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
233 { .mnemonic = MNE_frndint, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
234 { .mnemonic = MNE_fscale, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
235 { .mnemonic = MNE_fsin, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
236 { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
237 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
238 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
239 { .mnemonic = MNE_fadd, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
240 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
241 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
242 { .mnemonic = MNE_fmul, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
243 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
244 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
245 { .mnemonic = MNE_fsub, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
246 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
247 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
248 { .mnemonic = MNE_fsubr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
249 { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
250 { .mnemonic = MNE_fst, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
251 { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
252 { .mnemonic = MNE_fstp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
253 { .mnemonic = MNE_fldenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
254 { .mnemonic = MNE_fldcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
255 { .mnemonic = MNE_fnstenv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
256 { .mnemonic = MNE_fnstcw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
257 { .mnemonic = MNE_fxch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
258 { .mnemonic = MNE_faddp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
259 { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
260 { .mnemonic = MNE_fiadd, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
261 { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
262 { .mnemonic = MNE_fmulp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
263 { .mnemonic = MNE_fimul, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
264 { .mnemonic = MNE_fsubp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
265 { .mnemonic = MNE_fisub, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
266 { .mnemonic = MNE_fsubrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
267 { .mnemonic = MNE_fisubr, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
268 { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 1, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
269 { .mnemonic = MNE_fbld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
270 { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
271 { .mnemonic = MNE_fbstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
272 { .mnemonic = MNE_fchs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
273 { .mnemonic = MNE_fclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
274 { .mnemonic = MNE_finit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
275 { .mnemonic = MNE_fwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
276 { .mnemonic = MNE_fnclex, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
277 { .mnemonic = MNE_fcmovb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
278 { .mnemonic = MNE_fcmove, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
279 { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
280 { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
281 { .mnemonic = MNE_fcmovnb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
282 { .mnemonic = MNE_fcmovne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
283 { .mnemonic = MNE_fcmovnbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
284 { .mnemonic = MNE_fcmovnu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
285 { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
286 { .mnemonic = MNE_fcom, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
287 { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
288 { .mnemonic = MNE_fcomp, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
289 { .mnemonic = MNE_fcompp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
290 { .mnemonic = MNE_fcomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
291 { .mnemonic = MNE_fcomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
292 { .mnemonic = MNE_fucomi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
293 { .mnemonic = MNE_fucomip, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
294 { .mnemonic = MNE_fcos, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
295 { .mnemonic = MNE_fdecstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
296 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
297 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
298 { .mnemonic = MNE_fdiv, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
299 { .mnemonic = MNE_fidivl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
300 { .mnemonic = MNE_fdivp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
301 { .mnemonic = MNE_fidiv, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
302 { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
303 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 2, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
304 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
305 { .mnemonic = MNE_fdivr, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
306 { .mnemonic = MNE_fidivrl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
307 { .mnemonic = MNE_fidivr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
308 { .mnemonic = MNE_fdivrp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 4, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 11, .str2 = 0, .off2_1 = 8, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
309 { .mnemonic = MNE_ffree, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
310 { .mnemonic = MNE_fcmovbe, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
311 { .mnemonic = MNE_ficom, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
312 { .mnemonic = MNE_fcmovu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
313 { .mnemonic = MNE_ficomp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
314 { .mnemonic = MNE_fild, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
315 { .mnemonic = MNE_fildl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
316 { .mnemonic = MNE_fildll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
317 { .mnemonic = MNE_fincstp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
318 { .mnemonic = MNE_fninit, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
319 { .mnemonic = MNE_fist, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
320 { .mnemonic = MNE_fistp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
321 { .mnemonic = MNE_fistpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
322 { .mnemonic = MNE_fisttp, .rep = 0, .repe = 0, .suffix = 5, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
323 { .mnemonic = MNE_fisttpll, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
324 { .mnemonic = MNE_fldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
325 { .mnemonic = MNE_fstpt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
326 { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
327 { .mnemonic = MNE_fld, .rep = 0, .repe = 0, .suffix = 7, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
328 { .mnemonic = MNE_fucom, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
329 { .mnemonic = MNE_frstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
330 { .mnemonic = MNE_fucomp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 13, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
331 { .mnemonic = MNE_fnsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
332 { .mnemonic = MNE_fnstsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
333 { .mnemonic = MNE_hlt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
334 { .mnemonic = MNE_idiv, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
335 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
336 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
337 { .mnemonic = MNE_imul, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 14, .str1 = 0, .off1_1 = 13, .off1_2 = 2, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
338 { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
339 { .mnemonic = MNE_in, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
340 { .mnemonic = MNE_inc, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
341 { .mnemonic = MNE_ins, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 11, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
342 { .mnemonic = MNE_int, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
343 { .mnemonic = MNE_int3, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
344 { .mnemonic = MNE_invd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
345 { .mnemonic = MNE_swapgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
346 { .mnemonic = MNE_invlpg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
347 { .mnemonic = MNE_iret, .rep = 0, .repe = 0, .suffix = 6, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
348 { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
349 { .mnemonic = MNE_j, .rep = 0, .repe = 0, .suffix = 4, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
350 { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
351 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
352 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
353 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 29, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
354 { .mnemonic = MNE_jmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
355 { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 30, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 4, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
356 { .mnemonic = MNE_ljmp, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 22, .str1 = 6, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
357 { .mnemonic = MNE_lahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
358 { .mnemonic = MNE_lar, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
359 { .mnemonic = MNE_lea, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
360 { .mnemonic = MNE_leave, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
361 { .mnemonic = MNE_lfs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
362 { .mnemonic = MNE_lgs, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
363 { .mnemonic = MNE_lgdt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
364 { .mnemonic = MNE_lidt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
365 { .mnemonic = MNE_lldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
366 { .mnemonic = MNE_lmsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
367 { .mnemonic = MNE_lock, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
368 { .mnemonic = MNE_lods, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
369 { .mnemonic = MNE_loop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
370 { .mnemonic = MNE_loope, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
371 { .mnemonic = MNE_loopne, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 8, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
372 { .mnemonic = MNE_lsl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
373 { .mnemonic = MNE_lss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
374 { .mnemonic = MNE_ltr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
375 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
376 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
377 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
378 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 17, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 18, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
379 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 3, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 35, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
380 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 37, .off1_2 = 3, .off1_3 = 0, .fct2 = 3, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
381 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 6, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
382 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 6, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
383 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 7, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
384 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 7, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
385 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
386 { .mnemonic = MNE_mov, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 22, .str2 = 0, .off2_1 = 5, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
387 { .mnemonic = MNE_movs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
388 { .mnemonic = MNE_movsbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
389 { .mnemonic = MNE_movswl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
390 { .mnemonic = MNE_movzbl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
391 { .mnemonic = MNE_movzwl, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
392 { .mnemonic = MNE_mul, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
393 { .mnemonic = MNE_neg, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
394 { .mnemonic = MNE_pause, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
395 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
396 { .mnemonic = MNE_popcnt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
397 { .mnemonic = MNE_not, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
398 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
399 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
400 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
401 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
402 { .mnemonic = MNE_or, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
403 { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 12, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
404 { .mnemonic = MNE_out, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
405 { .mnemonic = MNE_outs, .rep = 1, .repe = 0, .suffix = 1, .modrm = 0, .fct1 = 10, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 9, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
406 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
407 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
408 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
409 { .mnemonic = MNE_popf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
410 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 10, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
411 { .mnemonic = MNE_pushq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
412 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
413 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 28, .str1 = 0, .off1_1 = 2, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
414 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 14, .str1 = 0, .off1_1 = 5, .off1_2 = 2, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
415 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
416 { .mnemonic = MNE_push, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 32, .str1 = 0, .off1_1 = 7, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
417 { .mnemonic = MNE_pushf, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
418 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
419 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
420 { .mnemonic = MNE_rcl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
421 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
422 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
423 { .mnemonic = MNE_rcr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
424 { .mnemonic = MNE_rdmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
425 { .mnemonic = MNE_rdpmc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
426 { .mnemonic = MNE_rdtsc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
427 { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
428 { .mnemonic = MNE_ret, .rep = 0, .repe = 0, .suffix = 3, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
429 { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
430 { .mnemonic = MNE_lret, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 16, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
431 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
432 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
433 { .mnemonic = MNE_rol, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
434 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
435 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
436 { .mnemonic = MNE_ror, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
437 { .mnemonic = MNE_rsm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
438 { .mnemonic = MNE_sahf, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
439 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
440 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
441 { .mnemonic = MNE_sar, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
442 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
443 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
444 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
445 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
446 { .mnemonic = MNE_sbb, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
447 { .mnemonic = MNE_scas, .rep = 0, .repe = 1, .suffix = 0, .modrm = 0, .fct1 = 12, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 3, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
448 { .mnemonic = MNE_set, .rep = 0, .repe = 0, .suffix = 4, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
449 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
450 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
451 { .mnemonic = MNE_shl, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
452 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
453 { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
454 { .mnemonic = MNE_shld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
455 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
456 { .mnemonic = MNE_shr, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
457 { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
458 { .mnemonic = MNE_shrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 2, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 2, .str3 = 0, .off3_1 = 6, .off3_2 = 0, },
459 { .mnemonic = MNE_vmcall, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
460 { .mnemonic = MNE_vmlaunch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
461 { .mnemonic = MNE_vmresume, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
462 { .mnemonic = MNE_vmxoff, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
463 { .mnemonic = MNE_vmread, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 28, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 14, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
464 { .mnemonic = MNE_vmwrite, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 22, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 21, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
465 { .mnemonic = MNE_sgdt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
466 { .mnemonic = MNE_monitor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 4, .str3 = 1, .off3_1 = 0, .off3_2 = 0, },
467 { .mnemonic = MNE_mwait, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 33, .str1 = 3, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 23, .str2 = 1, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
468 { .mnemonic = MNE_sidt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
469 { .mnemonic = MNE_sldt, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
470 { .mnemonic = MNE_smsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
471 { .mnemonic = MNE_stc, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
472 { .mnemonic = MNE_std, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
473 { .mnemonic = MNE_sti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
474 { .mnemonic = MNE_stos, .rep = 1, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 5, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 10, .str2 = 0, .off2_1 = 3, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
475 { .mnemonic = MNE_str, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
476 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
477 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
478 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
479 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
480 { .mnemonic = MNE_sub, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
481 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
482 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
483 { .mnemonic = MNE_test, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
484 { .mnemonic = MNE_ud2a, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
485 { .mnemonic = MNE_verr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
486 { .mnemonic = MNE_verw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 21, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
487 { .mnemonic = MNE_wbinvd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
488 { .mnemonic = MNE_prefetch, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
489 { .mnemonic = MNE_prefetchw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 23, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
490 { .mnemonic = MNE_prefetchnta, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
491 { .mnemonic = MNE_prefetcht0, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
492 { .mnemonic = MNE_prefetcht1, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
493 { .mnemonic = MNE_prefetcht2, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
494 { .mnemonic = MNE_nop, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
495 { .mnemonic = MNE_wrmsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
496 { .mnemonic = MNE_xadd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 15, .off1_2 = 11, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 8, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
497 { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
498 { .mnemonic = MNE_xchg, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 4, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 17, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
499 { .mnemonic = MNE_xlat, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 9, .str1 = 0, .off1_1 = 5, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
500 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 27, .str1 = 0, .off1_1 = 7, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
501 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 25, .str1 = 0, .off1_1 = 5, .off1_2 = 9, .off1_3 = 0, .fct2 = 20, .str2 = 0, .off2_1 = 5, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
502 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 15, .str1 = 0, .off1_1 = 5, .off1_2 = 3, .off1_3 = 0, .fct2 = 5, .str2 = 0, .off2_1 = 11, .off2_2 = 3, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
503 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 15, .str1 = 0, .off1_1 = 13, .off1_2 = 3, .off1_3 = 0, .fct2 = 16, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
504 { .mnemonic = MNE_xor, .rep = 0, .repe = 0, .suffix = 1, .modrm = 1, .fct1 = 19, .str1 = 0, .off1_1 = 13, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 3, .off2_2 = 9, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
505 { .mnemonic = MNE_emms, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
506 { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
507 { .mnemonic = MNE_pand, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
508 { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
509 { .mnemonic = MNE_pandn, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
510 { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
511 { .mnemonic = MNE_pmaddwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
512 { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
513 { .mnemonic = MNE_por, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
514 { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
515 { .mnemonic = MNE_pxor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
516 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
517 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
518 { .mnemonic = MNE_cmpeqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
519 { .mnemonic = MNE_cmpltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
520 { .mnemonic = MNE_cmpleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
521 { .mnemonic = MNE_cmpunordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
522 { .mnemonic = MNE_cmpneqps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
523 { .mnemonic = MNE_cmpnltps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
524 { .mnemonic = MNE_cmpnleps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
525 { .mnemonic = MNE_cmpordps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
526 { .mnemonic = MNE_cmpeqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
527 { .mnemonic = MNE_cmpltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
528 { .mnemonic = MNE_cmpless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
529 { .mnemonic = MNE_cmpunordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
530 { .mnemonic = MNE_cmpneqss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
531 { .mnemonic = MNE_cmpnltss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
532 { .mnemonic = MNE_cmpnless, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
533 { .mnemonic = MNE_cmpordss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
534 { .mnemonic = MNE_fxrstor, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
535 { .mnemonic = MNE_fxsave, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
536 { .mnemonic = MNE_ldmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
537 { .mnemonic = MNE_stmxcsr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
538 { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
539 { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
540 { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
541 { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
542 { .mnemonic = MNE_movsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
543 { .mnemonic = MNE_movss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
544 { .mnemonic = MNE_movupd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
545 { .mnemonic = MNE_movups, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
546 { .mnemonic = MNE_movddup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
547 { .mnemonic = MNE_movsldup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
548 { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
549 { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
550 { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
551 { .mnemonic = MNE_movhlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
552 { .mnemonic = MNE_movhlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
553 { .mnemonic = MNE_movlpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
554 { .mnemonic = MNE_movlps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
555 { .mnemonic = MNE_unpcklpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
556 { .mnemonic = MNE_unpcklps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
557 { .mnemonic = MNE_unpckhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
558 { .mnemonic = MNE_unpckhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
559 { .mnemonic = MNE_movshdup, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
560 { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
561 { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
562 { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
563 { .mnemonic = MNE_movlhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
564 { .mnemonic = MNE_movlhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
565 { .mnemonic = MNE_movhpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
566 { .mnemonic = MNE_movhps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
567 { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
568 { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
569 { .mnemonic = MNE_movapd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
570 { .mnemonic = MNE_movaps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
571 { .mnemonic = MNE_cvtsi2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
572 { .mnemonic = MNE_cvtsi2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
573 { .mnemonic = MNE_cvtpi2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
574 { .mnemonic = MNE_cvtpi2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
575 { .mnemonic = MNE_movntpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
576 { .mnemonic = MNE_movntps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
577 { .mnemonic = MNE_cvttsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
578 { .mnemonic = MNE_cvttss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
579 { .mnemonic = MNE_cvttpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
580 { .mnemonic = MNE_cvttps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
581 { .mnemonic = MNE_cvtpd2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
582 { .mnemonic = MNE_cvtsd2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
583 { .mnemonic = MNE_cvtss2si, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
584 { .mnemonic = MNE_cvtps2pi, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
585 { .mnemonic = MNE_ucomisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
586 { .mnemonic = MNE_ucomiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
587 { .mnemonic = MNE_comisd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
588 { .mnemonic = MNE_comiss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
589 { .mnemonic = MNE_getsec, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
590 { .mnemonic = MNE_movmskpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
591 { .mnemonic = MNE_movmskps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
592 { .mnemonic = MNE_sqrtpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
593 { .mnemonic = MNE_sqrtsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
594 { .mnemonic = MNE_sqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
595 { .mnemonic = MNE_sqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
596 { .mnemonic = MNE_rsqrtss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
597 { .mnemonic = MNE_rsqrtps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
598 { .mnemonic = MNE_rcpss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
599 { .mnemonic = MNE_rcpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
600 { .mnemonic = MNE_andpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
601 { .mnemonic = MNE_andps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
602 { .mnemonic = MNE_andnpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
603 { .mnemonic = MNE_andnps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
604 { .mnemonic = MNE_orpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
605 { .mnemonic = MNE_orps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
606 { .mnemonic = MNE_xorpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
607 { .mnemonic = MNE_xorps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
608 { .mnemonic = MNE_addsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
609 { .mnemonic = MNE_addss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
610 { .mnemonic = MNE_addpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
611 { .mnemonic = MNE_addps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
612 { .mnemonic = MNE_mulsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
613 { .mnemonic = MNE_mulss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
614 { .mnemonic = MNE_mulpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
615 { .mnemonic = MNE_mulps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
616 { .mnemonic = MNE_cvtsd2ss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
617 { .mnemonic = MNE_cvtss2sd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
618 { .mnemonic = MNE_cvtpd2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
619 { .mnemonic = MNE_cvtps2pd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
620 { .mnemonic = MNE_cvtps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
621 { .mnemonic = MNE_cvttps2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
622 { .mnemonic = MNE_cvtdq2ps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
623 { .mnemonic = MNE_subsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
624 { .mnemonic = MNE_subss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
625 { .mnemonic = MNE_subpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
626 { .mnemonic = MNE_subps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
627 { .mnemonic = MNE_minsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
628 { .mnemonic = MNE_minss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
629 { .mnemonic = MNE_minpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
630 { .mnemonic = MNE_minps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
631 { .mnemonic = MNE_divsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
632 { .mnemonic = MNE_divss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
633 { .mnemonic = MNE_divpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
634 { .mnemonic = MNE_divps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
635 { .mnemonic = MNE_maxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
636 { .mnemonic = MNE_maxss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
637 { .mnemonic = MNE_maxpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
638 { .mnemonic = MNE_maxps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
639 { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
640 { .mnemonic = MNE_punpcklbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
641 { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
642 { .mnemonic = MNE_punpcklwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
643 { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
644 { .mnemonic = MNE_punpckldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
645 { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
646 { .mnemonic = MNE_packsswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
647 { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
648 { .mnemonic = MNE_pcmpgtb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
649 { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
650 { .mnemonic = MNE_pcmpgtw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
651 { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
652 { .mnemonic = MNE_pcmpgtd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
653 { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
654 { .mnemonic = MNE_packuswb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
655 { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
656 { .mnemonic = MNE_punpckhbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
657 { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
658 { .mnemonic = MNE_punpckhwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
659 { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
660 { .mnemonic = MNE_punpckhdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
661 { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
662 { .mnemonic = MNE_packssdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
663 { .mnemonic = MNE_punpcklqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
664 { .mnemonic = MNE_punpckhqdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
665 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
666 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
667 { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
668 { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
669 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
670 { .mnemonic = MNE_pshufd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
671 { .mnemonic = MNE_pshuflw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
672 { .mnemonic = MNE_pshufhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
673 { .mnemonic = MNE_pshufw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
674 { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
675 { .mnemonic = MNE_pcmpeqb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
676 { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
677 { .mnemonic = MNE_pcmpeqw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
678 { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
679 { .mnemonic = MNE_pcmpeqd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
680 { .mnemonic = MNE_haddpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
681 { .mnemonic = MNE_haddps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
682 { .mnemonic = MNE_hsubpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
683 { .mnemonic = MNE_hsubps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
684 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
685 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
686 { .mnemonic = MNE_movd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
687 { .mnemonic = MNE_movdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
688 { .mnemonic = MNE_movdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
689 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
690 { .mnemonic = MNE_movnti, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 26, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
691 { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
692 { .mnemonic = MNE_pinsrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
693 { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
694 { .mnemonic = MNE_pextrw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 3, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
695 { .mnemonic = MNE_shufpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
696 { .mnemonic = MNE_shufps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 8, .off3_2 = 0, },
697 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
698 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
699 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
700 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
701 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
702 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
703 { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
704 { .mnemonic = MNE_paddq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
705 { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
706 { .mnemonic = MNE_pmullw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
707 { .mnemonic = MNE_movq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
708 { .mnemonic = MNE_movdq2q, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
709 { .mnemonic = MNE_movq2dq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
710 { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
711 { .mnemonic = MNE_pmovmskb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 19, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
712 { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
713 { .mnemonic = MNE_psubusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
714 { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
715 { .mnemonic = MNE_psubusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
716 { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
717 { .mnemonic = MNE_pminub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
718 { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
719 { .mnemonic = MNE_paddusb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
720 { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
721 { .mnemonic = MNE_paddusw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
722 { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
723 { .mnemonic = MNE_pmaxub, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
724 { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
725 { .mnemonic = MNE_pavgb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
726 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
727 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
728 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
729 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
730 { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
731 { .mnemonic = MNE_pavgw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
732 { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
733 { .mnemonic = MNE_pmulhuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
734 { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
735 { .mnemonic = MNE_pmulhw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
736 { .mnemonic = MNE_movntdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 34, .str1 = 0, .off1_1 = 23, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
737 { .mnemonic = MNE_movntq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 20, .str1 = 0, .off1_1 = 15, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 11, .off2_2 = 17, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
738 { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
739 { .mnemonic = MNE_psubsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
740 { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
741 { .mnemonic = MNE_psubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
742 { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
743 { .mnemonic = MNE_pminsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
744 { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
745 { .mnemonic = MNE_paddsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
746 { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
747 { .mnemonic = MNE_paddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
748 { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
749 { .mnemonic = MNE_pmaxsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
750 { .mnemonic = MNE_lddqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
751 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
752 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
753 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
754 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
755 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
756 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
757 { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
758 { .mnemonic = MNE_pmuludq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
759 { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
760 { .mnemonic = MNE_psadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
761 { .mnemonic = MNE_maskmovdqu, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 34, .str1 = 0, .off1_1 = 26, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
762 { .mnemonic = MNE_maskmovq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 20, .str1 = 0, .off1_1 = 18, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
763 { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
764 { .mnemonic = MNE_psubb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
765 { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
766 { .mnemonic = MNE_psubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
767 { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
768 { .mnemonic = MNE_psubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
769 { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
770 { .mnemonic = MNE_psubq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
771 { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
772 { .mnemonic = MNE_paddb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
773 { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
774 { .mnemonic = MNE_paddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
775 { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
776 { .mnemonic = MNE_paddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
777 { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
778 { .mnemonic = MNE_pshufb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
779 { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
780 { .mnemonic = MNE_phaddw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
781 { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
782 { .mnemonic = MNE_phaddd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
783 { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
784 { .mnemonic = MNE_phaddsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
785 { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
786 { .mnemonic = MNE_pmaddubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
787 { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
788 { .mnemonic = MNE_phsubw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
789 { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
790 { .mnemonic = MNE_phsubd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
791 { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
792 { .mnemonic = MNE_phsubsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
793 { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
794 { .mnemonic = MNE_psignb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
795 { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
796 { .mnemonic = MNE_psignw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
797 { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
798 { .mnemonic = MNE_psignd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
799 { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
800 { .mnemonic = MNE_pmulhrsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
801 { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
802 { .mnemonic = MNE_pabsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
803 { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
804 { .mnemonic = MNE_pabsw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
805 { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
806 { .mnemonic = MNE_pabsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 21, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
807 { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
808 { .mnemonic = MNE_palignr, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 1, .str2 = 0, .off2_1 = 19, .off2_2 = 25, .off2_3 = 0, .fct3 = 1, .str3 = 0, .off3_1 = 16, .off3_2 = 0, },
809 { .mnemonic = MNE_vmclear, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
810 { .mnemonic = MNE_vmxon, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 21, .off1_2 = 25, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
811 { .mnemonic = MNE_vmptrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
812 { .mnemonic = MNE_vmptrst, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
813 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
814 { .mnemonic = MNE_psrlw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
815 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
816 { .mnemonic = MNE_psraw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
817 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
818 { .mnemonic = MNE_psllw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
819 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
820 { .mnemonic = MNE_psrld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
821 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
822 { .mnemonic = MNE_psrad, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
823 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
824 { .mnemonic = MNE_pslld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
825 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
826 { .mnemonic = MNE_psrlq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
827 { .mnemonic = MNE_psrldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
828 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
829 { .mnemonic = MNE_psllq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 21, .off1_2 = 0, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 16, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
830 { .mnemonic = MNE_pslldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 18, .str1 = 0, .off1_1 = 29, .off1_2 = 0, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 24, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
831 { .mnemonic = MNE_lfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
832 { .mnemonic = MNE_mfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
833 { .mnemonic = MNE_sfence, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 0, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
834 { .mnemonic = MNE_clflush, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 24, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
835 { .mnemonic = MNE_INVALID, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 1, .str1 = 0, .off1_1 = 13, .off1_2 = 17, .off1_3 = 0, .fct2 = 13, .str2 = 0, .off2_1 = 13, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
836 { .mnemonic = MNE_blendps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
837 { .mnemonic = MNE_blendpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
838 { .mnemonic = MNE_blendvps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
839 { .mnemonic = MNE_blendvpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
840 { .mnemonic = MNE_dpps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
841 { .mnemonic = MNE_dppd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
842 { .mnemonic = MNE_insertps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
843 { .mnemonic = MNE_movntdqa, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
844 { .mnemonic = MNE_mpsadbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
845 { .mnemonic = MNE_packusdw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
846 { .mnemonic = MNE_pblendvb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 33, .str1 = 5, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
847 { .mnemonic = MNE_pblendw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
848 { .mnemonic = MNE_pcmpeqq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
849 { .mnemonic = MNE_pcmpestri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
850 { .mnemonic = MNE_pcmpestrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
851 { .mnemonic = MNE_pcmpistri, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
852 { .mnemonic = MNE_pcmpistrm, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
853 { .mnemonic = MNE_pcmpgtq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
854 { .mnemonic = MNE_phminposuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
855 { .mnemonic = MNE_pinsrb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
856 { .mnemonic = MNE_pinsrd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 15, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
857 { .mnemonic = MNE_pmaxsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
858 { .mnemonic = MNE_pmaxsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
859 { .mnemonic = MNE_pmaxud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
860 { .mnemonic = MNE_pmaxuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
861 { .mnemonic = MNE_pminsb, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
862 { .mnemonic = MNE_pminsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
863 { .mnemonic = MNE_pminud, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
864 { .mnemonic = MNE_pminuw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
865 { .mnemonic = MNE_pmovsxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
866 { .mnemonic = MNE_pmovsxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
867 { .mnemonic = MNE_pmovsxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
868 { .mnemonic = MNE_pmovsxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
869 { .mnemonic = MNE_pmovsxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
870 { .mnemonic = MNE_pmovsxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
871 { .mnemonic = MNE_pmovzxbw, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
872 { .mnemonic = MNE_pmovzxbd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
873 { .mnemonic = MNE_pmovzxbq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
874 { .mnemonic = MNE_pmovzxwd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
875 { .mnemonic = MNE_pmovzxwq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
876 { .mnemonic = MNE_pmovzxdq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
877 { .mnemonic = MNE_pmuldq, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
878 { .mnemonic = MNE_pmulld, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
879 { .mnemonic = MNE_ptest, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 2, .str1 = 0, .off1_1 = 29, .off1_2 = 33, .off1_3 = 0, .fct2 = 24, .str2 = 0, .off2_1 = 29, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
880 { .mnemonic = MNE_roundps, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
881 { .mnemonic = MNE_roundpd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
882 { .mnemonic = MNE_roundss, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
883 { .mnemonic = MNE_roundsd, .rep = 0, .repe = 0, .suffix = 0, .modrm = 1, .fct1 = 18, .str1 = 0, .off1_1 = 37, .off1_2 = 0, .off1_3 = 0, .fct2 = 2, .str2 = 0, .off2_1 = 27, .off2_2 = 33, .off2_3 = 0, .fct3 = 5, .str3 = 0, .off3_1 = 24, .off3_2 = 0, },
884 { .mnemonic = MNE_pop, .rep = 0, .repe = 0, .suffix = 0, .modrm = 0, .fct1 = 31, .str1 = 0, .off1_1 = 0, .off1_2 = 0, .off1_3 = 0, .fct2 = 0, .str2 = 0, .off2_1 = 0, .off2_2 = 0, .off2_3 = 0, .fct3 = 0, .str3 = 0, .off3_1 = 0, .off3_2 = 0, },
885};
886static const uint8_t match_data[] =
887{
888 0x1, 0xfe, 0x14,
889 0x2, 0xfe, 0x80, 0x38, 0x10,
890 0x2, 0xfe, 0x82, 0x38, 0x10,
891 0x2, 0xfe, 0x10, 0, 0,
892 0x2, 0xfe, 0x12, 0, 0,
893 0x1, 0xfe, 0x4,
894 0x2, 0xfe, 0x80, 0x38, 0,
895 0x12, 0x83, 0x38, 0,
896 0x2, 0xfe, 0, 0, 0,
897 0x2, 0xfe, 0x2, 0, 0,
898 0x34, 0x66, 0xf, 0xd0, 0, 0,
899 0x34, 0xf2, 0xf, 0xd0, 0, 0,
900 0x1, 0xfe, 0x24,
901 0x2, 0xfe, 0x80, 0x38, 0x20,
902 0x2, 0xfe, 0x82, 0x38, 0x20,
903 0x2, 0xfe, 0x20, 0, 0,
904 0x2, 0xfe, 0x22, 0, 0,
905 0x34, 0x66, 0xf, 0x54, 0, 0,
906 0x23, 0xf, 0x54, 0, 0,
907 0x34, 0x66, 0xf, 0x55, 0, 0,
908 0x23, 0xf, 0x55, 0, 0,
909 0x12, 0x63, 0, 0,
910 0x23, 0xf, 0xbc, 0, 0,
911 0x23, 0xf, 0xbd, 0, 0,
912 0x12, 0xf, 0xf8, 0xc8,
913 0x23, 0xf, 0xa3, 0, 0,
914 0x23, 0xf, 0xba, 0x38, 0x20,
915 0x23, 0xf, 0xbb, 0, 0,
916 0x23, 0xf, 0xba, 0x38, 0x38,
917 0x23, 0xf, 0xb3, 0, 0,
918 0x23, 0xf, 0xba, 0x38, 0x30,
919 0x23, 0xf, 0xab, 0, 0,
920 0x23, 0xf, 0xba, 0x38, 0x28,
921 0x11, 0xe8,
922 0x12, 0xff, 0x38, 0x10,
923 0x12, 0xff, 0x38, 0x18,
924 0x11, 0x98,
925 0x11, 0x99,
926 0x11, 0xf8,
927 0x11, 0xfc,
928 0x11, 0xfa,
929 0x22, 0xf, 0x5,
930 0x22, 0xf, 0x6,
931 0x22, 0xf, 0x7,
932 0x22, 0xf, 0x34,
933 0x22, 0xf, 0x35,
934 0x11, 0xf5,
935 0x13, 0xf, 0xf0, 0x40, 0, 0,
936 0x1, 0xfe, 0x3c,
937 0x2, 0xfe, 0x80, 0x38, 0x38,
938 0x12, 0x83, 0x38, 0x38,
939 0x2, 0xfe, 0x38, 0, 0,
940 0x2, 0xfe, 0x3a, 0, 0,
941 0x34, 0xf2, 0xf, 0xc2, 0, 0,
942 0x34, 0xf3, 0xf, 0xc2, 0, 0,
943 0x34, 0x66, 0xf, 0xc2, 0, 0,
944 0x23, 0xf, 0xc2, 0, 0,
945 0x1, 0xfe, 0xa6,
946 0x13, 0xf, 0xfe, 0xb0, 0, 0,
947 0x23, 0xf, 0xc7, 0x38, 0x8,
948 0x22, 0xf, 0xa2,
949 0x34, 0xf3, 0xf, 0xe6, 0, 0,
950 0x34, 0xf2, 0xf, 0xe6, 0, 0,
951 0x34, 0x66, 0xf, 0xe6, 0, 0,
952 0x2, 0xfe, 0xfe, 0x38, 0x8,
953 0x2, 0xfe, 0xf6, 0x38, 0x30,
954 0x22, 0xf, 0x77,
955 0x11, 0xc8,
956 0x22, 0xd9, 0xd0,
957 0x22, 0xd9, 0xe0,
958 0x22, 0xd9, 0xe1,
959 0x22, 0xd9, 0xe4,
960 0x22, 0xd9, 0xe5,
961 0x22, 0xd9, 0xe8,
962 0x22, 0xd9, 0xe9,
963 0x22, 0xd9, 0xea,
964 0x22, 0xd9, 0xeb,
965 0x22, 0xd9, 0xec,
966 0x22, 0xd9, 0xed,
967 0x22, 0xd9, 0xee,
968 0x22, 0xd9, 0xf0,
969 0x22, 0xd9, 0xf1,
970 0x22, 0xd9, 0xf2,
971 0x22, 0xd9, 0xf3,
972 0x22, 0xd9, 0xf4,
973 0x22, 0xd9, 0xf5,
974 0x22, 0xd9, 0xf6,
975 0x22, 0xd9, 0xf7,
976 0x22, 0xd9, 0xf8,
977 0x22, 0xd9, 0xf9,
978 0x22, 0xd9, 0xfa,
979 0x22, 0xd9, 0xfb,
980 0x22, 0xd9, 0xfc,
981 0x22, 0xd9, 0xfd,
982 0x22, 0xd9, 0xfe,
983 0x22, 0xd9, 0xff,
984 0x12, 0xd8, 0xf8, 0xc0,
985 0x12, 0xdc, 0xf8, 0xc0,
986 0x2, 0xfb, 0xd8, 0x38, 0,
987 0x12, 0xd8, 0xf8, 0xc8,
988 0x12, 0xdc, 0xf8, 0xc8,
989 0x2, 0xfb, 0xd8, 0x38, 0x8,
990 0x12, 0xd8, 0xf8, 0xe0,
991 0x12, 0xdc, 0xf8, 0xe0,
992 0x2, 0xfb, 0xd8, 0x38, 0x20,
993 0x12, 0xd8, 0xf8, 0xe8,
994 0x12, 0xdc, 0xf8, 0xe8,
995 0x2, 0xfb, 0xd8, 0x38, 0x28,
996 0x12, 0xdd, 0xf8, 0xd0,
997 0x2, 0xfb, 0xd9, 0x38, 0x10,
998 0x12, 0xdd, 0xf8, 0xd8,
999 0x2, 0xfb, 0xd9, 0x38, 0x18,
1000 0x12, 0xd9, 0x38, 0x20,
1001 0x12, 0xd9, 0x38, 0x28,
1002 0x12, 0xd9, 0x38, 0x30,
1003 0x12, 0xd9, 0x38, 0x38,
1004 0x12, 0xd9, 0xf8, 0xc8,
1005 0x12, 0xde, 0xf8, 0xc0,
1006 0x12, 0xda, 0xf8, 0xc0,
1007 0x2, 0xfb, 0xda, 0x38, 0,
1008 0x12, 0xda, 0xf8, 0xc8,
1009 0x12, 0xde, 0xf8, 0xc8,
1010 0x2, 0xfb, 0xda, 0x38, 0x8,
1011 0x12, 0xde, 0xf8, 0xe0,
1012 0x2, 0xfb, 0xda, 0x38, 0x20,
1013 0x12, 0xde, 0xf8, 0xe8,
1014 0x2, 0xfb, 0xda, 0x38, 0x28,
1015 0x22, 0xdf, 0xe0,
1016 0x12, 0xdf, 0x38, 0x20,
1017 0x12, 0xdf, 0xf8, 0xf0,
1018 0x12, 0xdf, 0x38, 0x30,
1019 0x22, 0xd9, 0xe0,
1020 0x33, 0x9b, 0xdb, 0xe2,
1021 0x33, 0x9b, 0xdb, 0xe3,
1022 0x11, 0x9b,
1023 0x22, 0xdb, 0xe2,
1024 0x12, 0xda, 0xf8, 0xc0,
1025 0x12, 0xda, 0xf8, 0xc8,
1026 0x12, 0xda, 0xf8, 0xd0,
1027 0x12, 0xda, 0xf8, 0xd8,
1028 0x12, 0xdb, 0xf8, 0xc0,
1029 0x12, 0xdb, 0xf8, 0xc8,
1030 0x12, 0xdb, 0xf8, 0xd0,
1031 0x12, 0xdb, 0xf8, 0xd8,
1032 0x12, 0xd8, 0xf8, 0xd0,
1033 0x2, 0xfb, 0xd8, 0x38, 0x10,
1034 0x12, 0xd8, 0xf8, 0xd8,
1035 0x2, 0xfb, 0xd8, 0x38, 0x18,
1036 0x22, 0xde, 0xd9,
1037 0x12, 0xdb, 0xf8, 0xf0,
1038 0x12, 0xdf, 0xf8, 0xf0,
1039 0x12, 0xdb, 0xf8, 0xe8,
1040 0x12, 0xdf, 0xf8, 0xe8,
1041 0x22, 0xd9, 0xff,
1042 0x22, 0xd9, 0xf6,
1043 0x12, 0xd8, 0xf8, 0xf0,
1044 0x12, 0xdc, 0xf8, 0xf0,
1045 0x2, 0xfb, 0xd8, 0x38, 0x30,
1046 0x12, 0xda, 0x38, 0x30,
1047 0x12, 0xde, 0xf8, 0xf0,
1048 0x12, 0xde, 0x38, 0x30,
1049 0x12, 0xde, 0xf8, 0xf8,
1050 0x12, 0xd8, 0xf8, 0xf8,
1051 0x12, 0xdc, 0xf8, 0xf8,
1052 0x2, 0xfb, 0xd8, 0x38, 0x38,
1053 0x12, 0xda, 0x38, 0x38,
1054 0x12, 0xde, 0x38, 0x38,
1055 0x12, 0xde, 0xf8, 0xf0,
1056 0x12, 0xdd, 0xf8, 0xc0,
1057 0x12, 0xda, 0xf8, 0xd0,
1058 0x2, 0xfb, 0xda, 0x38, 0x10,
1059 0x12, 0xda, 0xf8, 0xd8,
1060 0x2, 0xfb, 0xda, 0x38, 0x18,
1061 0x12, 0xdf, 0x38, 0,
1062 0x12, 0xdb, 0x38, 0,
1063 0x12, 0xdf, 0x38, 0x28,
1064 0x22, 0xd9, 0xf7,
1065 0x22, 0xdb, 0xe3,
1066 0x2, 0xfb, 0xdb, 0x38, 0x10,
1067 0x2, 0xfb, 0xdb, 0x38, 0x18,
1068 0x12, 0xdf, 0x38, 0x38,
1069 0x2, 0xfb, 0xdb, 0x38, 0x8,
1070 0x12, 0xdd, 0x38, 0x8,
1071 0x12, 0xdb, 0x38, 0x28,
1072 0x12, 0xdb, 0x38, 0x38,
1073 0x12, 0xd9, 0xf8, 0xc0,
1074 0x2, 0xfb, 0xd9, 0x38, 0,
1075 0x12, 0xdd, 0xf8, 0xe0,
1076 0x12, 0xdd, 0x38, 0x20,
1077 0x12, 0xdd, 0xf8, 0xe8,
1078 0x12, 0xdd, 0x38, 0x30,
1079 0x12, 0xdd, 0x38, 0x38,
1080 0x11, 0xf4,
1081 0x2, 0xfe, 0xf6, 0x38, 0x38,
1082 0x2, 0xfe, 0xf6, 0x38, 0x28,
1083 0x23, 0xf, 0xaf, 0, 0,
1084 0x2, 0xfd, 0x69, 0, 0,
1085 0x1, 0xfe, 0xe4,
1086 0x1, 0xfe, 0xec,
1087 0x2, 0xfe, 0xfe, 0x38, 0,
1088 0x1, 0xfe, 0x6c,
1089 0x11, 0xcd,
1090 0x11, 0xcc,
1091 0x22, 0xf, 0x8,
1092 0x33, 0xf, 0x1, 0xf8,
1093 0x23, 0xf, 0x1, 0x38, 0x38,
1094 0x11, 0xcf,
1095 0x1, 0xf0, 0x70,
1096 0x12, 0xf, 0xf0, 0x80,
1097 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
1098 0x11, 0xe3,
1099 0x11, 0xeb,
1100 0x11, 0xe9,
1101 0x12, 0xff, 0x38, 0x20,
1102 0x11, 0xea,
1103 0x12, 0xff, 0x38, 0x28,
1104 0x11, 0x9f,
1105 0x23, 0xf, 0x2, 0, 0,
1106 0x12, 0x8d, 0, 0,
1107 0x11, 0xc9,
1108 0x23, 0xf, 0xb4, 0, 0,
1109 0x23, 0xf, 0xb5, 0, 0,
1110 0x23, 0xf, 0x1, 0x38, 0x10,
1111 0x23, 0xf, 0x1, 0x38, 0x18,
1112 0x23, 0xf, 0, 0x38, 0x10,
1113 0x23, 0xf, 0x1, 0x38, 0x30,
1114 0x11, 0xf0,
1115 0x1, 0xfe, 0xac,
1116 0x11, 0xe2,
1117 0x11, 0xe1,
1118 0x11, 0xe0,
1119 0x23, 0xf, 0x3, 0, 0,
1120 0x23, 0xf, 0xb2, 0, 0,
1121 0x23, 0xf, 0, 0x38, 0x18,
1122 0x2, 0xfe, 0x88, 0, 0,
1123 0x2, 0xfe, 0x8a, 0, 0,
1124 0x2, 0xfe, 0xc6, 0x38, 0,
1125 0x1, 0xf0, 0xb0,
1126 0x1, 0xfe, 0xa0,
1127 0x1, 0xfe, 0xa2,
1128 0x23, 0xf, 0x20, 0xc0, 0xc0,
1129 0x23, 0xf, 0x22, 0xc0, 0xc0,
1130 0x23, 0xf, 0x21, 0xc0, 0xc0,
1131 0x23, 0xf, 0x23, 0xc0, 0xc0,
1132 0x12, 0x8c, 0, 0,
1133 0x12, 0x8e, 0, 0,
1134 0x1, 0xfe, 0xa4,
1135 0x23, 0xf, 0xbe, 0, 0,
1136 0x23, 0xf, 0xbf, 0, 0,
1137 0x23, 0xf, 0xb6, 0, 0,
1138 0x23, 0xf, 0xb7, 0, 0,
1139 0x2, 0xfe, 0xf6, 0x38, 0x20,
1140 0x2, 0xfe, 0xf6, 0x38, 0x18,
1141 0x22, 0xf3, 0x90,
1142 0x11, 0x90,
1143 0x34, 0xf3, 0xf, 0xb8, 0, 0,
1144 0x2, 0xfe, 0xf6, 0x38, 0x10,
1145 0x2, 0xfe, 0x8, 0, 0,
1146 0x2, 0xfe, 0xa, 0, 0,
1147 0x2, 0xfe, 0x80, 0x38, 0x8,
1148 0x2, 0xfe, 0x82, 0x38, 0x8,
1149 0x1, 0xfe, 0xc,
1150 0x1, 0xfe, 0xe6,
1151 0x1, 0xfe, 0xee,
1152 0x1, 0xfe, 0x6e,
1153 0x12, 0x8f, 0xf8, 0xc0,
1154 0x12, 0x8f, 0x38, 0,
1155 0x12, 0xf, 0xc7, 0x81,
1156 0x11, 0x9d,
1157 0x12, 0xff, 0xf8, 0xf0,
1158 0x12, 0xff, 0x38, 0x30,
1159 0x1, 0xf8, 0x50,
1160 0x1, 0xf8, 0x58,
1161 0x1, 0xfd, 0x68,
1162 0x1, 0xe7, 0x6,
1163 0x12, 0xf, 0xc7, 0x80,
1164 0x11, 0x9c,
1165 0x2, 0xfe, 0xd0, 0x38, 0x10,
1166 0x2, 0xfe, 0xd2, 0x38, 0x10,
1167 0x2, 0xfe, 0xc0, 0x38, 0x10,
1168 0x2, 0xfe, 0xd0, 0x38, 0x18,
1169 0x2, 0xfe, 0xd2, 0x38, 0x18,
1170 0x2, 0xfe, 0xc0, 0x38, 0x18,
1171 0x22, 0xf, 0x32,
1172 0x22, 0xf, 0x33,
1173 0x22, 0xf, 0x31,
1174 0x11, 0xc3,
1175 0x11, 0xc2,
1176 0x11, 0xcb,
1177 0x11, 0xca,
1178 0x2, 0xfe, 0xd0, 0x38, 0,
1179 0x2, 0xfe, 0xd2, 0x38, 0,
1180 0x2, 0xfe, 0xc0, 0x38, 0,
1181 0x2, 0xfe, 0xd0, 0x38, 0x8,
1182 0x2, 0xfe, 0xd2, 0x38, 0x8,
1183 0x2, 0xfe, 0xc0, 0x38, 0x8,
1184 0x22, 0xf, 0xaa,
1185 0x11, 0x9e,
1186 0x2, 0xfe, 0xd0, 0x38, 0x38,
1187 0x2, 0xfe, 0xd2, 0x38, 0x38,
1188 0x2, 0xfe, 0xc0, 0x38, 0x38,
1189 0x2, 0xfe, 0x18, 0, 0,
1190 0x2, 0xfe, 0x1a, 0, 0,
1191 0x1, 0xfe, 0x1c,
1192 0x2, 0xfe, 0x80, 0x38, 0x18,
1193 0x2, 0xfe, 0x82, 0x38, 0x18,
1194 0x1, 0xfe, 0xae,
1195 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
1196 0x2, 0xfe, 0xd0, 0x38, 0x20,
1197 0x2, 0xfe, 0xd2, 0x38, 0x20,
1198 0x2, 0xfe, 0xc0, 0x38, 0x20,
1199 0x2, 0xfe, 0xd0, 0x38, 0x28,
1200 0x23, 0xf, 0xa4, 0, 0,
1201 0x23, 0xf, 0xa5, 0, 0,
1202 0x2, 0xfe, 0xd2, 0x38, 0x28,
1203 0x2, 0xfe, 0xc0, 0x38, 0x28,
1204 0x23, 0xf, 0xac, 0, 0,
1205 0x23, 0xf, 0xad, 0, 0,
1206 0x33, 0xf, 0x1, 0xc1,
1207 0x33, 0xf, 0x1, 0xc2,
1208 0x33, 0xf, 0x1, 0xc3,
1209 0x33, 0xf, 0x1, 0xc4,
1210 0x23, 0xf, 0x78, 0, 0,
1211 0x23, 0xf, 0x79, 0, 0,
1212 0x23, 0xf, 0x1, 0x38, 0,
1213 0x33, 0xf, 0x1, 0xc8,
1214 0x33, 0xf, 0x1, 0xc9,
1215 0x23, 0xf, 0x1, 0x38, 0x8,
1216 0x23, 0xf, 0, 0x38, 0,
1217 0x23, 0xf, 0x1, 0x38, 0x20,
1218 0x11, 0xf9,
1219 0x11, 0xfd,
1220 0x11, 0xfb,
1221 0x1, 0xfe, 0xaa,
1222 0x23, 0xf, 0, 0x38, 0x8,
1223 0x2, 0xfe, 0x28, 0, 0,
1224 0x2, 0xfe, 0x2a, 0, 0,
1225 0x1, 0xfe, 0x2c,
1226 0x2, 0xfe, 0x80, 0x38, 0x28,
1227 0x2, 0xfe, 0x82, 0x38, 0x28,
1228 0x2, 0xfe, 0x84, 0, 0,
1229 0x1, 0xfe, 0xa8,
1230 0x2, 0xfe, 0xf6, 0x38, 0,
1231 0x22, 0xf, 0xb,
1232 0x23, 0xf, 0, 0x38, 0x20,
1233 0x23, 0xf, 0, 0x38, 0x28,
1234 0x22, 0xf, 0x9,
1235 0x23, 0xf, 0xd, 0x38, 0,
1236 0x23, 0xf, 0xd, 0x38, 0x8,
1237 0x23, 0xf, 0x18, 0x38, 0,
1238 0x23, 0xf, 0x18, 0x38, 0x8,
1239 0x23, 0xf, 0x18, 0x38, 0x10,
1240 0x23, 0xf, 0x18, 0x38, 0x18,
1241 0x23, 0xf, 0x1f, 0, 0,
1242 0x22, 0xf, 0x30,
1243 0x13, 0xf, 0xfe, 0xc0, 0, 0,
1244 0x2, 0xfe, 0x86, 0, 0,
1245 0x1, 0xf8, 0x90,
1246 0x11, 0xd7,
1247 0x2, 0xfe, 0x30, 0, 0,
1248 0x2, 0xfe, 0x32, 0, 0,
1249 0x1, 0xfe, 0x34,
1250 0x2, 0xfe, 0x80, 0x38, 0x30,
1251 0x2, 0xfe, 0x82, 0x38, 0x30,
1252 0x22, 0xf, 0x77,
1253 0x34, 0x66, 0xf, 0xdb, 0, 0,
1254 0x23, 0xf, 0xdb, 0, 0,
1255 0x34, 0x66, 0xf, 0xdf, 0, 0,
1256 0x23, 0xf, 0xdf, 0, 0,
1257 0x34, 0x66, 0xf, 0xf5, 0, 0,
1258 0x23, 0xf, 0xf5, 0, 0,
1259 0x34, 0x66, 0xf, 0xeb, 0, 0,
1260 0x23, 0xf, 0xeb, 0, 0,
1261 0x34, 0x66, 0xf, 0xef, 0, 0,
1262 0x23, 0xf, 0xef, 0, 0,
1263 0x23, 0xf, 0x55, 0, 0,
1264 0x23, 0xf, 0x54, 0, 0,
1265 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
1266 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
1267 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
1268 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
1269 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
1270 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
1271 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
1272 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
1273 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
1274 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
1275 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
1276 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
1277 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
1278 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
1279 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
1280 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
1281 0x23, 0xf, 0xae, 0x38, 0x8,
1282 0x23, 0xf, 0xae, 0x38, 0,
1283 0x23, 0xf, 0xae, 0x38, 0x10,
1284 0x23, 0xf, 0xae, 0x38, 0x18,
1285 0x34, 0xf2, 0xf, 0x10, 0, 0,
1286 0x34, 0xf3, 0xf, 0x10, 0, 0,
1287 0x34, 0x66, 0xf, 0x10, 0, 0,
1288 0x23, 0xf, 0x10, 0, 0,
1289 0x34, 0xf2, 0xf, 0x11, 0, 0,
1290 0x34, 0xf3, 0xf, 0x11, 0, 0,
1291 0x34, 0x66, 0xf, 0x11, 0, 0,
1292 0x23, 0xf, 0x11, 0, 0,
1293 0x34, 0xf2, 0xf, 0x12, 0, 0,
1294 0x34, 0xf3, 0xf, 0x12, 0, 0,
1295 0x34, 0x66, 0xf, 0x12, 0, 0,
1296 0x23, 0xf, 0x12, 0xc0, 0xc0,
1297 0x23, 0xf, 0x12, 0, 0,
1298 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
1299 0x23, 0xf, 0x13, 0xc0, 0xc0,
1300 0x34, 0x66, 0xf, 0x13, 0, 0,
1301 0x23, 0xf, 0x13, 0, 0,
1302 0x34, 0x66, 0xf, 0x14, 0, 0,
1303 0x23, 0xf, 0x14, 0, 0,
1304 0x34, 0x66, 0xf, 0x15, 0, 0,
1305 0x23, 0xf, 0x15, 0, 0,
1306 0x34, 0xf3, 0xf, 0x16, 0, 0,
1307 0x34, 0x66, 0xf, 0x16, 0, 0,
1308 0x23, 0xf, 0x16, 0xc0, 0xc0,
1309 0x23, 0xf, 0x16, 0, 0,
1310 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
1311 0x23, 0xf, 0x17, 0xc0, 0xc0,
1312 0x34, 0x66, 0xf, 0x17, 0, 0,
1313 0x23, 0xf, 0x17, 0, 0,
1314 0x34, 0x66, 0xf, 0x28, 0, 0,
1315 0x23, 0xf, 0x28, 0, 0,
1316 0x34, 0x66, 0xf, 0x29, 0, 0,
1317 0x23, 0xf, 0x29, 0, 0,
1318 0x34, 0xf2, 0xf, 0x2a, 0, 0,
1319 0x34, 0xf3, 0xf, 0x2a, 0, 0,
1320 0x34, 0x66, 0xf, 0x2a, 0, 0,
1321 0x23, 0xf, 0x2a, 0, 0,
1322 0x34, 0x66, 0xf, 0x2b, 0, 0,
1323 0x23, 0xf, 0x2b, 0, 0,
1324 0x34, 0xf2, 0xf, 0x2c, 0, 0,
1325 0x34, 0xf3, 0xf, 0x2c, 0, 0,
1326 0x34, 0x66, 0xf, 0x2c, 0, 0,
1327 0x23, 0xf, 0x2c, 0, 0,
1328 0x34, 0x66, 0xf, 0x2d, 0, 0,
1329 0x34, 0xf2, 0xf, 0x2d, 0, 0,
1330 0x34, 0xf3, 0xf, 0x2d, 0, 0,
1331 0x23, 0xf, 0x2d, 0, 0,
1332 0x34, 0x66, 0xf, 0x2e, 0, 0,
1333 0x23, 0xf, 0x2e, 0, 0,
1334 0x34, 0x66, 0xf, 0x2f, 0, 0,
1335 0x23, 0xf, 0x2f, 0, 0,
1336 0x22, 0xf, 0x37,
1337 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
1338 0x23, 0xf, 0x50, 0xc0, 0xc0,
1339 0x34, 0x66, 0xf, 0x51, 0, 0,
1340 0x34, 0xf2, 0xf, 0x51, 0, 0,
1341 0x34, 0xf3, 0xf, 0x51, 0, 0,
1342 0x23, 0xf, 0x51, 0, 0,
1343 0x34, 0xf3, 0xf, 0x52, 0, 0,
1344 0x23, 0xf, 0x52, 0, 0,
1345 0x34, 0xf3, 0xf, 0x53, 0, 0,
1346 0x23, 0xf, 0x53, 0, 0,
1347 0x34, 0x66, 0xf, 0x54, 0, 0,
1348 0x23, 0xf, 0x54, 0, 0,
1349 0x34, 0x66, 0xf, 0x55, 0, 0,
1350 0x23, 0xf, 0x55, 0, 0,
1351 0x34, 0x66, 0xf, 0x56, 0, 0,
1352 0x23, 0xf, 0x56, 0, 0,
1353 0x34, 0x66, 0xf, 0x57, 0, 0,
1354 0x23, 0xf, 0x57, 0, 0,
1355 0x34, 0xf2, 0xf, 0x58, 0, 0,
1356 0x34, 0xf3, 0xf, 0x58, 0, 0,
1357 0x34, 0x66, 0xf, 0x58, 0, 0,
1358 0x23, 0xf, 0x58, 0, 0,
1359 0x34, 0xf2, 0xf, 0x59, 0, 0,
1360 0x34, 0xf3, 0xf, 0x59, 0, 0,
1361 0x34, 0x66, 0xf, 0x59, 0, 0,
1362 0x23, 0xf, 0x59, 0, 0,
1363 0x34, 0xf2, 0xf, 0x5a, 0, 0,
1364 0x34, 0xf3, 0xf, 0x5a, 0, 0,
1365 0x34, 0x66, 0xf, 0x5a, 0, 0,
1366 0x23, 0xf, 0x5a, 0, 0,
1367 0x34, 0x66, 0xf, 0x5b, 0, 0,
1368 0x34, 0xf3, 0xf, 0x5b, 0, 0,
1369 0x23, 0xf, 0x5b, 0, 0,
1370 0x34, 0xf2, 0xf, 0x5c, 0, 0,
1371 0x34, 0xf3, 0xf, 0x5c, 0, 0,
1372 0x34, 0x66, 0xf, 0x5c, 0, 0,
1373 0x23, 0xf, 0x5c, 0, 0,
1374 0x34, 0xf2, 0xf, 0x5d, 0, 0,
1375 0x34, 0xf3, 0xf, 0x5d, 0, 0,
1376 0x34, 0x66, 0xf, 0x5d, 0, 0,
1377 0x23, 0xf, 0x5d, 0, 0,
1378 0x34, 0xf2, 0xf, 0x5e, 0, 0,
1379 0x34, 0xf3, 0xf, 0x5e, 0, 0,
1380 0x34, 0x66, 0xf, 0x5e, 0, 0,
1381 0x23, 0xf, 0x5e, 0, 0,
1382 0x34, 0xf2, 0xf, 0x5f, 0, 0,
1383 0x34, 0xf3, 0xf, 0x5f, 0, 0,
1384 0x34, 0x66, 0xf, 0x5f, 0, 0,
1385 0x23, 0xf, 0x5f, 0, 0,
1386 0x34, 0x66, 0xf, 0x60, 0, 0,
1387 0x23, 0xf, 0x60, 0, 0,
1388 0x34, 0x66, 0xf, 0x61, 0, 0,
1389 0x23, 0xf, 0x61, 0, 0,
1390 0x34, 0x66, 0xf, 0x62, 0, 0,
1391 0x23, 0xf, 0x62, 0, 0,
1392 0x34, 0x66, 0xf, 0x63, 0, 0,
1393 0x23, 0xf, 0x63, 0, 0,
1394 0x34, 0x66, 0xf, 0x64, 0, 0,
1395 0x23, 0xf, 0x64, 0, 0,
1396 0x34, 0x66, 0xf, 0x65, 0, 0,
1397 0x23, 0xf, 0x65, 0, 0,
1398 0x34, 0x66, 0xf, 0x66, 0, 0,
1399 0x23, 0xf, 0x66, 0, 0,
1400 0x34, 0x66, 0xf, 0x67, 0, 0,
1401 0x23, 0xf, 0x67, 0, 0,
1402 0x34, 0x66, 0xf, 0x68, 0, 0,
1403 0x23, 0xf, 0x68, 0, 0,
1404 0x34, 0x66, 0xf, 0x69, 0, 0,
1405 0x23, 0xf, 0x69, 0, 0,
1406 0x34, 0x66, 0xf, 0x6a, 0, 0,
1407 0x23, 0xf, 0x6a, 0, 0,
1408 0x34, 0x66, 0xf, 0x6b, 0, 0,
1409 0x23, 0xf, 0x6b, 0, 0,
1410 0x34, 0x66, 0xf, 0x6c, 0, 0,
1411 0x34, 0x66, 0xf, 0x6d, 0, 0,
1412 0x34, 0x66, 0xf, 0x6e, 0, 0,
1413 0x23, 0xf, 0x6e, 0, 0,
1414 0x34, 0x66, 0xf, 0x6f, 0, 0,
1415 0x34, 0xf3, 0xf, 0x6f, 0, 0,
1416 0x23, 0xf, 0x6f, 0, 0,
1417 0x34, 0x66, 0xf, 0x70, 0, 0,
1418 0x34, 0xf2, 0xf, 0x70, 0, 0,
1419 0x34, 0xf3, 0xf, 0x70, 0, 0,
1420 0x23, 0xf, 0x70, 0, 0,
1421 0x34, 0x66, 0xf, 0x74, 0, 0,
1422 0x23, 0xf, 0x74, 0, 0,
1423 0x34, 0x66, 0xf, 0x75, 0, 0,
1424 0x23, 0xf, 0x75, 0, 0,
1425 0x34, 0x66, 0xf, 0x76, 0, 0,
1426 0x23, 0xf, 0x76, 0, 0,
1427 0x34, 0x66, 0xf, 0x7c, 0, 0,
1428 0x34, 0xf2, 0xf, 0x7c, 0, 0,
1429 0x34, 0x66, 0xf, 0x7d, 0, 0,
1430 0x34, 0xf2, 0xf, 0x7d, 0, 0,
1431 0x34, 0x66, 0xf, 0x7e, 0, 0,
1432 0x34, 0xf3, 0xf, 0x7e, 0, 0,
1433 0x23, 0xf, 0x7e, 0, 0,
1434 0x34, 0x66, 0xf, 0x7f, 0, 0,
1435 0x34, 0xf3, 0xf, 0x7f, 0, 0,
1436 0x23, 0xf, 0x7f, 0, 0,
1437 0x23, 0xf, 0xc3, 0, 0,
1438 0x34, 0x66, 0xf, 0xc4, 0, 0,
1439 0x23, 0xf, 0xc4, 0, 0,
1440 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
1441 0x23, 0xf, 0xc5, 0xc0, 0xc0,
1442 0x34, 0x66, 0xf, 0xc6, 0, 0,
1443 0x23, 0xf, 0xc6, 0, 0,
1444 0x34, 0x66, 0xf, 0xd1, 0, 0,
1445 0x23, 0xf, 0xd1, 0, 0,
1446 0x34, 0x66, 0xf, 0xd2, 0, 0,
1447 0x23, 0xf, 0xd2, 0, 0,
1448 0x34, 0x66, 0xf, 0xd3, 0, 0,
1449 0x23, 0xf, 0xd3, 0, 0,
1450 0x34, 0x66, 0xf, 0xd4, 0, 0,
1451 0x23, 0xf, 0xd4, 0, 0,
1452 0x34, 0x66, 0xf, 0xd5, 0, 0,
1453 0x23, 0xf, 0xd5, 0, 0,
1454 0x34, 0x66, 0xf, 0xd6, 0, 0,
1455 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
1456 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
1457 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
1458 0x23, 0xf, 0xd7, 0xc0, 0xc0,
1459 0x34, 0x66, 0xf, 0xd8, 0, 0,
1460 0x23, 0xf, 0xd8, 0, 0,
1461 0x34, 0x66, 0xf, 0xd9, 0, 0,
1462 0x23, 0xf, 0xd9, 0, 0,
1463 0x34, 0x66, 0xf, 0xda, 0, 0,
1464 0x23, 0xf, 0xda, 0, 0,
1465 0x34, 0x66, 0xf, 0xdc, 0, 0,
1466 0x23, 0xf, 0xdc, 0, 0,
1467 0x34, 0x66, 0xf, 0xdd, 0, 0,
1468 0x23, 0xf, 0xdd, 0, 0,
1469 0x34, 0x66, 0xf, 0xde, 0, 0,
1470 0x23, 0xf, 0xde, 0, 0,
1471 0x34, 0x66, 0xf, 0xe0, 0, 0,
1472 0x23, 0xf, 0xe0, 0, 0,
1473 0x34, 0x66, 0xf, 0xe1, 0, 0,
1474 0x23, 0xf, 0xe1, 0, 0,
1475 0x34, 0x66, 0xf, 0xe2, 0, 0,
1476 0x23, 0xf, 0xe2, 0, 0,
1477 0x34, 0x66, 0xf, 0xe3, 0, 0,
1478 0x23, 0xf, 0xe3, 0, 0,
1479 0x34, 0x66, 0xf, 0xe4, 0, 0,
1480 0x23, 0xf, 0xe4, 0, 0,
1481 0x34, 0x66, 0xf, 0xe5, 0, 0,
1482 0x23, 0xf, 0xe5, 0, 0,
1483 0x34, 0x66, 0xf, 0xe7, 0, 0,
1484 0x23, 0xf, 0xe7, 0, 0,
1485 0x34, 0x66, 0xf, 0xe8, 0, 0,
1486 0x23, 0xf, 0xe8, 0, 0,
1487 0x34, 0x66, 0xf, 0xe9, 0, 0,
1488 0x23, 0xf, 0xe9, 0, 0,
1489 0x34, 0x66, 0xf, 0xea, 0, 0,
1490 0x23, 0xf, 0xea, 0, 0,
1491 0x34, 0x66, 0xf, 0xec, 0, 0,
1492 0x23, 0xf, 0xec, 0, 0,
1493 0x34, 0x66, 0xf, 0xed, 0, 0,
1494 0x23, 0xf, 0xed, 0, 0,
1495 0x34, 0x66, 0xf, 0xee, 0, 0,
1496 0x23, 0xf, 0xee, 0, 0,
1497 0x34, 0xf2, 0xf, 0xf0, 0, 0,
1498 0x34, 0x66, 0xf, 0xf1, 0, 0,
1499 0x23, 0xf, 0xf1, 0, 0,
1500 0x34, 0x66, 0xf, 0xf2, 0, 0,
1501 0x23, 0xf, 0xf2, 0, 0,
1502 0x34, 0x66, 0xf, 0xf3, 0, 0,
1503 0x23, 0xf, 0xf3, 0, 0,
1504 0x34, 0x66, 0xf, 0xf4, 0, 0,
1505 0x23, 0xf, 0xf4, 0, 0,
1506 0x34, 0x66, 0xf, 0xf6, 0, 0,
1507 0x23, 0xf, 0xf6, 0, 0,
1508 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
1509 0x23, 0xf, 0xf7, 0xc0, 0xc0,
1510 0x34, 0x66, 0xf, 0xf8, 0, 0,
1511 0x23, 0xf, 0xf8, 0, 0,
1512 0x34, 0x66, 0xf, 0xf9, 0, 0,
1513 0x23, 0xf, 0xf9, 0, 0,
1514 0x34, 0x66, 0xf, 0xfa, 0, 0,
1515 0x23, 0xf, 0xfa, 0, 0,
1516 0x34, 0x66, 0xf, 0xfb, 0, 0,
1517 0x23, 0xf, 0xfb, 0, 0,
1518 0x34, 0x66, 0xf, 0xfc, 0, 0,
1519 0x23, 0xf, 0xfc, 0, 0,
1520 0x34, 0x66, 0xf, 0xfd, 0, 0,
1521 0x23, 0xf, 0xfd, 0, 0,
1522 0x34, 0x66, 0xf, 0xfe, 0, 0,
1523 0x23, 0xf, 0xfe, 0, 0,
1524 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
1525 0x34, 0xf, 0x38, 0, 0, 0,
1526 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
1527 0x34, 0xf, 0x38, 0x1, 0, 0,
1528 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
1529 0x34, 0xf, 0x38, 0x2, 0, 0,
1530 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
1531 0x34, 0xf, 0x38, 0x3, 0, 0,
1532 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
1533 0x34, 0xf, 0x38, 0x4, 0, 0,
1534 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
1535 0x34, 0xf, 0x38, 0x5, 0, 0,
1536 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
1537 0x34, 0xf, 0x38, 0x6, 0, 0,
1538 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
1539 0x34, 0xf, 0x38, 0x7, 0, 0,
1540 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
1541 0x34, 0xf, 0x38, 0x8, 0, 0,
1542 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
1543 0x34, 0xf, 0x38, 0x9, 0, 0,
1544 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
1545 0x34, 0xf, 0x38, 0xa, 0, 0,
1546 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
1547 0x34, 0xf, 0x38, 0xb, 0, 0,
1548 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
1549 0x34, 0xf, 0x38, 0x1c, 0, 0,
1550 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
1551 0x34, 0xf, 0x38, 0x1d, 0, 0,
1552 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
1553 0x34, 0xf, 0x38, 0x1e, 0, 0,
1554 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
1555 0x34, 0xf, 0x3a, 0xf, 0, 0,
1556 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
1557 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
1558 0x23, 0xf, 0xc7, 0x38, 0x30,
1559 0x23, 0xf, 0xc7, 0x38, 0x38,
1560 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
1561 0x23, 0xf, 0x71, 0xf8, 0xd0,
1562 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
1563 0x23, 0xf, 0x71, 0xf8, 0xe0,
1564 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
1565 0x23, 0xf, 0x71, 0xf8, 0xf0,
1566 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
1567 0x23, 0xf, 0x72, 0xf8, 0xd0,
1568 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
1569 0x23, 0xf, 0x72, 0xf8, 0xe0,
1570 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
1571 0x23, 0xf, 0x72, 0xf8, 0xf0,
1572 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
1573 0x23, 0xf, 0x73, 0xf8, 0xd0,
1574 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
1575 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
1576 0x23, 0xf, 0x73, 0xf8, 0xf0,
1577 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
1578 0x33, 0xf, 0xae, 0xe8,
1579 0x33, 0xf, 0xae, 0xf0,
1580 0x33, 0xf, 0xae, 0xf8,
1581 0x23, 0xf, 0xae, 0x38, 0x38,
1582 0x23, 0xf, 0xf, 0, 0,
1583 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
1584 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
1585 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
1586 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
1587 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
1588 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
1589 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
1590 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
1591 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
1592 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
1593 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
1594 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
1595 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
1596 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
1597 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
1598 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
1599 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
1600 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
1601 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
1602 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
1603 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
1604 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
1605 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
1606 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
1607 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
1608 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
1609 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
1610 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
1611 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
1612 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
1613 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
1614 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
1615 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
1616 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
1617 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
1618 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
1619 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
1620 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
1621 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
1622 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
1623 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
1624 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
1625 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
1626 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
1627 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
1628 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
1629 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
1630 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
1631 0x1, 0xe7, 0x7,
1632};
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.89/warnings.patch b/meta/recipes-devtools/elfutils/elfutils-0.89/warnings.patch
new file mode 100644
index 0000000000..2a1ea09a61
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.89/warnings.patch
@@ -0,0 +1,98 @@
1--- elfutils-0.89/configure.ac~warnings.patch 2003-09-26 02:04:04.000000000 -0400
2+++ elfutils-0.89/configure.ac 2004-05-01 00:16:33.000000000 -0400
3@@ -28,6 +28,10 @@
4
5 ALL_LINGUAS=
6
7+if test X"$CFLAGS" = X; then
8+ CFLAGS="-Wall -Werror -g -O2"
9+fi
10+
11 AC_PROG_CC
12 AC_PROG_CPP
13 AC_PROG_GCC_TRADITIONAL
14--- elfutils-0.89/./lib/Makefile.am~warnings.patch 2003-09-22 18:57:58.000000000 -0400
15+++ elfutils-0.89/./lib/Makefile.am 2004-05-01 00:12:43.000000000 -0400
16@@ -14,7 +14,7 @@
17 ## 3001 King Ranch Road, Ukiah, CA 95482.
18 ##
19 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
20-AM_CFLAGS = -Wall -Werror -fpic
21+AM_CFLAGS = -fpic
22 INCLUDES = -I$(srcdir)/../libelf -I..
23
24 noinst_LIBRARIES = libeu.a
25--- elfutils-0.89/./libelf/Makefile.am~warnings.patch 2003-08-12 02:45:24.000000000 -0400
26+++ elfutils-0.89/./libelf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
27@@ -14,7 +14,6 @@
28 ## 3001 King Ranch Road, Ukiah, CA 95482.
29 ##
30 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
31-AM_CFLAGS = -Wall -Werror
32 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
33 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
34 VERSION = 1
35--- elfutils-0.89/./libebl/Makefile.am~warnings.patch 2003-09-22 18:53:17.000000000 -0400
36+++ elfutils-0.89/./libebl/Makefile.am 2004-05-01 00:12:43.000000000 -0400
37@@ -14,7 +14,7 @@
38 ## 3001 King Ranch Road, Ukiah, CA 95482.
39 ##
40 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall
41-AM_CFLAGS = -Wall -Werror -DOBJDIR=\"$(shell pwd)\" -fpic
42+AM_CFLAGS = -DOBJDIR=\"$(shell pwd)\" -fpic
43 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
44 VERSION = 1
45 PACKAGE_VERSION = @PACKAGE_VERSION@
46--- elfutils-0.89/./libdwarf/Makefile.am~warnings.patch 2003-08-12 02:46:05.000000000 -0400
47+++ elfutils-0.89/./libdwarf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
48@@ -14,7 +14,6 @@
49 ## 3001 King Ranch Road, Ukiah, CA 95482.
50 ##
51 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DDWARF_DEBUG
52-AM_CFLAGS = -Wall -Werror
53 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
54 VERSION = 1
55
56--- elfutils-0.89/./libdw/Makefile.am~warnings.patch 2003-08-12 02:46:18.000000000 -0400
57+++ elfutils-0.89/./libdw/Makefile.am 2004-05-01 00:12:43.000000000 -0400
58@@ -17,7 +17,6 @@
59 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
60 ##
61 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
62-AM_CFLAGS = -Wall -Werror -Wshadow
63 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
64 VERSION = 1
65
66--- elfutils-0.89/./libasm/Makefile.am~warnings.patch 2003-08-13 05:21:25.000000000 -0400
67+++ elfutils-0.89/./libasm/Makefile.am 2004-05-01 00:12:43.000000000 -0400
68@@ -14,7 +14,6 @@
69 ## 3001 King Ranch Road, Ukiah, CA 95482.
70 ##
71 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
72-AM_CFLAGS = -Wall -Werror
73 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
74 -I$(top_srcdir)/lib
75 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
76--- elfutils-0.89/./src/Makefile.am~warnings.patch 2003-09-22 18:57:09.000000000 -0400
77+++ elfutils-0.89/./src/Makefile.am 2004-05-01 00:12:43.000000000 -0400
78@@ -14,8 +14,8 @@
79 ## 3001 King Ranch Road, Ukiah, CA 95482.
80 ##
81 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -Wshadow $(YYDEBUG) \
82- $(if $($(*F)_no_Werror),,-Werror) $(native_ld_cflags)
83-AM_CFLAGS = -Wall -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
84+ $(if $(filter -Werror,$(CFLAGS)),$(if $($(*F)_no_Werror),,-Werror)) $(native_ld_cflags)
85+AM_CFLAGS = -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
86 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl -I$(srcdir)/../lib -I$(srcdir)/../libdwarf -I..
87
88 YACC = @YACC@ -d
89--- elfutils-0.89/./tests/Makefile.am~warnings.patch 2003-08-13 05:19:04.000000000 -0400
90+++ elfutils-0.89/./tests/Makefile.am 2004-05-01 00:12:43.000000000 -0400
91@@ -14,7 +14,6 @@
92 ## 3001 King Ranch Road, Ukiah, CA 95482.
93 ##
94 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
95-AM_CFLAGS = -Wall -Werror
96 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdwarf:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
97 INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdwarf \
98 -I$(top_srcdir)/libdw \
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.108.bb b/meta/recipes-devtools/elfutils/elfutils_0.108.bb
new file mode 100644
index 0000000000..67f34a0acd
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.108.bb
@@ -0,0 +1,25 @@
1SECTION = "base"
2LICENSE = "OSL"
3DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
4DEPENDS = "libtool"
5PR = "r2"
6
7SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
8 file://warnings.patch;patch=1"
9
10inherit autotools
11
12# Package binaries that overlap with binutils separately
13PACKAGES =+ "${PN}-binutils"
14FILES_${PN}-binutils = "\
15 ${bindir}/addr2line \
16 ${bindir}/ld \
17 ${bindir}/nm \
18 ${bindir}/readelf \
19 ${bindir}/size \
20 ${bindir}/strip"
21# Fix library issues
22FILES_${PN} =+ "${libdir}/*-${PV}.so"
23
24# The elfutils package contains symlinks that trip up insane
25INSANE_SKIP_elfutils = "1"
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
new file mode 100644
index 0000000000..18887e4b96
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -0,0 +1,63 @@
1DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
2HOMEPAGE = "https://fedorahosted.org/elfutils"
3SECTION = "base"
4LICENSE = "GPLv2 with exceptions"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
6 file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
7DEPENDS = "libtool"
8
9PR = "r1"
10
11SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
12
13# pick the patch from debian
14# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.148-1.debian.tar.gz
15
16SRC_URI += "\
17 file://redhat-portability.diff \
18 file://redhat-robustify.diff \
19 file://hppa_backend.diff \
20 file://arm_backend.diff \
21 file://mips_backend.diff \
22 file://m68k_backend.diff \
23 file://do-autoreconf.diff \
24 file://testsuite-ignore-elflint.diff \
25 file://elf_additions.diff \
26 file://elfutils-fsize.patch \
27"
28
29# The buildsystem wants to generate 2 .h files from source using a binary it just built,
30# which can not pass the cross compiling, so let's work around it by adding 2 .h files
31# along with the do_configure_prepend()
32
33SRC_URI += "\
34 file://i386_dis.h \
35 file://x86_64_dis.h \
36"
37
38inherit autotools
39
40EXTRA_OECONF = "--program-prefix=eu-"
41
42do_configure_prepend() {
43 sed -i 's:./i386_gendis:echo\ \#:g' ${S}/libcpu/Makefile.am
44
45 cp ${WORKDIR}/*dis.h ${S}/libcpu
46}
47
48BBCLASSEXTEND = "native nativesdk"
49
50# Package utilities separately
51PACKAGES =+ "${PN}-binutils"
52FILES_${PN}-binutils = "\
53 ${bindir}/eu-addr2line \
54 ${bindir}/eu-ld \
55 ${bindir}/eu-nm \
56 ${bindir}/eu-readelf \
57 ${bindir}/eu-size \
58 ${bindir}/eu-strip"
59# Fix library issues
60FILES_${PN} =+ "${libdir}/*-${PV}.so"
61
62# The elfutils package contains symlinks that trip up insane
63INSANE_SKIP_elfutils = "1"
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.89.bb b/meta/recipes-devtools/elfutils/elfutils_0.89.bb
new file mode 100644
index 0000000000..24cb37ad1f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.89.bb
@@ -0,0 +1,10 @@
1SECTION = "base"
2LICENSE = "OSL"
3DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
4DEPENDS = "libtool"
5
6SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
7 file://warnings.patch;patch=1"
8
9inherit autotools
10
diff --git a/meta/recipes-devtools/fakechroot/fakechroot/fix-readlink.patch b/meta/recipes-devtools/fakechroot/fakechroot/fix-readlink.patch
new file mode 100644
index 0000000000..9321564922
--- /dev/null
+++ b/meta/recipes-devtools/fakechroot/fakechroot/fix-readlink.patch
@@ -0,0 +1,26 @@
1---
2 src/libfakechroot.c | 4 ++--
3 1 file changed, 2 insertions(+), 2 deletions(-)
4
5Index: fakechroot-2.9/src/libfakechroot.c
6===================================================================
7--- fakechroot-2.9.orig/src/libfakechroot.c 2009-03-31 11:20:41.000000000 +0100
8+++ fakechroot-2.9/src/libfakechroot.c 2010-03-22 17:40:17.386783375 +0000
9@@ -775,7 +775,7 @@
10 nextsym(opendir, "opendir");
11 #endif
12 nextsym(pathconf, "pathconf");
13- nextsym(readlink, "readlink");
14+ nextsym(readlink, "own_readlink");
15 nextsym(realpath, "realpath");
16 nextsym(remove, "remove");
17 #ifdef HAVE_REMOVEXATTR
18@@ -2492,7 +2492,7 @@
19
20
21 /* #include <unistd.h> */
22-READLINK_TYPE_RETURN readlink (const char *path, char *buf, READLINK_TYPE_ARG3)
23+READLINK_TYPE_RETURN own_readlink (const char *path, char *buf, READLINK_TYPE_ARG3)
24 {
25 int status;
26 char tmp[FAKECHROOT_MAXPATH], *tmpptr;
diff --git a/meta/recipes-devtools/fakechroot/fakechroot_2.9.bb b/meta/recipes-devtools/fakechroot/fakechroot_2.9.bb
new file mode 100644
index 0000000000..aea76366f7
--- /dev/null
+++ b/meta/recipes-devtools/fakechroot/fakechroot_2.9.bb
@@ -0,0 +1,13 @@
1SECTION = "base"
2DESCRIPTION = "Gives a fake root environment which can support chroot"
3LICENSE = "GPL"
4
5SRC_URI = "${DEBIAN_MIRROR}/main/f/fakechroot/fakechroot_${PV}.orig.tar.gz \
6 file://fix-readlink.patch;patch=1 \
7 ${DEBIAN_MIRROR}/main/f/fakechroot/fakechroot_2.9-1.1.diff.gz;patch=1"
8
9inherit autotools
10
11PR = "r3"
12
13BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/fakeroot/fakeroot-1.14.4/absolutepaths.patch b/meta/recipes-devtools/fakeroot/fakeroot-1.14.4/absolutepaths.patch
new file mode 100644
index 0000000000..ae18e8a28c
--- /dev/null
+++ b/meta/recipes-devtools/fakeroot/fakeroot-1.14.4/absolutepaths.patch
@@ -0,0 +1,47 @@
1Image creation runs under a fakeroot context and calls a script which refers
2to the build systems's python. This loads but can find a libpython from staging
3if these are incompatible, anything can break. These scripts should *not* be
4changing LD_LIBRARY_PATH, just adding an LD_PRELOAD with an absolute path. The
5dyanmic linker can figure out anything else with rpaths.
6
7RP - 23/1/10
8
9Index: fakeroot-1.9.4/configure.ac
10===================================================================
11--- fakeroot-1.9.4.orig/configure.ac 2010-01-23 22:34:39.000000000 +0000
12+++ fakeroot-1.9.4/configure.ac 2010-01-23 22:35:14.000000000 +0000
13@@ -414,6 +414,8 @@
14 ;;
15 esac
16
17+LDPRELOADABS=1
18+
19 AC_DEFINE_UNQUOTED([LIBCPATH], "$libcpath", [path to libc shared object])
20 AC_SUBST(DLSUFFIX)
21 AC_SUBST(LDLIBPATHVAR)
22Index: fakeroot-1.9.4/scripts/fakeroot.in
23===================================================================
24--- fakeroot-1.9.4.orig/scripts/fakeroot.in 2010-01-23 22:34:53.000000000 +0000
25+++ fakeroot-1.9.4/scripts/fakeroot.in 2010-01-23 22:37:17.000000000 +0000
26@@ -135,7 +135,7 @@
27 if [ "$WAITINTRAP" -eq 0 ]; then
28 trap "kill -s @signal@ $PID" EXIT INT
29 else
30- trap 'FAKEROOTKEY=$FAKEROOTKEY LD_LIBRARY_PATH="$PATHS" LD_PRELOAD="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
31+ trap 'FAKEROOTKEY=$FAKEROOTKEY LD_PRELOAD="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
32 fi
33
34 if test -z "$FAKEROOTKEY" || test -z "$PID"; then
35@@ -158,10 +158,10 @@
36 export FAKEROOT_FD_BASE
37
38 if test -z "$*"; then
39- FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
40+ FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
41 RESULT=$?
42 else
43- FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
44+ FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
45 RESULT=$?
46 fi
47
diff --git a/meta/recipes-devtools/fakeroot/fakeroot_1.14.4.bb b/meta/recipes-devtools/fakeroot/fakeroot_1.14.4.bb
new file mode 100644
index 0000000000..4edeccfe6d
--- /dev/null
+++ b/meta/recipes-devtools/fakeroot/fakeroot_1.14.4.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "Provides a fake \"root environment\" by means of LD_PRELOAD and SYSV IPC or TCP trickery"
2HOMEPAGE = "http://fakeroot.alioth.debian.org/"
3SECTION = "base"
4LICENSE = "GPLv2"
5# fakeroot needs getopt which is provided by the util-linux package
6RDEPENDS = "util-linux"
7RDEPENDS_virtclass-native = "util-linux-native"
8PR = "r0"
9PROVIDES += "virtual/fakeroot"
10
11SRC_URI = "${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.orig.tar.bz2 \
12 file://absolutepaths.patch"
13
14inherit autotools
15
16do_configure_prepend() {
17 # fakeroot's own bootstrap includes other autoreconf stuff we don't need here
18 # so manually create the aux directory
19 mkdir -p ${S}/build-aux
20}
21
22do_install_append() {
23 install -d ${D}${STAGING_INCDIR}/fakeroot/
24 install -m 644 *.h ${D}${STAGING_INCDIR}/fakeroot
25}
26
27# Compatability for the rare systems not using or having SYSV
28python () {
29 if bb.data.inherits_class("native", d) and bb.data.getVar('HOST_NONSYSV', d, True) and bb.data.getVar('HOST_NONSYSV', d, True) != '0':
30 bb.data.setVar('EXTRA_OECONF', ' --with-ipc=tcp ', d)
31}
32
33BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/file/file/dump b/meta/recipes-devtools/file/file/dump
new file mode 100644
index 0000000000..628ead86c6
--- /dev/null
+++ b/meta/recipes-devtools/file/file/dump
@@ -0,0 +1,81 @@
1
2#------------------------------------------------------------------------------
3# dump: file(1) magic for dump file format--for new and old dump filesystems
4#
5# We specify both byte orders in order to recognize byte-swapped dumps.
6#
724 belong 60012 new-fs dump file (big endian),
8>4 bedate x Previous dump %s,
9>8 bedate x This dump %s,
10>12 belong >0 Volume %ld,
11>692 belong 0 Level zero, type:
12>692 belong >0 Level %d, type:
13>0 belong 1 tape header,
14>0 belong 2 beginning of file record,
15>0 belong 3 map of inodes on tape,
16>0 belong 4 continuation of file record,
17>0 belong 5 end of volume,
18>0 belong 6 map of inodes deleted,
19>0 belong 7 end of medium (for floppy),
20>676 string >\0 Label %s,
21>696 string >\0 Filesystem %s,
22>760 string >\0 Device %s,
23>824 string >\0 Host %s,
24>888 belong >0 Flags %x
25
2624 belong 60011 old-fs dump file (big endian),
27#>4 bedate x Previous dump %s,
28#>8 bedate x This dump %s,
29>12 belong >0 Volume %ld,
30>692 belong 0 Level zero, type:
31>692 belong >0 Level %d, type:
32>0 belong 1 tape header,
33>0 belong 2 beginning of file record,
34>0 belong 3 map of inodes on tape,
35>0 belong 4 continuation of file record,
36>0 belong 5 end of volume,
37>0 belong 6 map of inodes deleted,
38>0 belong 7 end of medium (for floppy),
39>676 string >\0 Label %s,
40>696 string >\0 Filesystem %s,
41>760 string >\0 Device %s,
42>824 string >\0 Host %s,
43>888 belong >0 Flags %x
44
4524 lelong 60012 new-fs dump file (little endian),
46>4 ledate x This dump %s,
47>8 ledate x Previous dump %s,
48>12 lelong >0 Volume %ld,
49>692 lelong 0 Level zero, type:
50>692 lelong >0 Level %d, type:
51>0 lelong 1 tape header,
52>0 lelong 2 beginning of file record,
53>0 lelong 3 map of inodes on tape,
54>0 lelong 4 continuation of file record,
55>0 lelong 5 end of volume,
56>0 lelong 6 map of inodes deleted,
57>0 lelong 7 end of medium (for floppy),
58>676 string >\0 Label %s,
59>696 string >\0 Filesystem %s,
60>760 string >\0 Device %s,
61>824 string >\0 Host %s,
62>888 lelong >0 Flags %x
63
6424 lelong 60011 old-fs dump file (little endian),
65#>4 ledate x Previous dump %s,
66#>8 ledate x This dump %s,
67>12 lelong >0 Volume %ld,
68>692 lelong 0 Level zero, type:
69>692 lelong >0 Level %d, type:
70>0 lelong 1 tape header,
71>0 lelong 2 beginning of file record,
72>0 lelong 3 map of inodes on tape,
73>0 lelong 4 continuation of file record,
74>0 lelong 5 end of volume,
75>0 lelong 6 map of inodes deleted,
76>0 lelong 7 end of medium (for floppy),
77>676 string >\0 Label %s,
78>696 string >\0 Filesystem %s,
79>760 string >\0 Device %s,
80>824 string >\0 Host %s,
81>888 lelong >0 Flags %x
diff --git a/meta/recipes-devtools/file/file/filesystems b/meta/recipes-devtools/file/file/filesystems
new file mode 100644
index 0000000000..fd5073334c
--- /dev/null
+++ b/meta/recipes-devtools/file/file/filesystems
@@ -0,0 +1,812 @@
1
2#------------------------------------------------------------------------------
3# filesystems: file(1) magic for different filesystems
4#
50 string \366\366\366\366 PC formatted floppy with no filesystem
6# Sun disk labels
7# From /usr/include/sun/dklabel.h:
80774 beshort 0xdabe Sun disk label
9>0 string x '%s
10>>31 string >\0 \b%s
11>>>63 string >\0 \b%s
12>>>>95 string >\0 \b%s
13>0 string x \b'
14>0734 short >0 %d rpm,
15>0736 short >0 %d phys cys,
16>0740 short >0 %d alts/cyl,
17>0746 short >0 %d interleave,
18>0750 short >0 %d data cyls,
19>0752 short >0 %d alt cyls,
20>0754 short >0 %d heads/partition,
21>0756 short >0 %d sectors/track,
22>0764 long >0 start cyl %ld,
23>0770 long x %ld blocks
24# Is there a boot block written 1 sector in?
25>512 belong&077777777 0600407 \b, boot block present
26# Smart Boot Manager backup file is 41 byte header + first sectors of disc
27# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
280 string SBMBAKUP_ Smart Boot Manager backup file
29>9 string x \b, version %-5.5s
30>>14 string =_
31>>>15 string x %-.1s
32>>>>16 string =_ \b.
33>>>>>17 string x \b%-.1s
34>>>>>>18 string =_ \b.
35>>>>>>>19 string x \b%-.1s
36# DOS Emulator image is 128 byte header + harddisc image
370 string DOSEMU\0
38>0x27E leshort 0xAA55 DOS Emulator image
390x1FE leshort 0xAA55 x86 boot sector
40>2 string OSBS \b, OS/BS MBR
41# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
42>0x8C string Invalid\ partition\ table \b, MS-DOS MBR
43# dr-dos with some upper-, lowercase variants
44>0x9D string Invalid\ partition\ table$
45>>181 string No\ Operating\ System$
46>>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
47>0x9D string Invalid\ partition\ table$
48>>181 string No\ operating\ system$
49>>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
50>342 string Invalid\ partition\ table$
51>>366 string No\ operating\ system$
52>>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
53>295 string NEWLDR\0
54>>302 string Bad\ PT\ $
55>>>310 string No\ OS\ $
56>>>>317 string OS\ load\ err$
57>>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
58>>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
59>>>>>>>387 string Copyright\ (c)\ 1984,1998
60>>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
61>0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
62>>0x1B8 ubelong >0 \b, Serial 0x%-.4x
63>0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
64>271 string Invalid\ partition\ table\0
65>>295 string Error\ loading\ operating\ system\0
66>>>326 string Missing\ operating\ system\0 \b, mbr
67#
68>139 string Invalid\ partition\ table\0
69>>163 string Error\ loading\ operating\ system\0
70>>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
71# http://www.heise.de/ct/05/09/006/ page 184
72#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
73>>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
74>300 string Invalid\ partition\ table\0
75>>324 string Error\ loading\ operating\ system\0
76>>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
77#??>>>389 string Invalid\ system\ disk
78>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
79>300 string Ung\201ltige\ Partitionstabelle
80#split string to avoid error: String too long
81>>328 string Fehler\ beim\ Laden\
82>>>346 string des\ Betriebssystems
83>>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
84>>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
85>0x145 string Default:\ F \b, FREE-DOS MBR
86>64 string no\ active\ partition\ found
87>>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
88>271 string Operating\ system\ loading
89>>296 string error\r \b, SYSLINUX MBR (2.10)
90# bootloader, bootmanager
91>43 string SMART\ BTMGRFAT12\ \ \
92>>430 string SBMK\ Bad!\r
93>>>3 string SBM \b, Smart Boot Manager
94>>>>6 string >\0 \b, version %s
95>382 string XOSLLOADXCF \b, eXtended Operating System Loader
96>6 string LILO \b, LInux i386 boot LOader
97>>120 string LILO \b, version 22.3.4 SuSe
98>>172 string LILO \b, version 22.5.8 Debian
99>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
100>>394 string stage1 \b, GRand Unified Bootloader (0.5.95)
101>343 string Geom\0Read\0\ Error\0
102>>321 string Loading\ stage1.5 \b, Grand Unified Bootloader
103>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
104>>374 string GRUB\ \0 \b, GRand Unified Bootloader
105>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
106>>376 string GRUB\ \0 \b, GRand Unified Bootloader (0.93)
107>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
108>>377 string GRUB\ \0 \b, GRand Unified Bootloader (0.94)
109>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
110>>379 string GRUB\ \0 \b, GRand Unified Bootloader (0.95)
111>480 string Boot\ failed\r
112>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06)
113>395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
114>185 string FDBOOT\ Version\
115>>204 string \rNo\ Systemdisk.\
116>>>220 string Booting\ from\ harddisk.\n\r
117>>>245 string Cannot\ load\ from\ harddisk.\n\r
118>>>>273 string Insert\ Systemdisk\
119>>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
120>>>>>>200 string >\0 \b, version %-3s
121>242 string Bootsector\ from\ C.H.\ Hochst\204
122>>278 string No\ Systemdisk.\
123>>>293 string Booting\ from\ harddisk.\n\r
124>>>441 string Cannot\ load\ from\ harddisk.\n\r
125>>>>469 string Insert\ Systemdisk\
126>>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
127>>>>>>209 string >\0 \b, version %-4.4s
128>(1.b+2) ubyte 0xe
129>>(1.b+3) ubyte 0x1f
130>>>(1.b+4) ubyte 0xbe
131>>>>(1.b+5) ubyte 0x77
132>>>>(1.b+6) ubyte 0x7c
133>>>>>(1.b+7) ubyte 0xac
134>>>>>>(1.b+8) ubyte 0x22
135>>>>>>>(1.b+9) ubyte 0xc0
136>>>>>>>>(1.b+10) ubyte 0x74
137>>>>>>>>>(1.b+11) ubyte 0xb
138>>>>>>>>>>(1.b+12) ubyte 0x56
139>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
140#
141>66 string Solaris\ Boot\ Sector
142>>99 string Incomplete\ MDBoot\ load.
143>>>89 string Version \b, Sun Solaris Bootloader
144>>>>97 byte x version %c
145#
146>408 string OS/2\ !!\ SYS01475\r\0
147>>429 string OS/2\ !!\ SYS02025\r\0
148>>>450 string OS/2\ !!\ SYS02027\r\0
149>>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
150#
151>409 string OS/2\ !!\ SYS01475\r\0
152>>430 string OS/2\ !!\ SYS02025\r\0
153>>>451 string OS/2\ !!\ SYS02027\r\0
154>>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
155>112 string This\ disk\ is\ not\ bootable\r
156>>142 string If\ you\ wish\ to\ make\ it\ bootable
157>>>176 string run\ the\ DOS\ program\ SYS\
158>>>200 string after\ the\r
159>>>>216 string system\ has\ been\ loaded\r\n
160>>>>>242 string Please\ insert\ a\ DOS\ diskette\
161>>>>>271 string into\r\n\ the\ drive\ and\
162>>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
163# XP
164>430 string NTLDR\ is\ missing\xFF\r\n
165>>449 string Disk\ error\xFF\r\n
166>>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
167# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
168>>>>417 ubyte&0xDF >0
169>>>>>417 string x %-.5s
170>>>>>>422 ubyte&0xDF >0
171>>>>>>>422 string x \b%-.3s
172>>>>>425 ubyte&0xDF >0
173>>>>>>425 string >\ \b.%-.3s
174#
175>>>>371 ubyte >0x20
176>>>>>368 ubyte&0xDF >0
177>>>>>>368 string x %-.5s
178>>>>>>>373 ubyte&0xDF >0
179>>>>>>>>373 string x \b%-.3s
180>>>>>>376 ubyte&0xDF >0
181>>>>>>>376 string x \b.%-.3s
182#
183>430 string NTLDR\ nicht\ gefunden\xFF\r\n
184>>453 string Datentr\204gerfehler\xFF\r\n
185>>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
186>>>>417 ubyte&0xDF >0
187>>>>>417 string x %-.5s
188>>>>>>422 ubyte&0xDF >0
189>>>>>>>422 string x \b%-.3s
190>>>>>425 ubyte&0xDF >0
191>>>>>>425 string >\ \b.%-.3s
192#
193>>>>368 ubyte&0xDF >0
194>>>>>368 string x %-.5s
195>>>>>>373 ubyte&0xDF >0
196>>>>>>>373 string x \b%-.3s
197>>>>>376 ubyte&0xDF >0
198>>>>>>376 string x \b.%-.3s
199#
200>430 string NTLDR\ fehlt\xFF\r\n
201>>444 string Datentr\204gerfehler\xFF\r\n
202>>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
203>>>>417 ubyte&0xDF >0
204>>>>>417 string x %-.5s
205>>>>>>422 ubyte&0xDF >0
206>>>>>>>422 string x \b%-.3s
207>>>>>425 ubyte&0xDF >0
208>>>>>>425 string >\ \b.%-.3s
209# variant
210>>>>371 ubyte >0x20
211>>>>>368 ubyte&0xDF >0
212>>>>>>368 string x %-.5s
213>>>>>>>373 ubyte&0xDF >0
214>>>>>>>>373 string x \b%-.3s
215>>>>>>376 ubyte&0xDF >0
216>>>>>>>376 string x \b.%-.3s
217#
218>430 string NTLDR\ fehlt\xFF\r\n
219>>444 string Medienfehler\xFF\r\n
220>>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
221>>>>371 ubyte >0x20
222>>>>>368 ubyte&0xDF >0
223>>>>>>368 string x %-.5s
224>>>>>>>373 ubyte&0xDF >0
225>>>>>>>>373 string x \b%-.3s
226>>>>>>376 ubyte&0xDF >0
227>>>>>>>376 string x \b.%-.3s
228# variant
229>>>>417 ubyte&0xDF >0
230>>>>>417 string x %-.5s
231>>>>>>422 ubyte&0xDF >0
232>>>>>>>422 string x \b%-.3s
233>>>>>425 ubyte&0xDF >0
234>>>>>>425 string >\ \b.%-.3s
235#
236>430 string Datentr\204ger\ entfernen\xFF\r\n
237>>454 string Medienfehler\xFF\r\n
238>>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
239>>>>368 ubyte&0xDF >0
240>>>>>368 string x %-.5s
241>>>>>>373 ubyte&0xDF >0
242>>>>>>>373 string x \b%-.3s
243>>>>>376 ubyte&0xDF >0
244>>>>>>376 string x \b.%-.3s
245#>3 string NTFS\ \ \ \
246>389 string Fehler\ beim\ Lesen\
247>>407 string des\ Datentr\204gers
248>>>426 string NTLDR\ fehlt
249>>>>440 string NTLDR\ ist\ komprimiert
250>>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
251#>3 string NTFS\ \ \ \
252>313 string A\ disk\ read\ error\ occurred.\r
253>>345 string A\ kernel\ file\ is\ missing\
254>>>370 string from\ the\ disk.\r
255>>>>484 string NTLDR\ is\ compressed
256>>>>>429 string Insert\ a\ system\ diskette\
257>>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
258# DOS loader variants different languages,offsets
259>472 ubyte&0xDF >0
260>>389 string Invalid\ system\ disk\xFF\r\n
261>>>411 string Disk\ I/O\ error
262>>>>428 string Replace\ the\ disk,\ and\
263>>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
264#IO.SYS
265>>>>>>472 ubyte&0xDF >0
266>>>>>>>472 string x \b %-.2s
267>>>>>>>>474 ubyte&0xDF >0
268>>>>>>>>>474 string x \b%-.5s
269>>>>>>>>>>479 ubyte&0xDF >0
270>>>>>>>>>>>479 string x \b%-.1s
271>>>>>>>480 ubyte&0xDF >0
272>>>>>>>>480 string x \b.%-.3s
273#MSDOS.SYS
274>>>>>>>483 ubyte&0xDF >0 \b+
275>>>>>>>>483 string x \b%-.5s
276>>>>>>>>>488 ubyte&0xDF >0
277>>>>>>>>>>488 string x \b%-.3s
278>>>>>>>>491 ubyte&0xDF >0
279>>>>>>>>>491 string x \b.%-.3s
280#
281>>390 string Invalid\ system\ disk\xFF\r\n
282>>>412 string Disk\ I/O\ error\xFF\r\n
283>>>>429 string Replace\ the\ disk,\ and\
284>>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
285>>388 string Ungueltiges\ System\ \xFF\r\n
286>>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
287>>>>427 string Datentraeger\ wechseln\ und\
288>>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
289#WINBOOT.SYS only not spaces (0xDF)
290>>>>>>497 ubyte&0xDF >0
291>>>>>>>497 string x %-.5s
292>>>>>>>>502 ubyte&0xDF >0
293>>>>>>>>>502 string x \b%-.1s
294>>>>>>>>>>503 ubyte&0xDF >0
295>>>>>>>>>>>503 string x \b%-.1s
296>>>>>>>>>>>>504 ubyte&0xDF >0
297>>>>>>>>>>>>>504 string x \b%-.1s
298>>>>>>505 ubyte&0xDF >0
299>>>>>>>505 string x \b.%-.3s
300#IO.SYS
301>>>>>>472 ubyte&0xDF >0 or
302>>>>>>>472 string x \b %-.2s
303>>>>>>>>474 ubyte&0xDF >0
304>>>>>>>>>474 string x \b%-.5s
305>>>>>>>>>>479 ubyte&0xDF >0
306>>>>>>>>>>>479 string x \b%-.1s
307>>>>>>>480 ubyte&0xDF >0
308>>>>>>>>480 string x \b.%-.3s
309#MSDOS.SYS
310>>>>>>>483 ubyte&0xDF >0 \b+
311>>>>>>>>483 string x \b%-.5s
312>>>>>>>>>488 ubyte&0xDF >0
313>>>>>>>>>>488 string x \b%-.3s
314>>>>>>>>491 ubyte&0xDF >0
315>>>>>>>>>491 string x \b.%-.3s
316#
317>>390 string Ungueltiges\ System\ \xFF\r\n
318>>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
319>>>>429 string Datentraeger\ wechseln\ und\
320>>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
321#WINBOOT.SYS only not spaces (0xDF)
322>>>>>>497 ubyte&0xDF >0
323>>>>>>>497 string x %-.7s
324>>>>>>>>504 ubyte&0xDF >0
325>>>>>>>>>504 string x \b%-.1s
326>>>>>>505 ubyte&0xDF >0
327>>>>>>>505 string x \b.%-.3s
328#IO.SYS
329>>>>>>472 ubyte&0xDF >0 or
330>>>>>>>472 string x \b %-.2s
331>>>>>>>>474 ubyte&0xDF >0
332>>>>>>>>>474 string x \b%-.6s
333>>>>>>>480 ubyte&0xDF >0
334>>>>>>>>480 string x \b.%-.3s
335#MSDOS.SYS
336>>>>>>>483 ubyte&0xDF >0 \b+
337>>>>>>>>483 string x \b%-.5s
338>>>>>>>>>488 ubyte&0xDF >0
339>>>>>>>>>>488 string x \b%-.3s
340>>>>>>>>491 ubyte&0xDF >0
341>>>>>>>>>491 string x \b.%-.3s
342#
343>>389 string Ungueltiges\ System\ \xFF\r\n
344>>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
345>>>>428 string Datentraeger\ wechseln\ und\
346>>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
347# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
348>>>>>>472 string x %-.2s
349>>>>>>>474 ubyte&0xDF >0
350>>>>>>>>474 string x \b%-.5s
351>>>>>>>>479 ubyte&0xDF >0
352>>>>>>>>>479 string x \b%-.1s
353>>>>>>480 ubyte&0xDF >0
354>>>>>>>480 string x \b.%-.3s
355>>>>>>483 ubyte&0xDF >0 \b+
356>>>>>>>483 string x \b%-.5s
357>>>>>>>488 ubyte&0xDF >0
358>>>>>>>>488 string x \b%-.2s
359>>>>>>>>490 ubyte&0xDF >0
360>>>>>>>>>490 string x \b%-.1s
361>>>>>>>491 ubyte&0xDF >0
362>>>>>>>>491 string x \b.%-.3s
363>479 ubyte&0xDF >0
364>>416 string Kein\ System\ oder\
365>>>433 string Laufwerksfehler
366>>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
367#IO.SYS
368>>>>>479 string x \b %-.2s
369>>>>>>481 ubyte&0xDF >0
370>>>>>>>481 string x \b%-.6s
371>>>>>487 ubyte&0xDF >0
372>>>>>>487 string x \b.%-.3s
373#MSDOS.SYS
374>>>>>>490 ubyte&0xDF >0 \b+
375>>>>>>>490 string x \b%-.5s
376>>>>>>>>495 ubyte&0xDF >0
377>>>>>>>>>495 string x \b%-.3s
378>>>>>>>498 ubyte&0xDF >0
379>>>>>>>>498 string x \b.%-.3s
380#
381>486 ubyte&0xDF >0
382>>416 string Non-System\ disk\ or\
383>>>435 string disk\ error\r
384>>>>447 string Replace\ and\ press\ any\ key\
385>>>>>473 string when\ ready\r \b, Microsoft DOS Bootloader
386>480 ubyte&0xDF >0
387>>393 string Non-System\ disk\ or\
388>>>412 string disk\ error\r
389>>>>424 string Replace\ and\ press\ any\ key\
390>>>>>450 string when\ ready\r \b, Microsoft DOS bootloader
391#IO.SYS
392>>>>>480 string x \b %-.2s
393>>>>>>482 ubyte&0xDF >0
394>>>>>>>48 string x \b%-.6s
395>>>>>488 ubyte&0xDF >0
396>>>>>>488 string x \b.%-.3s
397#MSDOS.SYS
398>>>>>>491 ubyte&0xDF >0 \b+
399>>>>>>>491 string x \b%-.5s
400>>>>>>>>496 ubyte&0xDF >0
401>>>>>>>>>496 string x \b%-.3s
402>>>>>>>499 ubyte&0xDF >0
403>>>>>>>>499 string x \b.%-.3s
404#>43 string \224R-LOADER\ \ SYS =label
405>54 string SYS
406>>324 string VASKK
407>>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
408#
409>70 string IBMBIO\ \ COM
410>>472 string Cannot\ load\ DOS!\
411>>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
412>>471 string Cannot\ load\ DOS\
413>>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
414>444 string KERNEL\ \ SYS
415>>314 string BOOT\ error! \b, FREE-DOS Bootloader
416>499 string KERNEL\ \ SYS
417>>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
418>449 string KERNEL\ \ SYS
419>>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
420>125 string Loading\ FreeDOS...\r
421>>311 string BOOT\ error!\r \b, FREE-DOS bootloader
422>>>441 ubyte&0xDF >0
423>>>>441 string x \b %-.6s
424>>>>>447 ubyte&0xDF >0
425>>>>>>447 string x \b%-.1s
426>>>>>>>448 ubyte&0xDF >0
427>>>>>>>>448 string x \b%-.1s
428>>>>449 ubyte&0xDF >0
429>>>>>449 string x \b.%-.3s
430>124 string FreeDOS\0
431>>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
432# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
433>>>497 ubyte&0xDF >0
434>>>>497 string x \b %-.6s
435>>>>>503 ubyte&0xDF >0
436>>>>>>503 string x \b%-.1s
437>>>>>>>504 ubyte&0xDF >0
438>>>>>>>>504 string x \b%-.1s
439>>>>505 ubyte&0xDF >0
440>>>>>505 string x \b.%-.3s
441>>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
442>>>497 ubyte&0xDF >0
443>>>>497 string x \b %-.6s
444>>>>>503 ubyte&0xDF >0
445>>>>>>503 string x \b%-.1s
446>>>>>>>504 ubyte&0xDF >0
447>>>>>>>>504 string x \b%-.1s
448>>>>505 ubyte&0xDF >0
449>>>>>505 string x \b.%-.3s
450>>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
451>>>497 ubyte&0xDF >0
452>>>>497 string x \b %-.6s
453>>>>>503 ubyte&0xDF >0
454>>>>>>503 string x \b%-.1s
455>>>>>>>504 ubyte&0xDF >0
456>>>>>>>>504 string x \b%-.1s
457>>>>505 ubyte&0xDF >0
458>>>>>505 string x \b.%-.3s
459>336 string Error!\
460>>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
461>>>497 ubyte&0xDF >0
462>>>>497 string x \b %-.6s
463>>>>>503 ubyte&0xDF >0
464>>>>>>503 string x \b%-.1s
465>>>>>>>504 ubyte&0xDF >0
466>>>>>>>>504 string x \b%-.1s
467>>>>505 ubyte&0xDF >0
468>>>>>505 string x \b.%-.3s
469# loader end
470>0 string \0\0\0\0 \b, extended partition table
471# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
472# older drives may use E9 xx xx
473>0 lelong&0x009000EB 0x009000EB
474>0 lelong&0x000000E9 0x000000E9
475>>1 ubyte >37 \b, code offset 0x%x
476# mtools-3.9.8/msdos.h
477# usual values are marked with comments to get only informations of strange FAT systems
478# valid sectorsize are from 32 to 2048
479>>>11 uleshort <2049
480>>>>11 uleshort >31
481>>>>>3 string >\0 \b, OEM-ID "%8.8s"
482>>>>>11 uleshort >512 \b, Bytes/sector %u
483#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
484>>>>>11 uleshort <512 \b, Bytes/sector %u
485>>>>>13 ubyte >1 \b, sectors/cluster %u
486#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
487>>>>>14 uleshort >32 \b, reserved sectors %u
488#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
489#>>>>>14 uleshort >1 \b, reserved sectors %u
490#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
491>>>>>14 uleshort <1 \b, reserved sectors %u
492>>>>>16 ubyte >2 \b, FATs %u
493#>>>>>16 ubyte =2 \b, FATs %u (usual)
494>>>>>16 ubyte =1 \b, FAT %u
495>>>>>16 ubyte >0
496>>>>>17 uleshort >0 \b, root entries %u
497#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
498>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
499#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
500>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
501#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
502>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
503>>>>>22 uleshort >0 \b, sectors/FAT %u
504#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
505>>>>>26 ubyte >2 \b, heads %u
506#>>>>>26 ubyte =2 \b, heads %u (usual floppy)
507>>>>>26 ubyte =1 \b, heads %u
508>>>>>28 ulelong >0 \b, hidden sectors %u
509#>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
510>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
511#>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
512# FAT<32 specific
513# NOT le FAT3=NOT 3TAF=0xCCABBEB9
514>>>>>82 ulelong&0xCCABBEB9 >0
515>>>>>>36 ubyte >0x80 \b, physical drive 0x%x
516#>>>>>>36 ubyte =0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
517>>>>>>36 ubyte&0x7F >0 \b, physical drive 0x%x
518#>>>>>>36 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
519>>>>>>37 ubyte >0 \b, reserved 0x%x
520#>>>>>>37 ubyte =0 \b, reserved 0x%x
521>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
522>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
523>>>>>>38 ubyte =0x29
524>>>>>>>39 ulelong x \b, serial number 0x%x
525>>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
526>>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
527>>>>>>>43 string =NO\ NAME \b, unlabeled
528>>>>>>54 string FAT \b, FAT
529>>>>>>>54 string FAT12 \b (12 bit)
530>>>>>>>54 string FAT16 \b (16 bit)
531# FAT32 specific
532>>>>>82 string FAT32 \b, FAT (32 bit)
533>>>>>>36 ulelong x \b, sectors/FAT %u
534>>>>>>40 uleshort >0 \b, extension flags %u
535#>>>>>>40 uleshort =0 \b, extension flags %u
536>>>>>>42 uleshort >0 \b, fsVersion %u
537#>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
538>>>>>>44 ulelong >2 \b, rootdir cluster %u
539#>>>>>>44 ulelong =2 \b, rootdir cluster %u
540#>>>>>>44 ulelong =1 \b, rootdir cluster %u
541>>>>>>48 uleshort >1 \b, infoSector %u
542#>>>>>>48 uleshort =1 \b, infoSector %u (usual)
543>>>>>>48 uleshort <1 \b, infoSector %u
544>>>>>>50 uleshort >6 \b, Backup boot sector %u
545#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
546>>>>>>50 uleshort <6 \b, Backup boot sector %u
547>>>>>>54 ulelong >0 \b, reserved1 0x%x
548>>>>>>58 ulelong >0 \b, reserved2 0x%x
549>>>>>>62 ulelong >0 \b, reserved3 0x%x
550# same structure as FAT1X
551>>>>>>64 ubyte >0x80 \b, physical drive 0x%x
552#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
553>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
554#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
555>>>>>>65 ubyte >0 \b, reserved 0x%x
556>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
557>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
558>>>>>>66 ubyte =0x29
559>>>>>>>67 ulelong x \b, serial number 0x%x
560>>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
561>>>>>>71 string >NO\ NAME \b, label: "%11.11s"
562>>>>>>71 string =NO\ NAME \b, unlabeled
563### FATs end
564>0x200 lelong 0x82564557 \b, BSD disklabel
565# FATX
5660 string FATX FATX filesystem data
567
568
569# Minix filesystems - Juan Cespedes <cespedes@debian.org>
5700x410 leshort 0x137f Minix filesystem
5710x410 beshort 0x137f Minix filesystem (big endian),
572>0x402 beshort !0 \b, %d zones
573>0x1e string minix \b, bootable
5740x410 leshort 0x138f Minix filesystem, 30 char names
5750x410 leshort 0x2468 Minix filesystem, version 2
5760x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
577
578# romfs filesystems - Juan Cespedes <cespedes@debian.org>
5790 string -rom1fs-\0 romfs filesystem, version 1
580>8 belong x %d bytes,
581>16 string x named %s.
582
583# netboot image - Juan Cespedes <cespedes@debian.org>
5840 lelong 0x1b031336L Netboot image,
585>4 lelong&0xFFFFFF00 0
586>>4 lelong&0x100 0x000 mode 2
587>>4 lelong&0x100 0x100 mode 3
588>4 lelong&0xFFFFFF00 !0 unknown mode
589
5900x18b string OS/2 OS/2 Boot Manager
591
5929564 lelong 0x00011954 Unix Fast File system (little-endian),
593>8404 string x last mounted on %s,
594#>9504 ledate x last checked at %s,
595>8224 ledate x last written at %s,
596>8401 byte x clean flag %d,
597>8228 lelong x number of blocks %d,
598>8232 lelong x number of data blocks %d,
599>8236 lelong x number of cylinder groups %d,
600>8240 lelong x block size %d,
601>8244 lelong x fragment size %d,
602>8252 lelong x minimum percentage of free blocks %d,
603>8256 lelong x rotational delay %dms,
604>8260 lelong x disk rotational speed %drps,
605>8320 lelong 0 TIME optimization
606>8320 lelong 1 SPACE optimization
607
6089564 belong 0x00011954 Unix Fast File system (big-endian),
609>7168 long 0x4c41424c Apple UFS Volume
610>>7186 string x named %s,
611>>7176 belong x volume label version %d,
612>>7180 bedate x created on %s,
613>8404 string x last mounted on %s,
614#>9504 bedate x last checked at %s,
615>8224 bedate x last written at %s,
616>8401 byte x clean flag %d,
617>8228 belong x number of blocks %d,
618>8232 belong x number of data blocks %d,
619>8236 belong x number of cylinder groups %d,
620>8240 belong x block size %d,
621>8244 belong x fragment size %d,
622>8252 belong x minimum percentage of free blocks %d,
623>8256 belong x rotational delay %dms,
624>8260 belong x disk rotational speed %drps,
625>8320 belong 0 TIME optimization
626>8320 belong 1 SPACE optimization
627
628# ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
6290x438 leshort 0xEF53 Linux
630>0x44c lelong x rev %d
631>0x43e leshort x \b.%d
632>0x45c lelong ^0x0000004 ext2 filesystem data
633>>0x43a leshort ^0x0000001 (mounted or unclean)
634>0x45c lelong &0x0000004 ext3 filesystem data
635>>0x460 lelong &0x0000004 (needs journal recovery)
636>0x43a leshort &0x0000002 (errors)
637>0x460 lelong &0x0000001 (compressed)
638#>0x460 lelong &0x0000002 (filetype)
639#>0x464 lelong &0x0000001 (sparse_super)
640>0x464 lelong &0x0000002 (large files)
641
642# SGI disk labels - Nathan Scott <nathans@debian.org>
6430 belong 0x0BE5A941 SGI disk label (volume header)
644
645# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
6460 belong 0x58465342 SGI XFS filesystem data
647>0x4 belong x (blksz %d,
648>0x68 beshort x inosz %d,
649>0x64 beshort ^0x2004 v1 dirs)
650>0x64 beshort &0x2004 v2 dirs)
651
652############################################################################
653# Minix-ST kernel floppy
6540x800 belong 0x46fc2700 Atari-ST Minix kernel image
655>19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy
656>19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy
657
658############################################################################
659# Hmmm, is this a better way of detecting _standard_ floppy images ?
66019 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k
661>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
66219 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k
663>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
66419 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
665>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
666
66719 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM
668>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
66919 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs
670>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
671
67219 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k
67319 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k
674
675# Valid media descriptor bytes for MS-DOS:
676#
677# Byte Capacity Media Size and Type
678# -------------------------------------------------
679#
680# F0 2.88 MB 3.5-inch, 2-sided, 36-sector
681# F0 1.44 MB 3.5-inch, 2-sided, 18-sector
682# F9 720K 3.5-inch, 2-sided, 9-sector
683# F9 1.2 MB 5.25-inch, 2-sided, 15-sector
684# FD 360K 5.25-inch, 2-sided, 9-sector
685# FF 320K 5.25-inch, 2-sided, 8-sector
686# FC 180K 5.25-inch, 1-sided, 9-sector
687# FE 160K 5.25-inch, 1-sided, 8-sector
688# FE 250K 8-inch, 1-sided, single-density
689# FD 500K 8-inch, 2-sided, single-density
690# FE 1.2 MB 8-inch, 2-sided, double-density
691# F8 ----- Fixed disk
692#
693# FC xxxK Apricot 70x1x9 boot disk.
694#
695# Originally a bitmap:
696# xxxxxxx0 Not two sided
697# xxxxxxx1 Double sided
698# xxxxxx0x Not 8 SPT
699# xxxxxx1x 8 SPT
700# xxxxx0xx Not Removable drive
701# xxxxx1xx Removable drive
702# 11111xxx Must be one.
703#
704# But now it's rather random:
705# 111111xx Low density disk
706# 00 SS, Not 8 SPT
707# 01 DS, Not 8 SPT
708# 10 SS, 8 SPT
709# 11 DS, 8 SPT
710#
711# 11111001 Double density 3½ floppy disk, high density 5¼
712# 11110000 High density 3½ floppy disk
713# 11111000 Hard disk any format
714#
715
716# CDROM Filesystems
71732769 string CD001 ISO 9660 CD-ROM filesystem data
718# "application id" which appears to be used as a volume label
719>32808 string >\0 '%s'
720>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
72137633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
72232776 string CDROM High Sierra CD-ROM filesystem data
723
724# cramfs filesystem - russell@coker.com.au
7250 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
726>4 lelong x size %d
727>8 lelong &1 version #2
728>8 lelong &2 sorted_dirs
729>8 lelong &4 hole_support
730>32 lelong x CRC 0x%x,
731>36 lelong x edition %d,
732>40 lelong x %d blocks,
733>44 lelong x %d files
734
7350 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
736>4 belong x size %d
737>8 belong &1 version #2
738>8 belong &2 sorted_dirs
739>8 belong &4 hole_support
740>32 belong x CRC 0x%x,
741>36 belong x edition %d,
742>40 belong x %d blocks,
743>44 belong x %d files
744
745# reiserfs - russell@coker.com.au
7460x10034 string ReIsErFs ReiserFS V3.5
7470x10034 string ReIsEr2Fs ReiserFS V3.6
748>0x1002c leshort x block size %d
749>0x10032 leshort &2 (mounted or unclean)
750>0x10000 lelong x num blocks %d
751>0x10040 lelong 1 tea hash
752>0x10040 lelong 2 yura hash
753>0x10040 lelong 3 r5 hash
754
755# JFFS - russell@coker.com.au
7560 lelong 0x34383931 Linux Journalled Flash File system, little endian
7570 belong 0x34383931 Linux Journalled Flash File system, big endian
758
759# EST flat binary format (which isn't, but anyway)
760# From: Mark Brown <broonie@sirena.org.uk>
7610 string ESTFBINR EST flat binary
762
763# Aculab VoIP firmware
764# From: Mark Brown <broonie@sirena.org.uk>
7650 string VoIP\ Startup\ and Aculab VoIP firmware
766>35 string x format %s
767
768# PPCBoot image file
769# From: Mark Brown <broonie@sirena.org.uk>
7700 belong 0x27051956 PPCBoot image
771>4 string PPCBoot
772>>12 string x version %s
773
774# JFFS2 file system
7750 leshort 0x1984 Linux old jffs2 filesystem data little endian
7760 lelong 0xe0011985 Linux jffs2 filesystem data little endian
777
778# Squashfs
7790 string sqsh Squashfs filesystem, big endian,
780>28 beshort x version %d.
781>30 beshort x \b%d,
782>8 belong x %d bytes,
783>4 belong x %d inodes,
784>28 beshort <2
785>>32 beshort x blocksize: %d bytes,
786>28 beshort >1
787>>51 belong x blocksize: %d bytes,
788>39 bedate x created: %s
7890 string hsqs Squashfs filesystem, little endian,
790>28 leshort x version %d.
791>30 leshort x \b%d,
792>8 lelong x %d bytes,
793>4 lelong x %d inodes,
794>28 leshort <2
795>>32 leshort x blocksize: %d bytes,
796>28 leshort >1
797>>51 lelong x blocksize: %d bytes,
798>39 ledate x created: %s
799
800# AFS Dump Magic
801# From: Ty Sarna <tsarna@sarna.org>
8020 string \x01\xb3\xa1\x13\x22 AFS Dump
803>&0 belong x (v%d)
804>>&0 byte 0x76
805>>>&0 belong x Vol %d,
806>>>>&0 byte 0x6e
807>>>>>&0 string x %s
808>>>>>>&1 byte 0x74
809>>>>>>>&0 beshort 2
810>>>>>>>>&4 bedate x on: %s
811>>>>>>>>&0 bedate =0 full dump
812>>>>>>>>&0 bedate !0 incremental since: %s
diff --git a/meta/recipes-devtools/file/file/ge-le.patch b/meta/recipes-devtools/file/file/ge-le.patch
new file mode 100644
index 0000000000..7b7d8b60a4
--- /dev/null
+++ b/meta/recipes-devtools/file/file/ge-le.patch
@@ -0,0 +1,70 @@
1`>=' and `<=' was silently ignored in previous version,
2but causes an warning in file 5.04. Add support for these
3two operators as a feature extension, however, users should
4not rely on them.
5
68/17/2010 - created by Qing He <qing.he@intel.com>
7
8diff --git a/src/apprentice.c b/src/apprentice.c
9index 3d4c3cf..a2b86ed 100644
10--- a/src/apprentice.c
11+++ b/src/apprentice.c
12@@ -1396,11 +1396,10 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
13 m->reln = *l;
14 ++l;
15 if (*l == '=') {
16- if (ms->flags & MAGIC_CHECK) {
17- file_magwarn(ms, "%c= not supported",
18- m->reln);
19- return -1;
20- }
21+ if (m->reln == '>')
22+ m->reln = 'g';
23+ else if (m->reln == '<')
24+ m->reln = 'l';
25 ++l;
26 }
27 break;
28diff --git a/src/softmagic.c b/src/softmagic.c
29index d8a5675..1648e43 100644
30--- a/src/softmagic.c
31+++ b/src/softmagic.c
32@@ -1955,6 +1955,38 @@ magiccheck(struct magic_set *ms, struct magic *m)
33 }
34 break;
35
36+ case 'g':
37+ if (m->flag & UNSIGNED) {
38+ matched = v >= l;
39+ if ((ms->flags & MAGIC_DEBUG) != 0)
40+ (void) fprintf(stderr, "%llu >= %llu = %d\n",
41+ (unsigned long long)v,
42+ (unsigned long long)l, matched);
43+ }
44+ else {
45+ matched = (int64_t) v >= (int64_t) l;
46+ if ((ms->flags & MAGIC_DEBUG) != 0)
47+ (void) fprintf(stderr, "%lld >= %lld = %d\n",
48+ (long long)v, (long long)l, matched);
49+ }
50+ break;
51+
52+ case 'l':
53+ if (m->flag & UNSIGNED) {
54+ matched = v <= l;
55+ if ((ms->flags & MAGIC_DEBUG) != 0)
56+ (void) fprintf(stderr, "%llu <= %llu = %d\n",
57+ (unsigned long long)v,
58+ (unsigned long long)l, matched);
59+ }
60+ else {
61+ matched = (int64_t) v <= (int64_t) l;
62+ if ((ms->flags & MAGIC_DEBUG) != 0)
63+ (void) fprintf(stderr, "%lld <= %lld = %d\n",
64+ (long long)v, (long long)l, matched);
65+ }
66+ break;
67+
68 case '&':
69 matched = (v & l) == l;
70 if ((ms->flags & MAGIC_DEBUG) != 0)
diff --git a/meta/recipes-devtools/file/file/stringb-compat.patch b/meta/recipes-devtools/file/file/stringb-compat.patch
new file mode 100644
index 0000000000..055e43e30a
--- /dev/null
+++ b/meta/recipes-devtools/file/file/stringb-compat.patch
@@ -0,0 +1,29 @@
1`B' in file 4.x has the same meaning with `W' in file 5,
2let `B' be an alias of `W'.
3
48/17/2010 - created by Qing He <qing.he@intel.com>
5
6diff --git a/src/apprentice.c b/src/apprentice.c
7index 58826c3..3d4c3cf 100644
8--- a/src/apprentice.c
9+++ b/src/apprentice.c
10@@ -1340,6 +1340,7 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
11 "zero range");
12 l = t - 1;
13 break;
14+ case CHAR_COMPACT_BLANK:
15 case CHAR_COMPACT_WHITESPACE:
16 m->str_flags |= STRING_COMPACT_WHITESPACE;
17 break;
18diff --git a/src/file.h b/src/file.h
19index c07f2d4..42cf416 100644
20--- a/src/file.h
21+++ b/src/file.h
22@@ -282,6 +282,7 @@ struct magic {
23 #define STRING_TEXTTEST BIT(5)
24 #define STRING_BINTEST BIT(6)
25 #define CHAR_COMPACT_WHITESPACE 'W'
26+#define CHAR_COMPACT_BLANK 'B'
27 #define CHAR_COMPACT_OPTIONAL_WHITESPACE 'w'
28 #define CHAR_IGNORE_LOWERCASE 'c'
29 #define CHAR_IGNORE_UPPERCASE 'C'
diff --git a/meta/recipes-devtools/file/file_5.04.bb b/meta/recipes-devtools/file/file_5.04.bb
new file mode 100644
index 0000000000..afc08162d4
--- /dev/null
+++ b/meta/recipes-devtools/file/file_5.04.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "File attempts to classify files depending \
2on their contents and prints a description if a match is found."
3HOMEPAGE = "http://www.darwinsys.com/file/"
4SECTION = "console/utils"
5
6# two clause BSD
7LICENSE = "BSD"
8LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
9
10DEPENDS = "zlib file-native"
11DEPENDS_virtclass-native = "zlib-native"
12PR = "r1"
13
14SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
15 file://stringb-compat.patch \
16 file://ge-le.patch \
17 file://dump \
18 file://filesystems"
19
20inherit autotools
21
22do_configure_prepend() {
23 cp ${WORKDIR}/dump ${S}/magic/Magdir/
24 cp ${WORKDIR}/filesystems ${S}/magic/Magdir/
25}
26
27FILES_${PN} += "${datadir}/misc/*.mgc"
28
29BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
new file mode 100644
index 0000000000..da95a5e25e
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -0,0 +1,11 @@
1DESCRIPTION = "Flex is a tool for generating programs that recognize lexical patterns in text."
2HOMEPAGE = "http://sourceforge.net/projects/flex/"
3
4SECTION = "devel"
5LICENSE = "BSD"
6DEPENDS = "gettext"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 "
9
10inherit autotools
11
diff --git a/meta/recipes-devtools/flex/flex_2.5.35.bb b/meta/recipes-devtools/flex/flex_2.5.35.bb
new file mode 100644
index 0000000000..eddaa4856f
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex_2.5.35.bb
@@ -0,0 +1,4 @@
1require flex.inc
2PR = "r1"
3
4BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/gcc/files/canadian-build-modules-configure.patch b/meta/recipes-devtools/gcc/files/canadian-build-modules-configure.patch
new file mode 100644
index 0000000000..8aede105c5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/canadian-build-modules-configure.patch
@@ -0,0 +1,22 @@
1diff -urN gcc-4.2.2-orig/gcc/configure gcc-4.2.2/gcc/configure
2--- gcc-4.2.2-orig/gcc/configure 2008-08-31 23:10:56.000000000 +0200
3+++ gcc-4.2.2/gcc/configure 2008-08-31 23:03:02.000000000 +0200
4@@ -12716,6 +12716,7 @@
5 esac
6 saved_CFLAGS="${CFLAGS}"
7 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
8+ CPP="${CPP_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \
9 CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
10 --enable-languages=${enable_languages-all} \
11 --target=$target_alias --host=$build_alias --build=$build_alias
12diff -urN gcc-4.2.2-orig/gcc/configure.ac gcc-4.2.2/gcc/configure.ac
13--- gcc-4.2.2-orig/gcc/configure.ac 2008-08-31 23:10:53.000000000 +0200
14+++ gcc-4.2.2/gcc/configure.ac 2008-08-31 23:03:29.000000000 +0200
15@@ -1490,6 +1490,7 @@
16 esac
17 saved_CFLAGS="${CFLAGS}"
18 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
19+ CPP="${CPP_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \
20 ${realsrcdir}/configure \
21 --enable-languages=${enable_languages-all} \
22 --target=$target_alias --host=$build_alias --build=$build_alias
diff --git a/meta/recipes-devtools/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch b/meta/recipes-devtools/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch
new file mode 100644
index 0000000000..8a2a4c4040
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch
@@ -0,0 +1,12 @@
1Index: gcc-4.3.3/Makefile.in
2===================================================================
3--- gcc-4.3.3.orig/Makefile.in 2010-06-16 18:04:38.379008150 +0400
4+++ gcc-4.3.3/Makefile.in 2010-06-16 18:05:29.115006261 +0400
5@@ -148,6 +148,7 @@
6 # built for the build system to override those in BASE_FLAGS_TO_PASSS.
7 EXTRA_BUILD_FLAGS = \
8 CFLAGS="$(CFLAGS_FOR_BUILD)" \
9+ LIBCFLAGS="$(CFLAGS_FOR_BUILD)" \
10 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
11
12 # This is the list of directories to built for the host system.
diff --git a/meta/recipes-devtools/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch b/meta/recipes-devtools/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch
new file mode 100644
index 0000000000..b3753364f8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.3.1/Makefile.in
2===================================================================
3--- gcc-4.3.1.orig/Makefile.in 2010-07-07 13:08:44.000000000 +0200
4+++ gcc-4.3.1/Makefile.in 2010-07-07 13:11:59.246625709 +0200
5@@ -149,7 +149,7 @@
6 EXTRA_BUILD_FLAGS = \
7 CFLAGS="$(CFLAGS_FOR_BUILD)" \
8 LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
9- LIBCFLAGS=""
10+ LIBCFLAGS="$(CFLAGS_FOR_BUILD)"
11
12 # This is the list of directories to built for the host system.
13 SUBDIRS = @configdirs@
diff --git a/meta/recipes-devtools/gcc/files/gcc-posix-open-fix.patch b/meta/recipes-devtools/gcc/files/gcc-posix-open-fix.patch
new file mode 100644
index 0000000000..99f813e866
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-posix-open-fix.patch
@@ -0,0 +1,11 @@
1--- gcc-3.4.6/gcc/collect2.c 2008-10-04 18:17:17.796750393 +0400
2+++ gcc-3.4.6/gcc/collect2.new 2008-10-04 18:24:10.120748711 +0400
3@@ -1534,7 +1534,7 @@ collect_execute (const char *prog, char
4 if (redir)
5 {
6 /* Open response file. */
7- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
8+ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IWUSR);
9
10 /* Duplicate the stdout and stderr file handles
11 so they can be restored later. */
diff --git a/meta/recipes-devtools/gcc/files/gcc4-mtune-compat.patch b/meta/recipes-devtools/gcc/files/gcc4-mtune-compat.patch
new file mode 100644
index 0000000000..0da2811d37
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc4-mtune-compat.patch
@@ -0,0 +1,14 @@
1Patch for gcc3 to support gcc4-compatible (and consistent) values for -mtune= option.
2
3--- gcc-3.4.4/gcc/config/arm/arm.c.org 2007-12-15 23:58:35.000000000 +0200
4+++ gcc-3.4.4/gcc/config/arm/arm.c 2007-12-16 00:20:39.000000000 +0200
5@@ -432,7 +432,9 @@
6 {"arm10tdmi", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 },
7 {"arm1020t", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 },
8 {"arm926ejs", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
9+ {"arm926ej-s", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
10 {"arm1026ejs", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
11+ {"arm1026ej-s", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
12 {"xscale", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE },
13 {"iwmmxt", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE | FL_IWMMXT },
14 /* V6 Architecture Processors */
diff --git a/meta/recipes-devtools/gcc/files/gfortran-4.3.x.patch b/meta/recipes-devtools/gcc/files/gfortran-4.3.x.patch
new file mode 100644
index 0000000000..0c42851ce1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gfortran-4.3.x.patch
@@ -0,0 +1,40 @@
1The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
2
3This target doesn't really have a 128-bit integer type, however it does use
4TImode to represent the return value of certain special ABI defined library
5functions. This results in type_for_size(TImode) being called.
6
7Because TImode deosn't correspond to any gfortran integer kind
8gfc_type_for_size returns NULL and we segfault shortly after.
9
10The patch below fixes this by making gfc_type_for_size handle TImode in the
11same way as the C frontend.
12
13Tested on x86_64-linux and arm-linux-gnueabi.
14Applied to trunk.
15
16Paul
17
182007-05-15 Paul Brook <paul@codesourcery.com>
19
20 gcc/fortran/
21 * trans-types.c (gfc_type_for_size): Handle signed TImode.
22
23Index: gcc-4.2.1/gcc/fortran/trans-types.c
24===================================================================
25--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
26+++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
27@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
28 if (type && bits == TYPE_PRECISION (type))
29 return type;
30 }
31+
32+ /* Handle TImode as a special case because it is used by some backends
33+ (eg. ARM) even though it is not available for normal use. */
34+#if HOST_BITS_PER_WIDE_INT >= 65
35+ if (bits == TYPE_PRECISION (intTI_type_node))
36+ return intTI_type_node;
37+#endif
38 }
39 else
40 {
diff --git a/meta/recipes-devtools/gcc/files/gfortran.patch b/meta/recipes-devtools/gcc/files/gfortran.patch
new file mode 100644
index 0000000000..96905e5d7d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gfortran.patch
@@ -0,0 +1,40 @@
1The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
2
3This target doesn't really have a 128-bit integer type, however it does use
4TImode to represent the return value of certain special ABI defined library
5functions. This results in type_for_size(TImode) being called.
6
7Because TImode deosn't correspond to any gfortran integer kind
8gfc_type_for_size returns NULL and we segfault shortly after.
9
10The patch below fixes this by making gfc_type_for_size handle TImode in the
11same way as the C frontend.
12
13Tested on x86_64-linux and arm-linux-gnueabi.
14Applied to trunk.
15
16Paul
17
182007-05-15 Paul Brook <paul@codesourcery.com>
19
20 gcc/fortran/
21 * trans-types.c (gfc_type_for_size): Handle signed TImode.
22
23Index: gcc-4.2.1/gcc/fortran/trans-types.c
24===================================================================
25--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
26+++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
27@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
28 if (type && bits == TYPE_PRECISION (type))
29 return type;
30 }
31+
32+ /* Handle TImode as a special case because it is used by some backends
33+ (eg. ARM) even though it is not available for normal use. */
34+#if HOST_BITS_PER_WIDE_INT >= 64
35+ if (bits == TYPE_PRECISION (intTI_type_node))
36+ return intTI_type_node;
37+#endif
38 }
39 else
40 {
diff --git a/meta/recipes-devtools/gcc/files/pr22133-mingw-path-fixup.patch b/meta/recipes-devtools/gcc/files/pr22133-mingw-path-fixup.patch
new file mode 100644
index 0000000000..429e9ffd0c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr22133-mingw-path-fixup.patch
@@ -0,0 +1,29 @@
1diff -rupN gcc-4.2.orig/gcc/c-incpath.c gcc-4.2/gcc/c-incpath.c
2--- gcc-4.2.orig/gcc/c-incpath.c 2007-09-01 11:28:30.000000000 -0400
3+++ gcc-4.2/gcc/c-incpath.c 2008-08-17 16:56:01.000000000 -0400
4@@ -340,13 +340,18 @@ add_path (char *path, int chain, int cxx
5 cpp_dir *p;
6
7 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
8- /* Convert all backslashes to slashes. The native CRT stat()
9- function does not recognize a directory that ends in a backslash
10- (unless it is a drive root dir, such "c:\"). Forward slashes,
11- trailing or otherwise, cause no problems for stat(). */
12- char* c;
13- for (c = path; *c; c++)
14- if (*c == '\\') *c = '/';
15+ /* Remove unnecessary trailing slashes. On some versions of MS
16+ Windows, trailing _forward_ slashes cause no problems for stat().
17+ On newer versions, stat() does not recognise a directory that ends
18+ in a '\\' or '/', unless it is a drive root dir, such as "c:/",
19+ where it is obligatory. */
20+ int pathlen = strlen (path);
21+ char* end = path + pathlen - 1;
22+ /* Preserve the lead '/' or lead "c:/". */
23+ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
24+
25+ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
26+ *end = 0;
27 #endif
28
29 p = XNEW (cpp_dir);
diff --git a/meta/recipes-devtools/gcc/files/pr33281-mingw-host-fragment.patch b/meta/recipes-devtools/gcc/files/pr33281-mingw-host-fragment.patch
new file mode 100644
index 0000000000..e16fb4464a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr33281-mingw-host-fragment.patch
@@ -0,0 +1,38 @@
1---
2 config/mh-mingw | 3 +++
3 configure | 1 +
4 configure.in | 1 +
5 3 files changed, 5 insertions(+)
6
7Index: gcc-4.2.3/config/mh-mingw
8===================================================================
9--- /dev/null
10+++ gcc-4.2.3/config/mh-mingw
11@@ -0,0 +1,3 @@
12+# Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
13+# Vista (see PR33281 for details).
14+BOOT_CFLAGS += -D__USE_MINGW_ACCESS
15Index: gcc-4.2.3/configure.in
16===================================================================
17--- gcc-4.2.3.orig/configure.in
18+++ gcc-4.2.3/configure.in
19@@ -929,6 +929,7 @@ case "${host}" in
20 host_makefile_frag="config/mh-cygwin"
21 ;;
22 *-mingw32*)
23+ host_makefile_frag="config/mh-mingw"
24 ;;
25 *-interix*)
26 host_makefile_frag="config/mh-interix"
27Index: gcc-4.2.3/configure
28===================================================================
29--- gcc-4.2.3.orig/configure
30+++ gcc-4.2.3/configure
31@@ -1769,6 +1769,7 @@ case "${host}" in
32 host_makefile_frag="config/mh-cygwin"
33 ;;
34 *-mingw32*)
35+ host_makefile_frag="config/mh-mingw"
36 ;;
37 *-interix*)
38 host_makefile_frag="config/mh-interix"
diff --git a/meta/recipes-devtools/gcc/files/pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch b/meta/recipes-devtools/gcc/files/pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch
new file mode 100644
index 0000000000..faf44c27f9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch
@@ -0,0 +1,13 @@
1---
2 config/mh-mingw | 1 +
3 1 file changed, 1 insertion(+)
4
5Index: gcc-4.2.3/config/mh-mingw
6===================================================================
7--- gcc-4.2.3.orig/config/mh-mingw
8+++ gcc-4.2.3/config/mh-mingw
9@@ -1,3 +1,4 @@
10 # Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
11 # Vista (see PR33281 for details).
12 BOOT_CFLAGS += -D__USE_MINGW_ACCESS
13+CFLAGS += -D__USE_MINGW_ACCESS
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3.inc b/meta/recipes-devtools/gcc/gcc-4.3.3.inc
new file mode 100644
index 0000000000..9b600a0f1f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3.inc
@@ -0,0 +1,69 @@
1require gcc-common.inc
2LICENSE = "GPLv3"
3
4DEPENDS =+ "mpfr gmp"
5NATIVEDEPS = "mpfr-native gmp-native gettext-native"
6
7SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
8 file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
9 file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \
10 file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \
11 file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \
12 file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \
13 file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \
14 file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \
15 file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \
16 file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \
17 file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \
18 file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \
19 file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \
20 file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \
21 file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \
22 file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \
23 file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \
24 file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \
25 file://debian/pr30961.dpatch;patch=1;pnum=0 \
26 file://100-uclibc-conf.patch;patch=1 \
27 file://103-uclibc-conf-noupstream.patch;patch=1 \
28 file://200-uclibc-locale.patch;patch=1 \
29 file://203-uclibc-locale-no__x.patch;patch=1 \
30 file://204-uclibc-locale-wchar_fix.patch;patch=1 \
31 file://205-uclibc-locale-update.patch;patch=1 \
32 file://301-missing-execinfo_h.patch;patch=1 \
33 file://302-c99-snprintf.patch;patch=1 \
34 file://303-c99-complex-ugly-hack.patch;patch=1 \
35 file://304-index_macro.patch;patch=1 \
36 file://305-libmudflap-susv3-legacy.patch;patch=1 \
37 file://306-libstdc++-namespace.patch;patch=1 \
38 file://307-locale_facets.patch;patch=1 \
39 file://602-sdk-libstdc++-includes.patch;patch=1 \
40 file://740-sh-pr24836.patch;patch=1 \
41 file://800-arm-bigendian.patch;patch=1 \
42 file://904-flatten-switch-stmt-00.patch;patch=1 \
43 file://arm-nolibfloat.patch;patch=1 \
44 file://arm-softfloat.patch;patch=1 \
45 file://cache-amnesia.patch;patch=1 \
46# file://gfortran.patch;patch=1 \
47 file://gcc-4.0.2-e300c2c3.patch;patch=1 \
48# file://pr34130.patch;patch=1 \
49# file://fortran-static-linking.patch;patch=1 \
50 file://gcc-arm-frename-registers.patch;patch=1 \
51 file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \
52 file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
53 file://zecke-xgcc-cpp.patch;patch=1 \
54 file://gcc-flags-for-build.patch;patch=1 \
55 file://pr35942.patch;patch=1 \
56 file://optional_libstdc.patch;patch=1 \
57 file://sparseset_rule.patch;patch=1 \
58 file://64bithack.patch;patch=1 \
59"
60
61SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
62
63# Language Overrides
64FORTRAN = ""
65JAVA = ""
66
67EXTRA_OECONF_BASE = " --enable-cheaders=c_std --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
68EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no"
69EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/100-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/100-uclibc-conf.patch
new file mode 100644
index 0000000000..0b799607e8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/100-uclibc-conf.patch
@@ -0,0 +1,37 @@
1Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
2===================================================================
3--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
4+++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
5@@ -105,6 +105,10 @@
6 then
7 make all-gdb all-dejagnu all-ld || exit 1
8 make install-gdb install-dejagnu install-ld || exit 1
9+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
10+ then
11+ make all-gdb all-dejagnu all-ld || exit 1
12+ make install-gdb install-dejagnu install-ld || exit 1
13 elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
14 make bootstrap || exit 1
15 make install || exit 1
16Index: gcc-4.3.1/libjava/classpath/ltconfig
17===================================================================
18--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
19+++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
20@@ -603,7 +603,7 @@
21
22 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
23 case $host_os in
24-linux-gnu*) ;;
25+linux-gnu*|linux-uclibc*) ;;
26 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
27 esac
28
29@@ -1251,7 +1251,7 @@
30 ;;
31
32 # This must be Linux ELF.
33-linux-gnu*)
34+linux*)
35 version_type=linux
36 need_lib_prefix=no
37 need_version=no
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/103-uclibc-conf-noupstream.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/103-uclibc-conf-noupstream.patch
new file mode 100644
index 0000000000..09c9bbecfb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,11 @@
1--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
2+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
3@@ -1905,7 +1905,7 @@
4 ;;
5 sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
6 sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
7- sh-*-linux* | sh[346lbe]*-*-linux* | \
8+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
9 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
10 sh64-*-netbsd* | sh64l*-*-netbsd*)
11 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/110-arm-eabi.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/110-arm-eabi.patch
new file mode 100644
index 0000000000..acebe5308f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/110-arm-eabi.patch
@@ -0,0 +1,27 @@
1--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
2+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
3@@ -674,7 +674,7 @@
4 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
5 tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
6 case ${target} in
7- arm*-*-linux-gnueabi)
8+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
9 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
10 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
11 # The BPABI long long divmod functions return a 128-bit value in
12
13diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
14--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
15+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
16@@ -53,7 +53,11 @@
17 /* Use ld-linux.so.3 so that it will be possible to run "classic"
18 GNU/Linux binaries on an EABI system. */
19 #undef LINUX_TARGET_INTERPRETER
20+#ifdef USE_UCLIBC
21+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
22+#else
23 #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
24+#endif
25
26 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
27 use the GNU/Linux version, not the generic BPABI version. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/200-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/200-uclibc-locale.patch
new file mode 100644
index 0000000000..70ba98eed7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/200-uclibc-locale.patch
@@ -0,0 +1,2833 @@
1Index: gcc-4.3.2/libstdc++-v3/acinclude.m4
2===================================================================
3--- gcc-4.3.2.orig/libstdc++-v3/acinclude.m4 2008-04-25 09:52:57.000000000 -0700
4+++ gcc-4.3.2/libstdc++-v3/acinclude.m4 2008-08-28 17:55:56.000000000 -0700
5@@ -1349,7 +1349,7 @@
6 AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
7 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
8 [use MODEL for target locale package],
9- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
10+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
11
12 # Deal with gettext issues. Default to not using it (=no) until we detect
13 # support for it later. Let the user turn it off via --e/d, but let that
14@@ -1370,6 +1370,9 @@
15 # Default to "generic".
16 if test $enable_clocale_flag = auto; then
17 case ${target_os} in
18+ *-uclibc*)
19+ enable_clocale_flag=uclibc
20+ ;;
21 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
22 enable_clocale_flag=gnu
23 ;;
24@@ -1541,6 +1544,40 @@
25 CTIME_CC=config/locale/generic/time_members.cc
26 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
27 ;;
28+ uclibc)
29+ AC_MSG_RESULT(uclibc)
30+
31+ # Declare intention to use gettext, and add support for specific
32+ # languages.
33+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
34+ ALL_LINGUAS="de fr"
35+
36+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
37+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
38+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
39+ USE_NLS=yes
40+ fi
41+ # Export the build objects.
42+ for ling in $ALL_LINGUAS; do \
43+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
44+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
45+ done
46+ AC_SUBST(glibcxx_MOFILES)
47+ AC_SUBST(glibcxx_POFILES)
48+
49+ CLOCALE_H=config/locale/uclibc/c_locale.h
50+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
51+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
52+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
53+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
54+ CMESSAGES_H=config/locale/uclibc/messages_members.h
55+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
56+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
57+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
58+ CTIME_H=config/locale/uclibc/time_members.h
59+ CTIME_CC=config/locale/uclibc/time_members.cc
60+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
61+ ;;
62 esac
63
64 # This is where the testsuite looks for locale catalogs, using the
65Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
66===================================================================
67--- /dev/null 1970-01-01 00:00:00.000000000 +0000
68+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-28 17:55:56.000000000 -0700
69@@ -0,0 +1,63 @@
70+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
71+
72+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
73+//
74+// This file is part of the GNU ISO C++ Library. This library is free
75+// software; you can redistribute it and/or modify it under the
76+// terms of the GNU General Public License as published by the
77+// Free Software Foundation; either version 2, or (at your option)
78+// any later version.
79+
80+// This library is distributed in the hope that it will be useful,
81+// but WITHOUT ANY WARRANTY; without even the implied warranty of
82+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83+// GNU General Public License for more details.
84+
85+// You should have received a copy of the GNU General Public License along
86+// with this library; see the file COPYING. If not, write to the Free
87+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
88+// USA.
89+
90+// As a special exception, you may use this file as part of a free software
91+// library without restriction. Specifically, if other files instantiate
92+// templates or use macros or inline functions from this file, or you compile
93+// this file and link it with other files to produce an executable, this
94+// file does not by itself cause the resulting executable to be covered by
95+// the GNU General Public License. This exception does not however
96+// invalidate any other reasons why the executable file might be covered by
97+// the GNU General Public License.
98+
99+// Written by Jakub Jelinek <jakub@redhat.com>
100+
101+#include <bits/c++config.h>
102+#include <clocale>
103+
104+#ifdef __UCLIBC_MJN3_ONLY__
105+#warning clean this up
106+#endif
107+
108+#ifdef __UCLIBC_HAS_XLOCALE__
109+
110+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
111+extern "C" __typeof(strcoll_l) __strcoll_l;
112+extern "C" __typeof(strftime_l) __strftime_l;
113+extern "C" __typeof(strtod_l) __strtod_l;
114+extern "C" __typeof(strtof_l) __strtof_l;
115+extern "C" __typeof(strtold_l) __strtold_l;
116+extern "C" __typeof(strxfrm_l) __strxfrm_l;
117+extern "C" __typeof(newlocale) __newlocale;
118+extern "C" __typeof(freelocale) __freelocale;
119+extern "C" __typeof(duplocale) __duplocale;
120+extern "C" __typeof(uselocale) __uselocale;
121+
122+#ifdef _GLIBCXX_USE_WCHAR_T
123+extern "C" __typeof(iswctype_l) __iswctype_l;
124+extern "C" __typeof(towlower_l) __towlower_l;
125+extern "C" __typeof(towupper_l) __towupper_l;
126+extern "C" __typeof(wcscoll_l) __wcscoll_l;
127+extern "C" __typeof(wcsftime_l) __wcsftime_l;
128+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
129+extern "C" __typeof(wctype_l) __wctype_l;
130+#endif
131+
132+#endif // GLIBC 2.3 and later
133Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
134===================================================================
135--- /dev/null 1970-01-01 00:00:00.000000000 +0000
136+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-28 17:55:56.000000000 -0700
137@@ -0,0 +1,160 @@
138+// Wrapper for underlying C-language localization -*- C++ -*-
139+
140+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
141+//
142+// This file is part of the GNU ISO C++ Library. This library is free
143+// software; you can redistribute it and/or modify it under the
144+// terms of the GNU General Public License as published by the
145+// Free Software Foundation; either version 2, or (at your option)
146+// any later version.
147+
148+// This library is distributed in the hope that it will be useful,
149+// but WITHOUT ANY WARRANTY; without even the implied warranty of
150+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
151+// GNU General Public License for more details.
152+
153+// You should have received a copy of the GNU General Public License along
154+// with this library; see the file COPYING. If not, write to the Free
155+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
156+// USA.
157+
158+// As a special exception, you may use this file as part of a free software
159+// library without restriction. Specifically, if other files instantiate
160+// templates or use macros or inline functions from this file, or you compile
161+// this file and link it with other files to produce an executable, this
162+// file does not by itself cause the resulting executable to be covered by
163+// the GNU General Public License. This exception does not however
164+// invalidate any other reasons why the executable file might be covered by
165+// the GNU General Public License.
166+
167+//
168+// ISO C++ 14882: 22.8 Standard locale categories.
169+//
170+
171+// Written by Benjamin Kosnik <bkoz@redhat.com>
172+
173+#include <cerrno> // For errno
174+#include <locale>
175+#include <stdexcept>
176+#include <langinfo.h>
177+#include <bits/c++locale_internal.h>
178+
179+#ifndef __UCLIBC_HAS_XLOCALE__
180+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
181+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
182+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
183+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
184+#define __strtof_l(S, E, L) strtof((S), (E))
185+#define __strtod_l(S, E, L) strtod((S), (E))
186+#define __strtold_l(S, E, L) strtold((S), (E))
187+#warning should dummy __newlocale check for C|POSIX ?
188+#define __newlocale(a, b, c) NULL
189+#define __freelocale(a) ((void)0)
190+#define __duplocale(a) __c_locale()
191+#endif
192+
193+namespace std
194+{
195+ template<>
196+ void
197+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
198+ const __c_locale& __cloc)
199+ {
200+ if (!(__err & ios_base::failbit))
201+ {
202+ char* __sanity;
203+ errno = 0;
204+ float __f = __strtof_l(__s, &__sanity, __cloc);
205+ if (__sanity != __s && errno != ERANGE)
206+ __v = __f;
207+ else
208+ __err |= ios_base::failbit;
209+ }
210+ }
211+
212+ template<>
213+ void
214+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
215+ const __c_locale& __cloc)
216+ {
217+ if (!(__err & ios_base::failbit))
218+ {
219+ char* __sanity;
220+ errno = 0;
221+ double __d = __strtod_l(__s, &__sanity, __cloc);
222+ if (__sanity != __s && errno != ERANGE)
223+ __v = __d;
224+ else
225+ __err |= ios_base::failbit;
226+ }
227+ }
228+
229+ template<>
230+ void
231+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
232+ const __c_locale& __cloc)
233+ {
234+ if (!(__err & ios_base::failbit))
235+ {
236+ char* __sanity;
237+ errno = 0;
238+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
239+ if (__sanity != __s && errno != ERANGE)
240+ __v = __ld;
241+ else
242+ __err |= ios_base::failbit;
243+ }
244+ }
245+
246+ void
247+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
248+ __c_locale __old)
249+ {
250+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
251+#ifdef __UCLIBC_HAS_XLOCALE__
252+ if (!__cloc)
253+ {
254+ // This named locale is not supported by the underlying OS.
255+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
256+ "name not valid"));
257+ }
258+#endif
259+ }
260+
261+ void
262+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
263+ {
264+ if (_S_get_c_locale() != __cloc)
265+ __freelocale(__cloc);
266+ }
267+
268+ __c_locale
269+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
270+ { return __duplocale(__cloc); }
271+} // namespace std
272+
273+namespace __gnu_cxx
274+{
275+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
276+ {
277+ "LC_CTYPE",
278+ "LC_NUMERIC",
279+ "LC_TIME",
280+ "LC_COLLATE",
281+ "LC_MONETARY",
282+ "LC_MESSAGES",
283+#if _GLIBCXX_NUM_CATEGORIES != 0
284+ "LC_PAPER",
285+ "LC_NAME",
286+ "LC_ADDRESS",
287+ "LC_TELEPHONE",
288+ "LC_MEASUREMENT",
289+ "LC_IDENTIFICATION"
290+#endif
291+ };
292+}
293+
294+namespace std
295+{
296+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
297+} // namespace std
298Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
299===================================================================
300--- /dev/null 1970-01-01 00:00:00.000000000 +0000
301+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-28 17:55:56.000000000 -0700
302@@ -0,0 +1,117 @@
303+// Wrapper for underlying C-language localization -*- C++ -*-
304+
305+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
306+//
307+// This file is part of the GNU ISO C++ Library. This library is free
308+// software; you can redistribute it and/or modify it under the
309+// terms of the GNU General Public License as published by the
310+// Free Software Foundation; either version 2, or (at your option)
311+// any later version.
312+
313+// This library is distributed in the hope that it will be useful,
314+// but WITHOUT ANY WARRANTY; without even the implied warranty of
315+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
316+// GNU General Public License for more details.
317+
318+// You should have received a copy of the GNU General Public License along
319+// with this library; see the file COPYING. If not, write to the Free
320+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
321+// USA.
322+
323+// As a special exception, you may use this file as part of a free software
324+// library without restriction. Specifically, if other files instantiate
325+// templates or use macros or inline functions from this file, or you compile
326+// this file and link it with other files to produce an executable, this
327+// file does not by itself cause the resulting executable to be covered by
328+// the GNU General Public License. This exception does not however
329+// invalidate any other reasons why the executable file might be covered by
330+// the GNU General Public License.
331+
332+//
333+// ISO C++ 14882: 22.8 Standard locale categories.
334+//
335+
336+// Written by Benjamin Kosnik <bkoz@redhat.com>
337+
338+#ifndef _C_LOCALE_H
339+#define _C_LOCALE_H 1
340+
341+#pragma GCC system_header
342+
343+#include <cstring> // get std::strlen
344+#include <cstdio> // get std::snprintf or std::sprintf
345+#include <clocale>
346+#include <langinfo.h> // For codecvt
347+#ifdef __UCLIBC_MJN3_ONLY__
348+#warning fix this
349+#endif
350+#ifdef __UCLIBC_HAS_LOCALE__
351+#include <iconv.h> // For codecvt using iconv, iconv_t
352+#endif
353+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
354+#include <libintl.h> // For messages
355+#endif
356+
357+#ifdef __UCLIBC_MJN3_ONLY__
358+#warning what is _GLIBCXX_C_LOCALE_GNU for
359+#endif
360+#define _GLIBCXX_C_LOCALE_GNU 1
361+
362+#ifdef __UCLIBC_MJN3_ONLY__
363+#warning fix categories
364+#endif
365+// #define _GLIBCXX_NUM_CATEGORIES 6
366+#define _GLIBCXX_NUM_CATEGORIES 0
367+
368+#ifdef __UCLIBC_HAS_XLOCALE__
369+namespace __gnu_cxx
370+{
371+ extern "C" __typeof(uselocale) __uselocale;
372+}
373+#endif
374+
375+namespace std
376+{
377+#ifdef __UCLIBC_HAS_XLOCALE__
378+ typedef __locale_t __c_locale;
379+#else
380+ typedef int* __c_locale;
381+#endif
382+
383+ // Convert numeric value of type _Tv to string and return length of
384+ // string. If snprintf is available use it, otherwise fall back to
385+ // the unsafe sprintf which, in general, can be dangerous and should
386+ // be avoided.
387+ template<typename _Tv>
388+ int
389+ __convert_from_v(char* __out,
390+ const int __size __attribute__ ((__unused__)),
391+ const char* __fmt,
392+#ifdef __UCLIBC_HAS_XCLOCALE__
393+ _Tv __v, const __c_locale& __cloc, int __prec)
394+ {
395+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
396+#else
397+ _Tv __v, const __c_locale&, int __prec)
398+ {
399+# ifdef __UCLIBC_HAS_LOCALE__
400+ char* __old = std::setlocale(LC_ALL, NULL);
401+ char* __sav = new char[std::strlen(__old) + 1];
402+ std::strcpy(__sav, __old);
403+ std::setlocale(LC_ALL, "C");
404+# endif
405+#endif
406+
407+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
408+
409+#ifdef __UCLIBC_HAS_XCLOCALE__
410+ __gnu_cxx::__uselocale(__old);
411+#elif defined __UCLIBC_HAS_LOCALE__
412+ std::setlocale(LC_ALL, __sav);
413+ delete [] __sav;
414+#endif
415+ return __ret;
416+ }
417+}
418+
419+#endif
420Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
421===================================================================
422--- /dev/null 1970-01-01 00:00:00.000000000 +0000
423+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2008-08-28 17:55:56.000000000 -0700
424@@ -0,0 +1,308 @@
425+// std::codecvt implementation details, GNU version -*- C++ -*-
426+
427+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
428+//
429+// This file is part of the GNU ISO C++ Library. This library is free
430+// software; you can redistribute it and/or modify it under the
431+// terms of the GNU General Public License as published by the
432+// Free Software Foundation; either version 2, or (at your option)
433+// any later version.
434+
435+// This library is distributed in the hope that it will be useful,
436+// but WITHOUT ANY WARRANTY; without even the implied warranty of
437+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
438+// GNU General Public License for more details.
439+
440+// You should have received a copy of the GNU General Public License along
441+// with this library; see the file COPYING. If not, write to the Free
442+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
443+// USA.
444+
445+// As a special exception, you may use this file as part of a free software
446+// library without restriction. Specifically, if other files instantiate
447+// templates or use macros or inline functions from this file, or you compile
448+// this file and link it with other files to produce an executable, this
449+// file does not by itself cause the resulting executable to be covered by
450+// the GNU General Public License. This exception does not however
451+// invalidate any other reasons why the executable file might be covered by
452+// the GNU General Public License.
453+
454+//
455+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
456+//
457+
458+// Written by Benjamin Kosnik <bkoz@redhat.com>
459+
460+#include <locale>
461+#include <cstdlib> // For MB_CUR_MAX
462+#include <climits> // For MB_LEN_MAX
463+#include <bits/c++locale_internal.h>
464+
465+namespace std
466+{
467+ // Specializations.
468+#ifdef _GLIBCXX_USE_WCHAR_T
469+ codecvt_base::result
470+ codecvt<wchar_t, char, mbstate_t>::
471+ do_out(state_type& __state, const intern_type* __from,
472+ const intern_type* __from_end, const intern_type*& __from_next,
473+ extern_type* __to, extern_type* __to_end,
474+ extern_type*& __to_next) const
475+ {
476+ result __ret = ok;
477+ state_type __tmp_state(__state);
478+
479+#ifdef __UCLIBC_HAS_XLOCALE__
480+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
481+#endif
482+
483+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
484+ // in case we fall back to wcrtomb and then continue, in a loop.
485+ // NB: wcsnrtombs is a GNU extension
486+ for (__from_next = __from, __to_next = __to;
487+ __from_next < __from_end && __to_next < __to_end
488+ && __ret == ok;)
489+ {
490+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
491+ __from_end - __from_next);
492+ if (!__from_chunk_end)
493+ __from_chunk_end = __from_end;
494+
495+ __from = __from_next;
496+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
497+ __from_chunk_end - __from_next,
498+ __to_end - __to_next, &__state);
499+ if (__conv == static_cast<size_t>(-1))
500+ {
501+ // In case of error, in order to stop at the exact place we
502+ // have to start again from the beginning with a series of
503+ // wcrtomb.
504+ for (; __from < __from_next; ++__from)
505+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
506+ __state = __tmp_state;
507+ __ret = error;
508+ }
509+ else if (__from_next && __from_next < __from_chunk_end)
510+ {
511+ __to_next += __conv;
512+ __ret = partial;
513+ }
514+ else
515+ {
516+ __from_next = __from_chunk_end;
517+ __to_next += __conv;
518+ }
519+
520+ if (__from_next < __from_end && __ret == ok)
521+ {
522+ extern_type __buf[MB_LEN_MAX];
523+ __tmp_state = __state;
524+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
525+ if (__conv > static_cast<size_t>(__to_end - __to_next))
526+ __ret = partial;
527+ else
528+ {
529+ memcpy(__to_next, __buf, __conv);
530+ __state = __tmp_state;
531+ __to_next += __conv;
532+ ++__from_next;
533+ }
534+ }
535+ }
536+
537+#ifdef __UCLIBC_HAS_XLOCALE__
538+ __uselocale(__old);
539+#endif
540+
541+ return __ret;
542+ }
543+
544+ codecvt_base::result
545+ codecvt<wchar_t, char, mbstate_t>::
546+ do_in(state_type& __state, const extern_type* __from,
547+ const extern_type* __from_end, const extern_type*& __from_next,
548+ intern_type* __to, intern_type* __to_end,
549+ intern_type*& __to_next) const
550+ {
551+ result __ret = ok;
552+ state_type __tmp_state(__state);
553+
554+#ifdef __UCLIBC_HAS_XLOCALE__
555+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
556+#endif
557+
558+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
559+ // in case we store a L'\0' and then continue, in a loop.
560+ // NB: mbsnrtowcs is a GNU extension
561+ for (__from_next = __from, __to_next = __to;
562+ __from_next < __from_end && __to_next < __to_end
563+ && __ret == ok;)
564+ {
565+ const extern_type* __from_chunk_end;
566+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
567+ __from_end
568+ - __from_next));
569+ if (!__from_chunk_end)
570+ __from_chunk_end = __from_end;
571+
572+ __from = __from_next;
573+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
574+ __from_chunk_end - __from_next,
575+ __to_end - __to_next, &__state);
576+ if (__conv == static_cast<size_t>(-1))
577+ {
578+ // In case of error, in order to stop at the exact place we
579+ // have to start again from the beginning with a series of
580+ // mbrtowc.
581+ for (;; ++__to_next, __from += __conv)
582+ {
583+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
584+ &__tmp_state);
585+ if (__conv == static_cast<size_t>(-1)
586+ || __conv == static_cast<size_t>(-2))
587+ break;
588+ }
589+ __from_next = __from;
590+ __state = __tmp_state;
591+ __ret = error;
592+ }
593+ else if (__from_next && __from_next < __from_chunk_end)
594+ {
595+ // It is unclear what to return in this case (see DR 382).
596+ __to_next += __conv;
597+ __ret = partial;
598+ }
599+ else
600+ {
601+ __from_next = __from_chunk_end;
602+ __to_next += __conv;
603+ }
604+
605+ if (__from_next < __from_end && __ret == ok)
606+ {
607+ if (__to_next < __to_end)
608+ {
609+ // XXX Probably wrong for stateful encodings
610+ __tmp_state = __state;
611+ ++__from_next;
612+ *__to_next++ = L'\0';
613+ }
614+ else
615+ __ret = partial;
616+ }
617+ }
618+
619+#ifdef __UCLIBC_HAS_XLOCALE__
620+ __uselocale(__old);
621+#endif
622+
623+ return __ret;
624+ }
625+
626+ int
627+ codecvt<wchar_t, char, mbstate_t>::
628+ do_encoding() const throw()
629+ {
630+ // XXX This implementation assumes that the encoding is
631+ // stateless and is either single-byte or variable-width.
632+ int __ret = 0;
633+#ifdef __UCLIBC_HAS_XLOCALE__
634+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
635+#endif
636+ if (MB_CUR_MAX == 1)
637+ __ret = 1;
638+#ifdef __UCLIBC_HAS_XLOCALE__
639+ __uselocale(__old);
640+#endif
641+ return __ret;
642+ }
643+
644+ int
645+ codecvt<wchar_t, char, mbstate_t>::
646+ do_max_length() const throw()
647+ {
648+#ifdef __UCLIBC_HAS_XLOCALE__
649+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
650+#endif
651+ // XXX Probably wrong for stateful encodings.
652+ int __ret = MB_CUR_MAX;
653+#ifdef __UCLIBC_HAS_XLOCALE__
654+ __uselocale(__old);
655+#endif
656+ return __ret;
657+ }
658+
659+ int
660+ codecvt<wchar_t, char, mbstate_t>::
661+ do_length(state_type& __state, const extern_type* __from,
662+ const extern_type* __end, size_t __max) const
663+ {
664+ int __ret = 0;
665+ state_type __tmp_state(__state);
666+
667+#ifdef __UCLIBC_HAS_XLOCALE__
668+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
669+#endif
670+
671+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
672+ // in case we advance past it and then continue, in a loop.
673+ // NB: mbsnrtowcs is a GNU extension
674+
675+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
676+ // its fourth parameter (it wouldn't with NULL as first parameter).
677+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
678+ * __max));
679+ while (__from < __end && __max)
680+ {
681+ const extern_type* __from_chunk_end;
682+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
683+ __end
684+ - __from));
685+ if (!__from_chunk_end)
686+ __from_chunk_end = __end;
687+
688+ const extern_type* __tmp_from = __from;
689+ size_t __conv = mbsnrtowcs(__to, &__from,
690+ __from_chunk_end - __from,
691+ __max, &__state);
692+ if (__conv == static_cast<size_t>(-1))
693+ {
694+ // In case of error, in order to stop at the exact place we
695+ // have to start again from the beginning with a series of
696+ // mbrtowc.
697+ for (__from = __tmp_from;; __from += __conv)
698+ {
699+ __conv = mbrtowc(NULL, __from, __end - __from,
700+ &__tmp_state);
701+ if (__conv == static_cast<size_t>(-1)
702+ || __conv == static_cast<size_t>(-2))
703+ break;
704+ }
705+ __state = __tmp_state;
706+ __ret += __from - __tmp_from;
707+ break;
708+ }
709+ if (!__from)
710+ __from = __from_chunk_end;
711+
712+ __ret += __from - __tmp_from;
713+ __max -= __conv;
714+
715+ if (__from < __end && __max)
716+ {
717+ // XXX Probably wrong for stateful encodings
718+ __tmp_state = __state;
719+ ++__from;
720+ ++__ret;
721+ --__max;
722+ }
723+ }
724+
725+#ifdef __UCLIBC_HAS_XLOCALE__
726+ __uselocale(__old);
727+#endif
728+
729+ return __ret;
730+ }
731+#endif
732+}
733Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
734===================================================================
735--- /dev/null 1970-01-01 00:00:00.000000000 +0000
736+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-28 17:55:56.000000000 -0700
737@@ -0,0 +1,80 @@
738+// std::collate implementation details, GNU version -*- C++ -*-
739+
740+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
741+//
742+// This file is part of the GNU ISO C++ Library. This library is free
743+// software; you can redistribute it and/or modify it under the
744+// terms of the GNU General Public License as published by the
745+// Free Software Foundation; either version 2, or (at your option)
746+// any later version.
747+
748+// This library is distributed in the hope that it will be useful,
749+// but WITHOUT ANY WARRANTY; without even the implied warranty of
750+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
751+// GNU General Public License for more details.
752+
753+// You should have received a copy of the GNU General Public License along
754+// with this library; see the file COPYING. If not, write to the Free
755+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
756+// USA.
757+
758+// As a special exception, you may use this file as part of a free software
759+// library without restriction. Specifically, if other files instantiate
760+// templates or use macros or inline functions from this file, or you compile
761+// this file and link it with other files to produce an executable, this
762+// file does not by itself cause the resulting executable to be covered by
763+// the GNU General Public License. This exception does not however
764+// invalidate any other reasons why the executable file might be covered by
765+// the GNU General Public License.
766+
767+//
768+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
769+//
770+
771+// Written by Benjamin Kosnik <bkoz@redhat.com>
772+
773+#include <locale>
774+#include <bits/c++locale_internal.h>
775+
776+#ifndef __UCLIBC_HAS_XLOCALE__
777+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
778+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
779+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
780+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
781+#endif
782+
783+namespace std
784+{
785+ // These are basically extensions to char_traits, and perhaps should
786+ // be put there instead of here.
787+ template<>
788+ int
789+ collate<char>::_M_compare(const char* __one, const char* __two) const
790+ {
791+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
792+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
793+ }
794+
795+ template<>
796+ size_t
797+ collate<char>::_M_transform(char* __to, const char* __from,
798+ size_t __n) const
799+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
800+
801+#ifdef _GLIBCXX_USE_WCHAR_T
802+ template<>
803+ int
804+ collate<wchar_t>::_M_compare(const wchar_t* __one,
805+ const wchar_t* __two) const
806+ {
807+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
808+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
809+ }
810+
811+ template<>
812+ size_t
813+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
814+ size_t __n) const
815+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
816+#endif
817+}
818Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
819===================================================================
820--- /dev/null 1970-01-01 00:00:00.000000000 +0000
821+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-28 17:55:56.000000000 -0700
822@@ -0,0 +1,300 @@
823+// std::ctype implementation details, GNU version -*- C++ -*-
824+
825+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
826+//
827+// This file is part of the GNU ISO C++ Library. This library is free
828+// software; you can redistribute it and/or modify it under the
829+// terms of the GNU General Public License as published by the
830+// Free Software Foundation; either version 2, or (at your option)
831+// any later version.
832+
833+// This library is distributed in the hope that it will be useful,
834+// but WITHOUT ANY WARRANTY; without even the implied warranty of
835+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
836+// GNU General Public License for more details.
837+
838+// You should have received a copy of the GNU General Public License along
839+// with this library; see the file COPYING. If not, write to the Free
840+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
841+// USA.
842+
843+// As a special exception, you may use this file as part of a free software
844+// library without restriction. Specifically, if other files instantiate
845+// templates or use macros or inline functions from this file, or you compile
846+// this file and link it with other files to produce an executable, this
847+// file does not by itself cause the resulting executable to be covered by
848+// the GNU General Public License. This exception does not however
849+// invalidate any other reasons why the executable file might be covered by
850+// the GNU General Public License.
851+
852+//
853+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
854+//
855+
856+// Written by Benjamin Kosnik <bkoz@redhat.com>
857+
858+#define _LIBC
859+#include <locale>
860+#undef _LIBC
861+#include <bits/c++locale_internal.h>
862+
863+#ifndef __UCLIBC_HAS_XLOCALE__
864+#define __wctype_l(S, L) wctype((S))
865+#define __towupper_l(C, L) towupper((C))
866+#define __towlower_l(C, L) towlower((C))
867+#define __iswctype_l(C, M, L) iswctype((C), (M))
868+#endif
869+
870+namespace std
871+{
872+ // NB: The other ctype<char> specializations are in src/locale.cc and
873+ // various /config/os/* files.
874+ template<>
875+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
876+ : ctype<char>(0, false, __refs)
877+ {
878+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
879+ {
880+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
881+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
882+#ifdef __UCLIBC_HAS_XLOCALE__
883+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
884+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
885+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
886+#endif
887+ }
888+ }
889+
890+#ifdef _GLIBCXX_USE_WCHAR_T
891+ ctype<wchar_t>::__wmask_type
892+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
893+ {
894+ __wmask_type __ret;
895+ switch (__m)
896+ {
897+ case space:
898+ __ret = __wctype_l("space", _M_c_locale_ctype);
899+ break;
900+ case print:
901+ __ret = __wctype_l("print", _M_c_locale_ctype);
902+ break;
903+ case cntrl:
904+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
905+ break;
906+ case upper:
907+ __ret = __wctype_l("upper", _M_c_locale_ctype);
908+ break;
909+ case lower:
910+ __ret = __wctype_l("lower", _M_c_locale_ctype);
911+ break;
912+ case alpha:
913+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
914+ break;
915+ case digit:
916+ __ret = __wctype_l("digit", _M_c_locale_ctype);
917+ break;
918+ case punct:
919+ __ret = __wctype_l("punct", _M_c_locale_ctype);
920+ break;
921+ case xdigit:
922+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
923+ break;
924+ case alnum:
925+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
926+ break;
927+ case graph:
928+ __ret = __wctype_l("graph", _M_c_locale_ctype);
929+ break;
930+ default:
931+ __ret = __wmask_type();
932+ }
933+ return __ret;
934+ }
935+
936+ wchar_t
937+ ctype<wchar_t>::do_toupper(wchar_t __c) const
938+ { return __towupper_l(__c, _M_c_locale_ctype); }
939+
940+ const wchar_t*
941+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
942+ {
943+ while (__lo < __hi)
944+ {
945+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
946+ ++__lo;
947+ }
948+ return __hi;
949+ }
950+
951+ wchar_t
952+ ctype<wchar_t>::do_tolower(wchar_t __c) const
953+ { return __towlower_l(__c, _M_c_locale_ctype); }
954+
955+ const wchar_t*
956+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
957+ {
958+ while (__lo < __hi)
959+ {
960+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
961+ ++__lo;
962+ }
963+ return __hi;
964+ }
965+
966+ bool
967+ ctype<wchar_t>::
968+ do_is(mask __m, wchar_t __c) const
969+ {
970+ // Highest bitmask in ctype_base == 10, but extra in "C"
971+ // library for blank.
972+ bool __ret = false;
973+ const size_t __bitmasksize = 11;
974+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
975+ if (__m & _M_bit[__bitcur]
976+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
977+ {
978+ __ret = true;
979+ break;
980+ }
981+ return __ret;
982+ }
983+
984+ const wchar_t*
985+ ctype<wchar_t>::
986+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
987+ {
988+ for (; __lo < __hi; ++__vec, ++__lo)
989+ {
990+ // Highest bitmask in ctype_base == 10, but extra in "C"
991+ // library for blank.
992+ const size_t __bitmasksize = 11;
993+ mask __m = 0;
994+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
995+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
996+ __m |= _M_bit[__bitcur];
997+ *__vec = __m;
998+ }
999+ return __hi;
1000+ }
1001+
1002+ const wchar_t*
1003+ ctype<wchar_t>::
1004+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
1005+ {
1006+ while (__lo < __hi && !this->do_is(__m, *__lo))
1007+ ++__lo;
1008+ return __lo;
1009+ }
1010+
1011+ const wchar_t*
1012+ ctype<wchar_t>::
1013+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
1014+ {
1015+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
1016+ ++__lo;
1017+ return __lo;
1018+ }
1019+
1020+ wchar_t
1021+ ctype<wchar_t>::
1022+ do_widen(char __c) const
1023+ { return _M_widen[static_cast<unsigned char>(__c)]; }
1024+
1025+ const char*
1026+ ctype<wchar_t>::
1027+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
1028+ {
1029+ while (__lo < __hi)
1030+ {
1031+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
1032+ ++__lo;
1033+ ++__dest;
1034+ }
1035+ return __hi;
1036+ }
1037+
1038+ char
1039+ ctype<wchar_t>::
1040+ do_narrow(wchar_t __wc, char __dfault) const
1041+ {
1042+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
1043+ return _M_narrow[__wc];
1044+#ifdef __UCLIBC_HAS_XLOCALE__
1045+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1046+#endif
1047+ const int __c = wctob(__wc);
1048+#ifdef __UCLIBC_HAS_XLOCALE__
1049+ __uselocale(__old);
1050+#endif
1051+ return (__c == EOF ? __dfault : static_cast<char>(__c));
1052+ }
1053+
1054+ const wchar_t*
1055+ ctype<wchar_t>::
1056+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
1057+ char* __dest) const
1058+ {
1059+#ifdef __UCLIBC_HAS_XLOCALE__
1060+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1061+#endif
1062+ if (_M_narrow_ok)
1063+ while (__lo < __hi)
1064+ {
1065+ if (*__lo >= 0 && *__lo < 128)
1066+ *__dest = _M_narrow[*__lo];
1067+ else
1068+ {
1069+ const int __c = wctob(*__lo);
1070+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1071+ }
1072+ ++__lo;
1073+ ++__dest;
1074+ }
1075+ else
1076+ while (__lo < __hi)
1077+ {
1078+ const int __c = wctob(*__lo);
1079+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1080+ ++__lo;
1081+ ++__dest;
1082+ }
1083+#ifdef __UCLIBC_HAS_XLOCALE__
1084+ __uselocale(__old);
1085+#endif
1086+ return __hi;
1087+ }
1088+
1089+ void
1090+ ctype<wchar_t>::_M_initialize_ctype()
1091+ {
1092+#ifdef __UCLIBC_HAS_XLOCALE__
1093+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1094+#endif
1095+ wint_t __i;
1096+ for (__i = 0; __i < 128; ++__i)
1097+ {
1098+ const int __c = wctob(__i);
1099+ if (__c == EOF)
1100+ break;
1101+ else
1102+ _M_narrow[__i] = static_cast<char>(__c);
1103+ }
1104+ if (__i == 128)
1105+ _M_narrow_ok = true;
1106+ else
1107+ _M_narrow_ok = false;
1108+ for (size_t __j = 0;
1109+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
1110+ _M_widen[__j] = btowc(__j);
1111+
1112+ for (size_t __k = 0; __k <= 11; ++__k)
1113+ {
1114+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
1115+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
1116+ }
1117+#ifdef __UCLIBC_HAS_XLOCALE__
1118+ __uselocale(__old);
1119+#endif
1120+ }
1121+#endif // _GLIBCXX_USE_WCHAR_T
1122+}
1123Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
1124===================================================================
1125--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1126+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-28 17:55:56.000000000 -0700
1127@@ -0,0 +1,100 @@
1128+// std::messages implementation details, GNU version -*- C++ -*-
1129+
1130+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1131+//
1132+// This file is part of the GNU ISO C++ Library. This library is free
1133+// software; you can redistribute it and/or modify it under the
1134+// terms of the GNU General Public License as published by the
1135+// Free Software Foundation; either version 2, or (at your option)
1136+// any later version.
1137+
1138+// This library is distributed in the hope that it will be useful,
1139+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1140+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1141+// GNU General Public License for more details.
1142+
1143+// You should have received a copy of the GNU General Public License along
1144+// with this library; see the file COPYING. If not, write to the Free
1145+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1146+// USA.
1147+
1148+// As a special exception, you may use this file as part of a free software
1149+// library without restriction. Specifically, if other files instantiate
1150+// templates or use macros or inline functions from this file, or you compile
1151+// this file and link it with other files to produce an executable, this
1152+// file does not by itself cause the resulting executable to be covered by
1153+// the GNU General Public License. This exception does not however
1154+// invalidate any other reasons why the executable file might be covered by
1155+// the GNU General Public License.
1156+
1157+//
1158+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
1159+//
1160+
1161+// Written by Benjamin Kosnik <bkoz@redhat.com>
1162+
1163+#include <locale>
1164+#include <bits/c++locale_internal.h>
1165+
1166+#ifdef __UCLIBC_MJN3_ONLY__
1167+#warning fix gettext stuff
1168+#endif
1169+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1170+extern "C" char *__dcgettext(const char *domainname,
1171+ const char *msgid, int category);
1172+#undef gettext
1173+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1174+#else
1175+#undef gettext
1176+#define gettext(msgid) (msgid)
1177+#endif
1178+
1179+namespace std
1180+{
1181+ // Specializations.
1182+ template<>
1183+ string
1184+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
1185+ {
1186+#ifdef __UCLIBC_HAS_XLOCALE__
1187+ __c_locale __old = __uselocale(_M_c_locale_messages);
1188+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
1189+ __uselocale(__old);
1190+ return string(__msg);
1191+#elif defined __UCLIBC_HAS_LOCALE__
1192+ char* __old = strdup(setlocale(LC_ALL, NULL));
1193+ setlocale(LC_ALL, _M_name_messages);
1194+ const char* __msg = gettext(__dfault.c_str());
1195+ setlocale(LC_ALL, __old);
1196+ free(__old);
1197+ return string(__msg);
1198+#else
1199+ const char* __msg = gettext(__dfault.c_str());
1200+ return string(__msg);
1201+#endif
1202+ }
1203+
1204+#ifdef _GLIBCXX_USE_WCHAR_T
1205+ template<>
1206+ wstring
1207+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
1208+ {
1209+# ifdef __UCLIBC_HAS_XLOCALE__
1210+ __c_locale __old = __uselocale(_M_c_locale_messages);
1211+ char* __msg = gettext(_M_convert_to_char(__dfault));
1212+ __uselocale(__old);
1213+ return _M_convert_from_char(__msg);
1214+# elif defined __UCLIBC_HAS_LOCALE__
1215+ char* __old = strdup(setlocale(LC_ALL, NULL));
1216+ setlocale(LC_ALL, _M_name_messages);
1217+ char* __msg = gettext(_M_convert_to_char(__dfault));
1218+ setlocale(LC_ALL, __old);
1219+ free(__old);
1220+ return _M_convert_from_char(__msg);
1221+# else
1222+ char* __msg = gettext(_M_convert_to_char(__dfault));
1223+ return _M_convert_from_char(__msg);
1224+# endif
1225+ }
1226+#endif
1227+}
1228Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
1229===================================================================
1230--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1231+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-28 17:55:56.000000000 -0700
1232@@ -0,0 +1,118 @@
1233+// std::messages implementation details, GNU version -*- C++ -*-
1234+
1235+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1236+//
1237+// This file is part of the GNU ISO C++ Library. This library is free
1238+// software; you can redistribute it and/or modify it under the
1239+// terms of the GNU General Public License as published by the
1240+// Free Software Foundation; either version 2, or (at your option)
1241+// any later version.
1242+
1243+// This library is distributed in the hope that it will be useful,
1244+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1245+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1246+// GNU General Public License for more details.
1247+
1248+// You should have received a copy of the GNU General Public License along
1249+// with this library; see the file COPYING. If not, write to the Free
1250+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1251+// USA.
1252+
1253+// As a special exception, you may use this file as part of a free software
1254+// library without restriction. Specifically, if other files instantiate
1255+// templates or use macros or inline functions from this file, or you compile
1256+// this file and link it with other files to produce an executable, this
1257+// file does not by itself cause the resulting executable to be covered by
1258+// the GNU General Public License. This exception does not however
1259+// invalidate any other reasons why the executable file might be covered by
1260+// the GNU General Public License.
1261+
1262+//
1263+// ISO C++ 14882: 22.2.7.1.2 messages functions
1264+//
1265+
1266+// Written by Benjamin Kosnik <bkoz@redhat.com>
1267+
1268+#ifdef __UCLIBC_MJN3_ONLY__
1269+#warning fix prototypes for *textdomain funcs
1270+#endif
1271+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1272+extern "C" char *__textdomain(const char *domainname);
1273+extern "C" char *__bindtextdomain(const char *domainname,
1274+ const char *dirname);
1275+#else
1276+#undef __textdomain
1277+#undef __bindtextdomain
1278+#define __textdomain(D) ((void)0)
1279+#define __bindtextdomain(D,P) ((void)0)
1280+#endif
1281+
1282+ // Non-virtual member functions.
1283+ template<typename _CharT>
1284+ messages<_CharT>::messages(size_t __refs)
1285+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
1286+ _M_name_messages(_S_get_c_name())
1287+ { }
1288+
1289+ template<typename _CharT>
1290+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
1291+ size_t __refs)
1292+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
1293+ _M_name_messages(__s)
1294+ {
1295+ char* __tmp = new char[std::strlen(__s) + 1];
1296+ std::strcpy(__tmp, __s);
1297+ _M_name_messages = __tmp;
1298+ }
1299+
1300+ template<typename _CharT>
1301+ typename messages<_CharT>::catalog
1302+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1303+ const char* __dir) const
1304+ {
1305+ __bindtextdomain(__s.c_str(), __dir);
1306+ return this->do_open(__s, __loc);
1307+ }
1308+
1309+ // Virtual member functions.
1310+ template<typename _CharT>
1311+ messages<_CharT>::~messages()
1312+ {
1313+ if (_M_name_messages != _S_get_c_name())
1314+ delete [] _M_name_messages;
1315+ _S_destroy_c_locale(_M_c_locale_messages);
1316+ }
1317+
1318+ template<typename _CharT>
1319+ typename messages<_CharT>::catalog
1320+ messages<_CharT>::do_open(const basic_string<char>& __s,
1321+ const locale&) const
1322+ {
1323+ // No error checking is done, assume the catalog exists and can
1324+ // be used.
1325+ __textdomain(__s.c_str());
1326+ return 0;
1327+ }
1328+
1329+ template<typename _CharT>
1330+ void
1331+ messages<_CharT>::do_close(catalog) const
1332+ { }
1333+
1334+ // messages_byname
1335+ template<typename _CharT>
1336+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
1337+ : messages<_CharT>(__refs)
1338+ {
1339+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
1340+ delete [] this->_M_name_messages;
1341+ char* __tmp = new char[std::strlen(__s) + 1];
1342+ std::strcpy(__tmp, __s);
1343+ this->_M_name_messages = __tmp;
1344+
1345+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
1346+ {
1347+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
1348+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
1349+ }
1350+ }
1351Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1352===================================================================
1353--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1354+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-28 17:55:56.000000000 -0700
1355@@ -0,0 +1,692 @@
1356+// std::moneypunct implementation details, GNU version -*- C++ -*-
1357+
1358+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1359+//
1360+// This file is part of the GNU ISO C++ Library. This library is free
1361+// software; you can redistribute it and/or modify it under the
1362+// terms of the GNU General Public License as published by the
1363+// Free Software Foundation; either version 2, or (at your option)
1364+// any later version.
1365+
1366+// This library is distributed in the hope that it will be useful,
1367+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1368+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1369+// GNU General Public License for more details.
1370+
1371+// You should have received a copy of the GNU General Public License along
1372+// with this library; see the file COPYING. If not, write to the Free
1373+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1374+// USA.
1375+
1376+// As a special exception, you may use this file as part of a free software
1377+// library without restriction. Specifically, if other files instantiate
1378+// templates or use macros or inline functions from this file, or you compile
1379+// this file and link it with other files to produce an executable, this
1380+// file does not by itself cause the resulting executable to be covered by
1381+// the GNU General Public License. This exception does not however
1382+// invalidate any other reasons why the executable file might be covered by
1383+// the GNU General Public License.
1384+
1385+//
1386+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
1387+//
1388+
1389+// Written by Benjamin Kosnik <bkoz@redhat.com>
1390+
1391+#define _LIBC
1392+#include <locale>
1393+#undef _LIBC
1394+#include <bits/c++locale_internal.h>
1395+
1396+#ifdef __UCLIBC_MJN3_ONLY__
1397+#warning optimize this for uclibc
1398+#warning tailor for stub locale support
1399+#endif
1400+
1401+#ifndef __UCLIBC_HAS_XLOCALE__
1402+#define __nl_langinfo_l(N, L) nl_langinfo((N))
1403+#endif
1404+
1405+namespace std
1406+{
1407+ // Construct and return valid pattern consisting of some combination of:
1408+ // space none symbol sign value
1409+ money_base::pattern
1410+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
1411+ {
1412+ pattern __ret;
1413+
1414+ // This insanely complicated routine attempts to construct a valid
1415+ // pattern for use with monyepunct. A couple of invariants:
1416+
1417+ // if (__precedes) symbol -> value
1418+ // else value -> symbol
1419+
1420+ // if (__space) space
1421+ // else none
1422+
1423+ // none == never first
1424+ // space never first or last
1425+
1426+ // Any elegant implementations of this are welcome.
1427+ switch (__posn)
1428+ {
1429+ case 0:
1430+ case 1:
1431+ // 1 The sign precedes the value and symbol.
1432+ __ret.field[0] = sign;
1433+ if (__space)
1434+ {
1435+ // Pattern starts with sign.
1436+ if (__precedes)
1437+ {
1438+ __ret.field[1] = symbol;
1439+ __ret.field[3] = value;
1440+ }
1441+ else
1442+ {
1443+ __ret.field[1] = value;
1444+ __ret.field[3] = symbol;
1445+ }
1446+ __ret.field[2] = space;
1447+ }
1448+ else
1449+ {
1450+ // Pattern starts with sign and ends with none.
1451+ if (__precedes)
1452+ {
1453+ __ret.field[1] = symbol;
1454+ __ret.field[2] = value;
1455+ }
1456+ else
1457+ {
1458+ __ret.field[1] = value;
1459+ __ret.field[2] = symbol;
1460+ }
1461+ __ret.field[3] = none;
1462+ }
1463+ break;
1464+ case 2:
1465+ // 2 The sign follows the value and symbol.
1466+ if (__space)
1467+ {
1468+ // Pattern either ends with sign.
1469+ if (__precedes)
1470+ {
1471+ __ret.field[0] = symbol;
1472+ __ret.field[2] = value;
1473+ }
1474+ else
1475+ {
1476+ __ret.field[0] = value;
1477+ __ret.field[2] = symbol;
1478+ }
1479+ __ret.field[1] = space;
1480+ __ret.field[3] = sign;
1481+ }
1482+ else
1483+ {
1484+ // Pattern ends with sign then none.
1485+ if (__precedes)
1486+ {
1487+ __ret.field[0] = symbol;
1488+ __ret.field[1] = value;
1489+ }
1490+ else
1491+ {
1492+ __ret.field[0] = value;
1493+ __ret.field[1] = symbol;
1494+ }
1495+ __ret.field[2] = sign;
1496+ __ret.field[3] = none;
1497+ }
1498+ break;
1499+ case 3:
1500+ // 3 The sign immediately precedes the symbol.
1501+ if (__precedes)
1502+ {
1503+ __ret.field[0] = sign;
1504+ __ret.field[1] = symbol;
1505+ if (__space)
1506+ {
1507+ __ret.field[2] = space;
1508+ __ret.field[3] = value;
1509+ }
1510+ else
1511+ {
1512+ __ret.field[2] = value;
1513+ __ret.field[3] = none;
1514+ }
1515+ }
1516+ else
1517+ {
1518+ __ret.field[0] = value;
1519+ if (__space)
1520+ {
1521+ __ret.field[1] = space;
1522+ __ret.field[2] = sign;
1523+ __ret.field[3] = symbol;
1524+ }
1525+ else
1526+ {
1527+ __ret.field[1] = sign;
1528+ __ret.field[2] = symbol;
1529+ __ret.field[3] = none;
1530+ }
1531+ }
1532+ break;
1533+ case 4:
1534+ // 4 The sign immediately follows the symbol.
1535+ if (__precedes)
1536+ {
1537+ __ret.field[0] = symbol;
1538+ __ret.field[1] = sign;
1539+ if (__space)
1540+ {
1541+ __ret.field[2] = space;
1542+ __ret.field[3] = value;
1543+ }
1544+ else
1545+ {
1546+ __ret.field[2] = value;
1547+ __ret.field[3] = none;
1548+ }
1549+ }
1550+ else
1551+ {
1552+ __ret.field[0] = value;
1553+ if (__space)
1554+ {
1555+ __ret.field[1] = space;
1556+ __ret.field[2] = symbol;
1557+ __ret.field[3] = sign;
1558+ }
1559+ else
1560+ {
1561+ __ret.field[1] = symbol;
1562+ __ret.field[2] = sign;
1563+ __ret.field[3] = none;
1564+ }
1565+ }
1566+ break;
1567+ default:
1568+ ;
1569+ }
1570+ return __ret;
1571+ }
1572+
1573+ template<>
1574+ void
1575+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
1576+ const char*)
1577+ {
1578+ if (!_M_data)
1579+ _M_data = new __moneypunct_cache<char, true>;
1580+
1581+ if (!__cloc)
1582+ {
1583+ // "C" locale
1584+ _M_data->_M_decimal_point = '.';
1585+ _M_data->_M_thousands_sep = ',';
1586+ _M_data->_M_grouping = "";
1587+ _M_data->_M_grouping_size = 0;
1588+ _M_data->_M_curr_symbol = "";
1589+ _M_data->_M_curr_symbol_size = 0;
1590+ _M_data->_M_positive_sign = "";
1591+ _M_data->_M_positive_sign_size = 0;
1592+ _M_data->_M_negative_sign = "";
1593+ _M_data->_M_negative_sign_size = 0;
1594+ _M_data->_M_frac_digits = 0;
1595+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1596+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1597+
1598+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1599+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1600+ }
1601+ else
1602+ {
1603+ // Named locale.
1604+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1605+ __cloc));
1606+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1607+ __cloc));
1608+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1609+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1610+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1611+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1612+
1613+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1614+ if (!__nposn)
1615+ _M_data->_M_negative_sign = "()";
1616+ else
1617+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1618+ __cloc);
1619+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1620+
1621+ // _Intl == true
1622+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1623+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1624+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1625+ __cloc));
1626+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1627+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1628+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1629+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1630+ __pposn);
1631+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1632+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1633+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1634+ __nposn);
1635+ }
1636+ }
1637+
1638+ template<>
1639+ void
1640+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
1641+ const char*)
1642+ {
1643+ if (!_M_data)
1644+ _M_data = new __moneypunct_cache<char, false>;
1645+
1646+ if (!__cloc)
1647+ {
1648+ // "C" locale
1649+ _M_data->_M_decimal_point = '.';
1650+ _M_data->_M_thousands_sep = ',';
1651+ _M_data->_M_grouping = "";
1652+ _M_data->_M_grouping_size = 0;
1653+ _M_data->_M_curr_symbol = "";
1654+ _M_data->_M_curr_symbol_size = 0;
1655+ _M_data->_M_positive_sign = "";
1656+ _M_data->_M_positive_sign_size = 0;
1657+ _M_data->_M_negative_sign = "";
1658+ _M_data->_M_negative_sign_size = 0;
1659+ _M_data->_M_frac_digits = 0;
1660+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1661+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1662+
1663+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1664+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1665+ }
1666+ else
1667+ {
1668+ // Named locale.
1669+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1670+ __cloc));
1671+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1672+ __cloc));
1673+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1674+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1675+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1676+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1677+
1678+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1679+ if (!__nposn)
1680+ _M_data->_M_negative_sign = "()";
1681+ else
1682+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1683+ __cloc);
1684+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1685+
1686+ // _Intl == false
1687+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1688+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1689+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1690+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1691+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1692+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1693+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1694+ __pposn);
1695+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1696+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1697+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1698+ __nposn);
1699+ }
1700+ }
1701+
1702+ template<>
1703+ moneypunct<char, true>::~moneypunct()
1704+ { delete _M_data; }
1705+
1706+ template<>
1707+ moneypunct<char, false>::~moneypunct()
1708+ { delete _M_data; }
1709+
1710+#ifdef _GLIBCXX_USE_WCHAR_T
1711+ template<>
1712+ void
1713+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
1714+#ifdef __UCLIBC_HAS_XLOCALE__
1715+ const char*)
1716+#else
1717+ const char* __name)
1718+#endif
1719+ {
1720+ if (!_M_data)
1721+ _M_data = new __moneypunct_cache<wchar_t, true>;
1722+
1723+ if (!__cloc)
1724+ {
1725+ // "C" locale
1726+ _M_data->_M_decimal_point = L'.';
1727+ _M_data->_M_thousands_sep = L',';
1728+ _M_data->_M_grouping = "";
1729+ _M_data->_M_grouping_size = 0;
1730+ _M_data->_M_curr_symbol = L"";
1731+ _M_data->_M_curr_symbol_size = 0;
1732+ _M_data->_M_positive_sign = L"";
1733+ _M_data->_M_positive_sign_size = 0;
1734+ _M_data->_M_negative_sign = L"";
1735+ _M_data->_M_negative_sign_size = 0;
1736+ _M_data->_M_frac_digits = 0;
1737+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1738+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1739+
1740+ // Use ctype::widen code without the facet...
1741+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1742+ _M_data->_M_atoms[__i] =
1743+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
1744+ }
1745+ else
1746+ {
1747+ // Named locale.
1748+#ifdef __UCLIBC_HAS_XLOCALE__
1749+ __c_locale __old = __uselocale(__cloc);
1750+#else
1751+ // Switch to named locale so that mbsrtowcs will work.
1752+ char* __old = strdup(setlocale(LC_ALL, NULL));
1753+ setlocale(LC_ALL, __name);
1754+#endif
1755+
1756+#ifdef __UCLIBC_MJN3_ONLY__
1757+#warning fix this... should be monetary
1758+#endif
1759+#ifdef __UCLIBC__
1760+# ifdef __UCLIBC_HAS_XLOCALE__
1761+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1762+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1763+# else
1764+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1765+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1766+# endif
1767+#else
1768+ union { char *__s; wchar_t __w; } __u;
1769+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1770+ _M_data->_M_decimal_point = __u.__w;
1771+
1772+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1773+ _M_data->_M_thousands_sep = __u.__w;
1774+#endif
1775+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1776+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1777+
1778+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1779+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1780+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1781+
1782+ wchar_t* __wcs_ps = 0;
1783+ wchar_t* __wcs_ns = 0;
1784+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1785+ try
1786+ {
1787+ mbstate_t __state;
1788+ size_t __len = strlen(__cpossign);
1789+ if (__len)
1790+ {
1791+ ++__len;
1792+ memset(&__state, 0, sizeof(mbstate_t));
1793+ __wcs_ps = new wchar_t[__len];
1794+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1795+ _M_data->_M_positive_sign = __wcs_ps;
1796+ }
1797+ else
1798+ _M_data->_M_positive_sign = L"";
1799+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1800+
1801+ __len = strlen(__cnegsign);
1802+ if (!__nposn)
1803+ _M_data->_M_negative_sign = L"()";
1804+ else if (__len)
1805+ {
1806+ ++__len;
1807+ memset(&__state, 0, sizeof(mbstate_t));
1808+ __wcs_ns = new wchar_t[__len];
1809+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1810+ _M_data->_M_negative_sign = __wcs_ns;
1811+ }
1812+ else
1813+ _M_data->_M_negative_sign = L"";
1814+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1815+
1816+ // _Intl == true.
1817+ __len = strlen(__ccurr);
1818+ if (__len)
1819+ {
1820+ ++__len;
1821+ memset(&__state, 0, sizeof(mbstate_t));
1822+ wchar_t* __wcs = new wchar_t[__len];
1823+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1824+ _M_data->_M_curr_symbol = __wcs;
1825+ }
1826+ else
1827+ _M_data->_M_curr_symbol = L"";
1828+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1829+ }
1830+ catch (...)
1831+ {
1832+ delete _M_data;
1833+ _M_data = 0;
1834+ delete __wcs_ps;
1835+ delete __wcs_ns;
1836+#ifdef __UCLIBC_HAS_XLOCALE__
1837+ __uselocale(__old);
1838+#else
1839+ setlocale(LC_ALL, __old);
1840+ free(__old);
1841+#endif
1842+ __throw_exception_again;
1843+ }
1844+
1845+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1846+ __cloc));
1847+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1848+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1849+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1850+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1851+ __pposn);
1852+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1853+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1854+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1855+ __nposn);
1856+
1857+#ifdef __UCLIBC_HAS_XLOCALE__
1858+ __uselocale(__old);
1859+#else
1860+ setlocale(LC_ALL, __old);
1861+ free(__old);
1862+#endif
1863+ }
1864+ }
1865+
1866+ template<>
1867+ void
1868+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
1869+#ifdef __UCLIBC_HAS_XLOCALE__
1870+ const char*)
1871+#else
1872+ const char* __name)
1873+#endif
1874+ {
1875+ if (!_M_data)
1876+ _M_data = new __moneypunct_cache<wchar_t, false>;
1877+
1878+ if (!__cloc)
1879+ {
1880+ // "C" locale
1881+ _M_data->_M_decimal_point = L'.';
1882+ _M_data->_M_thousands_sep = L',';
1883+ _M_data->_M_grouping = "";
1884+ _M_data->_M_grouping_size = 0;
1885+ _M_data->_M_curr_symbol = L"";
1886+ _M_data->_M_curr_symbol_size = 0;
1887+ _M_data->_M_positive_sign = L"";
1888+ _M_data->_M_positive_sign_size = 0;
1889+ _M_data->_M_negative_sign = L"";
1890+ _M_data->_M_negative_sign_size = 0;
1891+ _M_data->_M_frac_digits = 0;
1892+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1893+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1894+
1895+ // Use ctype::widen code without the facet...
1896+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1897+ _M_data->_M_atoms[__i] =
1898+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
1899+ }
1900+ else
1901+ {
1902+ // Named locale.
1903+#ifdef __UCLIBC_HAS_XLOCALE__
1904+ __c_locale __old = __uselocale(__cloc);
1905+#else
1906+ // Switch to named locale so that mbsrtowcs will work.
1907+ char* __old = strdup(setlocale(LC_ALL, NULL));
1908+ setlocale(LC_ALL, __name);
1909+#endif
1910+
1911+#ifdef __UCLIBC_MJN3_ONLY__
1912+#warning fix this... should be monetary
1913+#endif
1914+#ifdef __UCLIBC__
1915+# ifdef __UCLIBC_HAS_XLOCALE__
1916+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1917+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1918+# else
1919+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1920+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1921+# endif
1922+#else
1923+ union { char *__s; wchar_t __w; } __u;
1924+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1925+ _M_data->_M_decimal_point = __u.__w;
1926+
1927+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1928+ _M_data->_M_thousands_sep = __u.__w;
1929+#endif
1930+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1931+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1932+
1933+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1934+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1935+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1936+
1937+ wchar_t* __wcs_ps = 0;
1938+ wchar_t* __wcs_ns = 0;
1939+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1940+ try
1941+ {
1942+ mbstate_t __state;
1943+ size_t __len;
1944+ __len = strlen(__cpossign);
1945+ if (__len)
1946+ {
1947+ ++__len;
1948+ memset(&__state, 0, sizeof(mbstate_t));
1949+ __wcs_ps = new wchar_t[__len];
1950+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1951+ _M_data->_M_positive_sign = __wcs_ps;
1952+ }
1953+ else
1954+ _M_data->_M_positive_sign = L"";
1955+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1956+
1957+ __len = strlen(__cnegsign);
1958+ if (!__nposn)
1959+ _M_data->_M_negative_sign = L"()";
1960+ else if (__len)
1961+ {
1962+ ++__len;
1963+ memset(&__state, 0, sizeof(mbstate_t));
1964+ __wcs_ns = new wchar_t[__len];
1965+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1966+ _M_data->_M_negative_sign = __wcs_ns;
1967+ }
1968+ else
1969+ _M_data->_M_negative_sign = L"";
1970+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1971+
1972+ // _Intl == true.
1973+ __len = strlen(__ccurr);
1974+ if (__len)
1975+ {
1976+ ++__len;
1977+ memset(&__state, 0, sizeof(mbstate_t));
1978+ wchar_t* __wcs = new wchar_t[__len];
1979+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1980+ _M_data->_M_curr_symbol = __wcs;
1981+ }
1982+ else
1983+ _M_data->_M_curr_symbol = L"";
1984+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1985+ }
1986+ catch (...)
1987+ {
1988+ delete _M_data;
1989+ _M_data = 0;
1990+ delete __wcs_ps;
1991+ delete __wcs_ns;
1992+#ifdef __UCLIBC_HAS_XLOCALE__
1993+ __uselocale(__old);
1994+#else
1995+ setlocale(LC_ALL, __old);
1996+ free(__old);
1997+#endif
1998+ __throw_exception_again;
1999+ }
2000+
2001+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
2002+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
2003+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
2004+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
2005+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
2006+ __pposn);
2007+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
2008+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
2009+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
2010+ __nposn);
2011+
2012+#ifdef __UCLIBC_HAS_XLOCALE__
2013+ __uselocale(__old);
2014+#else
2015+ setlocale(LC_ALL, __old);
2016+ free(__old);
2017+#endif
2018+ }
2019+ }
2020+
2021+ template<>
2022+ moneypunct<wchar_t, true>::~moneypunct()
2023+ {
2024+ if (_M_data->_M_positive_sign_size)
2025+ delete [] _M_data->_M_positive_sign;
2026+ if (_M_data->_M_negative_sign_size
2027+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2028+ delete [] _M_data->_M_negative_sign;
2029+ if (_M_data->_M_curr_symbol_size)
2030+ delete [] _M_data->_M_curr_symbol;
2031+ delete _M_data;
2032+ }
2033+
2034+ template<>
2035+ moneypunct<wchar_t, false>::~moneypunct()
2036+ {
2037+ if (_M_data->_M_positive_sign_size)
2038+ delete [] _M_data->_M_positive_sign;
2039+ if (_M_data->_M_negative_sign_size
2040+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2041+ delete [] _M_data->_M_negative_sign;
2042+ if (_M_data->_M_curr_symbol_size)
2043+ delete [] _M_data->_M_curr_symbol;
2044+ delete _M_data;
2045+ }
2046+#endif
2047+}
2048Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
2049===================================================================
2050--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2051+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-28 17:55:56.000000000 -0700
2052@@ -0,0 +1,160 @@
2053+// std::numpunct implementation details, GNU version -*- C++ -*-
2054+
2055+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2056+//
2057+// This file is part of the GNU ISO C++ Library. This library is free
2058+// software; you can redistribute it and/or modify it under the
2059+// terms of the GNU General Public License as published by the
2060+// Free Software Foundation; either version 2, or (at your option)
2061+// any later version.
2062+
2063+// This library is distributed in the hope that it will be useful,
2064+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2065+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2066+// GNU General Public License for more details.
2067+
2068+// You should have received a copy of the GNU General Public License along
2069+// with this library; see the file COPYING. If not, write to the Free
2070+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2071+// USA.
2072+
2073+// As a special exception, you may use this file as part of a free software
2074+// library without restriction. Specifically, if other files instantiate
2075+// templates or use macros or inline functions from this file, or you compile
2076+// this file and link it with other files to produce an executable, this
2077+// file does not by itself cause the resulting executable to be covered by
2078+// the GNU General Public License. This exception does not however
2079+// invalidate any other reasons why the executable file might be covered by
2080+// the GNU General Public License.
2081+
2082+//
2083+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
2084+//
2085+
2086+// Written by Benjamin Kosnik <bkoz@redhat.com>
2087+
2088+#define _LIBC
2089+#include <locale>
2090+#undef _LIBC
2091+#include <bits/c++locale_internal.h>
2092+
2093+#ifdef __UCLIBC_MJN3_ONLY__
2094+#warning tailor for stub locale support
2095+#endif
2096+#ifndef __UCLIBC_HAS_XLOCALE__
2097+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2098+#endif
2099+
2100+namespace std
2101+{
2102+ template<>
2103+ void
2104+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
2105+ {
2106+ if (!_M_data)
2107+ _M_data = new __numpunct_cache<char>;
2108+
2109+ if (!__cloc)
2110+ {
2111+ // "C" locale
2112+ _M_data->_M_grouping = "";
2113+ _M_data->_M_grouping_size = 0;
2114+ _M_data->_M_use_grouping = false;
2115+
2116+ _M_data->_M_decimal_point = '.';
2117+ _M_data->_M_thousands_sep = ',';
2118+
2119+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2120+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
2121+
2122+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2123+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
2124+ }
2125+ else
2126+ {
2127+ // Named locale.
2128+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
2129+ __cloc));
2130+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
2131+ __cloc));
2132+
2133+ // Check for NULL, which implies no grouping.
2134+ if (_M_data->_M_thousands_sep == '\0')
2135+ _M_data->_M_grouping = "";
2136+ else
2137+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2138+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2139+ }
2140+
2141+ // NB: There is no way to extact this info from posix locales.
2142+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2143+ _M_data->_M_truename = "true";
2144+ _M_data->_M_truename_size = 4;
2145+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2146+ _M_data->_M_falsename = "false";
2147+ _M_data->_M_falsename_size = 5;
2148+ }
2149+
2150+ template<>
2151+ numpunct<char>::~numpunct()
2152+ { delete _M_data; }
2153+
2154+#ifdef _GLIBCXX_USE_WCHAR_T
2155+ template<>
2156+ void
2157+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
2158+ {
2159+ if (!_M_data)
2160+ _M_data = new __numpunct_cache<wchar_t>;
2161+
2162+ if (!__cloc)
2163+ {
2164+ // "C" locale
2165+ _M_data->_M_grouping = "";
2166+ _M_data->_M_grouping_size = 0;
2167+ _M_data->_M_use_grouping = false;
2168+
2169+ _M_data->_M_decimal_point = L'.';
2170+ _M_data->_M_thousands_sep = L',';
2171+
2172+ // Use ctype::widen code without the facet...
2173+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2174+ _M_data->_M_atoms_out[__i] =
2175+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
2176+
2177+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2178+ _M_data->_M_atoms_in[__j] =
2179+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
2180+ }
2181+ else
2182+ {
2183+ // Named locale.
2184+ // NB: In the GNU model wchar_t is always 32 bit wide.
2185+ union { char *__s; wchar_t __w; } __u;
2186+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
2187+ _M_data->_M_decimal_point = __u.__w;
2188+
2189+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
2190+ _M_data->_M_thousands_sep = __u.__w;
2191+
2192+ if (_M_data->_M_thousands_sep == L'\0')
2193+ _M_data->_M_grouping = "";
2194+ else
2195+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2196+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2197+ }
2198+
2199+ // NB: There is no way to extact this info from posix locales.
2200+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2201+ _M_data->_M_truename = L"true";
2202+ _M_data->_M_truename_size = 4;
2203+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2204+ _M_data->_M_falsename = L"false";
2205+ _M_data->_M_falsename_size = 5;
2206+ }
2207+
2208+ template<>
2209+ numpunct<wchar_t>::~numpunct()
2210+ { delete _M_data; }
2211+ #endif
2212+}
2213Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
2214===================================================================
2215--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2216+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-28 17:55:56.000000000 -0700
2217@@ -0,0 +1,406 @@
2218+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2219+
2220+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2221+//
2222+// This file is part of the GNU ISO C++ Library. This library is free
2223+// software; you can redistribute it and/or modify it under the
2224+// terms of the GNU General Public License as published by the
2225+// Free Software Foundation; either version 2, or (at your option)
2226+// any later version.
2227+
2228+// This library is distributed in the hope that it will be useful,
2229+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2230+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2231+// GNU General Public License for more details.
2232+
2233+// You should have received a copy of the GNU General Public License along
2234+// with this library; see the file COPYING. If not, write to the Free
2235+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2236+// USA.
2237+
2238+// As a special exception, you may use this file as part of a free software
2239+// library without restriction. Specifically, if other files instantiate
2240+// templates or use macros or inline functions from this file, or you compile
2241+// this file and link it with other files to produce an executable, this
2242+// file does not by itself cause the resulting executable to be covered by
2243+// the GNU General Public License. This exception does not however
2244+// invalidate any other reasons why the executable file might be covered by
2245+// the GNU General Public License.
2246+
2247+//
2248+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
2249+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
2250+//
2251+
2252+// Written by Benjamin Kosnik <bkoz@redhat.com>
2253+
2254+#include <locale>
2255+#include <bits/c++locale_internal.h>
2256+
2257+#ifdef __UCLIBC_MJN3_ONLY__
2258+#warning tailor for stub locale support
2259+#endif
2260+#ifndef __UCLIBC_HAS_XLOCALE__
2261+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2262+#endif
2263+
2264+namespace std
2265+{
2266+ template<>
2267+ void
2268+ __timepunct<char>::
2269+ _M_put(char* __s, size_t __maxlen, const char* __format,
2270+ const tm* __tm) const
2271+ {
2272+#ifdef __UCLIBC_HAS_XLOCALE__
2273+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
2274+ _M_c_locale_timepunct);
2275+#else
2276+ char* __old = strdup(setlocale(LC_ALL, NULL));
2277+ setlocale(LC_ALL, _M_name_timepunct);
2278+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
2279+ setlocale(LC_ALL, __old);
2280+ free(__old);
2281+#endif
2282+ // Make sure __s is null terminated.
2283+ if (__len == 0)
2284+ __s[0] = '\0';
2285+ }
2286+
2287+ template<>
2288+ void
2289+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
2290+ {
2291+ if (!_M_data)
2292+ _M_data = new __timepunct_cache<char>;
2293+
2294+ if (!__cloc)
2295+ {
2296+ // "C" locale
2297+ _M_c_locale_timepunct = _S_get_c_locale();
2298+
2299+ _M_data->_M_date_format = "%m/%d/%y";
2300+ _M_data->_M_date_era_format = "%m/%d/%y";
2301+ _M_data->_M_time_format = "%H:%M:%S";
2302+ _M_data->_M_time_era_format = "%H:%M:%S";
2303+ _M_data->_M_date_time_format = "";
2304+ _M_data->_M_date_time_era_format = "";
2305+ _M_data->_M_am = "AM";
2306+ _M_data->_M_pm = "PM";
2307+ _M_data->_M_am_pm_format = "";
2308+
2309+ // Day names, starting with "C"'s Sunday.
2310+ _M_data->_M_day1 = "Sunday";
2311+ _M_data->_M_day2 = "Monday";
2312+ _M_data->_M_day3 = "Tuesday";
2313+ _M_data->_M_day4 = "Wednesday";
2314+ _M_data->_M_day5 = "Thursday";
2315+ _M_data->_M_day6 = "Friday";
2316+ _M_data->_M_day7 = "Saturday";
2317+
2318+ // Abbreviated day names, starting with "C"'s Sun.
2319+ _M_data->_M_aday1 = "Sun";
2320+ _M_data->_M_aday2 = "Mon";
2321+ _M_data->_M_aday3 = "Tue";
2322+ _M_data->_M_aday4 = "Wed";
2323+ _M_data->_M_aday5 = "Thu";
2324+ _M_data->_M_aday6 = "Fri";
2325+ _M_data->_M_aday7 = "Sat";
2326+
2327+ // Month names, starting with "C"'s January.
2328+ _M_data->_M_month01 = "January";
2329+ _M_data->_M_month02 = "February";
2330+ _M_data->_M_month03 = "March";
2331+ _M_data->_M_month04 = "April";
2332+ _M_data->_M_month05 = "May";
2333+ _M_data->_M_month06 = "June";
2334+ _M_data->_M_month07 = "July";
2335+ _M_data->_M_month08 = "August";
2336+ _M_data->_M_month09 = "September";
2337+ _M_data->_M_month10 = "October";
2338+ _M_data->_M_month11 = "November";
2339+ _M_data->_M_month12 = "December";
2340+
2341+ // Abbreviated month names, starting with "C"'s Jan.
2342+ _M_data->_M_amonth01 = "Jan";
2343+ _M_data->_M_amonth02 = "Feb";
2344+ _M_data->_M_amonth03 = "Mar";
2345+ _M_data->_M_amonth04 = "Apr";
2346+ _M_data->_M_amonth05 = "May";
2347+ _M_data->_M_amonth06 = "Jun";
2348+ _M_data->_M_amonth07 = "Jul";
2349+ _M_data->_M_amonth08 = "Aug";
2350+ _M_data->_M_amonth09 = "Sep";
2351+ _M_data->_M_amonth10 = "Oct";
2352+ _M_data->_M_amonth11 = "Nov";
2353+ _M_data->_M_amonth12 = "Dec";
2354+ }
2355+ else
2356+ {
2357+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2358+
2359+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
2360+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
2361+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
2362+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
2363+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
2364+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
2365+ __cloc);
2366+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
2367+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
2368+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
2369+
2370+ // Day names, starting with "C"'s Sunday.
2371+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
2372+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
2373+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
2374+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
2375+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
2376+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
2377+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
2378+
2379+ // Abbreviated day names, starting with "C"'s Sun.
2380+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
2381+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
2382+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
2383+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
2384+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
2385+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
2386+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
2387+
2388+ // Month names, starting with "C"'s January.
2389+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
2390+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
2391+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
2392+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
2393+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
2394+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
2395+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
2396+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
2397+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
2398+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
2399+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
2400+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
2401+
2402+ // Abbreviated month names, starting with "C"'s Jan.
2403+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
2404+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
2405+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
2406+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
2407+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
2408+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
2409+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
2410+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
2411+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
2412+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
2413+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
2414+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
2415+ }
2416+ }
2417+
2418+#ifdef _GLIBCXX_USE_WCHAR_T
2419+ template<>
2420+ void
2421+ __timepunct<wchar_t>::
2422+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
2423+ const tm* __tm) const
2424+ {
2425+#ifdef __UCLIBC_HAS_XLOCALE__
2426+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2427+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
2428+ _M_c_locale_timepunct);
2429+#else
2430+ char* __old = strdup(setlocale(LC_ALL, NULL));
2431+ setlocale(LC_ALL, _M_name_timepunct);
2432+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
2433+ setlocale(LC_ALL, __old);
2434+ free(__old);
2435+#endif
2436+ // Make sure __s is null terminated.
2437+ if (__len == 0)
2438+ __s[0] = L'\0';
2439+ }
2440+
2441+ template<>
2442+ void
2443+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
2444+ {
2445+ if (!_M_data)
2446+ _M_data = new __timepunct_cache<wchar_t>;
2447+
2448+#warning wide time stuff
2449+// if (!__cloc)
2450+ {
2451+ // "C" locale
2452+ _M_c_locale_timepunct = _S_get_c_locale();
2453+
2454+ _M_data->_M_date_format = L"%m/%d/%y";
2455+ _M_data->_M_date_era_format = L"%m/%d/%y";
2456+ _M_data->_M_time_format = L"%H:%M:%S";
2457+ _M_data->_M_time_era_format = L"%H:%M:%S";
2458+ _M_data->_M_date_time_format = L"";
2459+ _M_data->_M_date_time_era_format = L"";
2460+ _M_data->_M_am = L"AM";
2461+ _M_data->_M_pm = L"PM";
2462+ _M_data->_M_am_pm_format = L"";
2463+
2464+ // Day names, starting with "C"'s Sunday.
2465+ _M_data->_M_day1 = L"Sunday";
2466+ _M_data->_M_day2 = L"Monday";
2467+ _M_data->_M_day3 = L"Tuesday";
2468+ _M_data->_M_day4 = L"Wednesday";
2469+ _M_data->_M_day5 = L"Thursday";
2470+ _M_data->_M_day6 = L"Friday";
2471+ _M_data->_M_day7 = L"Saturday";
2472+
2473+ // Abbreviated day names, starting with "C"'s Sun.
2474+ _M_data->_M_aday1 = L"Sun";
2475+ _M_data->_M_aday2 = L"Mon";
2476+ _M_data->_M_aday3 = L"Tue";
2477+ _M_data->_M_aday4 = L"Wed";
2478+ _M_data->_M_aday5 = L"Thu";
2479+ _M_data->_M_aday6 = L"Fri";
2480+ _M_data->_M_aday7 = L"Sat";
2481+
2482+ // Month names, starting with "C"'s January.
2483+ _M_data->_M_month01 = L"January";
2484+ _M_data->_M_month02 = L"February";
2485+ _M_data->_M_month03 = L"March";
2486+ _M_data->_M_month04 = L"April";
2487+ _M_data->_M_month05 = L"May";
2488+ _M_data->_M_month06 = L"June";
2489+ _M_data->_M_month07 = L"July";
2490+ _M_data->_M_month08 = L"August";
2491+ _M_data->_M_month09 = L"September";
2492+ _M_data->_M_month10 = L"October";
2493+ _M_data->_M_month11 = L"November";
2494+ _M_data->_M_month12 = L"December";
2495+
2496+ // Abbreviated month names, starting with "C"'s Jan.
2497+ _M_data->_M_amonth01 = L"Jan";
2498+ _M_data->_M_amonth02 = L"Feb";
2499+ _M_data->_M_amonth03 = L"Mar";
2500+ _M_data->_M_amonth04 = L"Apr";
2501+ _M_data->_M_amonth05 = L"May";
2502+ _M_data->_M_amonth06 = L"Jun";
2503+ _M_data->_M_amonth07 = L"Jul";
2504+ _M_data->_M_amonth08 = L"Aug";
2505+ _M_data->_M_amonth09 = L"Sep";
2506+ _M_data->_M_amonth10 = L"Oct";
2507+ _M_data->_M_amonth11 = L"Nov";
2508+ _M_data->_M_amonth12 = L"Dec";
2509+ }
2510+#if 0
2511+ else
2512+ {
2513+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2514+
2515+ union { char *__s; wchar_t *__w; } __u;
2516+
2517+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
2518+ _M_data->_M_date_format = __u.__w;
2519+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
2520+ _M_data->_M_date_era_format = __u.__w;
2521+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
2522+ _M_data->_M_time_format = __u.__w;
2523+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
2524+ _M_data->_M_time_era_format = __u.__w;
2525+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
2526+ _M_data->_M_date_time_format = __u.__w;
2527+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
2528+ _M_data->_M_date_time_era_format = __u.__w;
2529+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
2530+ _M_data->_M_am = __u.__w;
2531+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
2532+ _M_data->_M_pm = __u.__w;
2533+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
2534+ _M_data->_M_am_pm_format = __u.__w;
2535+
2536+ // Day names, starting with "C"'s Sunday.
2537+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
2538+ _M_data->_M_day1 = __u.__w;
2539+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
2540+ _M_data->_M_day2 = __u.__w;
2541+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
2542+ _M_data->_M_day3 = __u.__w;
2543+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
2544+ _M_data->_M_day4 = __u.__w;
2545+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
2546+ _M_data->_M_day5 = __u.__w;
2547+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
2548+ _M_data->_M_day6 = __u.__w;
2549+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
2550+ _M_data->_M_day7 = __u.__w;
2551+
2552+ // Abbreviated day names, starting with "C"'s Sun.
2553+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
2554+ _M_data->_M_aday1 = __u.__w;
2555+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
2556+ _M_data->_M_aday2 = __u.__w;
2557+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
2558+ _M_data->_M_aday3 = __u.__w;
2559+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
2560+ _M_data->_M_aday4 = __u.__w;
2561+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
2562+ _M_data->_M_aday5 = __u.__w;
2563+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
2564+ _M_data->_M_aday6 = __u.__w;
2565+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
2566+ _M_data->_M_aday7 = __u.__w;
2567+
2568+ // Month names, starting with "C"'s January.
2569+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
2570+ _M_data->_M_month01 = __u.__w;
2571+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
2572+ _M_data->_M_month02 = __u.__w;
2573+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
2574+ _M_data->_M_month03 = __u.__w;
2575+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
2576+ _M_data->_M_month04 = __u.__w;
2577+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
2578+ _M_data->_M_month05 = __u.__w;
2579+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
2580+ _M_data->_M_month06 = __u.__w;
2581+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
2582+ _M_data->_M_month07 = __u.__w;
2583+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
2584+ _M_data->_M_month08 = __u.__w;
2585+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
2586+ _M_data->_M_month09 = __u.__w;
2587+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
2588+ _M_data->_M_month10 = __u.__w;
2589+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
2590+ _M_data->_M_month11 = __u.__w;
2591+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
2592+ _M_data->_M_month12 = __u.__w;
2593+
2594+ // Abbreviated month names, starting with "C"'s Jan.
2595+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
2596+ _M_data->_M_amonth01 = __u.__w;
2597+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
2598+ _M_data->_M_amonth02 = __u.__w;
2599+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
2600+ _M_data->_M_amonth03 = __u.__w;
2601+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
2602+ _M_data->_M_amonth04 = __u.__w;
2603+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
2604+ _M_data->_M_amonth05 = __u.__w;
2605+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
2606+ _M_data->_M_amonth06 = __u.__w;
2607+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
2608+ _M_data->_M_amonth07 = __u.__w;
2609+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
2610+ _M_data->_M_amonth08 = __u.__w;
2611+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
2612+ _M_data->_M_amonth09 = __u.__w;
2613+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
2614+ _M_data->_M_amonth10 = __u.__w;
2615+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
2616+ _M_data->_M_amonth11 = __u.__w;
2617+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
2618+ _M_data->_M_amonth12 = __u.__w;
2619+ }
2620+#endif // 0
2621+ }
2622+#endif
2623+}
2624Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
2625===================================================================
2626--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2627+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-08-28 17:55:56.000000000 -0700
2628@@ -0,0 +1,68 @@
2629+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2630+
2631+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2632+//
2633+// This file is part of the GNU ISO C++ Library. This library is free
2634+// software; you can redistribute it and/or modify it under the
2635+// terms of the GNU General Public License as published by the
2636+// Free Software Foundation; either version 2, or (at your option)
2637+// any later version.
2638+
2639+// This library is distributed in the hope that it will be useful,
2640+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2641+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2642+// GNU General Public License for more details.
2643+
2644+// You should have received a copy of the GNU General Public License along
2645+// with this library; see the file COPYING. If not, write to the Free
2646+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2647+// USA.
2648+
2649+// As a special exception, you may use this file as part of a free software
2650+// library without restriction. Specifically, if other files instantiate
2651+// templates or use macros or inline functions from this file, or you compile
2652+// this file and link it with other files to produce an executable, this
2653+// file does not by itself cause the resulting executable to be covered by
2654+// the GNU General Public License. This exception does not however
2655+// invalidate any other reasons why the executable file might be covered by
2656+// the GNU General Public License.
2657+
2658+//
2659+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
2660+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
2661+//
2662+
2663+// Written by Benjamin Kosnik <bkoz@redhat.com>
2664+
2665+ template<typename _CharT>
2666+ __timepunct<_CharT>::__timepunct(size_t __refs)
2667+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2668+ _M_name_timepunct(_S_get_c_name())
2669+ { _M_initialize_timepunct(); }
2670+
2671+ template<typename _CharT>
2672+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
2673+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
2674+ _M_name_timepunct(_S_get_c_name())
2675+ { _M_initialize_timepunct(); }
2676+
2677+ template<typename _CharT>
2678+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
2679+ size_t __refs)
2680+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2681+ _M_name_timepunct(__s)
2682+ {
2683+ char* __tmp = new char[std::strlen(__s) + 1];
2684+ std::strcpy(__tmp, __s);
2685+ _M_name_timepunct = __tmp;
2686+ _M_initialize_timepunct(__cloc);
2687+ }
2688+
2689+ template<typename _CharT>
2690+ __timepunct<_CharT>::~__timepunct()
2691+ {
2692+ if (_M_name_timepunct != _S_get_c_name())
2693+ delete [] _M_name_timepunct;
2694+ delete _M_data;
2695+ _S_destroy_c_locale(_M_c_locale_timepunct);
2696+ }
2697Index: gcc-4.3.2/libstdc++-v3/configure
2698===================================================================
2699--- gcc-4.3.2.orig/libstdc++-v3/configure 2008-07-07 12:49:54.000000000 -0700
2700+++ gcc-4.3.2/libstdc++-v3/configure 2008-08-28 18:02:13.000000000 -0700
2701@@ -14003,7 +14003,7 @@
2702 enableval="$enable_clocale"
2703
2704 case "$enableval" in
2705- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
2706+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
2707 *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
2708 echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
2709 { (exit 1); exit 1; }; } ;;
2710@@ -14036,6 +14036,9 @@
2711 # Default to "generic".
2712 if test $enable_clocale_flag = auto; then
2713 case ${target_os} in
2714+ *-uclibc*)
2715+ enable_clocale_flag=uclibc
2716+ ;;
2717 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
2718 enable_clocale_flag=gnu
2719 ;;
2720@@ -14424,6 +14427,76 @@
2721 CTIME_CC=config/locale/generic/time_members.cc
2722 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
2723 ;;
2724+ uclibc)
2725+ echo "$as_me:$LINENO: result: uclibc" >&5
2726+echo "${ECHO_T}uclibc" >&6
2727+
2728+ # Declare intention to use gettext, and add support for specific
2729+ # languages.
2730+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
2731+ ALL_LINGUAS="de fr"
2732+
2733+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
2734+ # Extract the first word of "msgfmt", so it can be a program name with args.
2735+set dummy msgfmt; ac_word=$2
2736+echo "$as_me:$LINENO: checking for $ac_word" >&5
2737+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
2739+ echo $ECHO_N "(cached) $ECHO_C" >&6
2740+else
2741+ if test -n "$check_msgfmt"; then
2742+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
2743+else
2744+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2745+for as_dir in $PATH
2746+do
2747+ IFS=$as_save_IFS
2748+ test -z "$as_dir" && as_dir=.
2749+ for ac_exec_ext in '' $ac_executable_extensions; do
2750+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2751+ ac_cv_prog_check_msgfmt="yes"
2752+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2753+ break 2
2754+ fi
2755+done
2756+done
2757+
2758+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
2759+fi
2760+fi
2761+check_msgfmt=$ac_cv_prog_check_msgfmt
2762+if test -n "$check_msgfmt"; then
2763+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
2764+echo "${ECHO_T}$check_msgfmt" >&6
2765+else
2766+ echo "$as_me:$LINENO: result: no" >&5
2767+echo "${ECHO_T}no" >&6
2768+fi
2769+
2770+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
2771+ USE_NLS=yes
2772+ fi
2773+ # Export the build objects.
2774+ for ling in $ALL_LINGUAS; do \
2775+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
2776+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
2777+ done
2778+
2779+
2780+
2781+ CLOCALE_H=config/locale/uclibc/c_locale.h
2782+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
2783+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
2784+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
2785+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
2786+ CMESSAGES_H=config/locale/uclibc/messages_members.h
2787+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
2788+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
2789+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
2790+ CTIME_H=config/locale/uclibc/time_members.h
2791+ CTIME_CC=config/locale/uclibc/time_members.cc
2792+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
2793+ ;;
2794 esac
2795
2796 # This is where the testsuite looks for locale catalogs, using the
2797@@ -17016,7 +17089,7 @@
2798
2799 # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
2800 cat > conftest.$ac_ext << EOF
2801-#line 17019 "configure"
2802+#line 17092 "configure"
2803 int main()
2804 {
2805 // NB: _Atomic_word not necessarily int.
2806Index: gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h
2807===================================================================
2808--- gcc-4.3.2.orig/libstdc++-v3/include/c_compatibility/wchar.h 2007-03-04 14:59:49.000000000 -0800
2809+++ gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h 2008-08-28 17:55:56.000000000 -0700
2810@@ -106,7 +106,9 @@
2811 using std::wmemcpy;
2812 using std::wmemmove;
2813 using std::wmemset;
2814+#if _GLIBCXX_HAVE_WCSFTIME
2815 using std::wcsftime;
2816+#endif
2817
2818 #if _GLIBCXX_USE_C99
2819 using std::wcstold;
2820Index: gcc-4.3.2/libstdc++-v3/include/c_std/cwchar
2821===================================================================
2822--- gcc-4.3.2.orig/libstdc++-v3/include/c_std/cwchar 2007-05-27 07:50:21.000000000 -0700
2823+++ gcc-4.3.2/libstdc++-v3/include/c_std/cwchar 2008-08-28 17:55:56.000000000 -0700
2824@@ -182,7 +182,9 @@
2825 using ::wcscoll;
2826 using ::wcscpy;
2827 using ::wcscspn;
2828+#if _GLIBCXX_HAVE_WCSFTIME
2829 using ::wcsftime;
2830+#endif
2831 using ::wcslen;
2832 using ::wcsncat;
2833 using ::wcsncmp;
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch
new file mode 100644
index 0000000000..f39e65220c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch
@@ -0,0 +1,233 @@
1Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
2===================================================================
3--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700
4+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700
5@@ -60,4 +60,49 @@
6 extern "C" __typeof(wctype_l) __wctype_l;
7 #endif
8
9+# define __nl_langinfo_l nl_langinfo_l
10+# define __strcoll_l strcoll_l
11+# define __strftime_l strftime_l
12+# define __strtod_l strtod_l
13+# define __strtof_l strtof_l
14+# define __strtold_l strtold_l
15+# define __strxfrm_l strxfrm_l
16+# define __newlocale newlocale
17+# define __freelocale freelocale
18+# define __duplocale duplocale
19+# define __uselocale uselocale
20+
21+# ifdef _GLIBCXX_USE_WCHAR_T
22+# define __iswctype_l iswctype_l
23+# define __towlower_l towlower_l
24+# define __towupper_l towupper_l
25+# define __wcscoll_l wcscoll_l
26+# define __wcsftime_l wcsftime_l
27+# define __wcsxfrm_l wcsxfrm_l
28+# define __wctype_l wctype_l
29+# endif
30+
31+#else
32+# define __nl_langinfo_l(N, L) nl_langinfo((N))
33+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
34+# define __strtod_l(S, E, L) strtod((S), (E))
35+# define __strtof_l(S, E, L) strtof((S), (E))
36+# define __strtold_l(S, E, L) strtold((S), (E))
37+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
38+# warning should dummy __newlocale check for C|POSIX ?
39+# define __newlocale(a, b, c) NULL
40+# define __freelocale(a) ((void)0)
41+# define __duplocale(a) __c_locale()
42+//# define __uselocale ?
43+//
44+# ifdef _GLIBCXX_USE_WCHAR_T
45+# define __iswctype_l(C, M, L) iswctype((C), (M))
46+# define __towlower_l(C, L) towlower((C))
47+# define __towupper_l(C, L) towupper((C))
48+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
49+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
50+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
51+# define __wctype_l(S, L) wctype((S))
52+# endif
53+
54 #endif // GLIBC 2.3 and later
55Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
56===================================================================
57--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700
58+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700
59@@ -39,20 +39,6 @@
60 #include <langinfo.h>
61 #include <bits/c++locale_internal.h>
62
63-#ifndef __UCLIBC_HAS_XLOCALE__
64-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
65-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
66-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
67-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
68-#define __strtof_l(S, E, L) strtof((S), (E))
69-#define __strtod_l(S, E, L) strtod((S), (E))
70-#define __strtold_l(S, E, L) strtold((S), (E))
71-#warning should dummy __newlocale check for C|POSIX ?
72-#define __newlocale(a, b, c) NULL
73-#define __freelocale(a) ((void)0)
74-#define __duplocale(a) __c_locale()
75-#endif
76-
77 namespace std
78 {
79 template<>
80Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
81===================================================================
82--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700
83+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700
84@@ -36,13 +36,6 @@
85 #include <locale>
86 #include <bits/c++locale_internal.h>
87
88-#ifndef __UCLIBC_HAS_XLOCALE__
89-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
90-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
91-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
92-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
93-#endif
94-
95 namespace std
96 {
97 // These are basically extensions to char_traits, and perhaps should
98Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
99===================================================================
100--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700
101+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700
102@@ -43,10 +43,6 @@
103 #warning tailor for stub locale support
104 #endif
105
106-#ifndef __UCLIBC_HAS_XLOCALE__
107-#define __nl_langinfo_l(N, L) nl_langinfo((N))
108-#endif
109-
110 namespace std
111 {
112 // Construct and return valid pattern consisting of some combination of:
113Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
114===================================================================
115--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700
116+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700
117@@ -41,9 +41,6 @@
118 #ifdef __UCLIBC_MJN3_ONLY__
119 #warning tailor for stub locale support
120 #endif
121-#ifndef __UCLIBC_HAS_XLOCALE__
122-#define __nl_langinfo_l(N, L) nl_langinfo((N))
123-#endif
124
125 namespace std
126 {
127Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
128===================================================================
129--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700
130+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700
131@@ -40,9 +40,6 @@
132 #ifdef __UCLIBC_MJN3_ONLY__
133 #warning tailor for stub locale support
134 #endif
135-#ifndef __UCLIBC_HAS_XLOCALE__
136-#define __nl_langinfo_l(N, L) nl_langinfo((N))
137-#endif
138
139 namespace std
140 {
141Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
142===================================================================
143--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700
144+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700
145@@ -38,13 +38,6 @@
146 #undef _LIBC
147 #include <bits/c++locale_internal.h>
148
149-#ifndef __UCLIBC_HAS_XLOCALE__
150-#define __wctype_l(S, L) wctype((S))
151-#define __towupper_l(C, L) towupper((C))
152-#define __towlower_l(C, L) towlower((C))
153-#define __iswctype_l(C, M, L) iswctype((C), (M))
154-#endif
155-
156 namespace std
157 {
158 // NB: The other ctype<char> specializations are in src/locale.cc and
159Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
160===================================================================
161--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700
162+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700
163@@ -39,13 +39,10 @@
164 #ifdef __UCLIBC_MJN3_ONLY__
165 #warning fix gettext stuff
166 #endif
167-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
168-extern "C" char *__dcgettext(const char *domainname,
169- const char *msgid, int category);
170 #undef gettext
171-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
172+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
173+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
174 #else
175-#undef gettext
176 #define gettext(msgid) (msgid)
177 #endif
178
179Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
180===================================================================
181--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700
182+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700
183@@ -36,15 +36,11 @@
184 #ifdef __UCLIBC_MJN3_ONLY__
185 #warning fix prototypes for *textdomain funcs
186 #endif
187-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
188-extern "C" char *__textdomain(const char *domainname);
189-extern "C" char *__bindtextdomain(const char *domainname,
190- const char *dirname);
191-#else
192-#undef __textdomain
193-#undef __bindtextdomain
194-#define __textdomain(D) ((void)0)
195-#define __bindtextdomain(D,P) ((void)0)
196+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
197+#undef textdomain
198+#undef bindtextdomain
199+#define textdomain(D) ((void)0)
200+#define bindtextdomain(D,P) ((void)0)
201 #endif
202
203 // Non-virtual member functions.
204@@ -70,7 +66,7 @@
205 messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
206 const char* __dir) const
207 {
208- __bindtextdomain(__s.c_str(), __dir);
209+ bindtextdomain(__s.c_str(), __dir);
210 return this->do_open(__s, __loc);
211 }
212
213@@ -90,7 +86,7 @@
214 {
215 // No error checking is done, assume the catalog exists and can
216 // be used.
217- __textdomain(__s.c_str());
218+ textdomain(__s.c_str());
219 return 0;
220 }
221
222Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
223===================================================================
224--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700
225+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700
226@@ -68,6 +68,7 @@
227 {
228 extern "C" __typeof(uselocale) __uselocale;
229 }
230+#define __uselocale uselocale
231 #endif
232
233 namespace std
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/204-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..160ab35bb3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
1--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
2+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
3@@ -401,7 +401,7 @@
4 # ifdef __UCLIBC_HAS_XLOCALE__
5 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
6 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
7-# else
8+# elif defined __UCLIBC_HAS_LOCALE__
9 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
10 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
11 # endif
12@@ -556,7 +556,7 @@
13 # ifdef __UCLIBC_HAS_XLOCALE__
14 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
15 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
16-# else
17+# elif defined __UCLIBC_HAS_LOCALE__
18 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
19 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
20 # endif
21--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
22+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
23@@ -127,12 +127,25 @@
24 {
25 // Named locale.
26 // NB: In the GNU model wchar_t is always 32 bit wide.
27+#ifdef __UCLIBC_MJN3_ONLY__
28+#warning fix this... should be numeric
29+#endif
30+#ifdef __UCLIBC__
31+# ifdef __UCLIBC_HAS_XLOCALE__
32+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
33+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
34+# elif defined __UCLIBC_HAS_LOCALE__
35+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
36+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
37+# endif
38+#else
39 union { char *__s; wchar_t __w; } __u;
40 __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
41 _M_data->_M_decimal_point = __u.__w;
42
43 __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
44 _M_data->_M_thousands_sep = __u.__w;
45+#endif
46
47 if (_M_data->_M_thousands_sep == L'\0')
48 _M_data->_M_grouping = "";
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/205-uclibc-locale-update.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
new file mode 100644
index 0000000000..48eaa1d442
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
@@ -0,0 +1,519 @@
1Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
2===================================================================
3--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
4+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
5@@ -39,23 +39,20 @@
6 #include <langinfo.h>
7 #include <bits/c++locale_internal.h>
8
9-namespace std
10-{
11+_GLIBCXX_BEGIN_NAMESPACE(std)
12+
13 template<>
14 void
15 __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
16 const __c_locale& __cloc)
17 {
18- if (!(__err & ios_base::failbit))
19- {
20- char* __sanity;
21- errno = 0;
22- float __f = __strtof_l(__s, &__sanity, __cloc);
23- if (__sanity != __s && errno != ERANGE)
24- __v = __f;
25- else
26- __err |= ios_base::failbit;
27- }
28+ char* __sanity;
29+ errno = 0;
30+ float __f = __strtof_l(__s, &__sanity, __cloc);
31+ if (__sanity != __s && errno != ERANGE)
32+ __v = __f;
33+ else
34+ __err |= ios_base::failbit;
35 }
36
37 template<>
38@@ -63,16 +60,13 @@
39 __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
40 const __c_locale& __cloc)
41 {
42- if (!(__err & ios_base::failbit))
43- {
44- char* __sanity;
45- errno = 0;
46- double __d = __strtod_l(__s, &__sanity, __cloc);
47- if (__sanity != __s && errno != ERANGE)
48- __v = __d;
49- else
50- __err |= ios_base::failbit;
51- }
52+ char* __sanity;
53+ errno = 0;
54+ double __d = __strtod_l(__s, &__sanity, __cloc);
55+ if (__sanity != __s && errno != ERANGE)
56+ __v = __d;
57+ else
58+ __err |= ios_base::failbit;
59 }
60
61 template<>
62@@ -80,16 +74,13 @@
63 __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
64 const __c_locale& __cloc)
65 {
66- if (!(__err & ios_base::failbit))
67- {
68- char* __sanity;
69- errno = 0;
70- long double __ld = __strtold_l(__s, &__sanity, __cloc);
71- if (__sanity != __s && errno != ERANGE)
72- __v = __ld;
73- else
74- __err |= ios_base::failbit;
75- }
76+ char* __sanity;
77+ errno = 0;
78+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
79+ if (__sanity != __s && errno != ERANGE)
80+ __v = __ld;
81+ else
82+ __err |= ios_base::failbit;
83 }
84
85 void
86@@ -110,17 +101,18 @@
87 void
88 locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
89 {
90- if (_S_get_c_locale() != __cloc)
91+ if (__cloc && _S_get_c_locale() != __cloc)
92 __freelocale(__cloc);
93 }
94
95 __c_locale
96 locale::facet::_S_clone_c_locale(__c_locale& __cloc)
97 { return __duplocale(__cloc); }
98-} // namespace std
99
100-namespace __gnu_cxx
101-{
102+_GLIBCXX_END_NAMESPACE
103+
104+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
105+
106 const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
107 {
108 "LC_CTYPE",
109@@ -138,9 +130,11 @@
110 "LC_IDENTIFICATION"
111 #endif
112 };
113-}
114
115-namespace std
116-{
117+_GLIBCXX_END_NAMESPACE
118+
119+_GLIBCXX_BEGIN_NAMESPACE(std)
120+
121 const char* const* const locale::_S_categories = __gnu_cxx::category_names;
122-} // namespace std
123+
124+_GLIBCXX_END_NAMESPACE
125Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
126===================================================================
127--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
128+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
129@@ -33,16 +33,20 @@
130
131 // Written by Benjamin Kosnik <bkoz@redhat.com>
132
133+#include <features.h>
134+#ifdef __UCLIBC_HAS_LOCALE__
135 #define _LIBC
136 #include <locale>
137 #undef _LIBC
138+#else
139+#include <locale>
140+#endif
141 #include <bits/c++locale_internal.h>
142
143-namespace std
144-{
145+_GLIBCXX_BEGIN_NAMESPACE(std)
146+
147 // NB: The other ctype<char> specializations are in src/locale.cc and
148 // various /config/os/* files.
149- template<>
150 ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
151 : ctype<char>(0, false, __refs)
152 {
153@@ -57,6 +61,8 @@
154 #endif
155 }
156 }
157+ ctype_byname<char>::~ctype_byname()
158+ { }
159
160 #ifdef _GLIBCXX_USE_WCHAR_T
161 ctype<wchar_t>::__wmask_type
162@@ -138,17 +144,33 @@
163 ctype<wchar_t>::
164 do_is(mask __m, wchar_t __c) const
165 {
166- // Highest bitmask in ctype_base == 10, but extra in "C"
167- // library for blank.
168+ // The case of __m == ctype_base::space is particularly important,
169+ // due to its use in many istream functions. Therefore we deal with
170+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
171+ // is the mask corresponding to ctype_base::space. NB: an encoding
172+ // change would not affect correctness!
173+
174 bool __ret = false;
175- const size_t __bitmasksize = 11;
176- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
177- if (__m & _M_bit[__bitcur]
178- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
179- {
180- __ret = true;
181- break;
182- }
183+ if (__m == _M_bit[5])
184+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
185+ else
186+ {
187+ // Highest bitmask in ctype_base == 10, but extra in "C"
188+ // library for blank.
189+ const size_t __bitmasksize = 11;
190+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
191+ if (__m & _M_bit[__bitcur])
192+ {
193+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
194+ {
195+ __ret = true;
196+ break;
197+ }
198+ else if (__m == _M_bit[__bitcur])
199+ break;
200+ }
201+ }
202+
203 return __ret;
204 }
205
206@@ -290,4 +312,5 @@
207 #endif
208 }
209 #endif // _GLIBCXX_USE_WCHAR_T
210-}
211+
212+_GLIBCXX_END_NAMESPACE
213Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
214===================================================================
215--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
216+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
217@@ -53,12 +53,16 @@
218 template<typename _CharT>
219 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
220 size_t __refs)
221- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
222- _M_name_messages(__s)
223+ : facet(__refs), _M_c_locale_messages(NULL),
224+ _M_name_messages(NULL)
225 {
226- char* __tmp = new char[std::strlen(__s) + 1];
227- std::strcpy(__tmp, __s);
228+ const size_t __len = std::strlen(__s) + 1;
229+ char* __tmp = new char[__len];
230+ std::memcpy(__tmp, __s, __len);
231 _M_name_messages = __tmp;
232+
233+ // Last to avoid leaking memory if new throws.
234+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
235 }
236
237 template<typename _CharT>
238Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
239===================================================================
240--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
241+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
242@@ -33,9 +33,14 @@
243
244 // Written by Benjamin Kosnik <bkoz@redhat.com>
245
246+#include <features.h>
247+#ifdef __UCLIBC_HAS_LOCALE__
248 #define _LIBC
249 #include <locale>
250 #undef _LIBC
251+#else
252+#include <locale>
253+#endif
254 #include <bits/c++locale_internal.h>
255
256 #ifdef __UCLIBC_MJN3_ONLY__
257@@ -206,7 +211,7 @@
258 }
259 break;
260 default:
261- ;
262+ __ret = pattern();
263 }
264 return __ret;
265 }
266@@ -390,7 +395,9 @@
267 __c_locale __old = __uselocale(__cloc);
268 #else
269 // Switch to named locale so that mbsrtowcs will work.
270- char* __old = strdup(setlocale(LC_ALL, NULL));
271+ char* __old = setlocale(LC_ALL, NULL);
272+ const size_t __llen = strlen(__old) + 1;
273+ char* __sav = new char[__llen];
274 setlocale(LC_ALL, __name);
275 #endif
276
277@@ -477,8 +484,8 @@
278 #ifdef __UCLIBC_HAS_XLOCALE__
279 __uselocale(__old);
280 #else
281- setlocale(LC_ALL, __old);
282- free(__old);
283+ setlocale(LC_ALL, __sav);
284+ delete [] __sav;
285 #endif
286 __throw_exception_again;
287 }
288@@ -498,8 +505,8 @@
289 #ifdef __UCLIBC_HAS_XLOCALE__
290 __uselocale(__old);
291 #else
292- setlocale(LC_ALL, __old);
293- free(__old);
294+ setlocale(LC_ALL, __sav);
295+ delete [] __sav;
296 #endif
297 }
298 }
299@@ -545,8 +552,11 @@
300 __c_locale __old = __uselocale(__cloc);
301 #else
302 // Switch to named locale so that mbsrtowcs will work.
303- char* __old = strdup(setlocale(LC_ALL, NULL));
304- setlocale(LC_ALL, __name);
305+ char* __old = setlocale(LC_ALL, NULL);
306+ const size_t __llen = strlen(__old) + 1;
307+ char* __sav = new char[__llen];
308+ memcpy(__sav, __old, __llen);
309+ setlocale(LC_ALL, __name);
310 #endif
311
312 #ifdef __UCLIBC_MJN3_ONLY__
313@@ -633,8 +643,8 @@
314 #ifdef __UCLIBC_HAS_XLOCALE__
315 __uselocale(__old);
316 #else
317- setlocale(LC_ALL, __old);
318- free(__old);
319+ setlocale(LC_ALL, __sav);
320+ delete [] __sav;
321 #endif
322 __throw_exception_again;
323 }
324@@ -653,8 +663,8 @@
325 #ifdef __UCLIBC_HAS_XLOCALE__
326 __uselocale(__old);
327 #else
328- setlocale(LC_ALL, __old);
329- free(__old);
330+ setlocale(LC_ALL, __sav);
331+ delete [] __sav;
332 #endif
333 }
334 }
335Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
336===================================================================
337--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
338+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
339@@ -33,9 +33,14 @@
340
341 // Written by Benjamin Kosnik <bkoz@redhat.com>
342
343+#include <features.h>
344+#ifdef __UCLIBC_HAS_LOCALE__
345 #define _LIBC
346 #include <locale>
347 #undef _LIBC
348+#else
349+#include <locale>
350+#endif
351 #include <bits/c++locale_internal.h>
352
353 #ifdef __UCLIBC_MJN3_ONLY__
354Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
355===================================================================
356--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
357+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
358@@ -50,12 +50,21 @@
359 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
360 size_t __refs)
361 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
362- _M_name_timepunct(__s)
363+ _M_name_timepunct(NULL)
364 {
365- char* __tmp = new char[std::strlen(__s) + 1];
366- std::strcpy(__tmp, __s);
367+ const size_t __len = std::strlen(__s) + 1;
368+ char* __tmp = new char[__len];
369+ std::memcpy(__tmp, __s, __len);
370 _M_name_timepunct = __tmp;
371- _M_initialize_timepunct(__cloc);
372+
373+ try
374+ { _M_initialize_timepunct(__cloc); }
375+ catch(...)
376+ {
377+ delete [] _M_name_timepunct;
378+ __throw_exception_again;
379+ }
380+
381 }
382
383 template<typename _CharT>
384Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
385===================================================================
386--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
387+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
388@@ -39,21 +39,23 @@
389 #pragma GCC system_header
390
391 #include <cstring> // get std::strlen
392-#include <cstdio> // get std::snprintf or std::sprintf
393+#include <cstdio> // get std::vsnprintf or std::vsprintf
394 #include <clocale>
395 #include <langinfo.h> // For codecvt
396 #ifdef __UCLIBC_MJN3_ONLY__
397 #warning fix this
398 #endif
399-#ifdef __UCLIBC_HAS_LOCALE__
400+#ifdef _GLIBCXX_USE_ICONV
401 #include <iconv.h> // For codecvt using iconv, iconv_t
402 #endif
403-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
404-#include <libintl.h> // For messages
405+#ifdef HAVE_LIBINTL_H
406+#include <libintl.h> // For messages
407 #endif
408+#include <cstdarg>
409
410 #ifdef __UCLIBC_MJN3_ONLY__
411 #warning what is _GLIBCXX_C_LOCALE_GNU for
412+// psm: used in os/gnu-linux/ctype_noninline.h
413 #endif
414 #define _GLIBCXX_C_LOCALE_GNU 1
415
416@@ -78,23 +80,25 @@
417 #else
418 typedef int* __c_locale;
419 #endif
420-
421- // Convert numeric value of type _Tv to string and return length of
422- // string. If snprintf is available use it, otherwise fall back to
423- // the unsafe sprintf which, in general, can be dangerous and should
424+ // Convert numeric value of type double to string and return length of
425+ // string. If vsnprintf is available use it, otherwise fall back to
426+ // the unsafe vsprintf which, in general, can be dangerous and should
427 // be avoided.
428- template<typename _Tv>
429- int
430- __convert_from_v(char* __out,
431- const int __size __attribute__ ((__unused__)),
432- const char* __fmt,
433-#ifdef __UCLIBC_HAS_XCLOCALE__
434- _Tv __v, const __c_locale& __cloc, int __prec)
435+ inline int
436+ __convert_from_v(const __c_locale&
437+#ifndef __UCLIBC_HAS_XCLOCALE__
438+ __cloc __attribute__ ((__unused__))
439+#endif
440+ ,
441+ char* __out,
442+ const int __size,
443+ const char* __fmt, ...)
444 {
445+ va_list __args;
446+#ifdef __UCLIBC_HAS_XCLOCALE__
447+
448 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
449 #else
450- _Tv __v, const __c_locale&, int __prec)
451- {
452 # ifdef __UCLIBC_HAS_LOCALE__
453 char* __old = std::setlocale(LC_ALL, NULL);
454 char* __sav = new char[std::strlen(__old) + 1];
455@@ -103,7 +107,9 @@
456 # endif
457 #endif
458
459- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
460+ va_start(__args, __fmt);
461+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
462+ va_end(__args);
463
464 #ifdef __UCLIBC_HAS_XCLOCALE__
465 __gnu_cxx::__uselocale(__old);
466Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
467===================================================================
468--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
469+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
470@@ -53,11 +53,14 @@
471 const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
472 _M_c_locale_timepunct);
473 #else
474- char* __old = strdup(setlocale(LC_ALL, NULL));
475+ char* __old = setlocale(LC_ALL, NULL);
476+ const size_t __llen = strlen(__old) + 1;
477+ char* __sav = new char[__llen];
478+ memcpy(__sav, __old, __llen);
479 setlocale(LC_ALL, _M_name_timepunct);
480 const size_t __len = strftime(__s, __maxlen, __format, __tm);
481- setlocale(LC_ALL, __old);
482- free(__old);
483+ setlocale(LC_ALL, __sav);
484+ delete [] __sav;
485 #endif
486 // Make sure __s is null terminated.
487 if (__len == 0)
488@@ -207,11 +210,14 @@
489 const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
490 _M_c_locale_timepunct);
491 #else
492- char* __old = strdup(setlocale(LC_ALL, NULL));
493+ char* __old = setlocale(LC_ALL, NULL);
494+ const size_t __llen = strlen(__old) + 1;
495+ char* __sav = new char[__llen];
496+ memcpy(__sav, __old, __llen);
497 setlocale(LC_ALL, _M_name_timepunct);
498 const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
499- setlocale(LC_ALL, __old);
500- free(__old);
501+ setlocale(LC_ALL, __sav);
502+ delete [] __sav;
503 #endif
504 // Make sure __s is null terminated.
505 if (__len == 0)
506Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
507===================================================================
508--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
509+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
510@@ -31,6 +31,9 @@
511
512 #include <bits/c++config.h>
513 #include <clocale>
514+#include <cstdlib>
515+#include <cstring>
516+#include <cstddef>
517
518 #ifdef __UCLIBC_MJN3_ONLY__
519 #warning clean this up
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/300-libstdc++-pic.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/300-libstdc++-pic.patch
new file mode 100644
index 0000000000..89d03a85e5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/300-libstdc++-pic.patch
@@ -0,0 +1,46 @@
1# DP: Build and install libstdc++_pic.a library.
2
3--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
4+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
5@@ -214,6 +214,10 @@
6 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
7
8
9+install-exec-local:
10+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
11+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
12+
13 # Added bits to build debug library.
14 if GLIBCXX_BUILD_DEBUG
15 all-local: build_debug
16--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
17+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
18@@ -627,7 +627,7 @@
19
20 install-data-am: install-data-local
21
22-install-exec-am: install-toolexeclibLTLIBRARIES
23+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
24
25 install-info: install-info-am
26
27@@ -660,6 +660,7 @@
28 distclean-libtool distclean-tags distdir dvi dvi-am html \
29 html-am info info-am install install-am install-data \
30 install-data-am install-data-local install-exec \
31+ install-exec-local \
32 install-exec-am install-info install-info-am install-man \
33 install-strip install-toolexeclibLTLIBRARIES installcheck \
34 installcheck-am installdirs maintainer-clean \
35@@ -745,6 +746,11 @@
36 install_debug:
37 (cd ${debugdir} && $(MAKE) \
38 toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
39+
40+install-exec-local:
41+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
42+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
43+
44 # Tell versions [3.59,3.63) of GNU make to not export all variables.
45 # Otherwise a system limit (for SysV at least) may be exceeded.
46 .NOEXPORT:
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/301-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..0e2092f3fb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
1--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
2+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
3@@ -500,7 +500,7 @@
4 #ifdef __linux__
5 # include <features.h>
6 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
7- && !defined(__ia64__)
8+ && !defined(__ia64__) && !defined(__UCLIBC__)
9 # ifndef GC_HAVE_BUILTIN_BACKTRACE
10 # define GC_HAVE_BUILTIN_BACKTRACE
11 # endif
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/302-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/302-c99-snprintf.patch
new file mode 100644
index 0000000000..02865865e5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/302-c99-snprintf.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.3.1/libstdc++-v3/include/c_std/cstdio
2===================================================================
3--- gcc-4.3.1.orig/libstdc++-v3/include/c_std/cstdio 2006-12-07 01:35:57.000000000 -0800
4+++ gcc-4.3.1/libstdc++-v3/include/c_std/cstdio 2008-08-16 02:11:37.000000000 -0700
5@@ -144,7 +144,7 @@
6
7 _GLIBCXX_END_NAMESPACE
8
9-#if _GLIBCXX_USE_C99
10+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
11
12 #undef snprintf
13 #undef vfscanf
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/303-c99-complex-ugly-hack.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/303-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..2ccc80d9bb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
1--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
2+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
3@@ -7194,6 +7194,9 @@
4 cat >>conftest.$ac_ext <<_ACEOF
5 /* end confdefs.h. */
6 #include <complex.h>
7+#ifdef __UCLIBC__
8+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
9+#endif
10 int
11 main ()
12 {
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/304-index_macro.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/304-index_macro.patch
new file mode 100644
index 0000000000..d8e476555d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/304-index_macro.patch
@@ -0,0 +1,24 @@
1--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
2+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
3@@ -59,6 +59,9 @@
4 #include <bits/allocator.h>
5 #include <ext/hash_fun.h>
6
7+/* cope w/ index defined as macro, SuSv3 proposal */
8+#undef index
9+
10 # ifdef __GC
11 # define __GC_CONST const
12 # else
13--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
14+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
15@@ -53,6 +53,9 @@
16 #include <ext/memory> // For uninitialized_copy_n
17 #include <ext/numeric> // For power
18
19+/* cope w/ index defined as macro, SuSv3 proposal */
20+#undef index
21+
22 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
23
24 using std::size_t;
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/305-libmudflap-susv3-legacy.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..374b1f8659
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
1Index: gcc-4.2/libmudflap/mf-hooks2.c
2===================================================================
3--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
4+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
5@@ -427,7 +427,7 @@
6 {
7 TRACE ("%s\n", __PRETTY_FUNCTION__);
8 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
9- bzero (s, n);
10+ memset (s, 0, n);
11 }
12
13
14@@ -437,7 +437,7 @@
15 TRACE ("%s\n", __PRETTY_FUNCTION__);
16 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
17 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
18- bcopy (src, dest, n);
19+ memmove (dest, src, n);
20 }
21
22
23@@ -447,7 +447,7 @@
24 TRACE ("%s\n", __PRETTY_FUNCTION__);
25 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
26 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
27- return bcmp (s1, s2, n);
28+ return n == 0 ? 0 : memcmp (s1, s2, n);
29 }
30
31
32@@ -456,7 +456,7 @@
33 size_t n = strlen (s);
34 TRACE ("%s\n", __PRETTY_FUNCTION__);
35 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
36- return index (s, c);
37+ return strchr (s, c);
38 }
39
40
41@@ -465,7 +465,7 @@
42 size_t n = strlen (s);
43 TRACE ("%s\n", __PRETTY_FUNCTION__);
44 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
45- return rindex (s, c);
46+ return strrchr (s, c);
47 }
48
49 /* XXX: stpcpy, memccpy */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/306-libstdc++-namespace.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/306-libstdc++-namespace.patch
new file mode 100644
index 0000000000..69587ca63a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/306-libstdc++-namespace.patch
@@ -0,0 +1,36 @@
1diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
2--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
3+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
4@@ -32,7 +32,8 @@
5 //
6
7 // Written by Benjamin Kosnik <bkoz@redhat.com>
8-
9+namespace std
10+{
11 #ifdef __UCLIBC_MJN3_ONLY__
12 #warning fix prototypes for *textdomain funcs
13 #endif
14@@ -115,3 +116,4 @@
15 this->_S_create_c_locale(this->_M_c_locale_messages, __s);
16 }
17 }
18+}
19diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
20--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
21+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
22@@ -33,7 +33,8 @@
23 //
24
25 // Written by Benjamin Kosnik <bkoz@redhat.com>
26-
27+namespace std
28+{
29 template<typename _CharT>
30 __timepunct<_CharT>::__timepunct(size_t __refs)
31 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
32@@ -74,3 +75,4 @@
33 delete _M_data;
34 _S_destroy_c_locale(_M_c_locale_timepunct);
35 }
36+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/307-locale_facets.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/307-locale_facets.patch
new file mode 100644
index 0000000000..774fcfa2ca
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/307-locale_facets.patch
@@ -0,0 +1,19 @@
1This patch fixes a bug into ostream::operator<<(double) due to the wrong size
2passed into the __convert_from_v method. The wrong size is then passed to
3std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
4
5Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
6
7Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
8===================================================================
9--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
10+++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
11@@ -1004,7 +1004,7 @@
12 const int __cs_size = __fixed ? __max_exp + __prec + 4
13 : __max_digits * 2 + __prec;
14 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
15- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
16+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
17 __prec, __v);
18 #endif
19
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/402-libbackend_dep_gcov-iov.h.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 0000000000..0bf115c45d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.2/gcc/Makefile.in
2===================================================================
3--- gcc-4.2/gcc/Makefile.in (revision 121758)
4+++ gcc-4.2/gcc/Makefile.in (working copy)
5@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
6 # FIXME: writing proper dependencies for this is a *LOT* of work.
7 libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
8 insn-config.h insn-flags.h insn-codes.h insn-constants.h \
9- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
10+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
11 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
12 -DTARGET_NAME=\"$(target_noncanonical)\" \
13 -DLOCALEDIR=\"$(localedir)\" \
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/602-sdk-libstdc++-includes.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/602-sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..23fce7544d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
1--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
2+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
3@@ -21,5 +21,5 @@
4 $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
5
6 # -I/-D flags to pass when compiling.
7-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
8+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
9
10--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
11+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
12@@ -35,7 +35,7 @@
13
14 libmath_la_SOURCES = stubs.c
15
16-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
17+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
18
19 # Only compiling "C" sources in this directory.
20 LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/64bithack.patch
new file mode 100644
index 0000000000..f6931b85af
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/64bithack.patch
@@ -0,0 +1,33 @@
1By default gcc places 64 bit libs in a lib64 directory. This makes it use
2"lib" instead.
3
4RP 25/7/10
5
6Index: gcc-4.3.3/gcc/config/i386/t-linux64
7===================================================================
8--- gcc-4.3.3.orig/gcc/config/i386/t-linux64 2007-09-27 20:56:06.000000000 +0100
9+++ gcc-4.3.3/gcc/config/i386/t-linux64 2010-08-03 12:55:04.642189070 +0100
10@@ -12,8 +12,8 @@
11 # MULTILIB_OSDIRNAMES according to what is found on the target.
12
13 MULTILIB_OPTIONS = m64/m32
14-MULTILIB_DIRNAMES = 64 32
15-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
16+MULTILIB_DIRNAMES = . 32
17+MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
18
19 LIBGCC = stmp-multilib
20 INSTALL_LIBGCC = install-multilib
21Index: gcc-4.3.3/gcc/config/i386/linux64.h
22===================================================================
23--- gcc-4.3.3.orig/gcc/config/i386/linux64.h 2007-08-02 11:49:31.000000000 +0100
24+++ gcc-4.3.3/gcc/config/i386/linux64.h 2010-08-03 13:01:51.621182117 +0100
25@@ -54,7 +54,7 @@
26 done. */
27
28 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
29-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
30+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
31
32 #if TARGET_64BIT_DEFAULT
33 #define SPEC_32 "m32"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/740-sh-pr24836.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/740-sh-pr24836.patch
new file mode 100644
index 0000000000..7992282cff
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
1http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
2http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
3
4--- gcc/gcc/configure.ac (revision 106699)
5+++ gcc/gcc/configure.ac (working copy)
6@@ -2446,7 +2446,7 @@
7 tls_first_minor=14
8 tls_as_opt="-m64 -Aesame --fatal-warnings"
9 ;;
10- sh-*-* | sh[34]-*-*)
11+ sh-*-* | sh[34]*-*-*)
12 conftest_s='
13 .section ".tdata","awT",@progbits
14 foo: .long 25
15--- gcc/gcc/configure
16+++ gcc/gcc/configure
17@@ -14846,7 +14846,7 @@
18 tls_first_minor=14
19 tls_as_opt="-m64 -Aesame --fatal-warnings"
20 ;;
21- sh-*-* | sh[34]-*-*)
22+ sh-*-* | sh[34]*-*-*)
23 conftest_s='
24 .section ".tdata","awT",@progbits
25 foo: .long 25
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/800-arm-bigendian.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/800-arm-bigendian.patch
new file mode 100644
index 0000000000..f433942783
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/800-arm-bigendian.patch
@@ -0,0 +1,34 @@
1By Lennert Buytenhek <buytenh@wantstofly.org>
2Adds support for arm*b-linux* big-endian ARM targets
3
4See http://gcc.gnu.org/PR16350
5
6Index: gcc-4.3.2/gcc/config/arm/linux-elf.h
7===================================================================
8--- gcc-4.3.2.orig/gcc/config/arm/linux-elf.h 2007-11-08 05:44:09.000000000 -0800
9+++ gcc-4.3.2/gcc/config/arm/linux-elf.h 2008-08-28 21:08:30.000000000 -0700
10@@ -51,7 +51,7 @@
11
12 #undef MULTILIB_DEFAULTS
13 #define MULTILIB_DEFAULTS \
14- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
15+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
16
17 /* Now we define the strings used to build the spec file. */
18 #undef LIB_SPEC
19Index: gcc-4.3.2/gcc/config.gcc
20===================================================================
21--- gcc-4.3.2.orig/gcc/config.gcc 2008-08-28 20:57:39.000000000 -0700
22+++ gcc-4.3.2/gcc/config.gcc 2008-08-28 21:00:11.000000000 -0700
23@@ -742,6 +742,11 @@
24 esac
25 tmake_file="${tmake_file} t-linux arm/t-arm"
26 case ${target} in
27+ arm*b-*)
28+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
29+ ;;
30+ esac
31+ case ${target} in
32 arm*-*-linux-*eabi)
33 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
34 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/801-arm-bigendian-eabi.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/801-arm-bigendian-eabi.patch
new file mode 100644
index 0000000000..54490fc24f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/801-arm-bigendian-eabi.patch
@@ -0,0 +1,14 @@
1Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
2===================================================================
3--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
4+++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
5@@ -48,7 +48,8 @@
6 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
7
8 #undef SUBTARGET_EXTRA_LINK_SPEC
9-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
10+#define SUBTARGET_EXTRA_LINK_SPEC \
11+ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
12
13 /* Use ld-linux.so.3 so that it will be possible to run "classic"
14 GNU/Linux binaries on an EABI system. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/904-flatten-switch-stmt-00.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/904-flatten-switch-stmt-00.patch
new file mode 100644
index 0000000000..8fac37c4df
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,153 @@
1Hi,
2
3The attached patch makes sure that we create smaller object code for
4simple switch statements. We just make sure to flatten the switch
5statement into an if-else chain, basically.
6
7This fixes a size-regression as compared to gcc-3.4, as can be seen
8below.
9
102007-04-15 Bernhard Fischer <..>
11
12 * stmt.c (expand_case): Do not create a complex binary tree when
13 optimizing for size but rather use the simple ordered list.
14 (emit_case_nodes): do not emit jumps to the default_label when
15 optimizing for size.
16
17Not regtested so far.
18Comments?
19
20Attached is the test switch.c mentioned below.
21
22$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
23gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
24$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
25gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
26
27$ size switch-*.o
28 text data bss dec hex filename
29 169 0 0 169 a9 switch-2.95.o
30 115 0 0 115 73 switch-3.3.o
31 103 0 0 103 67 switch-3.4.o
32 124 0 0 124 7c switch-4.0.o
33 124 0 0 124 7c switch-4.1.o
34 124 0 0 124 7c switch-4.2.orig-HEAD.o
35 95 0 0 95 5f switch-4.3-HEAD.o
36 124 0 0 124 7c switch-4.3.orig-HEAD.o
37 166 0 0 166 a6 switch-CHAIN-2.95.o
38 111 0 0 111 6f switch-CHAIN-3.3.o
39 95 0 0 95 5f switch-CHAIN-3.4.o
40 95 0 0 95 5f switch-CHAIN-4.0.o
41 95 0 0 95 5f switch-CHAIN-4.1.o
42 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
43 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
44 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
45
46
47Content-Type: text/x-diff; charset=us-ascii
48Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
49
50Index: gcc-4.2.0/gcc/stmt.c
51===================================================================
52--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
53+++ gcc-4.2.0/gcc/stmt.c (working copy)
54@@ -2517,7 +2517,11 @@ expand_case (tree exp)
55 use_cost_table
56 = (TREE_CODE (orig_type) != ENUMERAL_TYPE
57 && estimate_case_costs (case_list));
58- balance_case_nodes (&case_list, NULL);
59+ /* When optimizing for size, we want a straight list to avoid
60+ jumps as much as possible. This basically creates an if-else
61+ chain. */
62+ if (!optimize_size)
63+ balance_case_nodes (&case_list, NULL);
64 emit_case_nodes (index, case_list, default_label, index_type);
65 emit_jump (default_label);
66 }
67@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
68 {
69 if (!node_has_low_bound (node, index_type))
70 {
71+ if (!optimize_size) /* don't jl to the .default_label. */
72 emit_cmp_and_jump_insns (index,
73 convert_modes
74 (mode, imode,
75
76
77Content-Type: text/x-csrc; charset=us-ascii
78Content-Disposition: attachment; filename="switch.c"
79
80int
81commutative_tree_code (int code)
82{
83#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
84#ifndef CHAIN
85 switch (code)
86 {
87# if 1
88 CASE(1,3)
89 CASE(3,2)
90 CASE(5,8)
91 CASE(7,1)
92 CASE(33,4)
93 CASE(44,9)
94 CASE(55,10)
95 CASE(66,-1)
96 CASE(77,99)
97 CASE(666,0)
98# else
99 case 1:
100 return 3;
101 case 3:
102 return 2;
103 case 5:
104 return 8;
105 case 7:
106 return 1;
107 case 33:
108 return 4;
109 case 44:
110 return 9;
111 case 55:
112 return 10;
113 case 66:
114 return -1;
115 case 77:
116 return 99;
117 case 666:
118 return 0;
119# endif
120 default:
121 break;
122 }
123 return 4711;
124
125#else
126 if (code == 1)
127 return 3;
128 else if (code == 3)
129 return 2;
130 else if (code == 5)
131 return 8;
132 else if (code == 7)
133 return 1;
134 else if (code == 33)
135 return 4;
136 else if (code == 44)
137 return 9;
138 else if (code == 55)
139 return 10;
140 else if (code == 66)
141 return -1;
142 else if (code == 77)
143 return 99;
144 else if (code == 666)
145 return 0;
146 else
147 return 4711;
148#endif
149}
150
151
152--AhhlLboLdkugWU4S--
153
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/arm-nolibfloat.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
1# Dimitry Andric <dimitry@andric.com>, 2004-05-01
2#
3# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
4# anymore. (The required functions are now in libgcc.)
5#
6# Fixes errors like
7# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
8# collect2: ld returned 1 exit status
9# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
10# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
11
12Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
13===================================================================
14--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
15+++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
16@@ -56,7 +56,7 @@
17 %{shared:-lc} \
18 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
19
20-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
21+#define LIBGCC_SPEC "-lgcc"
22
23 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
24 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/arm-softfloat.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-softfloat.patch
new file mode 100644
index 0000000000..5e1edd9208
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-softfloat.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.0.2/gcc/config/arm/t-linux
2===================================================================
3--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
4+++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
5@@ -4,7 +4,10 @@
6 LIBGCC2_DEBUG_CFLAGS = -g0
7
8 LIB1ASMSRC = arm/lib1funcs.asm
9-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
10+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
11+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
12+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
13+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
14
15 # MULTILIB_OPTIONS = mhard-float/msoft-float
16 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb-cache.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb-cache.patch
new file mode 100644
index 0000000000..fa63846c8c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb-cache.patch
@@ -0,0 +1,29 @@
1--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200
2+++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200
3@@ -44,6 +44,7 @@
4
5 /* Clear the instruction cache from `beg' to `end'. This makes an
6 inline system call to SYS_cacheflush. */
7+#if !defined(__thumb__)
8 #define CLEAR_INSN_CACHE(BEG, END) \
9 { \
10 register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
11@@ -53,3 +54,18 @@
12 : "=r" (_beg) \
13 : "0" (_beg), "r" (_end), "r" (_flg)); \
14 }
15+#else
16+#define CLEAR_INSN_CACHE(BEG, END) \
17+{ \
18+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
19+ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
20+ register unsigned long _flg __asm ("a3") = 0; \
21+ register unsigned long _swi __asm ("a4") = 0xf0002; \
22+ __asm __volatile ("push {r7}\n" \
23+ " mov r7,a4\n" \
24+ " swi 0 @ sys_cacheflush\n" \
25+ " pop {r7}\n" \
26+ : "=r" (_beg) \
27+ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
28+}
29+#endif
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb.patch
new file mode 100644
index 0000000000..7b0b8b2ddc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb.patch
@@ -0,0 +1,43 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6Index: gcc-4.3.1/gcc/config/arm/lib1funcs.asm
7===================================================================
8--- gcc-4.3.1.orig/gcc/config/arm/lib1funcs.asm 2007-05-30 12:04:09.000000000 -0700
9+++ gcc-4.3.1/gcc/config/arm/lib1funcs.asm 2008-08-28 21:51:17.000000000 -0700
10@@ -1225,11 +1225,12 @@
11 code here switches to the correct mode before executing the function. */
12
13 .text
14- .align 0
15+ .align 1
16 .force_thumb
17
18 .macro call_via register
19 THUMB_FUNC_START _call_via_\register
20+ .hidden SYM (_call_via_\register)
21
22 bx \register
23 nop
24@@ -1330,6 +1331,7 @@
25 .code 16
26
27 THUMB_FUNC_START _interwork_call_via_\register
28+ .hidden SYM (_interwork_call_via_\register)
29
30 bx pc
31 nop
32Index: gcc-4.3.1/gcc/config/arm/t-linux
33===================================================================
34--- gcc-4.3.1.orig/gcc/config/arm/t-linux 2008-08-28 21:25:24.000000000 -0700
35+++ gcc-4.3.1/gcc/config/arm/t-linux 2008-08-28 21:51:17.000000000 -0700
36@@ -6,6 +6,7 @@
37 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
38 _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
39 _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
40+ _call_via_rX \
41 _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
42
43 # MULTILIB_OPTIONS = mhard-float/msoft-float
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/cache-amnesia.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/cache-amnesia.patch
new file mode 100644
index 0000000000..fb4d1a26d8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/cache-amnesia.patch
@@ -0,0 +1,31 @@
1---
2 gcc/configure | 2 +-
3 gcc/configure.ac | 2 +-
4 2 files changed, 2 insertions(+), 2 deletions(-)
5
6Index: gcc-4.3.1/gcc/configure
7===================================================================
8--- gcc-4.3.1.orig/gcc/configure 2008-08-20 00:27:57.000000000 -0700
9+++ gcc-4.3.1/gcc/configure 2008-08-20 00:45:11.000000000 -0700
10@@ -12813,7 +12813,7 @@ else
11 esac
12 saved_CFLAGS="${CFLAGS}"
13 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
14- ${realsrcdir}/configure \
15+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
16 --enable-languages=${enable_languages-all} \
17 --target=$target_alias --host=$build_alias --build=$build_alias
18 CFLAGS="${saved_CFLAGS}"
19Index: gcc-4.3.1/gcc/configure.ac
20===================================================================
21--- gcc-4.3.1.orig/gcc/configure.ac 2008-08-20 00:27:57.000000000 -0700
22+++ gcc-4.3.1/gcc/configure.ac 2008-08-20 00:44:52.000000000 -0700
23@@ -1480,7 +1480,7 @@ else
24 esac
25 saved_CFLAGS="${CFLAGS}"
26 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
27- ${realsrcdir}/configure \
28+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
29 --enable-languages=${enable_languages-all} \
30 --target=$target_alias --host=$build_alias --build=$build_alias
31 CFLAGS="${saved_CFLAGS}"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/debian/arm-unbreak-eabi-armv4t.dpatch b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/arm-unbreak-eabi-armv4t.dpatch
new file mode 100644
index 0000000000..7bb8887068
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/arm-unbreak-eabi-armv4t.dpatch
@@ -0,0 +1,36 @@
1#! /bin/sh -e
2
3# DP: Fix armv4t build on ARM
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p1 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
27+++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
28@@ -44,7 +44,7 @@
29 The ARM10TDMI core is the default for armv5t, so set
30 SUBTARGET_CPU_DEFAULT to achieve this. */
31 #undef SUBTARGET_CPU_DEFAULT
32-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
33+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
34
35 /* TARGET_BIG_ENDIAN_DEFAULT is set in
36 config.gcc for big endian configurations. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/debian/gcc-ice-hack.dpatch b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/gcc-ice-hack.dpatch
new file mode 100644
index 0000000000..84c5ef2ebd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/gcc-ice-hack.dpatch
@@ -0,0 +1,331 @@
1#! /bin/sh -e
2
3# DP: Retry the build on an ice, save the calling options and preprocessed
4# DP: source when the ice is reproducible.
5
6dir=
7if [ $# -eq 3 -a "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 ;;
18 -unpatch)
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 ;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1
24esac
25exit 0
26
272004-01-23 Jakub Jelinek <jakub@redhat.com>
28
29 * system.h (ICE_EXIT_CODE): Define.
30 * gcc.c (execute): Don't free first string early, but at the end
31 of the function. Call retry_ice if compiler exited with
32 ICE_EXIT_CODE.
33 (retry_ice): New function.
34 * diagnostic.c (diagnostic_count_diagnostic,
35 diagnostic_action_after_output, error_recursion): Exit with
36 ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
37
38--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
39+++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
40@@ -244,7 +244,7 @@
41 fnotice (stderr, "Please submit a full bug report,\n"
42 "with preprocessed source if appropriate.\n"
43 "See %s for instructions.\n", bug_report_url);
44- exit (ICE_EXIT_CODE);
45+ exit (FATAL_EXIT_CODE);
46
47 case DK_FATAL:
48 if (context->abort_on_error)
49--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
50+++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
51@@ -357,6 +357,9 @@
52 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
53 static const char *convert_filename (const char *, int, int);
54 #endif
55+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
56+static void retry_ice (const char *prog, const char **argv);
57+#endif
58
59 static const char *getenv_spec_function (int, const char **);
60 static const char *if_exists_spec_function (int, const char **);
61@@ -2999,7 +3002,7 @@
62 }
63 }
64
65- if (string != commands[i].prog)
66+ if (i && string != commands[i].prog)
67 free (CONST_CAST (char *, string));
68 }
69
70@@ -3056,6 +3059,16 @@
71 else if (WIFEXITED (status)
72 && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
73 {
74+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
75+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
76+ reproducible or not. */
77+ char *p;
78+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
79+ && i == 0
80+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
81+ && ! strncmp (p + 1, "cc1", 3))
82+ retry_ice (commands[0].prog, commands[0].argv);
83+#endif
84 if (WEXITSTATUS (status) > greatest_status)
85 greatest_status = WEXITSTATUS (status);
86 ret_code = -1;
87@@ -3076,6 +3089,9 @@
88 }
89 }
90
91+ if (commands[0].argv[0] != commands[0].prog)
92+ free ((PTR) commands[0].argv[0]);
93+
94 return ret_code;
95 }
96 }
97@@ -6016,6 +6032,224 @@
98 switches[switchnum].validated = 1;
99 }
100
101+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
102+#define RETRY_ICE_ATTEMPTS 2
103+
104+static void
105+retry_ice (const char *prog, const char **argv)
106+{
107+ int nargs, out_arg = -1, quiet = 0, attempt;
108+ int pid, retries, sleep_interval;
109+ const char **new_argv;
110+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
111+
112+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
113+ return;
114+
115+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
116+ /* Only retry compiler ICEs, not preprocessor ones. */
117+ if (! strcmp (argv[nargs], "-E"))
118+ return;
119+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
120+ {
121+ if (out_arg == -1)
122+ out_arg = nargs;
123+ else
124+ return;
125+ }
126+ /* If the compiler is going to output any time information,
127+ it might vary between invocations. */
128+ else if (! strcmp (argv[nargs], "-quiet"))
129+ quiet = 1;
130+ else if (! strcmp (argv[nargs], "-ftime-report"))
131+ return;
132+
133+ if (out_arg == -1 || !quiet)
134+ return;
135+
136+ memset (temp_filenames, '\0', sizeof (temp_filenames));
137+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
138+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
139+ new_argv[nargs++] = "-frandom-seed=0";
140+ new_argv[nargs] = NULL;
141+ if (new_argv[out_arg][2] == '\0')
142+ new_argv[out_arg + 1] = "-";
143+ else
144+ new_argv[out_arg] = "-o-";
145+
146+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
147+ {
148+ int fd = -1;
149+ int status;
150+
151+ temp_filenames[attempt * 2] = make_temp_file (".out");
152+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
153+
154+ if (attempt == RETRY_ICE_ATTEMPTS)
155+ {
156+ int i;
157+ int fd1, fd2;
158+ struct stat st1, st2;
159+ size_t n, len;
160+ char *buf;
161+
162+ buf = xmalloc (8192);
163+
164+ for (i = 0; i < 2; ++i)
165+ {
166+ fd1 = open (temp_filenames[i], O_RDONLY);
167+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
168+
169+ if (fd1 < 0 || fd2 < 0)
170+ {
171+ i = -1;
172+ close (fd1);
173+ close (fd2);
174+ break;
175+ }
176+
177+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
178+ {
179+ i = -1;
180+ close (fd1);
181+ close (fd2);
182+ break;
183+ }
184+
185+ if (st1.st_size != st2.st_size)
186+ {
187+ close (fd1);
188+ close (fd2);
189+ break;
190+ }
191+
192+ len = 0;
193+ for (n = st1.st_size; n; n -= len)
194+ {
195+ len = n;
196+ if (len > 4096)
197+ len = 4096;
198+
199+ if (read (fd1, buf, len) != (int) len
200+ || read (fd2, buf + 4096, len) != (int) len)
201+ {
202+ i = -1;
203+ break;
204+ }
205+
206+ if (memcmp (buf, buf + 4096, len) != 0)
207+ break;
208+ }
209+
210+ close (fd1);
211+ close (fd2);
212+
213+ if (n)
214+ break;
215+ }
216+
217+ free (buf);
218+ if (i == -1)
219+ break;
220+
221+ if (i != 2)
222+ {
223+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
224+ break;
225+ }
226+
227+ fd = open (temp_filenames[attempt * 2], O_RDWR);
228+ if (fd < 0)
229+ break;
230+ write (fd, "//", 2);
231+ for (i = 0; i < nargs; i++)
232+ {
233+ write (fd, " ", 1);
234+ write (fd, new_argv[i], strlen (new_argv[i]));
235+ }
236+ write (fd, "\n", 1);
237+ new_argv[nargs] = "-E";
238+ new_argv[nargs + 1] = NULL;
239+ }
240+
241+ /* Fork a subprocess; wait and retry if it fails. */
242+ sleep_interval = 1;
243+ pid = -1;
244+ for (retries = 0; retries < 4; retries++)
245+ {
246+ pid = fork ();
247+ if (pid >= 0)
248+ break;
249+ sleep (sleep_interval);
250+ sleep_interval *= 2;
251+ }
252+
253+ if (pid < 0)
254+ break;
255+ else if (pid == 0)
256+ {
257+ if (attempt != RETRY_ICE_ATTEMPTS)
258+ fd = open (temp_filenames[attempt * 2], O_RDWR);
259+ if (fd < 0)
260+ exit (-1);
261+ if (fd != 1)
262+ {
263+ close (1);
264+ dup (fd);
265+ close (fd);
266+ }
267+
268+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
269+ if (fd < 0)
270+ exit (-1);
271+ if (fd != 2)
272+ {
273+ close (2);
274+ dup (fd);
275+ close (fd);
276+ }
277+
278+ if (prog == new_argv[0])
279+ execvp (prog, (char *const *) new_argv);
280+ else
281+ execv (new_argv[0], (char *const *) new_argv);
282+ exit (-1);
283+ }
284+
285+ if (waitpid (pid, &status, 0) < 0)
286+ break;
287+
288+ if (attempt < RETRY_ICE_ATTEMPTS
289+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
290+ {
291+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
292+ break;
293+ }
294+ else if (attempt == RETRY_ICE_ATTEMPTS)
295+ {
296+ close (fd);
297+ if (WIFEXITED (status)
298+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
299+ {
300+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
301+ temp_filenames[attempt * 2]);
302+ /* Make sure it is not deleted. */
303+ free (temp_filenames[attempt * 2]);
304+ temp_filenames[attempt * 2] = NULL;
305+ break;
306+ }
307+ }
308+ }
309+
310+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
311+ if (temp_filenames[attempt])
312+ {
313+ unlink (temp_filenames[attempt]);
314+ free (temp_filenames[attempt]);
315+ }
316+}
317+#endif
318+
319 /* Search for a file named NAME trying various prefixes including the
320 user's -B prefix and some standard ones.
321 Return the absolute file name found. If nothing is found, return NAME. */
322--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
323+++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
324@@ -192,6 +192,7 @@
325 build/gengtype-lex.o-warn = -Wno-error
326 # SYSCALLS.c misses prototypes
327 SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
328+build/gcc.o-warn = -Wno-error
329
330 # All warnings have to be shut off in stage1 if the compiler used then
331 # isn't gcc; configure determines that. WARN_CFLAGS will be either
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/debian/libstdc++-pic.dpatch b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/libstdc++-pic.dpatch
new file mode 100644
index 0000000000..70c9e81542
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/libstdc++-pic.dpatch
@@ -0,0 +1,71 @@
1#! /bin/sh -e
2
3# DP: Build and install libstdc++_pic.a library.
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
27--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
28+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
29@@ -210,6 +210,10 @@
30 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
31
32
33+install-exec-local:
34+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
35+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
36+
37 # Added bits to build debug library.
38 if GLIBCXX_BUILD_DEBUG
39 all-local: build_debug
40diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
41--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
42+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
43@@ -611,7 +611,7 @@
44
45 install-data-am: install-data-local
46
47-install-exec-am: install-toolexeclibLTLIBRARIES
48+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
49
50 install-info: install-info-am
51
52@@ -644,6 +644,7 @@
53 distclean-libtool distclean-tags distdir dvi dvi-am html \
54 html-am info info-am install install-am install-data \
55 install-data-am install-data-local install-exec \
56+ install-exec-local \
57 install-exec-am install-info install-info-am install-man \
58 install-strip install-toolexeclibLTLIBRARIES installcheck \
59 installcheck-am installdirs maintainer-clean \
60@@ -729,6 +730,11 @@
61 install_debug:
62 (cd ${debugdir} && $(MAKE) \
63 toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
64+
65+install-exec-local:
66+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
67+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
68+
69 # Tell versions [3.59,3.63) of GNU make to not export all variables.
70 # Otherwise a system limit (for SysV at least) may be exceeded.
71 .NOEXPORT:
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/debian/pr30961.dpatch b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/pr30961.dpatch
new file mode 100644
index 0000000000..b20fdf5bf5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/pr30961.dpatch
@@ -0,0 +1,179 @@
1#! /bin/sh -e
2
3# DP: <your description>
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26From: "H.J. Lu" <hjl@lucon.org>
27Sender: gcc-patches-owner@gcc.gnu.org
28To: gcc-patches@gcc.gnu.org
29Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
30Date: Mon, 27 Aug 2007 11:34:12 -0700
31
32We start with
33
34(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
35
36(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
37 (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
38 (nil)))
39
40(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
41 (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
42 (nil)))
43
44(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
45
46we are trying to allocate registers for insn 6 and we allocate
47xmm0 for the return value. Reload doesn't check if xmm0 can be used for
48DF 59, it allocates xmm1 for DF 59 and generates:
49
50Reloads for insn # 6
51Reload 0: reload_in (DF) = (reg:DF 5 di)
52 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
53 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
54 reload_reg_rtx: (reg:DF 22 xmm1)
55...
56
57(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
58
59(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
60
61(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
62 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
63 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
64
65(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
66 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
67 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
68
69(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
70 (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
71
72(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
73
74This patch tries to use the destination register when reloading for input. It
75generates
76
77Reloads for insn # 6
78Reload 0: reload_in (DF) = (reg:DF 5 di)
79 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
80 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
81 reload_reg_rtx: (reg:DF 21 xmm0)
82...
83(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
84
85(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
86
87(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
88 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
89 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
90
91(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
92 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
93 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
94
95(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
96 (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
97
98(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
99 (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
100
101(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
102
103
104H.J.
105----
106gcc/
107
1082007-08-27 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR target/30961
111 * reload1.c (find_reg): Favor the hard register in destination
112 if it is usable and a memory location is needed for reload
113 input.
114
115gcc/testsuite/
116
1172007-08-27 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR target/30961
120 * gcc.target/i386/pr30961-1.c: New.
121
122--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
123+++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
124@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
125 HARD_REG_SET not_usable;
126 HARD_REG_SET used_by_other_reload;
127 reg_set_iterator rsi;
128+#ifdef SECONDARY_MEMORY_NEEDED
129+ rtx body = PATTERN (chain->insn);
130+ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
131+
132+ if (GET_CODE (body) == SET)
133+ {
134+ rtx dest = SET_DEST (body);
135+
136+ if ((REG_P (dest)
137+ || (GET_CODE (dest) == SUBREG
138+ && REG_P (SUBREG_REG (dest)))))
139+ dest_reg = reg_or_subregno (dest);
140+ }
141+#endif
142
143 COPY_HARD_REG_SET (not_usable, bad_spill_regs);
144 IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
145@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
146 this_cost--;
147 if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
148 this_cost--;
149+#ifdef SECONDARY_MEMORY_NEEDED
150+ /* If a memory location is needed for rl->in and dest_reg
151+ is usable, we will favor it. */
152+ else if (dest_reg == regno
153+ && rl->in
154+ && REG_P (rl->in)
155+ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
156+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
157+ rl->class,
158+ rl->mode))
159+ this_cost = 0;
160+#endif
161 if (this_cost < best_cost
162 /* Among registers with equal cost, prefer caller-saved ones, or
163 use REG_ALLOC_ORDER if it is defined. */
164--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
165+++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
166@@ -0,0 +1,13 @@
167+/* { dg-do compile } */
168+/* { dg-require-effective-target lp64 } */
169+/* { dg-options "-O2" } */
170+
171+double
172+convert (long long in)
173+{
174+ double f;
175+ __builtin_memcpy( &f, &in, sizeof( in ) );
176+ return f;
177+}
178+
179+/* { dg-final { scan-assembler-not "movapd" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-c++-builtin-redecl.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-c++-builtin-redecl.patch
new file mode 100644
index 0000000000..77655ad792
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-c++-builtin-redecl.patch
@@ -0,0 +1,102 @@
12007-10-02 Jakub Jelinek <jakub@redhat.com>
2
3 * decl.c (duplicate_decls): When redeclaring a builtin function,
4 keep the merged decl builtin whenever types match, even if new
5 decl defines a function.
6
7 * gcc.dg/builtins-65.c: New test.
8 * g++.dg/ext/builtin10.C: New test.
9
10--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
11+++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
12@@ -1988,23 +1988,21 @@ duplicate_decls (tree newdecl, tree oldd
13 DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
14 DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
15 }
16+ /* If redeclaring a builtin function, it stays built in. */
17+ if (types_match && DECL_BUILT_IN (olddecl))
18+ {
19+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
20+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
21+ /* If we're keeping the built-in definition, keep the rtl,
22+ regardless of declaration matches. */
23+ COPY_DECL_RTL (olddecl, newdecl);
24+ }
25 if (new_defines_function)
26 /* If defining a function declared with other language
27 linkage, use the previously declared language linkage. */
28 SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
29 else if (types_match)
30 {
31- /* If redeclaring a builtin function, and not a definition,
32- it stays built in. */
33- if (DECL_BUILT_IN (olddecl))
34- {
35- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
36- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
37- /* If we're keeping the built-in definition, keep the rtl,
38- regardless of declaration matches. */
39- COPY_DECL_RTL (olddecl, newdecl);
40- }
41-
42 DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
43 /* Don't clear out the arguments if we're redefining a function. */
44 if (DECL_ARGUMENTS (olddecl))
45--- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200
46+++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200
47@@ -0,0 +1,25 @@
48+/* { dg-do compile } */
49+/* { dg-options "-O2" } */
50+
51+typedef __SIZE_TYPE__ size_t;
52+extern void __chk_fail (void);
53+extern int snprintf (char *, size_t, const char *, ...);
54+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
55+{
56+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
57+ __chk_fail ();
58+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
59+}
60+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
61+
62+char buf[10];
63+
64+int
65+main (void)
66+{
67+ snprintf (buf, 10, "%d%d\n", 10, 10);
68+ return 0;
69+}
70+
71+/* { dg-final { scan-assembler "mysnprintf" } } */
72+/* { dg-final { scan-assembler-not "__chk_fail" } } */
73--- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200
74+++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200
75@@ -0,0 +1,27 @@
76+// { dg-do compile }
77+// { dg-options "-O2" }
78+
79+typedef __SIZE_TYPE__ size_t;
80+extern "C" {
81+extern void __chk_fail (void);
82+extern int snprintf (char *, size_t, const char *, ...);
83+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
84+{
85+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
86+ __chk_fail ();
87+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
88+}
89+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
90+}
91+
92+char buf[10];
93+
94+int
95+main (void)
96+{
97+ snprintf (buf, 10, "%d%d\n", 10, 10);
98+ return 0;
99+}
100+
101+// { dg-final { scan-assembler "mysnprintf" } }
102+// { dg-final { scan-assembler-not "__chk_fail" } }
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-cpp-pragma.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-cpp-pragma.patch
new file mode 100644
index 0000000000..00d37bd7ce
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-cpp-pragma.patch
@@ -0,0 +1,284 @@
12008-02-26 Jakub Jelinek <jakub@redhat.com>
2
3 * c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
4 and CPP_PRAGMA_EOL.
5 * c-pragma.c (pragma_ns_name): New typedef.
6 (registered_pp_pragmas): New variable.
7 (c_pp_lookup_pragma): New function.
8 (c_register_pragma_1): If flag_preprocess_only, do nothing
9 for non-expanded pragmas, for expanded ones push pragma's
10 namespace and name into registered_pp_pragmas vector.
11 (c_invoke_pragma_handler): Register OpenMP pragmas even when
12 flag_preprocess_only, don't register GCC pch_preprocess
13 pragma if flag_preprocess_only.
14 * c-opts.c (c_common_init): Call init_pragma even if
15 flag_preprocess_only.
16 * c-pragma.c (c_pp_lookup_pragma): New prototype.
17 * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
18 cpp_register_pragma if flag_preprocess_only.
19
20 * gcc.dg/gomp/preprocess-1.c: New test.
21
22--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
23+++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
24@@ -1,6 +1,6 @@
25 /* Preprocess only, using cpplib.
26- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
27- Free Software Foundation, Inc.
28+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
29+ 2008 Free Software Foundation, Inc.
30 Written by Per Bothner, 1994-95.
31
32 This program is free software; you can redistribute it and/or modify it
33@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
34 avoid_paste = false;
35 print.source = NULL;
36 print.prev = token;
37- cpp_output_token (token, print.outf);
38+ if (token->type == CPP_PRAGMA)
39+ {
40+ const char *space;
41+ const char *name;
42+
43+ maybe_print_line (token->src_loc);
44+ fputs ("#pragma ", print.outf);
45+ c_pp_lookup_pragma (token->val.pragma, &space, &name);
46+ if (space)
47+ fprintf (print.outf, "%s %s", space, name);
48+ else
49+ fprintf (print.outf, "%s", name);
50+ print.printed = 1;
51+ }
52+ else if (token->type == CPP_PRAGMA_EOL)
53+ maybe_print_line (token->src_loc);
54+ else
55+ cpp_output_token (token, print.outf);
56
57 if (token->type == CPP_COMMENT)
58 account_for_newlines (token->val.str.text, token->val.str.len);
59--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
60+++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
61@@ -1,6 +1,6 @@
62 /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
63 Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
64- 2006, 2007 Free Software Foundation, Inc.
65+ 2006, 2007, 2008 Free Software Foundation, Inc.
66
67 This file is part of GCC.
68
69@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
70
71 static VEC(pragma_handler, heap) *registered_pragmas;
72
73+typedef struct
74+{
75+ const char *space;
76+ const char *name;
77+} pragma_ns_name;
78+
79+DEF_VEC_O (pragma_ns_name);
80+DEF_VEC_ALLOC_O (pragma_ns_name, heap);
81+
82+static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
83+
84+struct omp_pragma_def { const char *name; unsigned int id; };
85+static const struct omp_pragma_def omp_pragmas[] = {
86+ { "atomic", PRAGMA_OMP_ATOMIC },
87+ { "barrier", PRAGMA_OMP_BARRIER },
88+ { "critical", PRAGMA_OMP_CRITICAL },
89+ { "flush", PRAGMA_OMP_FLUSH },
90+ { "for", PRAGMA_OMP_FOR },
91+ { "master", PRAGMA_OMP_MASTER },
92+ { "ordered", PRAGMA_OMP_ORDERED },
93+ { "parallel", PRAGMA_OMP_PARALLEL },
94+ { "section", PRAGMA_OMP_SECTION },
95+ { "sections", PRAGMA_OMP_SECTIONS },
96+ { "single", PRAGMA_OMP_SINGLE },
97+ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
98+};
99+
100+void
101+c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
102+{
103+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
104+ int i;
105+
106+ for (i = 0; i < n_omp_pragmas; ++i)
107+ if (omp_pragmas[i].id == id)
108+ {
109+ *space = "omp";
110+ *name = omp_pragmas[i].name;
111+ return;
112+ }
113+
114+ if (id >= PRAGMA_FIRST_EXTERNAL
115+ && (id < PRAGMA_FIRST_EXTERNAL
116+ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
117+ {
118+ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
119+ id - PRAGMA_FIRST_EXTERNAL)->space;
120+ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
121+ id - PRAGMA_FIRST_EXTERNAL)->name;
122+ return;
123+ }
124+
125+ gcc_unreachable ();
126+}
127+
128 /* Front-end wrappers for pragma registration to avoid dragging
129 cpplib.h in almost everywhere. */
130
131@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
132 {
133 unsigned id;
134
135- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
136- id = VEC_length (pragma_handler, registered_pragmas);
137- id += PRAGMA_FIRST_EXTERNAL - 1;
138-
139- /* The C++ front end allocates 6 bits in cp_token; the C front end
140- allocates 7 bits in c_token. At present this is sufficient. */
141- gcc_assert (id < 64);
142+ if (flag_preprocess_only)
143+ {
144+ pragma_ns_name ns_name;
145+
146+ if (!allow_expansion)
147+ return;
148+
149+ ns_name.space = space;
150+ ns_name.name = name;
151+ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
152+ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
153+ id += PRAGMA_FIRST_EXTERNAL - 1;
154+ }
155+ else
156+ {
157+ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
158+ id = VEC_length (pragma_handler, registered_pragmas);
159+ id += PRAGMA_FIRST_EXTERNAL - 1;
160+
161+ /* The C++ front end allocates 6 bits in cp_token; the C front end
162+ allocates 7 bits in c_token. At present this is sufficient. */
163+ gcc_assert (id < 64);
164+ }
165
166 cpp_register_deferred_pragma (parse_in, space, name, id,
167 allow_expansion, false);
168@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
169 void
170 init_pragma (void)
171 {
172- if (flag_openmp && !flag_preprocess_only)
173+ if (flag_openmp)
174 {
175- struct omp_pragma_def { const char *name; unsigned int id; };
176- static const struct omp_pragma_def omp_pragmas[] = {
177- { "atomic", PRAGMA_OMP_ATOMIC },
178- { "barrier", PRAGMA_OMP_BARRIER },
179- { "critical", PRAGMA_OMP_CRITICAL },
180- { "flush", PRAGMA_OMP_FLUSH },
181- { "for", PRAGMA_OMP_FOR },
182- { "master", PRAGMA_OMP_MASTER },
183- { "ordered", PRAGMA_OMP_ORDERED },
184- { "parallel", PRAGMA_OMP_PARALLEL },
185- { "section", PRAGMA_OMP_SECTION },
186- { "sections", PRAGMA_OMP_SECTIONS },
187- { "single", PRAGMA_OMP_SINGLE },
188- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
189- };
190-
191 const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
192 int i;
193
194@@ -947,8 +1002,9 @@ init_pragma (void)
195 omp_pragmas[i].id, true, true);
196 }
197
198- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
199- PRAGMA_GCC_PCH_PREPROCESS, false, false);
200+ if (!flag_preprocess_only)
201+ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
202+ PRAGMA_GCC_PCH_PREPROCESS, false, false);
203
204 #ifdef HANDLE_PRAGMA_PACK
205 #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
206--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
207+++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
208@@ -1,5 +1,5 @@
209 /* C/ObjC/C++ command line option handling.
210- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
211+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
212 Free Software Foundation, Inc.
213 Contributed by Neil Booth.
214
215@@ -1239,6 +1239,9 @@ c_common_init (void)
216 if (version_flag)
217 c_common_print_pch_checksum (stderr);
218
219+ /* Has to wait until now so that cpplib has its hash table. */
220+ init_pragma ();
221+
222 if (flag_preprocess_only)
223 {
224 finish_options ();
225@@ -1246,9 +1249,6 @@ c_common_init (void)
226 return false;
227 }
228
229- /* Has to wait until now so that cpplib has its hash table. */
230- init_pragma ();
231-
232 return true;
233 }
234
235--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
236+++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
237@@ -1,6 +1,6 @@
238 /* Pragma related interfaces.
239 Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
240- 2007 Free Software Foundation, Inc.
241+ 2007, 2008 Free Software Foundation, Inc.
242
243 This file is part of GCC.
244
245@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
246 extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
247 int);
248
249+extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
250+
251 #endif /* GCC_C_PRAGMA_H */
252--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
253+++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
254@@ -892,8 +892,9 @@ enum machopic_addr_class {
255
256 #define DARWIN_REGISTER_TARGET_PRAGMAS() \
257 do { \
258- cpp_register_pragma (parse_in, NULL, "mark", \
259- darwin_pragma_ignore, false); \
260+ if (!flag_preprocess_only) \
261+ cpp_register_pragma (parse_in, NULL, "mark", \
262+ darwin_pragma_ignore, false); \
263 c_register_pragma (0, "options", darwin_pragma_options); \
264 c_register_pragma (0, "segment", darwin_pragma_ignore); \
265 c_register_pragma (0, "unused", darwin_pragma_unused); \
266--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
267+++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
268@@ -0,0 +1,16 @@
269+/* { dg-do preprocess } */
270+
271+void foo (void)
272+{
273+ int i1, j1, k1;
274+#define p parallel
275+#define P(x) private (x##1)
276+#define S(x) shared (x##1)
277+#define F(x) firstprivate (x##1)
278+#pragma omp p P(i) \
279+ S(j) \
280+ F(k)
281+ ;
282+}
283+
284+/* { dg-final { scan-file preprocess-1.i "(^|\n)#pragma omp parallel private \\(i1\\) shared \\(j1\\) firstprivate \\(k1\\)($|\n)" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch
new file mode 100644
index 0000000000..2ad3b24d89
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch
@@ -0,0 +1,61 @@
1Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
2hardware isn't supported because NPTL doesn't support it anyway.
3
4--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
5+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
6@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
7 ;;
8
9 # Note that bare i386 is not included here. We need cmpxchg.
10- i[456]86-*-linux*)
11+ i[3456]86-*-linux*)
12 config_path="linux/x86 linux posix"
13 case " ${CC} ${CFLAGS} " in
14 *" -m64 "*)
15 ;;
16 *)
17 if test -z "$with_arch"; then
18- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
19+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
20 fi
21 esac
22 ;;
23@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
24 config_path="linux/x86 linux posix"
25 case " ${CC} ${CFLAGS} " in
26 *" -m32 "*)
27- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
28+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
29 ;;
30 esac
31 ;;
32--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
33+++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
34@@ -35,6 +35,27 @@
35 #include <new>
36 #include <ext/atomicity.h>
37 #include <ext/concurrence.h>
38+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
39+# define _GLIBCXX_ATOMIC_BUILTINS 1
40+# define __sync_val_compare_and_swap(a, b, c) \
41+ ({ \
42+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
43+ int sltas; \
44+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
45+ : "=a" (sltas) \
46+ : "r" (a), "0" (b), "r" (c) : "memory"); \
47+ sltas; \
48+ })
49+# define __sync_lock_test_and_set(a, b) \
50+ ({ \
51+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
52+ int sltas; \
53+ __asm __volatile ("xchgl (%1), %0" \
54+ : "=r" (sltas) \
55+ : "r" (a), "0" (b) : "memory"); \
56+ sltas; \
57+ })
58+#endif
59 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
60 && defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
61 # include <climits>
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
new file mode 100644
index 0000000000..8e10979ce8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
@@ -0,0 +1,538 @@
12004-11-27 Jakub Jelinek <jakub@redhat.com>
2
3 * config.gcc (ia64*-*-linux*): If native and libelf is installed,
4 use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
5 fragments.
6 * config/ia64/t-glibc-no-libunwind: New file.
7 * config/ia64/change-symver.c: New file.
8 * config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
9 define _Unwind_* to __symverglobal_Unwind_*.
10 (alias): Undefine.
11 (symverglobal): Define. Use it on _Unwind_*.
12 * config/ia64/mkmap-symver-multi.awk: New file.
13 * config/ia64/libgcc-ia64-no-libunwind.ver: New file.
14
15--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
16+++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
17@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
18 ;;
19 ia64*-*-linux*)
20 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
21- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
22- if test x$with_system_libunwind != xyes ; then
23- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
24+ tmake_file="${tmake_file} ia64/t-ia64"
25+ if test x${target} = x${host} && test x${target} = x${build} \
26+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
27+ && test -f /usr/lib/libelf.so; then
28+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
29+ else
30+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
31+ if test x$with_system_libunwind != xyes ; then
32+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
33+ fi
34 fi
35 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
36 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
37--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
38+++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
39@@ -0,0 +1,30 @@
40+# Don't use system libunwind library on IA-64 GLIBC based system,
41+# but make _Unwind_* symbols unversioned, so that created programs
42+# are usable even when libgcc_s uses libunwind.
43+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
44+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
45+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
46+
47+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
48+ -Wl,--soname=$(SHLIB_SONAME) \
49+ -Wl,--version-script=$(SHLIB_MAP) \
50+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
51+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
52+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
53+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
54+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
55+ else true; fi && \
56+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
57+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
58+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
59+ GCC_3.4.2 _GLOBAL_ \
60+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
61+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
62+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
63+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
64+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
65+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
66+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
67+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
68+
69+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
70--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
71+++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
72@@ -0,0 +1,211 @@
73+#define _GNU_SOURCE 1
74+#define _FILE_OFFSET_BITS 64
75+#include <endian.h>
76+#include <errno.h>
77+#include <error.h>
78+#include <fcntl.h>
79+#include <fnmatch.h>
80+#include <gelf.h>
81+#include <stdlib.h>
82+#include <string.h>
83+#include <unistd.h>
84+
85+int
86+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
87+{
88+ if (strcmp (name, "_GLOBAL_") == 0)
89+ return 1;
90+
91+ int cnt;
92+ size_t offset = 0;
93+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
94+ {
95+ GElf_Verdef defmem;
96+ GElf_Verdef *def;
97+ GElf_Verdaux auxmem;
98+ GElf_Verdaux *aux;
99+ unsigned int auxoffset;
100+
101+ /* Get the data at the next offset. */
102+ def = gelf_getverdef (verd, offset, &defmem);
103+ if (def == NULL)
104+ break;
105+
106+ auxoffset = offset + def->vd_aux;
107+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
108+ if (aux == NULL)
109+ break;
110+
111+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
112+ aux->vda_name)) == 0)
113+ return def->vd_ndx;
114+
115+ /* Find the next offset. */
116+ offset += def->vd_next;
117+ }
118+
119+ return -1;
120+}
121+
122+int
123+main (int argc, char **argv)
124+{
125+ if (argc < 4)
126+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
127+
128+ const char *fname = argv[1];
129+
130+ /* Open the file. */
131+ int fd;
132+ fd = open (fname, O_RDWR);
133+ if (fd == -1)
134+ error (1, errno, fname);
135+
136+ elf_version (EV_CURRENT);
137+
138+ /* Now get the ELF descriptor. */
139+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
140+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
141+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
142+
143+ size_t shstrndx;
144+ /* Get the section header string table index. */
145+ if (elf_getshstrndx (elf, &shstrndx) < 0)
146+ error (1, 0, "cannot get shstrndx from %s", fname);
147+
148+ GElf_Ehdr ehdr_mem;
149+ GElf_Ehdr *ehdr;
150+
151+ /* We need the ELF header in a few places. */
152+ ehdr = gelf_getehdr (elf, &ehdr_mem);
153+ if (ehdr == NULL)
154+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
155+
156+ Elf_Scn *scn = NULL;
157+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
158+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
159+
160+ while ((scn = elf_nextscn (elf, scn)) != NULL)
161+ {
162+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
163+
164+ if (shdr == NULL)
165+ error (1, 0, "couldn't get shdr from %s", fname);
166+
167+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
168+ {
169+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
170+ Elf_Data **p;
171+
172+ if (strcmp (name, ".gnu.version") == 0)
173+ {
174+ p = &ver;
175+ ver_shdr = *shdr;
176+ }
177+ else if (strcmp (name, ".gnu.version_d") == 0)
178+ {
179+ p = &verd;
180+ verd_shdr = *shdr;
181+ }
182+ else if (strcmp (name, ".dynsym") == 0)
183+ {
184+ p = &dynsym;
185+ dynsym_shdr = *shdr;
186+ }
187+ else
188+ continue;
189+
190+ if (*p != NULL)
191+ error (1, 0, "Two %s sections in %s", name, fname);
192+ *p = elf_getdata (scn, NULL);
193+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
194+ error (1, 0, "No data or non-contiguous data in %s section in %s",
195+ name, fname);
196+ }
197+ }
198+
199+ if (ver == NULL || verd == NULL || dynsym == NULL)
200+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
201+
202+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
203+ if (from_idx == -1)
204+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
205+
206+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
207+ if (to_idx == -1)
208+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
209+
210+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
211+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
212+ || ver_shdr.sh_entsize != 2
213+ || (ver_shdr.sh_size & 1)
214+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
215+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
216+
217+ size_t nentries = ver_shdr.sh_size / 2;
218+ size_t cnt;
219+ GElf_Versym array[nentries];
220+ for (cnt = 0; cnt < nentries; ++cnt)
221+ {
222+ GElf_Versym vsymmem;
223+ GElf_Versym *vsym;
224+
225+ vsym = gelf_getversym (ver, cnt, &vsymmem);
226+ if (vsym == NULL)
227+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
228+
229+ array[cnt] = *vsym;
230+ if (*vsym != from_idx)
231+ continue;
232+
233+ GElf_Sym sym_mem;
234+ GElf_Sym *sym;
235+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
236+ if (sym == NULL)
237+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
238+
239+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
240+
241+ int argn;
242+ for (argn = 4; argn < argc; ++argn)
243+ if (fnmatch (argv[argn], name, 0) == 0)
244+ {
245+ array[cnt] = to_idx;
246+ break;
247+ }
248+ }
249+
250+ if (sizeof (array[0]) != 2)
251+ abort ();
252+
253+#if __BYTE_ORDER == __LITTLE_ENDIAN
254+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
255+ ;
256+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
257+#elif __BYTE_ORDER == __BIG_ENDIAN
258+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
259+ ;
260+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
261+#else
262+# error Unsupported endianity
263+#endif
264+ {
265+ for (cnt = 0; cnt < nentries; ++cnt)
266+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
267+ }
268+ else
269+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
270+
271+ if (elf_end (elf) != 0)
272+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
273+
274+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
275+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
276+ fname);
277+
278+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
279+ error (1, 0, "failed to write .gnu.version section into %s", fname);
280+
281+ close (fd);
282+ return 0;
283+}
284--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
285+++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
286@@ -51,6 +51,51 @@
287 #define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
288 #define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
289
290+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
291+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
292+ (_Unwind_Trace_Fn, void *);
293+extern void __symverglobal_Unwind_DeleteException
294+ (struct _Unwind_Exception *);
295+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
296+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
297+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
298+extern _Unwind_Word __symverglobal_Unwind_GetCFA
299+ (struct _Unwind_Context *);
300+extern _Unwind_Word __symverglobal_Unwind_GetBSP
301+ (struct _Unwind_Context *);
302+extern _Unwind_Word __symverglobal_Unwind_GetGR
303+ (struct _Unwind_Context *, int );
304+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
305+extern void *__symverglobal_Unwind_GetLanguageSpecificData
306+ (struct _Unwind_Context *);
307+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
308+ (struct _Unwind_Context *);
309+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
310+ (struct _Unwind_Exception *);
311+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
312+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
313+ (struct _Unwind_Exception *);
314+extern void __symverglobal_Unwind_SetGR
315+ (struct _Unwind_Context *, int, _Unwind_Word);
316+extern void __symverglobal_Unwind_SetIP
317+ (struct _Unwind_Context *, _Unwind_Ptr);
318+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
319+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
320+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
321+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
322+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
323+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
324+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
325+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
326+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
327+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
328+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
329+#define _Unwind_Resume __symverglobal_Unwind_Resume
330+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
331+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
332+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
333+#endif
334+
335 enum unw_application_register
336 {
337 UNW_AR_BSP,
338@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
339 alias (_Unwind_SetIP);
340 #endif
341
342+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
343+#undef alias
344+#define symverglobal(name, version) \
345+__typeof (__symverglobal##name) __symverlocal##name \
346+ __attribute__ ((alias ("__symverglobal" #name))); \
347+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
348+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
349+
350+#undef _Unwind_Backtrace
351+#undef _Unwind_DeleteException
352+#undef _Unwind_FindEnclosingFunction
353+#undef _Unwind_ForcedUnwind
354+#undef _Unwind_GetBSP
355+#undef _Unwind_GetCFA
356+#undef _Unwind_GetGR
357+#undef _Unwind_GetIP
358+#undef _Unwind_GetLanguageSpecificData
359+#undef _Unwind_GetRegionStart
360+#undef _Unwind_RaiseException
361+#undef _Unwind_Resume
362+#undef _Unwind_Resume_or_Rethrow
363+#undef _Unwind_SetGR
364+#undef _Unwind_SetIP
365+symverglobal (_Unwind_Backtrace, GCC_3.3);
366+symverglobal (_Unwind_DeleteException, GCC_3.0);
367+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
368+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
369+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
370+symverglobal (_Unwind_GetCFA, GCC_3.3);
371+symverglobal (_Unwind_GetGR, GCC_3.0);
372+symverglobal (_Unwind_GetIP, GCC_3.0);
373+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
374+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
375+symverglobal (_Unwind_RaiseException, GCC_3.0);
376+symverglobal (_Unwind_Resume, GCC_3.0);
377+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
378+symverglobal (_Unwind_SetGR, GCC_3.0);
379+symverglobal (_Unwind_SetIP, GCC_3.0);
380+#endif
381+
382 #endif
383--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
384+++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
385@@ -0,0 +1,133 @@
386+# Generate an ELF symbol version map a-la Solaris and GNU ld.
387+# Contributed by Richard Henderson <rth@cygnus.com>
388+#
389+# This file is part of GCC.
390+#
391+# GCC is free software; you can redistribute it and/or modify it under
392+# the terms of the GNU General Public License as published by the Free
393+# Software Foundation; either version 2, or (at your option) any later
394+# version.
395+#
396+# GCC is distributed in the hope that it will be useful, but WITHOUT
397+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
398+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
399+# License for more details.
400+#
401+# You should have received a copy of the GNU General Public License
402+# along with GCC; see the file COPYING. If not, write to the Free
403+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
404+# 02110-1301, USA.
405+
406+BEGIN {
407+ state = "nm";
408+ sawsymbol = 0;
409+}
410+
411+# Remove comment and blank lines.
412+/^ *#/ || /^ *$/ {
413+ next;
414+}
415+
416+# We begin with nm input. Collect the set of symbols that are present
417+# so that we can not emit them into the final version script -- Solaris
418+# complains at us if we do.
419+
420+state == "nm" && /^%%/ {
421+ state = "ver";
422+ next;
423+}
424+
425+state == "nm" && ($1 == "U" || $2 == "U") {
426+ next;
427+}
428+
429+state == "nm" && NF == 3 {
430+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
431+ def[$3] = 1
432+ tl=$3
433+ sub(/^.*@/,"",tl)
434+ ver[$3] = tl
435+ } else {
436+ sub(/@@?GCC_[0-9.]*$/,"",$3)
437+ def[$3] = 1;
438+ }
439+ sawsymbol = 1;
440+ next;
441+}
442+
443+state == "nm" {
444+ next;
445+}
446+
447+# Now we process a simplified variant of the Solaris symbol version
448+# script. We have one symbol per line, no semicolons, simple markers
449+# for beginning and ending each section, and %inherit markers for
450+# describing version inheritence. A symbol may appear in more than
451+# one symbol version, and the last seen takes effect.
452+
453+NF == 3 && $1 == "%inherit" {
454+ inherit[$2] = $3;
455+ next;
456+}
457+
458+NF == 2 && $2 == "{" {
459+ libs[$1] = 1;
460+ thislib = $1;
461+ next;
462+}
463+
464+$1 == "}" {
465+ thislib = "";
466+ next;
467+}
468+
469+{
470+ ver[$1] = thislib;
471+ next;
472+}
473+
474+END {
475+ if (!sawsymbol)
476+ {
477+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
478+ exit 1;
479+ }
480+ for (l in libs)
481+ output(l);
482+}
483+
484+function output(lib) {
485+ if (done[lib])
486+ return;
487+ done[lib] = 1;
488+ if (inherit[lib])
489+ output(inherit[lib]);
490+
491+ empty=1
492+ for (sym in ver)
493+ if ((ver[sym] == lib) && (sym in def))
494+ {
495+ if (empty)
496+ {
497+ printf("%s {\n", lib);
498+ printf(" global:\n");
499+ empty = 0;
500+ }
501+ symp = sym;
502+ sub(/@GCC_[0-9.]*$/,"",symp);
503+ printf("\t%s;\n", symp);
504+ if (dotsyms)
505+ printf("\t.%s;\n", symp);
506+ }
507+
508+ if (empty)
509+ {
510+ for (l in libs)
511+ if (inherit[l] == lib)
512+ inherit[l] = inherit[lib];
513+ }
514+ else if (inherit[lib])
515+ printf("} %s;\n", inherit[lib]);
516+ else
517+ printf ("\n local:\n\t*;\n};\n");
518+}
519--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
520+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
521@@ -0,0 +1,17 @@
522+GCC_3.4.2 {
523+ _Unwind_GetGR
524+ _Unwind_RaiseException
525+ _Unwind_GetRegionStart
526+ _Unwind_SetIP
527+ _Unwind_GetIP
528+ _Unwind_GetLanguageSpecificData
529+ _Unwind_Resume
530+ _Unwind_DeleteException
531+ _Unwind_SetGR
532+ _Unwind_ForcedUnwind
533+ _Unwind_Backtrace
534+ _Unwind_FindEnclosingFunction
535+ _Unwind_GetCFA
536+ _Unwind_Resume_or_Rethrow
537+ _Unwind_GetBSP
538+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-debug-iface-type.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-debug-iface-type.patch
new file mode 100644
index 0000000000..63a1b50a76
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-debug-iface-type.patch
@@ -0,0 +1,17 @@
12008-01-25 Jakub Jelinek <jakub@redhat.com>
2
3 * lang.c (java_classify_record): Revert 2007-12-20 change.
4
5--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
6+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
7@@ -965,9 +965,7 @@ java_classify_record (tree type)
8 if (! CLASS_P (type))
9 return RECORD_IS_STRUCT;
10
11- /* ??? GDB does not support DW_TAG_interface_type as of December,
12- 2007. Re-enable this at a later time. */
13- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
14+ if (CLASS_INTERFACE (TYPE_NAME (type)))
15 return RECORD_IS_INTERFACE;
16
17 return RECORD_IS_CLASS;
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-nomulti.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-nomulti.patch
new file mode 100644
index 0000000000..f07ead8f2b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-nomulti.patch
@@ -0,0 +1,44 @@
1--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100
2+++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100
3@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode,
4 [allow rebuilding of .class and .h files]))
5 AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
6
7+AC_ARG_ENABLE(libjava-multilib,
8+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
9+if test "$enable_libjava_multilib" = no; then
10+ multilib=no
11+ ac_configure_args="$ac_configure_args --disable-multilib"
12+fi
13+
14 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
15 GCC_NO_EXECUTABLES
16
17--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100
18+++ libjava/configure 2007-12-07 18:39:58.000000000 +0100
19@@ -1018,6 +1018,8 @@ Optional Features:
20 --enable-gconf-peer compile GConf native peers for util.preferences
21 --enable-java-maintainer-mode
22 allow rebuilding of .class and .h files
23+ --enable-libjava-multilib
24+ build libjava as multilib
25 --disable-dependency-tracking speeds up one-time build
26 --enable-dependency-tracking do not reject slow dependency extractors
27 --enable-maintainer-mode enable make rules and dependencies not useful
28@@ -1848,6 +1850,16 @@ else
29 fi
30
31
32+# Check whether --enable-libjava-multilib was given.
33+if test "${enable_libjava_multilib+set}" = set; then
34+ enableval=$enable_libjava_multilib;
35+fi
36+
37+if test "$enable_libjava_multilib" = no; then
38+ multilib=no
39+ ac_configure_args="$ac_configure_args --disable-multilib"
40+fi
41+
42 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
43
44
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-libgomp-speedup.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-libgomp-speedup.patch
new file mode 100644
index 0000000000..da85e556ec
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-libgomp-speedup.patch
@@ -0,0 +1,2797 @@
12008-03-28 Jakub Jelinek <jakub@redhat.com>
2
3 * config/linux/sparc/futex.h (atomic_write_barrier): Fix membar
4 argument.
5
62008-03-27 Jakub Jelinek <jakub@redhat.com>
7
8 * libgomp.h (struct gomp_team_state): Remove single_count field
9 ifndef HAVE_SYNC_BUILTINS.
10 (struct gomp_team): Likewise. Add work_share_list_free_lock
11 ifndef HAVE_SYNC_BUILTINS.
12 * team.c (gomp_new_team): If HAVE_SYNC_BUILTINS is not defined,
13 don't initialize single_count, but instead initialize
14 work_share_list_free_lock.
15 (free_team): Destroy work_share_list_free_lock ifndef
16 HAVE_SYNC_BUILTINS.
17 (gomp_team_start): Don't initialize ts.single_count ifndef
18 HAVE_SYNC_BUILTINS.
19 * work.c (alloc_work_share, free_work_share): Use
20 work_share_list_free_lock instead of atomic chaining ifndef
21 HAVE_SYNC_BUILTINS.
22
232008-03-26 Jakub Jelinek <jakub@redhat.com>
24
25 * loop.c (gomp_loop_init): Fix GFS_DYNAMIC ws->mode setting.
26 * testsuite/libgomp.c/loop-4.c: New test.
27
28 * libgomp.h (struct gomp_team_state): Add single_count field.
29 (struct gomp_team): Likewise.
30 * team.c (gomp_new_team): Clear single_count.
31 (gomp_team_start): Likewise.
32 * single.c (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.
33
342008-03-25 Jakub Jelinek <jakub@redhat.com>
35
36 * team.c (gomp_thread_start): Don't clear ts.static_trip here.
37 * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
38 ts.static_trip here.
39 * work.c (gomp_work_share_start): Don't clear ts.static_trip here.
40
412008-03-21 Jakub Jelinek <jakub@redhat.com>
42
43 * libgomp.h: Include ptrlock.h.
44 (struct gomp_work_share): Reshuffle fields. Add next_alloc,
45 next_ws, next_free and inline_ordered_team_ids fields, change
46 ordered_team_ids into pointer from flexible array member.
47 (struct gomp_team_state): Add last_work_share field, remove
48 work_share_generation.
49 (struct gomp_team): Remove work_share_lock, generation_mask,
50 oldest_live_gen, num_live_gen and init_work_shares fields, add
51 work work_share_list_alloc, work_share_list_free and work_share_chunk
52 fields. Change work_shares from pointer to pointers into an array.
53 (gomp_new_team): New prototype.
54 (gomp_team_start): Change type of last argument.
55 (gomp_new_work_share): Removed.
56 (gomp_init_work_share, gomp_fini_work_share): New prototypes.
57 (gomp_work_share_init_done): New static inline.
58 * team.c (gomp_thread_start): Clear ts.last_work_share, don't clear
59 ts.work_share_generation.
60 (new_team): Removed.
61 (gomp_new_team): New function.
62 (free_team): Free gomp_work_share blocks chained through next_alloc,
63 instead of freeing work_shares and destroying work_share_lock.
64 (gomp_team_start): Change last argument from ws to team, don't create
65 new team, set ts.work_share to &team->work_shares[0] and clear
66 ts.last_work_share. Don't clear ts.work_share_generation.
67 (gomp_team_end): Call gomp_fini_work_share.
68 * work.c (gomp_new_work_share): Removed.
69 (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
70 functions.
71 (free_work_share): Add team argument. Call gomp_fini_work_share
72 and then either free ws if orphaned, or put it into
73 work_share_list_free list of the current team.
74 (gomp_work_share_start, gomp_work_share_end,
75 gomp_work_share_end_nowait): Rewritten.
76 * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
77 after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
78 gomp_iter_dynamic_next instead of the _locked variant and don't take
79 lock around it, otherwise acquire it before calling
80 gomp_iter_dynamic_next_locked.
81 (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
82 gomp_iter_dynamic_next instead of the _locked variant and don't take
83 lock around it.
84 (GOMP_parallel_sections_start): Call gomp_new_team instead of
85 gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
86 Adjust gomp_team_start caller.
87 * loop.c (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
88 gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
89 (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
90 gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
91 don't unlock ws->lock, otherwise lock it.
92 (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
93 gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
94 (gomp_parallel_loop_start): Call gomp_new_team instead of
95 gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
96 Adjust gomp_team_start caller.
97 * single.c (GOMP_single_start, GOMP_single_copy_start): Call
98 gomp_work_share_init_done if gomp_work_share_start returned true.
99 Don't unlock ws->lock.
100 * parallel.c (GOMP_parallel_start): Call gomp_new_team and pass that
101 as last argument to gomp_team_start.
102 * config/linux/ptrlock.c: New file.
103 * config/linux/ptrlock.h: New file.
104 * config/posix/ptrlock.c: New file.
105 * config/posix/ptrlock.h: New file.
106 * Makefile.am (libgomp_la_SOURCES): Add ptrlock.c.
107 * Makefile.in: Regenerated.
108 * testsuite/Makefile.in: Regenerated.
109
1102008-03-19 Jakub Jelinek <jakub@redhat.com>
111
112 * libgomp.h (gomp_active_wait_policy): Remove decl.
113 (gomp_throttled_spin_count_var, gomp_available_cpus,
114 gomp_managed_threads): New extern decls.
115 * team.c (gomp_team_start, gomp_team_end): If number of threads
116 changed, adjust atomically gomp_managed_threads.
117 * env.c (gomp_active_wait_policy, gomp_block_time_var): Remove.
118 (gomp_throttled_spin_count_var, gomp_available_cpus,
119 gomp_managed_threads): New variables.
120 (parse_millis): Removed.
121 (parse_spincount): New function.
122 (parse_wait_policy): Return -1/0/1 instead of setting
123 gomp_active_wait_policy.
124 (initialize_env): Call gomp_init_num_threads unconditionally.
125 Initialize gomp_available_cpus. Call parse_spincount instead
126 of parse_millis, initialize gomp_{,throttled_}spin_count_var
127 depending on presence and value of OMP_WAIT_POLICY and
128 GOMP_SPINCOUNT env vars.
129 * config/linux/wait.h (do_wait): Use gomp_throttled_spin_count_var
130 instead of gomp_spin_count_var if gomp_managed_threads >
131 gomp_available_cpus.
132
133 * config/linux/wait.h: Include errno.h.
134 (FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Define.
135 (gomp_futex_wake, gomp_futex_wait): New extern decls.
136 * config/linux/mutex.c (gomp_futex_wake, gomp_futex_wait): New
137 variables.
138 * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
139 (sys_futex0): Return error code.
140 (futex_wake, futex_wait): If ENOSYS was returned, clear
141 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
142 * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
143 (futex_wake, futex_wait): If ENOSYS was returned, clear
144 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
145 * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
146 (sys_futex0): Return error code.
147 (futex_wake, futex_wait): If ENOSYS was returned, clear
148 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
149 * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
150 (sys_futex0): Return error code.
151 (futex_wake, futex_wait): If ENOSYS was returned, clear
152 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
153 * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
154 (sys_futex0): Return error code.
155 (futex_wake, futex_wait): If ENOSYS was returned, clear
156 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
157 * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
158 (sys_futex0): Return error code.
159 (futex_wake, futex_wait): If ENOSYS was returned, clear
160 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
161
1622008-03-18 Jakub Jelinek <jakub@redhat.com>
163
164 * libgomp.h (struct gomp_work_share): Add mode field. Put lock and
165 next into a different cache line from most of the write-once fields.
166 * loop.c: Include limits.h.
167 (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
168 If adding ws->chunk_size nthreads + 1 times after end won't
169 overflow, set ws->mode to 1.
170 * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
171 ws->chunk_size by incr.
172 (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
173 code.
174 * work.c: Include stddef.h.
175 (gomp_new_work_share): Use offsetof rather than sizeof.
176
1772008-03-17 Jakub Jelinek <jakub@redhat.com>
178
179 * libgomp.h (struct gomp_team): Change ordered_release field
180 into gomp_sem_t ** from flexible array member. Add implicit_task
181 and initial_work_shares fields.
182 (gomp_new_task): Removed.
183 (gomp_init_task): New prototype.
184 * team.c (new_team): Allocate implicit_task for each thread
185 and initial work_shares together with gomp_team allocation.
186 (free_team): Only free work_shares if it is not init_work_shares.
187 (gomp_team_start): Use gomp_init_task instead of gomp_new_task,
188 set thr->task to the corresponding implicit_task array entry.
189 * task.c (gomp_new_task): Removed.
190 (gomp_init_task): New function.
191 (gomp_end_task): Don't free the task.
192 (GOMP_task): Allocate struct gomp_task on the stack, call
193 gomp_init_task rather than gomp_new_task.
194 * work.c (gomp_work_share_start): If work_shares ==
195 init_work_shares, gomp_malloc + memcpy rather than gomp_realloc.
196
1972008-03-15 Jakub Jelinek <jakub@redhat.com>
198 Ulrich Drepper <drepper@redhat.com>
199
200 * config/linux/bar.h (gomp_barrier_state_t): Rewritten.
201 (gomp_barrier_state_t): Change to unsigned int.
202 (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
203 gomp_barrier_wait_start, gomp_barrier_last_thread): Rewritten.
204 (gomp_barrier_wait_last): Prototype rather than inline.
205 * config/linux/bar.c (gomp_barrier_wait_end): Rewritten.
206 (gomp_barrier_wait_last): New function.
207
2082008-03-15 Jakub Jelinek <jakub@redhat.com>
209
210 * team.c (gomp_thread_start): Use gomp_barrier_wait_last instead
211 of gomp_barrier_wait.
212 * env.c (gomp_block_time_var, gomp_spin_count_var): New variables.
213 (parse_millis): New function.
214 (initialize_env): Handle GOMP_BLOCKTIME env var.
215 * libgomp.h (struct gomp_team): Move close to the end of the struct.
216 (gomp_spin_count_var): New extern var decl.
217 * work.c (gomp_work_share_end): Use gomp_barrier_state_t bstate
218 var instead of bool last, call gomp_barrier_last_thread to check
219 for last thread, pass bstate to gomp_barrier_wait_end.
220 * config/linux/wait.h: New file.
221 * config/linux/mutex.c: Include wait.h instead of libgomp.h and
222 futex.h.
223 (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
224 * config/linux/bar.c: Include wait.h instead of libgomp.h and
225 futex.h.
226 (gomp_barrier_wait_end): Change second argument to
227 gomp_barrier_state_t. Call do_wait instead of futex_wait.
228 * config/linux/sem.c: Include wait.h instead of libgomp.h and
229 futex.h.
230 (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
231 * config/linux/lock.c: Include wait.h instead of libgomp.h and
232 futex.h.
233 (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
234 * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
235 * config/linux/bar.h (gomp_barrier_state_t): New typedef.
236 (gomp_barrier_wait_end): Change second argument to
237 gomp_barrier_state_t.
238 (gomp_barrier_wait_start): Return gomp_barrier_state_t.
239 (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
240 inlines.
241 * config/linux/powerpc/futex.h (cpu_relax, atomic_write_barrier): New
242 static inlines.
243 * config/linux/alpha/futex.h (cpu_relax, atomic_write_barrier):
244 Likewise.
245 * config/linux/x86/futex.h (cpu_relax, atomic_write_barrier):
246 Likewise.
247 * config/linux/s390/futex.h (cpu_relax, atomic_write_barrier):
248 Likewise.
249 * config/linux/ia64/futex.h (cpu_relax, atomic_write_barrier):
250 Likewise.
251 * config/linux/sparc/futex.h (cpu_relax, atomic_write_barrier):
252 Likewise.
253 * config/posix/bar.c (gomp_barrier_wait_end): Change second argument
254 to gomp_barrier_state_t.
255 * config/posix/bar.h (gomp_barrier_state_t): New typedef.
256 (gomp_barrier_wait_end): Change second argument to
257 gomp_barrier_state_t.
258 (gomp_barrier_wait_start): Return gomp_barrier_state_t.
259 (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
260 inlines.
261
262--- libgomp/parallel.c.jj 2007-12-07 14:41:01.000000000 +0100
263+++ libgomp/parallel.c 2008-03-26 15:32:06.000000000 +0100
264@@ -68,7 +68,7 @@ void
265 GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
266 {
267 num_threads = gomp_resolve_num_threads (num_threads);
268- gomp_team_start (fn, data, num_threads, NULL);
269+ gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
270 }
271
272 void
273--- libgomp/sections.c.jj 2007-12-07 14:41:01.000000000 +0100
274+++ libgomp/sections.c 2008-03-26 15:33:06.000000000 +0100
275@@ -59,14 +59,24 @@ GOMP_sections_start (unsigned count)
276 long s, e, ret;
277
278 if (gomp_work_share_start (false))
279- gomp_sections_init (thr->ts.work_share, count);
280+ {
281+ gomp_sections_init (thr->ts.work_share, count);
282+ gomp_work_share_init_done ();
283+ }
284
285+#ifdef HAVE_SYNC_BUILTINS
286+ if (gomp_iter_dynamic_next (&s, &e))
287+ ret = s;
288+ else
289+ ret = 0;
290+#else
291+ gomp_mutex_lock (&thr->ts.work_share->lock);
292 if (gomp_iter_dynamic_next_locked (&s, &e))
293 ret = s;
294 else
295 ret = 0;
296-
297 gomp_mutex_unlock (&thr->ts.work_share->lock);
298+#endif
299
300 return ret;
301 }
302@@ -83,15 +93,23 @@ GOMP_sections_start (unsigned count)
303 unsigned
304 GOMP_sections_next (void)
305 {
306- struct gomp_thread *thr = gomp_thread ();
307 long s, e, ret;
308
309+#ifdef HAVE_SYNC_BUILTINS
310+ if (gomp_iter_dynamic_next (&s, &e))
311+ ret = s;
312+ else
313+ ret = 0;
314+#else
315+ struct gomp_thread *thr = gomp_thread ();
316+
317 gomp_mutex_lock (&thr->ts.work_share->lock);
318 if (gomp_iter_dynamic_next_locked (&s, &e))
319 ret = s;
320 else
321 ret = 0;
322 gomp_mutex_unlock (&thr->ts.work_share->lock);
323+#endif
324
325 return ret;
326 }
327@@ -103,15 +121,15 @@ void
328 GOMP_parallel_sections_start (void (*fn) (void *), void *data,
329 unsigned num_threads, unsigned count)
330 {
331- struct gomp_work_share *ws;
332+ struct gomp_team *team;
333
334 num_threads = gomp_resolve_num_threads (num_threads);
335 if (gomp_dyn_var && num_threads > count)
336 num_threads = count;
337
338- ws = gomp_new_work_share (false, num_threads);
339- gomp_sections_init (ws, count);
340- gomp_team_start (fn, data, num_threads, ws);
341+ team = gomp_new_team (num_threads);
342+ gomp_sections_init (&team->work_shares[0], count);
343+ gomp_team_start (fn, data, num_threads, team);
344 }
345
346 /* The GOMP_section_end* routines are called after the thread is told
347--- libgomp/env.c.jj 2007-12-07 14:41:01.000000000 +0100
348+++ libgomp/env.c 2008-03-26 16:40:26.000000000 +0100
349@@ -44,6 +44,11 @@ enum gomp_schedule_type gomp_run_sched_v
350 unsigned long gomp_run_sched_chunk = 1;
351 unsigned short *gomp_cpu_affinity;
352 size_t gomp_cpu_affinity_len;
353+#ifndef HAVE_SYNC_BUILTINS
354+gomp_mutex_t gomp_remaining_threads_lock;
355+#endif
356+unsigned long gomp_available_cpus = 1, gomp_managed_threads = 1;
357+unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
358
359 /* Parse the OMP_SCHEDULE environment variable. */
360
361@@ -147,6 +152,79 @@ parse_unsigned_long (const char *name, u
362 return false;
363 }
364
365+/* Parse the GOMP_SPINCOUNT environment varible. Return true if one was
366+ present and it was successfully parsed. */
367+
368+static bool
369+parse_spincount (const char *name, unsigned long long *pvalue)
370+{
371+ char *env, *end;
372+ unsigned long long value, mult = 1;
373+
374+ env = getenv (name);
375+ if (env == NULL)
376+ return false;
377+
378+ while (isspace ((unsigned char) *env))
379+ ++env;
380+ if (*env == '\0')
381+ goto invalid;
382+
383+ if (strncasecmp (env, "infinite", 8) == 0
384+ || strncasecmp (env, "infinity", 8) == 0)
385+ {
386+ value = ~0ULL;
387+ end = env + 8;
388+ goto check_tail;
389+ }
390+
391+ errno = 0;
392+ value = strtoull (env, &end, 10);
393+ if (errno)
394+ goto invalid;
395+
396+ while (isspace ((unsigned char) *end))
397+ ++end;
398+ if (*end != '\0')
399+ {
400+ switch (tolower (*end))
401+ {
402+ case 'k':
403+ mult = 1000LL;
404+ break;
405+ case 'm':
406+ mult = 1000LL * 1000LL;
407+ break;
408+ case 'g':
409+ mult = 1000LL * 1000LL * 1000LL;
410+ break;
411+ case 't':
412+ mult = 1000LL * 1000LL * 1000LL * 1000LL;
413+ break;
414+ default:
415+ goto invalid;
416+ }
417+ ++end;
418+ check_tail:
419+ while (isspace ((unsigned char) *end))
420+ ++end;
421+ if (*end != '\0')
422+ goto invalid;
423+ }
424+
425+ if (value > ~0ULL / mult)
426+ value = ~0ULL;
427+ else
428+ value *= mult;
429+
430+ *pvalue = value;
431+ return true;
432+
433+ invalid:
434+ gomp_error ("Invalid value for environment variable %s", name);
435+ return false;
436+}
437+
438 /* Parse a boolean value for environment variable NAME and store the
439 result in VALUE. */
440
441@@ -281,10 +359,25 @@ initialize_env (void)
442 parse_schedule ();
443 parse_boolean ("OMP_DYNAMIC", &gomp_dyn_var);
444 parse_boolean ("OMP_NESTED", &gomp_nest_var);
445+ gomp_init_num_threads ();
446+ gomp_available_cpus = gomp_nthreads_var;
447 if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
448- gomp_init_num_threads ();
449+ gomp_nthreads_var = gomp_available_cpus;
450 if (parse_affinity ())
451 gomp_init_affinity ();
452+ if (!parse_spincount ("GOMP_SPINCOUNT", &gomp_spin_count_var))
453+ {
454+ /* Using a rough estimation of 100000 spins per msec,
455+ use 200 msec blocking.
456+ Depending on the CPU speed, this can be e.g. 5 times longer
457+ or 5 times shorter. */
458+ gomp_spin_count_var = 20000000LL;
459+ }
460+ /* gomp_throttled_spin_count_var is used when there are more libgomp
461+ managed threads than available CPUs. Use very short spinning. */
462+ gomp_throttled_spin_count_var = 100LL;
463+ if (gomp_throttled_spin_count_var > gomp_spin_count_var)
464+ gomp_throttled_spin_count_var = gomp_spin_count_var;
465
466 /* Not strictly environment related, but ordering constructors is tricky. */
467 pthread_attr_init (&gomp_thread_attr);
468--- libgomp/libgomp.h.jj 2007-12-07 14:41:01.000000000 +0100
469+++ libgomp/libgomp.h 2008-03-27 12:21:51.000000000 +0100
470@@ -50,6 +50,7 @@
471 #include "sem.h"
472 #include "mutex.h"
473 #include "bar.h"
474+#include "ptrlock.h"
475
476
477 /* This structure contains the data to control one work-sharing construct,
478@@ -70,6 +71,8 @@ struct gomp_work_share
479 If this is a SECTIONS construct, this value will always be DYNAMIC. */
480 enum gomp_schedule_type sched;
481
482+ int mode;
483+
484 /* This is the chunk_size argument to the SCHEDULE clause. */
485 long chunk_size;
486
487@@ -81,17 +84,38 @@ struct gomp_work_share
488 is always 1. */
489 long incr;
490
491- /* This lock protects the update of the following members. */
492- gomp_mutex_t lock;
493+ /* This is a circular queue that details which threads will be allowed
494+ into the ordered region and in which order. When a thread allocates
495+ iterations on which it is going to work, it also registers itself at
496+ the end of the array. When a thread reaches the ordered region, it
497+ checks to see if it is the one at the head of the queue. If not, it
498+ blocks on its RELEASE semaphore. */
499+ unsigned *ordered_team_ids;
500
501- union {
502- /* This is the next iteration value to be allocated. In the case of
503- GFS_STATIC loops, this the iteration start point and never changes. */
504- long next;
505+ /* This is the number of threads that have registered themselves in
506+ the circular queue ordered_team_ids. */
507+ unsigned ordered_num_used;
508
509- /* This is the returned data structure for SINGLE COPYPRIVATE. */
510- void *copyprivate;
511- };
512+ /* This is the team_id of the currently acknowledged owner of the ordered
513+ section, or -1u if the ordered section has not been acknowledged by
514+ any thread. This is distinguished from the thread that is *allowed*
515+ to take the section next. */
516+ unsigned ordered_owner;
517+
518+ /* This is the index into the circular queue ordered_team_ids of the
519+ current thread that's allowed into the ordered reason. */
520+ unsigned ordered_cur;
521+
522+ /* This is a chain of allocated gomp_work_share blocks, valid only
523+ in the first gomp_work_share struct in the block. */
524+ struct gomp_work_share *next_alloc;
525+
526+ /* The above fields are written once during workshare initialization,
527+ or related to ordered worksharing. Make sure the following fields
528+ are in a different cache line. */
529+
530+ /* This lock protects the update of the following members. */
531+ gomp_mutex_t lock __attribute__((aligned (64)));
532
533 /* This is the count of the number of threads that have exited the work
534 share construct. If the construct was marked nowait, they have moved on
535@@ -99,27 +123,28 @@ struct gomp_work_share
536 of the team to exit the work share construct must deallocate it. */
537 unsigned threads_completed;
538
539- /* This is the index into the circular queue ordered_team_ids of the
540- current thread that's allowed into the ordered reason. */
541- unsigned ordered_cur;
542+ union {
543+ /* This is the next iteration value to be allocated. In the case of
544+ GFS_STATIC loops, this the iteration start point and never changes. */
545+ long next;
546
547- /* This is the number of threads that have registered themselves in
548- the circular queue ordered_team_ids. */
549- unsigned ordered_num_used;
550+ /* This is the returned data structure for SINGLE COPYPRIVATE. */
551+ void *copyprivate;
552+ };
553
554- /* This is the team_id of the currently acknoledged owner of the ordered
555- section, or -1u if the ordered section has not been acknowledged by
556- any thread. This is distinguished from the thread that is *allowed*
557- to take the section next. */
558- unsigned ordered_owner;
559+ union {
560+ /* Link to gomp_work_share struct for next work sharing construct
561+ encountered after this one. */
562+ gomp_ptrlock_t next_ws;
563+
564+ /* gomp_work_share structs are chained in the free work share cache
565+ through this. */
566+ struct gomp_work_share *next_free;
567+ };
568
569- /* This is a circular queue that details which threads will be allowed
570- into the ordered region and in which order. When a thread allocates
571- iterations on which it is going to work, it also registers itself at
572- the end of the array. When a thread reaches the ordered region, it
573- checks to see if it is the one at the head of the queue. If not, it
574- blocks on its RELEASE semaphore. */
575- unsigned ordered_team_ids[];
576+ /* If only few threads are in the team, ordered_team_ids can point
577+ to this array which fills the padding at the end of this struct. */
578+ unsigned inline_ordered_team_ids[0];
579 };
580
581 /* This structure contains all of the thread-local data associated with
582@@ -133,21 +158,24 @@ struct gomp_team_state
583
584 /* This is the work share construct which this thread is currently
585 processing. Recall that with NOWAIT, not all threads may be
586- processing the same construct. This value is NULL when there
587- is no construct being processed. */
588+ processing the same construct. */
589 struct gomp_work_share *work_share;
590
591+ /* This is the previous work share construct or NULL if there wasn't any.
592+ When all threads are done with the current work sharing construct,
593+ the previous one can be freed. The current one can't, as its
594+ next_ws field is used. */
595+ struct gomp_work_share *last_work_share;
596+
597 /* This is the ID of this thread within the team. This value is
598 guaranteed to be between 0 and N-1, where N is the number of
599 threads in the team. */
600 unsigned team_id;
601
602- /* The work share "generation" is a number that increases by one for
603- each work share construct encountered in the dynamic flow of the
604- program. It is used to find the control data for the work share
605- when encountering it for the first time. This particular number
606- reflects the generation of the work_share member of this struct. */
607- unsigned work_share_generation;
608+#ifdef HAVE_SYNC_BUILTINS
609+ /* Number of single stmts encountered. */
610+ unsigned long single_count;
611+#endif
612
613 /* For GFS_RUNTIME loops that resolved to GFS_STATIC, this is the
614 trip number through the loop. So first time a particular loop
615@@ -163,41 +191,53 @@ struct gomp_team_state
616
617 struct gomp_team
618 {
619- /* This lock protects access to the following work shares data structures. */
620- gomp_mutex_t work_share_lock;
621-
622- /* This is a dynamically sized array containing pointers to the control
623- structs for all "live" work share constructs. Here "live" means that
624- the construct has been encountered by at least one thread, and not
625- completed by all threads. */
626- struct gomp_work_share **work_shares;
627-
628- /* The work_shares array is indexed by "generation & generation_mask".
629- The mask will be 2**N - 1, where 2**N is the size of the array. */
630- unsigned generation_mask;
631-
632- /* These two values define the bounds of the elements of the work_shares
633- array that are currently in use. */
634- unsigned oldest_live_gen;
635- unsigned num_live_gen;
636-
637 /* This is the number of threads in the current team. */
638 unsigned nthreads;
639
640+ /* This is number of gomp_work_share structs that have been allocated
641+ as a block last time. */
642+ unsigned work_share_chunk;
643+
644 /* This is the saved team state that applied to a master thread before
645 the current thread was created. */
646 struct gomp_team_state prev_ts;
647
648- /* This barrier is used for most synchronization of the team. */
649- gomp_barrier_t barrier;
650-
651 /* This semaphore should be used by the master thread instead of its
652 "native" semaphore in the thread structure. Required for nested
653 parallels, as the master is a member of two teams. */
654 gomp_sem_t master_release;
655
656- /* This array contains pointers to the release semaphore of the threads
657- in the team. */
658+ /* List of gomp_work_share structs chained through next_free fields.
659+ This is populated and taken off only by the first thread in the
660+ team encountering a new work sharing construct, in a critical
661+ section. */
662+ struct gomp_work_share *work_share_list_alloc;
663+
664+ /* List of gomp_work_share structs freed by free_work_share. New
665+ entries are atomically added to the start of the list, and
666+ alloc_work_share can safely only move all but the first entry
667+ to work_share_list alloc, as free_work_share can happen concurrently
668+ with alloc_work_share. */
669+ struct gomp_work_share *work_share_list_free;
670+
671+#ifdef HAVE_SYNC_BUILTINS
672+ /* Number of simple single regions encountered by threads in this
673+ team. */
674+ unsigned long single_count;
675+#else
676+ /* Mutex protecting addition of workshares to work_share_list_free. */
677+ gomp_mutex_t work_share_list_free_lock;
678+#endif
679+
680+ /* This barrier is used for most synchronization of the team. */
681+ gomp_barrier_t barrier;
682+
683+ /* Initial work shares, to avoid allocating any gomp_work_share
684+ structs in the common case. */
685+ struct gomp_work_share work_shares[8];
686+
687+ /* This is an array with pointers to the release semaphore
688+ of the threads in the team. */
689 gomp_sem_t *ordered_release[];
690 };
691
692@@ -242,6 +282,11 @@ extern bool gomp_dyn_var;
693 extern bool gomp_nest_var;
694 extern enum gomp_schedule_type gomp_run_sched_var;
695 extern unsigned long gomp_run_sched_chunk;
696+#ifndef HAVE_SYNC_BUILTINS
697+extern gomp_mutex_t gomp_remaining_threads_lock;
698+#endif
699+extern unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
700+extern unsigned long gomp_available_cpus, gomp_managed_threads;
701
702 /* The attributes to be used during thread creation. */
703 extern pthread_attr_t gomp_thread_attr;
704@@ -306,17 +351,27 @@ extern unsigned gomp_dynamic_max_threads
705
706 /* team.c */
707
708+extern struct gomp_team *gomp_new_team (unsigned);
709 extern void gomp_team_start (void (*) (void *), void *, unsigned,
710- struct gomp_work_share *);
711+ struct gomp_team *);
712 extern void gomp_team_end (void);
713
714 /* work.c */
715
716-extern struct gomp_work_share * gomp_new_work_share (bool, unsigned);
717+extern void gomp_init_work_share (struct gomp_work_share *, bool, unsigned);
718+extern void gomp_fini_work_share (struct gomp_work_share *);
719 extern bool gomp_work_share_start (bool);
720 extern void gomp_work_share_end (void);
721 extern void gomp_work_share_end_nowait (void);
722
723+static inline void
724+gomp_work_share_init_done (void)
725+{
726+ struct gomp_thread *thr = gomp_thread ();
727+ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
728+ gomp_ptrlock_set (&thr->ts.last_work_share->next_ws, thr->ts.work_share);
729+}
730+
731 #ifdef HAVE_ATTRIBUTE_VISIBILITY
732 # pragma GCC visibility pop
733 #endif
734--- libgomp/iter.c.jj 2008-03-26 14:48:34.000000000 +0100
735+++ libgomp/iter.c 2008-03-26 15:11:23.000000000 +0100
736@@ -1,4 +1,4 @@
737-/* Copyright (C) 2005 Free Software Foundation, Inc.
738+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
739 Contributed by Richard Henderson <rth@redhat.com>.
740
741 This file is part of the GNU OpenMP Library (libgomp).
742@@ -154,7 +154,7 @@ gomp_iter_dynamic_next_locked (long *pst
743 if (start == ws->end)
744 return false;
745
746- chunk = ws->chunk_size * ws->incr;
747+ chunk = ws->chunk_size;
748 left = ws->end - start;
749 if (ws->incr < 0)
750 {
751@@ -186,11 +186,38 @@ gomp_iter_dynamic_next (long *pstart, lo
752 struct gomp_work_share *ws = thr->ts.work_share;
753 long start, end, nend, chunk, incr;
754
755- start = ws->next;
756 end = ws->end;
757 incr = ws->incr;
758- chunk = ws->chunk_size * incr;
759+ chunk = ws->chunk_size;
760+
761+ if (__builtin_expect (ws->mode, 1))
762+ {
763+ long tmp = __sync_fetch_and_add (&ws->next, chunk);
764+ if (incr > 0)
765+ {
766+ if (tmp >= end)
767+ return false;
768+ nend = tmp + chunk;
769+ if (nend > end)
770+ nend = end;
771+ *pstart = tmp;
772+ *pend = nend;
773+ return true;
774+ }
775+ else
776+ {
777+ if (tmp <= end)
778+ return false;
779+ nend = tmp + chunk;
780+ if (nend < end)
781+ nend = end;
782+ *pstart = tmp;
783+ *pend = nend;
784+ return true;
785+ }
786+ }
787
788+ start = ws->next;
789 while (1)
790 {
791 long left = end - start;
792--- libgomp/work.c.jj 2007-12-07 14:41:01.000000000 +0100
793+++ libgomp/work.c 2008-03-27 12:21:51.000000000 +0100
794@@ -1,4 +1,4 @@
795-/* Copyright (C) 2005 Free Software Foundation, Inc.
796+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
797 Contributed by Richard Henderson <rth@redhat.com>.
798
799 This file is part of the GNU OpenMP Library (libgomp).
800@@ -29,39 +29,138 @@
801 of threads. */
802
803 #include "libgomp.h"
804+#include <stddef.h>
805 #include <stdlib.h>
806 #include <string.h>
807
808
809-/* Create a new work share structure. */
810+/* Allocate a new work share structure, preferably from current team's
811+ free gomp_work_share cache. */
812
813-struct gomp_work_share *
814-gomp_new_work_share (bool ordered, unsigned nthreads)
815+static struct gomp_work_share *
816+alloc_work_share (struct gomp_team *team)
817 {
818 struct gomp_work_share *ws;
819- size_t size;
820+ unsigned int i;
821
822- size = sizeof (*ws);
823- if (ordered)
824- size += nthreads * sizeof (ws->ordered_team_ids[0]);
825+ /* This is called in a critical section. */
826+ if (team->work_share_list_alloc != NULL)
827+ {
828+ ws = team->work_share_list_alloc;
829+ team->work_share_list_alloc = ws->next_free;
830+ return ws;
831+ }
832
833- ws = gomp_malloc_cleared (size);
834- gomp_mutex_init (&ws->lock);
835- ws->ordered_owner = -1;
836+#ifdef HAVE_SYNC_BUILTINS
837+ ws = team->work_share_list_free;
838+ /* We need atomic read from work_share_list_free,
839+ as free_work_share can be called concurrently. */
840+ __asm ("" : "+r" (ws));
841+
842+ if (ws && ws->next_free)
843+ {
844+ struct gomp_work_share *next = ws->next_free;
845+ ws->next_free = NULL;
846+ team->work_share_list_alloc = next->next_free;
847+ return next;
848+ }
849+#else
850+ gomp_mutex_lock (&team->work_share_list_free_lock);
851+ ws = team->work_share_list_free;
852+ if (ws)
853+ {
854+ team->work_share_list_alloc = ws->next_free;
855+ team->work_share_list_free = NULL;
856+ gomp_mutex_unlock (&team->work_share_list_free_lock);
857+ return ws;
858+ }
859+ gomp_mutex_unlock (&team->work_share_list_free_lock);
860+#endif
861
862+ team->work_share_chunk *= 2;
863+ ws = gomp_malloc (team->work_share_chunk * sizeof (struct gomp_work_share));
864+ ws->next_alloc = team->work_shares[0].next_alloc;
865+ team->work_shares[0].next_alloc = ws;
866+ team->work_share_list_alloc = &ws[1];
867+ for (i = 1; i < team->work_share_chunk - 1; i++)
868+ ws[i].next_free = &ws[i + 1];
869+ ws[i].next_free = NULL;
870 return ws;
871 }
872
873+/* Initialize an already allocated struct gomp_work_share.
874+ This shouldn't touch the next_alloc field. */
875+
876+void
877+gomp_init_work_share (struct gomp_work_share *ws, bool ordered,
878+ unsigned nthreads)
879+{
880+ gomp_mutex_init (&ws->lock);
881+ if (__builtin_expect (ordered, 0))
882+ {
883+#define INLINE_ORDERED_TEAM_IDS_CNT \
884+ ((sizeof (struct gomp_work_share) \
885+ - offsetof (struct gomp_work_share, inline_ordered_team_ids)) \
886+ / sizeof (((struct gomp_work_share *) 0)->inline_ordered_team_ids[0]))
887+
888+ if (nthreads > INLINE_ORDERED_TEAM_IDS_CNT)
889+ ws->ordered_team_ids
890+ = gomp_malloc (nthreads * sizeof (*ws->ordered_team_ids));
891+ else
892+ ws->ordered_team_ids = ws->inline_ordered_team_ids;
893+ memset (ws->ordered_team_ids, '\0',
894+ nthreads * sizeof (*ws->ordered_team_ids));
895+ ws->ordered_num_used = 0;
896+ ws->ordered_owner = -1;
897+ ws->ordered_cur = 0;
898+ }
899+ else
900+ ws->ordered_team_ids = NULL;
901+ gomp_ptrlock_init (&ws->next_ws, NULL);
902+ ws->threads_completed = 0;
903+}
904
905-/* Free a work share structure. */
906+/* Do any needed destruction of gomp_work_share fields before it
907+ is put back into free gomp_work_share cache or freed. */
908
909-static void
910-free_work_share (struct gomp_work_share *ws)
911+void
912+gomp_fini_work_share (struct gomp_work_share *ws)
913 {
914 gomp_mutex_destroy (&ws->lock);
915- free (ws);
916+ if (ws->ordered_team_ids != ws->inline_ordered_team_ids)
917+ free (ws->ordered_team_ids);
918+ gomp_ptrlock_destroy (&ws->next_ws);
919 }
920
921+/* Free a work share struct, if not orphaned, put it into current
922+ team's free gomp_work_share cache. */
923+
924+static inline void
925+free_work_share (struct gomp_team *team, struct gomp_work_share *ws)
926+{
927+ gomp_fini_work_share (ws);
928+ if (__builtin_expect (team == NULL, 0))
929+ free (ws);
930+ else
931+ {
932+ struct gomp_work_share *next_ws;
933+#ifdef HAVE_SYNC_BUILTINS
934+ do
935+ {
936+ next_ws = team->work_share_list_free;
937+ ws->next_free = next_ws;
938+ }
939+ while (!__sync_bool_compare_and_swap (&team->work_share_list_free,
940+ next_ws, ws));
941+#else
942+ gomp_mutex_lock (&team->work_share_list_free_lock);
943+ next_ws = team->work_share_list_free;
944+ ws->next_free = next_ws;
945+ team->work_share_list_free = ws;
946+ gomp_mutex_unlock (&team->work_share_list_free_lock);
947+#endif
948+ }
949+}
950
951 /* The current thread is ready to begin the next work sharing construct.
952 In all cases, thr->ts.work_share is updated to point to the new
953@@ -74,71 +173,34 @@ gomp_work_share_start (bool ordered)
954 struct gomp_thread *thr = gomp_thread ();
955 struct gomp_team *team = thr->ts.team;
956 struct gomp_work_share *ws;
957- unsigned ws_index, ws_gen;
958
959 /* Work sharing constructs can be orphaned. */
960 if (team == NULL)
961 {
962- ws = gomp_new_work_share (ordered, 1);
963+ ws = gomp_malloc (sizeof (*ws));
964+ gomp_init_work_share (ws, ordered, 1);
965 thr->ts.work_share = ws;
966- thr->ts.static_trip = 0;
967- gomp_mutex_lock (&ws->lock);
968- return true;
969+ return ws;
970 }
971
972- gomp_mutex_lock (&team->work_share_lock);
973-
974- /* This thread is beginning its next generation. */
975- ws_gen = ++thr->ts.work_share_generation;
976-
977- /* If this next generation is not newer than any other generation in
978- the team, then simply reference the existing construct. */
979- if (ws_gen - team->oldest_live_gen < team->num_live_gen)
980+ ws = thr->ts.work_share;
981+ thr->ts.last_work_share = ws;
982+ ws = gomp_ptrlock_get (&ws->next_ws);
983+ if (ws == NULL)
984 {
985- ws_index = ws_gen & team->generation_mask;
986- ws = team->work_shares[ws_index];
987+ /* This thread encountered a new ws first. */
988+ struct gomp_work_share *ws = alloc_work_share (team);
989+ gomp_init_work_share (ws, ordered, team->nthreads);
990 thr->ts.work_share = ws;
991- thr->ts.static_trip = 0;
992-
993- gomp_mutex_lock (&ws->lock);
994- gomp_mutex_unlock (&team->work_share_lock);
995-
996- return false;
997+ return true;
998 }
999-
1000- /* Resize the work shares queue if we've run out of space. */
1001- if (team->num_live_gen++ == team->generation_mask)
1002+ else
1003 {
1004- team->work_shares = gomp_realloc (team->work_shares,
1005- 2 * team->num_live_gen
1006- * sizeof (*team->work_shares));
1007-
1008- /* Unless oldest_live_gen is zero, the sequence of live elements
1009- wraps around the end of the array. If we do nothing, we break
1010- lookup of the existing elements. Fix that by unwrapping the
1011- data from the front to the end. */
1012- if (team->oldest_live_gen > 0)
1013- memcpy (team->work_shares + team->num_live_gen,
1014- team->work_shares,
1015- (team->oldest_live_gen & team->generation_mask)
1016- * sizeof (*team->work_shares));
1017-
1018- team->generation_mask = team->generation_mask * 2 + 1;
1019- }
1020-
1021- ws_index = ws_gen & team->generation_mask;
1022- ws = gomp_new_work_share (ordered, team->nthreads);
1023- thr->ts.work_share = ws;
1024- thr->ts.static_trip = 0;
1025- team->work_shares[ws_index] = ws;
1026-
1027- gomp_mutex_lock (&ws->lock);
1028- gomp_mutex_unlock (&team->work_share_lock);
1029-
1030- return true;
1031+ thr->ts.work_share = ws;
1032+ return false;
1033+ }
1034 }
1035
1036-
1037 /* The current thread is done with its current work sharing construct.
1038 This version does imply a barrier at the end of the work-share. */
1039
1040@@ -147,36 +209,28 @@ gomp_work_share_end (void)
1041 {
1042 struct gomp_thread *thr = gomp_thread ();
1043 struct gomp_team *team = thr->ts.team;
1044- struct gomp_work_share *ws = thr->ts.work_share;
1045- bool last;
1046-
1047- thr->ts.work_share = NULL;
1048+ gomp_barrier_state_t bstate;
1049
1050 /* Work sharing constructs can be orphaned. */
1051 if (team == NULL)
1052 {
1053- free_work_share (ws);
1054+ free_work_share (NULL, thr->ts.work_share);
1055+ thr->ts.work_share = NULL;
1056 return;
1057 }
1058
1059- last = gomp_barrier_wait_start (&team->barrier);
1060+ bstate = gomp_barrier_wait_start (&team->barrier);
1061
1062- if (last)
1063+ if (gomp_barrier_last_thread (bstate))
1064 {
1065- unsigned ws_index;
1066-
1067- ws_index = thr->ts.work_share_generation & team->generation_mask;
1068- team->work_shares[ws_index] = NULL;
1069- team->oldest_live_gen++;
1070- team->num_live_gen = 0;
1071-
1072- free_work_share (ws);
1073+ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
1074+ free_work_share (team, thr->ts.last_work_share);
1075 }
1076
1077- gomp_barrier_wait_end (&team->barrier, last);
1078+ gomp_barrier_wait_end (&team->barrier, bstate);
1079+ thr->ts.last_work_share = NULL;
1080 }
1081
1082-
1083 /* The current thread is done with its current work sharing construct.
1084 This version does NOT imply a barrier at the end of the work-share. */
1085
1086@@ -188,15 +242,17 @@ gomp_work_share_end_nowait (void)
1087 struct gomp_work_share *ws = thr->ts.work_share;
1088 unsigned completed;
1089
1090- thr->ts.work_share = NULL;
1091-
1092 /* Work sharing constructs can be orphaned. */
1093 if (team == NULL)
1094 {
1095- free_work_share (ws);
1096+ free_work_share (NULL, ws);
1097+ thr->ts.work_share = NULL;
1098 return;
1099 }
1100
1101+ if (__builtin_expect (thr->ts.last_work_share == NULL, 0))
1102+ return;
1103+
1104 #ifdef HAVE_SYNC_BUILTINS
1105 completed = __sync_add_and_fetch (&ws->threads_completed, 1);
1106 #else
1107@@ -206,18 +262,6 @@ gomp_work_share_end_nowait (void)
1108 #endif
1109
1110 if (completed == team->nthreads)
1111- {
1112- unsigned ws_index;
1113-
1114- gomp_mutex_lock (&team->work_share_lock);
1115-
1116- ws_index = thr->ts.work_share_generation & team->generation_mask;
1117- team->work_shares[ws_index] = NULL;
1118- team->oldest_live_gen++;
1119- team->num_live_gen--;
1120-
1121- gomp_mutex_unlock (&team->work_share_lock);
1122-
1123- free_work_share (ws);
1124- }
1125+ free_work_share (team, thr->ts.last_work_share);
1126+ thr->ts.last_work_share = NULL;
1127 }
1128--- libgomp/single.c.jj 2007-12-07 14:41:01.000000000 +0100
1129+++ libgomp/single.c 2008-03-26 15:11:32.000000000 +0100
1130@@ -1,4 +1,4 @@
1131-/* Copyright (C) 2005 Free Software Foundation, Inc.
1132+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1133 Contributed by Richard Henderson <rth@redhat.com>.
1134
1135 This file is part of the GNU OpenMP Library (libgomp).
1136@@ -37,10 +37,24 @@
1137 bool
1138 GOMP_single_start (void)
1139 {
1140+#ifdef HAVE_SYNC_BUILTINS
1141+ struct gomp_thread *thr = gomp_thread ();
1142+ struct gomp_team *team = thr->ts.team;
1143+ unsigned long single_count;
1144+
1145+ if (__builtin_expect (team == NULL, 0))
1146+ return true;
1147+
1148+ single_count = thr->ts.single_count++;
1149+ return __sync_bool_compare_and_swap (&team->single_count, single_count,
1150+ single_count + 1L);
1151+#else
1152 bool ret = gomp_work_share_start (false);
1153- gomp_mutex_unlock (&gomp_thread ()->ts.work_share->lock);
1154+ if (ret)
1155+ gomp_work_share_init_done ();
1156 gomp_work_share_end_nowait ();
1157 return ret;
1158+#endif
1159 }
1160
1161 /* This routine is called when first encountering a SINGLE construct that
1162@@ -57,10 +71,12 @@ GOMP_single_copy_start (void)
1163 void *ret;
1164
1165 first = gomp_work_share_start (false);
1166- gomp_mutex_unlock (&thr->ts.work_share->lock);
1167
1168 if (first)
1169- ret = NULL;
1170+ {
1171+ gomp_work_share_init_done ();
1172+ ret = NULL;
1173+ }
1174 else
1175 {
1176 gomp_barrier_wait (&thr->ts.team->barrier);
1177--- libgomp/loop.c.jj 2007-12-07 14:41:01.000000000 +0100
1178+++ libgomp/loop.c 2008-03-26 18:47:04.000000000 +0100
1179@@ -27,8 +27,9 @@
1180
1181 /* This file handles the LOOP (FOR/DO) construct. */
1182
1183-#include "libgomp.h"
1184+#include <limits.h>
1185 #include <stdlib.h>
1186+#include "libgomp.h"
1187
1188
1189 /* Initialize the given work share construct from the given arguments. */
1190@@ -44,6 +45,39 @@ gomp_loop_init (struct gomp_work_share *
1191 ? start : end;
1192 ws->incr = incr;
1193 ws->next = start;
1194+ if (sched == GFS_DYNAMIC)
1195+ {
1196+ ws->chunk_size *= incr;
1197+
1198+#ifdef HAVE_SYNC_BUILTINS
1199+ {
1200+ /* For dynamic scheduling prepare things to make each iteration
1201+ faster. */
1202+ struct gomp_thread *thr = gomp_thread ();
1203+ struct gomp_team *team = thr->ts.team;
1204+ long nthreads = team ? team->nthreads : 1;
1205+
1206+ if (__builtin_expect (incr > 0, 1))
1207+ {
1208+ /* Cheap overflow protection. */
1209+ if (__builtin_expect ((nthreads | ws->chunk_size)
1210+ >= 1UL << (sizeof (long)
1211+ * __CHAR_BIT__ / 2 - 1), 0))
1212+ ws->mode = 0;
1213+ else
1214+ ws->mode = ws->end < (LONG_MAX
1215+ - (nthreads + 1) * ws->chunk_size);
1216+ }
1217+ /* Cheap overflow protection. */
1218+ else if (__builtin_expect ((nthreads | -ws->chunk_size)
1219+ >= 1UL << (sizeof (long)
1220+ * __CHAR_BIT__ / 2 - 1), 0))
1221+ ws->mode = 0;
1222+ else
1223+ ws->mode = ws->end > (nthreads + 1) * -ws->chunk_size - LONG_MAX;
1224+ }
1225+#endif
1226+ }
1227 }
1228
1229 /* The *_start routines are called when first encountering a loop construct
1230@@ -68,10 +102,13 @@ gomp_loop_static_start (long start, long
1231 {
1232 struct gomp_thread *thr = gomp_thread ();
1233
1234+ thr->ts.static_trip = 0;
1235 if (gomp_work_share_start (false))
1236- gomp_loop_init (thr->ts.work_share, start, end, incr,
1237- GFS_STATIC, chunk_size);
1238- gomp_mutex_unlock (&thr->ts.work_share->lock);
1239+ {
1240+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1241+ GFS_STATIC, chunk_size);
1242+ gomp_work_share_init_done ();
1243+ }
1244
1245 return !gomp_iter_static_next (istart, iend);
1246 }
1247@@ -84,13 +121,16 @@ gomp_loop_dynamic_start (long start, lon
1248 bool ret;
1249
1250 if (gomp_work_share_start (false))
1251- gomp_loop_init (thr->ts.work_share, start, end, incr,
1252- GFS_DYNAMIC, chunk_size);
1253+ {
1254+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1255+ GFS_DYNAMIC, chunk_size);
1256+ gomp_work_share_init_done ();
1257+ }
1258
1259 #ifdef HAVE_SYNC_BUILTINS
1260- gomp_mutex_unlock (&thr->ts.work_share->lock);
1261 ret = gomp_iter_dynamic_next (istart, iend);
1262 #else
1263+ gomp_mutex_lock (&thr->ts.work_share->lock);
1264 ret = gomp_iter_dynamic_next_locked (istart, iend);
1265 gomp_mutex_unlock (&thr->ts.work_share->lock);
1266 #endif
1267@@ -106,13 +146,16 @@ gomp_loop_guided_start (long start, long
1268 bool ret;
1269
1270 if (gomp_work_share_start (false))
1271- gomp_loop_init (thr->ts.work_share, start, end, incr,
1272- GFS_GUIDED, chunk_size);
1273+ {
1274+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1275+ GFS_GUIDED, chunk_size);
1276+ gomp_work_share_init_done ();
1277+ }
1278
1279 #ifdef HAVE_SYNC_BUILTINS
1280- gomp_mutex_unlock (&thr->ts.work_share->lock);
1281 ret = gomp_iter_guided_next (istart, iend);
1282 #else
1283+ gomp_mutex_lock (&thr->ts.work_share->lock);
1284 ret = gomp_iter_guided_next_locked (istart, iend);
1285 gomp_mutex_unlock (&thr->ts.work_share->lock);
1286 #endif
1287@@ -149,13 +192,14 @@ gomp_loop_ordered_static_start (long sta
1288 {
1289 struct gomp_thread *thr = gomp_thread ();
1290
1291+ thr->ts.static_trip = 0;
1292 if (gomp_work_share_start (true))
1293 {
1294 gomp_loop_init (thr->ts.work_share, start, end, incr,
1295 GFS_STATIC, chunk_size);
1296 gomp_ordered_static_init ();
1297+ gomp_work_share_init_done ();
1298 }
1299- gomp_mutex_unlock (&thr->ts.work_share->lock);
1300
1301 return !gomp_iter_static_next (istart, iend);
1302 }
1303@@ -168,8 +212,14 @@ gomp_loop_ordered_dynamic_start (long st
1304 bool ret;
1305
1306 if (gomp_work_share_start (true))
1307- gomp_loop_init (thr->ts.work_share, start, end, incr,
1308- GFS_DYNAMIC, chunk_size);
1309+ {
1310+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1311+ GFS_DYNAMIC, chunk_size);
1312+ gomp_mutex_lock (&thr->ts.work_share->lock);
1313+ gomp_work_share_init_done ();
1314+ }
1315+ else
1316+ gomp_mutex_lock (&thr->ts.work_share->lock);
1317
1318 ret = gomp_iter_dynamic_next_locked (istart, iend);
1319 if (ret)
1320@@ -187,8 +237,14 @@ gomp_loop_ordered_guided_start (long sta
1321 bool ret;
1322
1323 if (gomp_work_share_start (true))
1324- gomp_loop_init (thr->ts.work_share, start, end, incr,
1325- GFS_GUIDED, chunk_size);
1326+ {
1327+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1328+ GFS_GUIDED, chunk_size);
1329+ gomp_mutex_lock (&thr->ts.work_share->lock);
1330+ gomp_work_share_init_done ();
1331+ }
1332+ else
1333+ gomp_mutex_lock (&thr->ts.work_share->lock);
1334
1335 ret = gomp_iter_guided_next_locked (istart, iend);
1336 if (ret)
1337@@ -375,12 +431,12 @@ gomp_parallel_loop_start (void (*fn) (vo
1338 long incr, enum gomp_schedule_type sched,
1339 long chunk_size)
1340 {
1341- struct gomp_work_share *ws;
1342+ struct gomp_team *team;
1343
1344 num_threads = gomp_resolve_num_threads (num_threads);
1345- ws = gomp_new_work_share (false, num_threads);
1346- gomp_loop_init (ws, start, end, incr, sched, chunk_size);
1347- gomp_team_start (fn, data, num_threads, ws);
1348+ team = gomp_new_team (num_threads);
1349+ gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
1350+ gomp_team_start (fn, data, num_threads, team);
1351 }
1352
1353 void
1354--- libgomp/Makefile.in.jj 2008-01-10 20:53:47.000000000 +0100
1355+++ libgomp/Makefile.in 2008-03-26 18:51:01.000000000 +0100
1356@@ -83,7 +83,7 @@ libgomp_la_LIBADD =
1357 am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
1358 error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
1359 single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
1360- bar.lo time.lo fortran.lo affinity.lo
1361+ bar.lo ptrlock.lo time.lo fortran.lo affinity.lo
1362 libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
1363 DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
1364 depcomp = $(SHELL) $(top_srcdir)/../depcomp
1365@@ -292,7 +292,7 @@ libgomp_version_info = -version-info $(l
1366 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
1367 libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
1368 loop.c ordered.c parallel.c sections.c single.c team.c work.c \
1369- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
1370+ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
1371
1372 nodist_noinst_HEADERS = libgomp_f.h
1373 nodist_libsubinclude_HEADERS = omp.h
1374@@ -434,6 +434,7 @@ distclean-compile:
1375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordered.Plo@am__quote@
1376 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@
1377 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc.Plo@am__quote@
1378+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrlock.Plo@am__quote@
1379 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sections.Plo@am__quote@
1380 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem.Plo@am__quote@
1381 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@
1382--- libgomp/testsuite/libgomp.c/loop-4.c.jj 2008-03-26 18:47:04.000000000 +0100
1383+++ libgomp/testsuite/libgomp.c/loop-4.c 2008-03-26 18:47:04.000000000 +0100
1384@@ -0,0 +1,28 @@
1385+/* { dg-do run } */
1386+
1387+extern void abort (void);
1388+
1389+int
1390+main (void)
1391+{
1392+ int e = 0;
1393+#pragma omp parallel num_threads (4) reduction(+:e)
1394+ {
1395+ long i;
1396+ #pragma omp for schedule(dynamic,1)
1397+ for (i = __LONG_MAX__ - 30001; i <= __LONG_MAX__ - 10001; i += 10000)
1398+ if (i != __LONG_MAX__ - 30001
1399+ && i != __LONG_MAX__ - 20001
1400+ && i != __LONG_MAX__ - 10001)
1401+ e = 1;
1402+ #pragma omp for schedule(dynamic,1)
1403+ for (i = -__LONG_MAX__ + 30000; i >= -__LONG_MAX__ + 10000; i -= 10000)
1404+ if (i != -__LONG_MAX__ + 30000
1405+ && i != -__LONG_MAX__ + 20000
1406+ && i != -__LONG_MAX__ + 10000)
1407+ e = 1;
1408+ }
1409+ if (e)
1410+ abort ();
1411+ return 0;
1412+}
1413--- libgomp/Makefile.am.jj 2007-12-07 14:41:01.000000000 +0100
1414+++ libgomp/Makefile.am 2008-03-26 15:15:19.000000000 +0100
1415@@ -31,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i
1416
1417 libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
1418 loop.c ordered.c parallel.c sections.c single.c team.c work.c \
1419- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
1420+ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
1421
1422 nodist_noinst_HEADERS = libgomp_f.h
1423 nodist_libsubinclude_HEADERS = omp.h
1424--- libgomp/team.c.jj 2007-12-07 14:41:01.000000000 +0100
1425+++ libgomp/team.c 2008-03-27 12:22:26.000000000 +0100
1426@@ -94,7 +94,7 @@ gomp_thread_start (void *xdata)
1427 {
1428 gomp_barrier_wait (&thr->ts.team->barrier);
1429 local_fn (local_data);
1430- gomp_barrier_wait (&thr->ts.team->barrier);
1431+ gomp_barrier_wait_last (&thr->ts.team->barrier);
1432 }
1433 else
1434 {
1435@@ -114,11 +114,10 @@ gomp_thread_start (void *xdata)
1436 thr->data = NULL;
1437 thr->ts.team = NULL;
1438 thr->ts.work_share = NULL;
1439+ thr->ts.last_work_share = NULL;
1440 thr->ts.team_id = 0;
1441- thr->ts.work_share_generation = 0;
1442- thr->ts.static_trip = 0;
1443
1444- gomp_barrier_wait (&team->barrier);
1445+ gomp_barrier_wait_last (&team->barrier);
1446 gomp_barrier_wait (&gomp_threads_dock);
1447
1448 local_fn = thr->fn;
1449@@ -133,21 +132,29 @@ gomp_thread_start (void *xdata)
1450
1451 /* Create a new team data structure. */
1452
1453-static struct gomp_team *
1454-new_team (unsigned nthreads, struct gomp_work_share *work_share)
1455+struct gomp_team *
1456+gomp_new_team (unsigned nthreads)
1457 {
1458 struct gomp_team *team;
1459 size_t size;
1460+ int i;
1461
1462 size = sizeof (*team) + nthreads * sizeof (team->ordered_release[0]);
1463 team = gomp_malloc (size);
1464- gomp_mutex_init (&team->work_share_lock);
1465
1466- team->work_shares = gomp_malloc (4 * sizeof (struct gomp_work_share *));
1467- team->generation_mask = 3;
1468- team->oldest_live_gen = work_share == NULL;
1469- team->num_live_gen = work_share != NULL;
1470- team->work_shares[0] = work_share;
1471+ team->work_share_chunk = 8;
1472+#ifdef HAVE_SYNC_BUILTINS
1473+ team->single_count = 0;
1474+#else
1475+ gomp_mutex_init (&team->work_share_list_free_lock);
1476+#endif
1477+ gomp_init_work_share (&team->work_shares[0], false, nthreads);
1478+ team->work_shares[0].next_alloc = NULL;
1479+ team->work_share_list_free = NULL;
1480+ team->work_share_list_alloc = &team->work_shares[1];
1481+ for (i = 1; i < 7; i++)
1482+ team->work_shares[i].next_free = &team->work_shares[i + 1];
1483+ team->work_shares[i].next_free = NULL;
1484
1485 team->nthreads = nthreads;
1486 gomp_barrier_init (&team->barrier, nthreads);
1487@@ -164,10 +171,22 @@ new_team (unsigned nthreads, struct gomp
1488 static void
1489 free_team (struct gomp_team *team)
1490 {
1491- free (team->work_shares);
1492- gomp_mutex_destroy (&team->work_share_lock);
1493+ if (__builtin_expect (team->work_shares[0].next_alloc != NULL, 0))
1494+ {
1495+ struct gomp_work_share *ws = team->work_shares[0].next_alloc;
1496+ do
1497+ {
1498+ struct gomp_work_share *next_ws = ws->next_alloc;
1499+ free (ws);
1500+ ws = next_ws;
1501+ }
1502+ while (ws != NULL);
1503+ }
1504 gomp_barrier_destroy (&team->barrier);
1505 gomp_sem_destroy (&team->master_release);
1506+#ifndef HAVE_SYNC_BUILTINS
1507+ gomp_mutex_destroy (&team->work_share_list_free_lock);
1508+#endif
1509 free (team);
1510 }
1511
1512@@ -176,11 +195,10 @@ free_team (struct gomp_team *team)
1513
1514 void
1515 gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
1516- struct gomp_work_share *work_share)
1517+ struct gomp_team *team)
1518 {
1519 struct gomp_thread_start_data *start_data;
1520 struct gomp_thread *thr, *nthr;
1521- struct gomp_team *team;
1522 bool nested;
1523 unsigned i, n, old_threads_used = 0;
1524 pthread_attr_t thread_attr, *attr;
1525@@ -188,17 +206,18 @@ gomp_team_start (void (*fn) (void *), vo
1526 thr = gomp_thread ();
1527 nested = thr->ts.team != NULL;
1528
1529- team = new_team (nthreads, work_share);
1530-
1531 /* Always save the previous state, even if this isn't a nested team.
1532 In particular, we should save any work share state from an outer
1533 orphaned work share construct. */
1534 team->prev_ts = thr->ts;
1535
1536 thr->ts.team = team;
1537- thr->ts.work_share = work_share;
1538 thr->ts.team_id = 0;
1539- thr->ts.work_share_generation = 0;
1540+ thr->ts.work_share = &team->work_shares[0];
1541+ thr->ts.last_work_share = NULL;
1542+#ifdef HAVE_SYNC_BUILTINS
1543+ thr->ts.single_count = 0;
1544+#endif
1545 thr->ts.static_trip = 0;
1546
1547 if (nthreads == 1)
1548@@ -241,9 +260,12 @@ gomp_team_start (void (*fn) (void *), vo
1549 {
1550 nthr = gomp_threads[i];
1551 nthr->ts.team = team;
1552- nthr->ts.work_share = work_share;
1553+ nthr->ts.work_share = &team->work_shares[0];
1554+ nthr->ts.last_work_share = NULL;
1555 nthr->ts.team_id = i;
1556- nthr->ts.work_share_generation = 0;
1557+#ifdef HAVE_SYNC_BUILTINS
1558+ nthr->ts.single_count = 0;
1559+#endif
1560 nthr->ts.static_trip = 0;
1561 nthr->fn = fn;
1562 nthr->data = data;
1563@@ -266,8 +288,24 @@ gomp_team_start (void (*fn) (void *), vo
1564 }
1565 }
1566
1567+ if (__builtin_expect (nthreads > old_threads_used, 0))
1568+ {
1569+ long diff = (long) nthreads - (long) old_threads_used;
1570+
1571+ if (old_threads_used == 0)
1572+ --diff;
1573+
1574+#ifdef HAVE_SYNC_BUILTINS
1575+ __sync_fetch_and_add (&gomp_managed_threads, diff);
1576+#else
1577+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1578+ gomp_managed_threads += diff;
1579+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1580+#endif
1581+ }
1582+
1583 attr = &gomp_thread_attr;
1584- if (gomp_cpu_affinity != NULL)
1585+ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
1586 {
1587 size_t stacksize;
1588 pthread_attr_init (&thread_attr);
1589@@ -287,9 +325,12 @@ gomp_team_start (void (*fn) (void *), vo
1590 int err;
1591
1592 start_data->ts.team = team;
1593- start_data->ts.work_share = work_share;
1594+ start_data->ts.work_share = &team->work_shares[0];
1595+ start_data->ts.last_work_share = NULL;
1596 start_data->ts.team_id = i;
1597- start_data->ts.work_share_generation = 0;
1598+#ifdef HAVE_SYNC_BUILTINS
1599+ start_data->ts.single_count = 0;
1600+#endif
1601 start_data->ts.static_trip = 0;
1602 start_data->fn = fn;
1603 start_data->fn_data = data;
1604@@ -303,7 +344,7 @@ gomp_team_start (void (*fn) (void *), vo
1605 gomp_fatal ("Thread creation failed: %s", strerror (err));
1606 }
1607
1608- if (gomp_cpu_affinity != NULL)
1609+ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
1610 pthread_attr_destroy (&thread_attr);
1611
1612 do_release:
1613@@ -313,8 +354,20 @@ gomp_team_start (void (*fn) (void *), vo
1614 that should arrive back at the end of this team. The extra
1615 threads should be exiting. Note that we arrange for this test
1616 to never be true for nested teams. */
1617- if (nthreads < old_threads_used)
1618- gomp_barrier_reinit (&gomp_threads_dock, nthreads);
1619+ if (__builtin_expect (nthreads < old_threads_used, 0))
1620+ {
1621+ long diff = (long) nthreads - (long) old_threads_used;
1622+
1623+ gomp_barrier_reinit (&gomp_threads_dock, nthreads);
1624+
1625+#ifdef HAVE_SYNC_BUILTINS
1626+ __sync_fetch_and_add (&gomp_managed_threads, diff);
1627+#else
1628+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1629+ gomp_managed_threads += diff;
1630+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1631+#endif
1632+ }
1633 }
1634
1635
1636@@ -329,8 +382,21 @@ gomp_team_end (void)
1637
1638 gomp_barrier_wait (&team->barrier);
1639
1640+ gomp_fini_work_share (thr->ts.work_share);
1641+
1642 thr->ts = team->prev_ts;
1643
1644+ if (__builtin_expect (thr->ts.team != NULL, 0))
1645+ {
1646+#ifdef HAVE_SYNC_BUILTINS
1647+ __sync_fetch_and_add (&gomp_managed_threads, 1L - team->nthreads);
1648+#else
1649+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1650+ gomp_managed_threads -= team->nthreads - 1L;
1651+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1652+#endif
1653+ }
1654+
1655 free_team (team);
1656 }
1657
1658--- libgomp/config/posix/bar.h.jj 2007-12-07 14:41:01.000000000 +0100
1659+++ libgomp/config/posix/bar.h 2008-03-26 15:11:32.000000000 +0100
1660@@ -1,4 +1,4 @@
1661-/* Copyright (C) 2005 Free Software Foundation, Inc.
1662+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1663 Contributed by Richard Henderson <rth@redhat.com>.
1664
1665 This file is part of the GNU OpenMP Library (libgomp).
1666@@ -46,18 +46,32 @@ typedef struct
1667 unsigned total;
1668 unsigned arrived;
1669 } gomp_barrier_t;
1670+typedef bool gomp_barrier_state_t;
1671
1672 extern void gomp_barrier_init (gomp_barrier_t *, unsigned);
1673 extern void gomp_barrier_reinit (gomp_barrier_t *, unsigned);
1674 extern void gomp_barrier_destroy (gomp_barrier_t *);
1675
1676 extern void gomp_barrier_wait (gomp_barrier_t *);
1677-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
1678+extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
1679
1680-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
1681+static inline gomp_barrier_state_t
1682+gomp_barrier_wait_start (gomp_barrier_t *bar)
1683 {
1684 gomp_mutex_lock (&bar->mutex1);
1685 return ++bar->arrived == bar->total;
1686 }
1687
1688+static inline bool
1689+gomp_barrier_last_thread (gomp_barrier_state_t state)
1690+{
1691+ return state;
1692+}
1693+
1694+static inline void
1695+gomp_barrier_wait_last (gomp_barrier_t *bar)
1696+{
1697+ gomp_barrier_wait (bar);
1698+}
1699+
1700 #endif /* GOMP_BARRIER_H */
1701--- libgomp/config/posix/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
1702+++ libgomp/config/posix/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
1703@@ -0,0 +1,69 @@
1704+/* Copyright (C) 2008 Free Software Foundation, Inc.
1705+ Contributed by Jakub Jelinek <jakub@redhat.com>.
1706+
1707+ This file is part of the GNU OpenMP Library (libgomp).
1708+
1709+ Libgomp is free software; you can redistribute it and/or modify it
1710+ under the terms of the GNU Lesser General Public License as published by
1711+ the Free Software Foundation; either version 2.1 of the License, or
1712+ (at your option) any later version.
1713+
1714+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
1715+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1716+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
1717+ more details.
1718+
1719+ You should have received a copy of the GNU Lesser General Public License
1720+ along with libgomp; see the file COPYING.LIB. If not, write to the
1721+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1722+ MA 02110-1301, USA. */
1723+
1724+/* As a special exception, if you link this library with other files, some
1725+ of which are compiled with GCC, to produce an executable, this library
1726+ does not by itself cause the resulting executable to be covered by the
1727+ GNU General Public License. This exception does not however invalidate
1728+ any other reasons why the executable file might be covered by the GNU
1729+ General Public License. */
1730+
1731+/* This is a Linux specific implementation of a mutex synchronization
1732+ mechanism for libgomp. This type is private to the library. This
1733+ implementation uses atomic instructions and the futex syscall. */
1734+
1735+#ifndef GOMP_PTRLOCK_H
1736+#define GOMP_PTRLOCK_H 1
1737+
1738+typedef struct { void *ptr; gomp_mutex_t lock; } gomp_ptrlock_t;
1739+
1740+static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
1741+{
1742+ ptrlock->ptr = ptr;
1743+ gomp_mutex_init (&ptrlock->lock);
1744+}
1745+
1746+static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
1747+{
1748+ if (ptrlock->ptr != NULL)
1749+ return ptrlock->ptr;
1750+
1751+ gomp_mutex_lock (&ptrlock->lock);
1752+ if (ptrlock->ptr != NULL)
1753+ {
1754+ gomp_mutex_unlock (&ptrlock->lock);
1755+ return ptrlock->ptr;
1756+ }
1757+
1758+ return NULL;
1759+}
1760+
1761+static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
1762+{
1763+ ptrlock->ptr = ptr;
1764+ gomp_mutex_unlock (&ptrlock->lock);
1765+}
1766+
1767+static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
1768+{
1769+ gomp_mutex_destroy (&ptrlock->lock);
1770+}
1771+
1772+#endif /* GOMP_PTRLOCK_H */
1773--- libgomp/config/posix/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
1774+++ libgomp/config/posix/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
1775@@ -0,0 +1 @@
1776+/* Everything is in the header. */
1777--- libgomp/config/posix/bar.c.jj 2007-12-07 14:41:01.000000000 +0100
1778+++ libgomp/config/posix/bar.c 2008-03-26 15:11:32.000000000 +0100
1779@@ -1,4 +1,4 @@
1780-/* Copyright (C) 2005 Free Software Foundation, Inc.
1781+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1782 Contributed by Richard Henderson <rth@redhat.com>.
1783
1784 This file is part of the GNU OpenMP Library (libgomp).
1785@@ -70,7 +70,7 @@ gomp_barrier_reinit (gomp_barrier_t *bar
1786 }
1787
1788 void
1789-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
1790+gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t last)
1791 {
1792 unsigned int n;
1793
1794--- libgomp/config/linux/alpha/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
1795+++ libgomp/config/linux/alpha/futex.h 2008-03-26 15:11:32.000000000 +0100
1796@@ -1,4 +1,4 @@
1797-/* Copyright (C) 2005 Free Software Foundation, Inc.
1798+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1799 Contributed by Richard Henderson <rth@redhat.com>.
1800
1801 This file is part of the GNU OpenMP Library (libgomp).
1802@@ -30,8 +30,6 @@
1803 #ifndef SYS_futex
1804 #define SYS_futex 394
1805 #endif
1806-#define FUTEX_WAIT 0
1807-#define FUTEX_WAKE 1
1808
1809
1810 static inline void
1811@@ -45,7 +43,7 @@ futex_wait (int *addr, int val)
1812
1813 sc_0 = SYS_futex;
1814 sc_16 = (long) addr;
1815- sc_17 = FUTEX_WAIT;
1816+ sc_17 = gomp_futex_wait;
1817 sc_18 = val;
1818 sc_19 = 0;
1819 __asm volatile ("callsys"
1820@@ -53,6 +51,20 @@ futex_wait (int *addr, int val)
1821 : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18), "1"(sc_19)
1822 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1823 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1824+ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
1825+ {
1826+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
1827+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
1828+ sc_0 = SYS_futex;
1829+ sc_17 &= ~FUTEX_PRIVATE_FLAG;
1830+ sc_19 = 0;
1831+ __asm volatile ("callsys"
1832+ : "=r" (sc_0), "=r"(sc_19)
1833+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18),
1834+ "1"(sc_19)
1835+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1836+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1837+ }
1838 }
1839
1840 static inline void
1841@@ -66,11 +78,35 @@ futex_wake (int *addr, int count)
1842
1843 sc_0 = SYS_futex;
1844 sc_16 = (long) addr;
1845- sc_17 = FUTEX_WAKE;
1846+ sc_17 = gomp_futex_wake;
1847 sc_18 = count;
1848 __asm volatile ("callsys"
1849 : "=r" (sc_0), "=r"(sc_19)
1850 : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
1851 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1852 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1853+ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
1854+ {
1855+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
1856+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
1857+ sc_0 = SYS_futex;
1858+ sc_17 &= ~FUTEX_PRIVATE_FLAG;
1859+ __asm volatile ("callsys"
1860+ : "=r" (sc_0), "=r"(sc_19)
1861+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
1862+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1863+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1864+ }
1865+}
1866+
1867+static inline void
1868+cpu_relax (void)
1869+{
1870+ __asm volatile ("" : : : "memory");
1871+}
1872+
1873+static inline void
1874+atomic_write_barrier (void)
1875+{
1876+ __asm volatile ("wmb" : : : "memory");
1877 }
1878--- libgomp/config/linux/affinity.c.jj 2007-12-07 14:41:00.000000000 +0100
1879+++ libgomp/config/linux/affinity.c 2008-03-26 15:11:32.000000000 +0100
1880@@ -1,4 +1,4 @@
1881-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
1882+/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
1883 Contributed by Jakub Jelinek <jakub@redhat.com>.
1884
1885 This file is part of the GNU OpenMP Library (libgomp).
1886@@ -38,9 +38,6 @@
1887 #ifdef HAVE_PTHREAD_AFFINITY_NP
1888
1889 static unsigned int affinity_counter;
1890-#ifndef HAVE_SYNC_BUILTINS
1891-static gomp_mutex_t affinity_lock;
1892-#endif
1893
1894 void
1895 gomp_init_affinity (void)
1896@@ -76,9 +73,6 @@ gomp_init_affinity (void)
1897 CPU_SET (gomp_cpu_affinity[0], &cpuset);
1898 pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
1899 affinity_counter = 1;
1900-#ifndef HAVE_SYNC_BUILTINS
1901- gomp_mutex_init (&affinity_lock);
1902-#endif
1903 }
1904
1905 void
1906@@ -87,13 +81,7 @@ gomp_init_thread_affinity (pthread_attr_
1907 unsigned int cpu;
1908 cpu_set_t cpuset;
1909
1910-#ifdef HAVE_SYNC_BUILTINS
1911 cpu = __sync_fetch_and_add (&affinity_counter, 1);
1912-#else
1913- gomp_mutex_lock (&affinity_lock);
1914- cpu = affinity_counter++;
1915- gomp_mutex_unlock (&affinity_lock);
1916-#endif
1917 cpu %= gomp_cpu_affinity_len;
1918 CPU_ZERO (&cpuset);
1919 CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
1920--- libgomp/config/linux/bar.h.jj 2007-12-07 14:41:00.000000000 +0100
1921+++ libgomp/config/linux/bar.h 2008-03-26 15:11:32.000000000 +0100
1922@@ -1,4 +1,4 @@
1923-/* Copyright (C) 2005 Free Software Foundation, Inc.
1924+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1925 Contributed by Richard Henderson <rth@redhat.com>.
1926
1927 This file is part of the GNU OpenMP Library (libgomp).
1928@@ -36,40 +36,49 @@
1929
1930 typedef struct
1931 {
1932- gomp_mutex_t mutex;
1933- unsigned total;
1934- unsigned arrived;
1935- int generation;
1936+ /* Make sure total/generation is in a mostly read cacheline, while
1937+ awaited in a separate cacheline. */
1938+ unsigned total __attribute__((aligned (64)));
1939+ unsigned generation;
1940+ unsigned awaited __attribute__((aligned (64)));
1941 } gomp_barrier_t;
1942+typedef unsigned int gomp_barrier_state_t;
1943
1944 static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
1945 {
1946- gomp_mutex_init (&bar->mutex);
1947 bar->total = count;
1948- bar->arrived = 0;
1949+ bar->awaited = count;
1950 bar->generation = 0;
1951 }
1952
1953 static inline void gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count)
1954 {
1955- gomp_mutex_lock (&bar->mutex);
1956+ __sync_fetch_and_add (&bar->awaited, count - bar->total);
1957 bar->total = count;
1958- gomp_mutex_unlock (&bar->mutex);
1959 }
1960
1961 static inline void gomp_barrier_destroy (gomp_barrier_t *bar)
1962 {
1963- /* Before destroying, make sure all threads have left the barrier. */
1964- gomp_mutex_lock (&bar->mutex);
1965 }
1966
1967 extern void gomp_barrier_wait (gomp_barrier_t *);
1968-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
1969+extern void gomp_barrier_wait_last (gomp_barrier_t *);
1970+extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
1971
1972-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
1973+static inline gomp_barrier_state_t
1974+gomp_barrier_wait_start (gomp_barrier_t *bar)
1975 {
1976- gomp_mutex_lock (&bar->mutex);
1977- return ++bar->arrived == bar->total;
1978+ unsigned int ret = bar->generation;
1979+ /* Do we need any barrier here or is __sync_add_and_fetch acting
1980+ as the needed LoadLoad barrier already? */
1981+ ret += __sync_add_and_fetch (&bar->awaited, -1) == 0;
1982+ return ret;
1983+}
1984+
1985+static inline bool
1986+gomp_barrier_last_thread (gomp_barrier_state_t state)
1987+{
1988+ return state & 1;
1989 }
1990
1991 #endif /* GOMP_BARRIER_H */
1992--- libgomp/config/linux/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
1993+++ libgomp/config/linux/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
1994@@ -0,0 +1,65 @@
1995+/* Copyright (C) 2008 Free Software Foundation, Inc.
1996+ Contributed by Jakub Jelinek <jakub@redhat.com>.
1997+
1998+ This file is part of the GNU OpenMP Library (libgomp).
1999+
2000+ Libgomp is free software; you can redistribute it and/or modify it
2001+ under the terms of the GNU Lesser General Public License as published by
2002+ the Free Software Foundation; either version 2.1 of the License, or
2003+ (at your option) any later version.
2004+
2005+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2006+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2007+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2008+ more details.
2009+
2010+ You should have received a copy of the GNU Lesser General Public License
2011+ along with libgomp; see the file COPYING.LIB. If not, write to the
2012+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2013+ MA 02110-1301, USA. */
2014+
2015+/* As a special exception, if you link this library with other files, some
2016+ of which are compiled with GCC, to produce an executable, this library
2017+ does not by itself cause the resulting executable to be covered by the
2018+ GNU General Public License. This exception does not however invalidate
2019+ any other reasons why the executable file might be covered by the GNU
2020+ General Public License. */
2021+
2022+/* This is a Linux specific implementation of a mutex synchronization
2023+ mechanism for libgomp. This type is private to the library. This
2024+ implementation uses atomic instructions and the futex syscall. */
2025+
2026+#ifndef GOMP_PTRLOCK_H
2027+#define GOMP_PTRLOCK_H 1
2028+
2029+typedef void *gomp_ptrlock_t;
2030+
2031+static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
2032+{
2033+ *ptrlock = ptr;
2034+}
2035+
2036+extern void *gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock);
2037+static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
2038+{
2039+ if ((uintptr_t) *ptrlock > 2)
2040+ return *ptrlock;
2041+
2042+ if (__sync_bool_compare_and_swap (ptrlock, NULL, (uintptr_t) 1))
2043+ return NULL;
2044+
2045+ return gomp_ptrlock_get_slow (ptrlock);
2046+}
2047+
2048+extern void gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr);
2049+static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
2050+{
2051+ if (!__sync_bool_compare_and_swap (ptrlock, (uintptr_t) 1, ptr))
2052+ gomp_ptrlock_set_slow (ptrlock, ptr);
2053+}
2054+
2055+static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
2056+{
2057+}
2058+
2059+#endif /* GOMP_PTRLOCK_H */
2060--- libgomp/config/linux/lock.c.jj 2007-12-07 14:41:00.000000000 +0100
2061+++ libgomp/config/linux/lock.c 2008-03-26 15:11:32.000000000 +0100
2062@@ -29,11 +29,10 @@
2063 primitives. This implementation uses atomic instructions and the futex
2064 syscall. */
2065
2066-#include "libgomp.h"
2067 #include <string.h>
2068 #include <unistd.h>
2069 #include <sys/syscall.h>
2070-#include "futex.h"
2071+#include "wait.h"
2072
2073
2074 /* The internal gomp_mutex_t and the external non-recursive omp_lock_t
2075@@ -137,7 +136,7 @@ omp_set_nest_lock (omp_nest_lock_t *lock
2076 return;
2077 }
2078
2079- futex_wait (&lock->owner, otid);
2080+ do_wait (&lock->owner, otid);
2081 }
2082 }
2083
2084--- libgomp/config/linux/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
2085+++ libgomp/config/linux/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
2086@@ -0,0 +1,70 @@
2087+/* Copyright (C) 2008 Free Software Foundation, Inc.
2088+ Contributed by Jakub Jelinek <jakub@redhat.com>.
2089+
2090+ This file is part of the GNU OpenMP Library (libgomp).
2091+
2092+ Libgomp is free software; you can redistribute it and/or modify it
2093+ under the terms of the GNU Lesser General Public License as published by
2094+ the Free Software Foundation; either version 2.1 of the License, or
2095+ (at your option) any later version.
2096+
2097+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2098+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2099+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2100+ more details.
2101+
2102+ You should have received a copy of the GNU Lesser General Public License
2103+ along with libgomp; see the file COPYING.LIB. If not, write to the
2104+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2105+ MA 02110-1301, USA. */
2106+
2107+/* As a special exception, if you link this library with other files, some
2108+ of which are compiled with GCC, to produce an executable, this library
2109+ does not by itself cause the resulting executable to be covered by the
2110+ GNU General Public License. This exception does not however invalidate
2111+ any other reasons why the executable file might be covered by the GNU
2112+ General Public License. */
2113+
2114+/* This is a Linux specific implementation of a mutex synchronization
2115+ mechanism for libgomp. This type is private to the library. This
2116+ implementation uses atomic instructions and the futex syscall. */
2117+
2118+#include <endian.h>
2119+#include <limits.h>
2120+#include "wait.h"
2121+
2122+void *
2123+gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock)
2124+{
2125+ int *intptr;
2126+ __sync_bool_compare_and_swap (ptrlock, 1, 2);
2127+
2128+ /* futex works on ints, not pointers.
2129+ But a valid work share pointer will be at least
2130+ 8 byte aligned, so it is safe to assume the low
2131+ 32-bits of the pointer won't contain values 1 or 2. */
2132+ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
2133+#if __BYTE_ORDER == __BIG_ENDIAN
2134+ if (sizeof (*ptrlock) > sizeof (int))
2135+ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
2136+#endif
2137+ do
2138+ do_wait (intptr, 2);
2139+ while (*intptr == 2);
2140+ __asm volatile ("" : : : "memory");
2141+ return *ptrlock;
2142+}
2143+
2144+void
2145+gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr)
2146+{
2147+ int *intptr;
2148+
2149+ *ptrlock = ptr;
2150+ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
2151+#if __BYTE_ORDER == __BIG_ENDIAN
2152+ if (sizeof (*ptrlock) > sizeof (int))
2153+ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
2154+#endif
2155+ futex_wake (intptr, INT_MAX);
2156+}
2157--- libgomp/config/linux/x86/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2158+++ libgomp/config/linux/x86/futex.h 2008-03-26 15:11:32.000000000 +0100
2159@@ -1,4 +1,4 @@
2160-/* Copyright (C) 2005 Free Software Foundation, Inc.
2161+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2162 Contributed by Richard Henderson <rth@redhat.com>.
2163
2164 This file is part of the GNU OpenMP Library (libgomp).
2165@@ -27,9 +27,6 @@
2166
2167 /* Provide target-specific access to the futex system call. */
2168
2169-#define FUTEX_WAIT 0
2170-#define FUTEX_WAKE 1
2171-
2172 #ifdef __LP64__
2173 # ifndef SYS_futex
2174 # define SYS_futex 202
2175@@ -38,14 +35,26 @@
2176 static inline void
2177 futex_wait (int *addr, int val)
2178 {
2179- register long r10 __asm__("%r10") = 0;
2180+ register long r10 __asm__("%r10");
2181 long res;
2182
2183+ r10 = 0;
2184 __asm volatile ("syscall"
2185 : "=a" (res)
2186- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAIT),
2187- "d"(val), "r"(r10)
2188+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
2189+ "d" (val), "r" (r10)
2190 : "r11", "rcx", "memory");
2191+ if (__builtin_expect (res == -ENOSYS, 0))
2192+ {
2193+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2194+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2195+ r10 = 0;
2196+ __asm volatile ("syscall"
2197+ : "=a" (res)
2198+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
2199+ "d" (val), "r" (r10)
2200+ : "r11", "rcx", "memory");
2201+ }
2202 }
2203
2204 static inline void
2205@@ -55,8 +64,19 @@ futex_wake (int *addr, int count)
2206
2207 __asm volatile ("syscall"
2208 : "=a" (res)
2209- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAKE), "d"(count)
2210+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
2211+ "d" (count)
2212 : "r11", "rcx", "memory");
2213+ if (__builtin_expect (res == -ENOSYS, 0))
2214+ {
2215+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2216+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2217+ __asm volatile ("syscall"
2218+ : "=a" (res)
2219+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
2220+ "d" (count)
2221+ : "r11", "rcx", "memory");
2222+ }
2223 }
2224 #else
2225 # ifndef SYS_futex
2226@@ -65,7 +85,7 @@ futex_wake (int *addr, int count)
2227
2228 # ifdef __PIC__
2229
2230-static inline void
2231+static inline long
2232 sys_futex0 (int *addr, int op, int val)
2233 {
2234 long res;
2235@@ -77,11 +97,12 @@ sys_futex0 (int *addr, int op, int val)
2236 : "0"(SYS_futex), "r" (addr), "c"(op),
2237 "d"(val), "S"(0)
2238 : "memory");
2239+ return res;
2240 }
2241
2242 # else
2243
2244-static inline void
2245+static inline long
2246 sys_futex0 (int *addr, int op, int val)
2247 {
2248 long res;
2249@@ -91,6 +112,7 @@ sys_futex0 (int *addr, int op, int val)
2250 : "0"(SYS_futex), "b" (addr), "c"(op),
2251 "d"(val), "S"(0)
2252 : "memory");
2253+ return res;
2254 }
2255
2256 # endif /* __PIC__ */
2257@@ -98,13 +120,37 @@ sys_futex0 (int *addr, int op, int val)
2258 static inline void
2259 futex_wait (int *addr, int val)
2260 {
2261- sys_futex0 (addr, FUTEX_WAIT, val);
2262+ long res = sys_futex0 (addr, gomp_futex_wait, val);
2263+ if (__builtin_expect (res == -ENOSYS, 0))
2264+ {
2265+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2266+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2267+ sys_futex0 (addr, gomp_futex_wait, val);
2268+ }
2269 }
2270
2271 static inline void
2272 futex_wake (int *addr, int count)
2273 {
2274- sys_futex0 (addr, FUTEX_WAKE, count);
2275+ long res = sys_futex0 (addr, gomp_futex_wake, count);
2276+ if (__builtin_expect (res == -ENOSYS, 0))
2277+ {
2278+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2279+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2280+ sys_futex0 (addr, gomp_futex_wake, count);
2281+ }
2282 }
2283
2284 #endif /* __LP64__ */
2285+
2286+static inline void
2287+cpu_relax (void)
2288+{
2289+ __asm volatile ("rep; nop" : : : "memory");
2290+}
2291+
2292+static inline void
2293+atomic_write_barrier (void)
2294+{
2295+ __sync_synchronize ();
2296+}
2297--- libgomp/config/linux/wait.h.jj 2008-03-26 15:11:32.000000000 +0100
2298+++ libgomp/config/linux/wait.h 2008-03-26 15:11:32.000000000 +0100
2299@@ -0,0 +1,68 @@
2300+/* Copyright (C) 2008 Free Software Foundation, Inc.
2301+ Contributed by Jakub Jelinek <jakub@redhat.com>.
2302+
2303+ This file is part of the GNU OpenMP Library (libgomp).
2304+
2305+ Libgomp is free software; you can redistribute it and/or modify it
2306+ under the terms of the GNU Lesser General Public License as published by
2307+ the Free Software Foundation; either version 2.1 of the License, or
2308+ (at your option) any later version.
2309+
2310+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2311+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2312+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2313+ more details.
2314+
2315+ You should have received a copy of the GNU Lesser General Public License
2316+ along with libgomp; see the file COPYING.LIB. If not, write to the
2317+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2318+ MA 02110-1301, USA. */
2319+
2320+/* As a special exception, if you link this library with other files, some
2321+ of which are compiled with GCC, to produce an executable, this library
2322+ does not by itself cause the resulting executable to be covered by the
2323+ GNU General Public License. This exception does not however invalidate
2324+ any other reasons why the executable file might be covered by the GNU
2325+ General Public License. */
2326+
2327+/* This is a Linux specific implementation of a mutex synchronization
2328+ mechanism for libgomp. This type is private to the library. This
2329+ implementation uses atomic instructions and the futex syscall. */
2330+
2331+#ifndef GOMP_WAIT_H
2332+#define GOMP_WAIT_H 1
2333+
2334+#include "libgomp.h"
2335+#include <errno.h>
2336+
2337+#define FUTEX_WAIT 0
2338+#define FUTEX_WAKE 1
2339+#define FUTEX_PRIVATE_FLAG 128L
2340+
2341+#ifdef HAVE_ATTRIBUTE_VISIBILITY
2342+# pragma GCC visibility push(hidden)
2343+#endif
2344+
2345+extern long int gomp_futex_wait, gomp_futex_wake;
2346+
2347+#include "futex.h"
2348+
2349+static inline void do_wait (int *addr, int val)
2350+{
2351+ unsigned long long i, count = gomp_spin_count_var;
2352+
2353+ if (__builtin_expect (gomp_managed_threads > gomp_available_cpus, 0))
2354+ count = gomp_throttled_spin_count_var;
2355+ for (i = 0; i < count; i++)
2356+ if (__builtin_expect (*addr != val, 0))
2357+ return;
2358+ else
2359+ cpu_relax ();
2360+ futex_wait (addr, val);
2361+}
2362+
2363+#ifdef HAVE_ATTRIBUTE_VISIBILITY
2364+# pragma GCC visibility pop
2365+#endif
2366+
2367+#endif /* GOMP_WAIT_H */
2368--- libgomp/config/linux/sparc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2369+++ libgomp/config/linux/sparc/futex.h 2008-03-26 15:11:32.000000000 +0100
2370@@ -1,4 +1,4 @@
2371-/* Copyright (C) 2005 Free Software Foundation, Inc.
2372+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2373 Contributed by Jakub Jelinek <jakub@redhat.com>.
2374
2375 This file is part of the GNU OpenMP Library (libgomp).
2376@@ -28,10 +28,8 @@
2377 /* Provide target-specific access to the futex system call. */
2378
2379 #include <sys/syscall.h>
2380-#define FUTEX_WAIT 0
2381-#define FUTEX_WAKE 1
2382
2383-static inline void
2384+static inline long
2385 sys_futex0 (int *addr, int op, int val)
2386 {
2387 register long int g1 __asm__ ("g1");
2388@@ -47,9 +45,9 @@ sys_futex0 (int *addr, int op, int val)
2389 o3 = 0;
2390
2391 #ifdef __arch64__
2392-# define SYSCALL_STRING "ta\t0x6d"
2393+# define SYSCALL_STRING "ta\t0x6d; bcs,a,pt %%xcc, 1f; sub %%g0, %%o0, %%o0; 1:"
2394 #else
2395-# define SYSCALL_STRING "ta\t0x10"
2396+# define SYSCALL_STRING "ta\t0x10; bcs,a 1f; sub %%g0, %%o0, %%o0; 1:"
2397 #endif
2398
2399 __asm volatile (SYSCALL_STRING
2400@@ -65,16 +63,49 @@ sys_futex0 (int *addr, int op, int val)
2401 "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",
2402 #endif
2403 "cc", "memory");
2404+ return o0;
2405 }
2406
2407 static inline void
2408 futex_wait (int *addr, int val)
2409 {
2410- sys_futex0 (addr, FUTEX_WAIT, val);
2411+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2412+ if (__builtin_expect (err == ENOSYS, 0))
2413+ {
2414+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2415+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2416+ sys_futex0 (addr, gomp_futex_wait, val);
2417+ }
2418 }
2419
2420 static inline void
2421 futex_wake (int *addr, int count)
2422 {
2423- sys_futex0 (addr, FUTEX_WAKE, count);
2424+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2425+ if (__builtin_expect (err == ENOSYS, 0))
2426+ {
2427+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2428+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2429+ sys_futex0 (addr, gomp_futex_wake, count);
2430+ }
2431+}
2432+
2433+static inline void
2434+cpu_relax (void)
2435+{
2436+#if defined __arch64__ || defined __sparc_v9__
2437+ __asm volatile ("membar #LoadLoad" : : : "memory");
2438+#else
2439+ __asm volatile ("" : : : "memory");
2440+#endif
2441+}
2442+
2443+static inline void
2444+atomic_write_barrier (void)
2445+{
2446+#if defined __arch64__ || defined __sparc_v9__
2447+ __asm volatile ("membar #StoreStore" : : : "memory");
2448+#else
2449+ __sync_synchronize ();
2450+#endif
2451 }
2452--- libgomp/config/linux/ia64/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2453+++ libgomp/config/linux/ia64/futex.h 2008-03-26 15:11:32.000000000 +0100
2454@@ -1,4 +1,4 @@
2455-/* Copyright (C) 2005 Free Software Foundation, Inc.
2456+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2457 Contributed by Richard Henderson <rth@redhat.com>.
2458
2459 This file is part of the GNU OpenMP Library (libgomp).
2460@@ -29,23 +29,24 @@
2461
2462 #include <sys/syscall.h>
2463
2464-#define FUTEX_WAIT 0
2465-#define FUTEX_WAKE 1
2466
2467
2468-static inline void
2469-sys_futex0(int *addr, int op, int val)
2470+static inline long
2471+sys_futex0(int *addr, long op, int val)
2472 {
2473 register long out0 asm ("out0") = (long) addr;
2474 register long out1 asm ("out1") = op;
2475 register long out2 asm ("out2") = val;
2476 register long out3 asm ("out3") = 0;
2477+ register long r8 asm ("r8");
2478+ register long r10 asm ("r10");
2479 register long r15 asm ("r15") = SYS_futex;
2480
2481 __asm __volatile ("break 0x100000"
2482- : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3)
2483+ : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3),
2484+ "=r"(r8), "=r"(r10)
2485 : "r"(r15), "r"(out0), "r"(out1), "r"(out2), "r"(out3)
2486- : "memory", "r8", "r10", "out4", "out5", "out6", "out7",
2487+ : "memory", "out4", "out5", "out6", "out7",
2488 /* Non-stacked integer registers, minus r8, r10, r15. */
2489 "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18",
2490 "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27",
2491@@ -56,16 +57,41 @@ sys_futex0(int *addr, int op, int val)
2492 "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
2493 /* Branch registers. */
2494 "b6");
2495+ return r8 & r10;
2496 }
2497
2498 static inline void
2499 futex_wait (int *addr, int val)
2500 {
2501- sys_futex0 (addr, FUTEX_WAIT, val);
2502+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2503+ if (__builtin_expect (err == ENOSYS, 0))
2504+ {
2505+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2506+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2507+ sys_futex0 (addr, gomp_futex_wait, val);
2508+ }
2509 }
2510
2511 static inline void
2512 futex_wake (int *addr, int count)
2513 {
2514- sys_futex0 (addr, FUTEX_WAKE, count);
2515+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2516+ if (__builtin_expect (err == ENOSYS, 0))
2517+ {
2518+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2519+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2520+ sys_futex0 (addr, gomp_futex_wake, count);
2521+ }
2522+}
2523+
2524+static inline void
2525+cpu_relax (void)
2526+{
2527+ __asm volatile ("hint @pause" : : : "memory");
2528+}
2529+
2530+static inline void
2531+atomic_write_barrier (void)
2532+{
2533+ __sync_synchronize ();
2534 }
2535--- libgomp/config/linux/s390/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2536+++ libgomp/config/linux/s390/futex.h 2008-03-26 15:11:32.000000000 +0100
2537@@ -1,4 +1,4 @@
2538-/* Copyright (C) 2005 Free Software Foundation, Inc.
2539+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2540 Contributed by Jakub Jelinek <jakub@redhat.com>.
2541
2542 This file is part of the GNU OpenMP Library (libgomp).
2543@@ -28,10 +28,8 @@
2544 /* Provide target-specific access to the futex system call. */
2545
2546 #include <sys/syscall.h>
2547-#define FUTEX_WAIT 0
2548-#define FUTEX_WAKE 1
2549
2550-static inline void
2551+static inline long
2552 sys_futex0 (int *addr, int op, int val)
2553 {
2554 register long int gpr2 __asm__ ("2");
2555@@ -49,16 +47,41 @@ sys_futex0 (int *addr, int op, int val)
2556 : "i" (SYS_futex),
2557 "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
2558 : "memory");
2559+ return gpr2;
2560 }
2561
2562 static inline void
2563 futex_wait (int *addr, int val)
2564 {
2565- sys_futex0 (addr, FUTEX_WAIT, val);
2566+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2567+ if (__builtin_expect (err == -ENOSYS, 0))
2568+ {
2569+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2570+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2571+ sys_futex0 (addr, gomp_futex_wait, val);
2572+ }
2573 }
2574
2575 static inline void
2576 futex_wake (int *addr, int count)
2577 {
2578- sys_futex0 (addr, FUTEX_WAKE, count);
2579+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2580+ if (__builtin_expect (err == -ENOSYS, 0))
2581+ {
2582+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2583+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2584+ sys_futex0 (addr, gomp_futex_wake, count);
2585+ }
2586+}
2587+
2588+static inline void
2589+cpu_relax (void)
2590+{
2591+ __asm volatile ("" : : : "memory");
2592+}
2593+
2594+static inline void
2595+atomic_write_barrier (void)
2596+{
2597+ __sync_synchronize ();
2598 }
2599--- libgomp/config/linux/mutex.c.jj 2007-12-07 14:41:00.000000000 +0100
2600+++ libgomp/config/linux/mutex.c 2008-03-26 15:11:32.000000000 +0100
2601@@ -1,4 +1,4 @@
2602-/* Copyright (C) 2005 Free Software Foundation, Inc.
2603+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2604 Contributed by Richard Henderson <rth@redhat.com>.
2605
2606 This file is part of the GNU OpenMP Library (libgomp).
2607@@ -29,9 +29,10 @@
2608 mechanism for libgomp. This type is private to the library. This
2609 implementation uses atomic instructions and the futex syscall. */
2610
2611-#include "libgomp.h"
2612-#include "futex.h"
2613+#include "wait.h"
2614
2615+long int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
2616+long int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
2617
2618 void
2619 gomp_mutex_lock_slow (gomp_mutex_t *mutex)
2620@@ -40,7 +41,7 @@ gomp_mutex_lock_slow (gomp_mutex_t *mute
2621 {
2622 int oldval = __sync_val_compare_and_swap (mutex, 1, 2);
2623 if (oldval != 0)
2624- futex_wait (mutex, 2);
2625+ do_wait (mutex, 2);
2626 }
2627 while (!__sync_bool_compare_and_swap (mutex, 0, 2));
2628 }
2629--- libgomp/config/linux/sem.c.jj 2007-12-07 14:41:00.000000000 +0100
2630+++ libgomp/config/linux/sem.c 2008-03-26 15:11:32.000000000 +0100
2631@@ -1,4 +1,4 @@
2632-/* Copyright (C) 2005 Free Software Foundation, Inc.
2633+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2634 Contributed by Richard Henderson <rth@redhat.com>.
2635
2636 This file is part of the GNU OpenMP Library (libgomp).
2637@@ -29,8 +29,7 @@
2638 mechanism for libgomp. This type is private to the library. This
2639 implementation uses atomic instructions and the futex syscall. */
2640
2641-#include "libgomp.h"
2642-#include "futex.h"
2643+#include "wait.h"
2644
2645
2646 void
2647@@ -44,7 +43,7 @@ gomp_sem_wait_slow (gomp_sem_t *sem)
2648 if (__sync_bool_compare_and_swap (sem, val, val - 1))
2649 return;
2650 }
2651- futex_wait (sem, -1);
2652+ do_wait (sem, -1);
2653 }
2654 }
2655
2656--- libgomp/config/linux/powerpc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2657+++ libgomp/config/linux/powerpc/futex.h 2008-03-26 15:11:32.000000000 +0100
2658@@ -1,4 +1,4 @@
2659-/* Copyright (C) 2005 Free Software Foundation, Inc.
2660+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2661 Contributed by Richard Henderson <rth@redhat.com>.
2662
2663 This file is part of the GNU OpenMP Library (libgomp).
2664@@ -28,10 +28,8 @@
2665 /* Provide target-specific access to the futex system call. */
2666
2667 #include <sys/syscall.h>
2668-#define FUTEX_WAIT 0
2669-#define FUTEX_WAKE 1
2670
2671-static inline void
2672+static inline long
2673 sys_futex0 (int *addr, int op, int val)
2674 {
2675 register long int r0 __asm__ ("r0");
2676@@ -50,21 +48,48 @@ sys_futex0 (int *addr, int op, int val)
2677 doesn't. It doesn't much matter for us. In the interest of unity,
2678 go ahead and clobber it always. */
2679
2680- __asm volatile ("sc"
2681+ __asm volatile ("sc; mfcr %0"
2682 : "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6)
2683 : "r"(r0), "r"(r3), "r"(r4), "r"(r5), "r"(r6)
2684 : "r7", "r8", "r9", "r10", "r11", "r12",
2685 "cr0", "ctr", "memory");
2686+ if (__builtin_expect (r0 & (1 << 28), 0))
2687+ return r3;
2688+ return 0;
2689 }
2690
2691 static inline void
2692 futex_wait (int *addr, int val)
2693 {
2694- sys_futex0 (addr, FUTEX_WAIT, val);
2695+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2696+ if (__builtin_expect (err == ENOSYS, 0))
2697+ {
2698+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2699+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2700+ sys_futex0 (addr, gomp_futex_wait, val);
2701+ }
2702 }
2703
2704 static inline void
2705 futex_wake (int *addr, int count)
2706 {
2707- sys_futex0 (addr, FUTEX_WAKE, count);
2708+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2709+ if (__builtin_expect (err == ENOSYS, 0))
2710+ {
2711+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2712+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2713+ sys_futex0 (addr, gomp_futex_wake, count);
2714+ }
2715+}
2716+
2717+static inline void
2718+cpu_relax (void)
2719+{
2720+ __asm volatile ("" : : : "memory");
2721+}
2722+
2723+static inline void
2724+atomic_write_barrier (void)
2725+{
2726+ __asm volatile ("eieio" : : : "memory");
2727 }
2728--- libgomp/config/linux/bar.c.jj 2007-12-07 14:41:00.000000000 +0100
2729+++ libgomp/config/linux/bar.c 2008-03-26 15:11:32.000000000 +0100
2730@@ -1,4 +1,4 @@
2731-/* Copyright (C) 2005 Free Software Foundation, Inc.
2732+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2733 Contributed by Richard Henderson <rth@redhat.com>.
2734
2735 This file is part of the GNU OpenMP Library (libgomp).
2736@@ -29,32 +29,29 @@
2737 mechanism for libgomp. This type is private to the library. This
2738 implementation uses atomic instructions and the futex syscall. */
2739
2740-#include "libgomp.h"
2741-#include "futex.h"
2742 #include <limits.h>
2743+#include "wait.h"
2744
2745
2746 void
2747-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
2748+gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t state)
2749 {
2750- if (last)
2751+ if (__builtin_expect ((state & 1) != 0, 0))
2752 {
2753- bar->generation++;
2754- futex_wake (&bar->generation, INT_MAX);
2755+ /* Next time we'll be awaiting TOTAL threads again. */
2756+ bar->awaited = bar->total;
2757+ atomic_write_barrier ();
2758+ bar->generation += 2;
2759+ futex_wake ((int *) &bar->generation, INT_MAX);
2760 }
2761 else
2762 {
2763- unsigned int generation = bar->generation;
2764-
2765- gomp_mutex_unlock (&bar->mutex);
2766+ unsigned int generation = state;
2767
2768 do
2769- futex_wait (&bar->generation, generation);
2770+ do_wait ((int *) &bar->generation, generation);
2771 while (bar->generation == generation);
2772 }
2773-
2774- if (__sync_add_and_fetch (&bar->arrived, -1) == 0)
2775- gomp_mutex_unlock (&bar->mutex);
2776 }
2777
2778 void
2779@@ -62,3 +59,18 @@ gomp_barrier_wait (gomp_barrier_t *barri
2780 {
2781 gomp_barrier_wait_end (barrier, gomp_barrier_wait_start (barrier));
2782 }
2783+
2784+/* Like gomp_barrier_wait, except that if the encountering thread
2785+ is not the last one to hit the barrier, it returns immediately.
2786+ The intended usage is that a thread which intends to gomp_barrier_destroy
2787+ this barrier calls gomp_barrier_wait, while all other threads
2788+ call gomp_barrier_wait_last. When gomp_barrier_wait returns,
2789+ the barrier can be safely destroyed. */
2790+
2791+void
2792+gomp_barrier_wait_last (gomp_barrier_t *barrier)
2793+{
2794+ gomp_barrier_state_t state = gomp_barrier_wait_start (barrier);
2795+ if (state & 1)
2796+ gomp_barrier_wait_end (barrier, state);
2797+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ppc32-retaddr.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ppc32-retaddr.patch
new file mode 100644
index 0000000000..e9ae1bc303
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ppc32-retaddr.patch
@@ -0,0 +1,86 @@
12005-11-28 Jakub Jelinek <jakub@redhat.com>
2
3 * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
4 read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
5 instead of doing an extran indirection from frame_pointer_rtx.
6
7 * gcc.dg/20051128-1.c: New test.
8
9--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
10+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
11@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
12 don't try to be too clever here. */
13 if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
14 {
15+ rtx x;
16 cfun->machine->ra_needs_full_frame = 1;
17
18- return
19- gen_rtx_MEM
20- (Pmode,
21- memory_address
22- (Pmode,
23- plus_constant (copy_to_reg
24- (gen_rtx_MEM (Pmode,
25- memory_address (Pmode, frame))),
26- RETURN_ADDRESS_OFFSET)));
27+ if (count == 0)
28+ {
29+ gcc_assert (frame == frame_pointer_rtx);
30+ x = arg_pointer_rtx;
31+ }
32+ else
33+ {
34+ x = memory_address (Pmode, frame);
35+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
36+ }
37+
38+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
39+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
40 }
41
42 cfun->machine->ra_need_lr = 1;
43--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
44+++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
45@@ -0,0 +1,41 @@
46+/* { dg-do run } */
47+/* { dg-options "-O2 -fpic" } */
48+
49+extern void exit (int);
50+extern void abort (void);
51+
52+int b;
53+
54+struct A
55+{
56+ void *pad[147];
57+ void *ra, *h;
58+ long o;
59+};
60+
61+void
62+__attribute__((noinline))
63+foo (struct A *a, void *x)
64+{
65+ __builtin_memset (a, 0, sizeof (a));
66+ if (!b)
67+ exit (0);
68+}
69+
70+void
71+__attribute__((noinline))
72+bar (void)
73+{
74+ struct A a;
75+
76+ __builtin_unwind_init ();
77+ foo (&a, __builtin_return_address (0));
78+}
79+
80+int
81+main (void)
82+{
83+ bar ();
84+ abort ();
85+ return 0;
86+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr27898.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr27898.patch
new file mode 100644
index 0000000000..172bb81171
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr27898.patch
@@ -0,0 +1,16 @@
12006-08-18 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/27898
4 * gcc.dg/pr27898.c: New test.
5
6--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
7+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
8@@ -0,0 +1,8 @@
9+/* PR c/27898 */
10+/* { dg-do compile } */
11+/* { dg-options "--combine" } */
12+/* { dg-additional-sources "pr27898.c" } */
13+
14+union u { struct { int i; }; };
15+
16+extern int foo (union u *);
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr32139.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr32139.patch
new file mode 100644
index 0000000000..f35696703d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr32139.patch
@@ -0,0 +1,19 @@
12007-06-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/32139
4 * gcc.c-torture/compile/20070531-1.c: New test.
5
6--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
7+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
8@@ -0,0 +1,11 @@
9+/* PR tree-optimization/32139 */
10+int foo (void);
11+int bar (void) __attribute__ ((const));
12+
13+int
14+test (int x)
15+{
16+ int a = (x == 10000 ? foo : bar) ();
17+ int b = (x == 10000 ? foo : bar) ();
18+ return a + b;
19+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr33763.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr33763.patch
new file mode 100644
index 0000000000..9e9c90d271
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr33763.patch
@@ -0,0 +1,153 @@
12007-11-06 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/33763
4 * gcc.dg/pr33763.c: New test.
5 * g++.dg/opt/inline13.C: New test.
6
72007-11-06 Jan Hubicka <jh@suse.cz>
8
9 PR tree-optimization/33763
10 * tree-inline.c (expand_call_inline): Silently ignore always_inline
11 attribute for redefined extern inline functions.
12
13--- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100
14+++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100
15@@ -2582,6 +2582,12 @@ expand_call_inline (basic_block bb, tree
16 if (!cgraph_inline_p (cg_edge, &reason))
17 {
18 if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
19+ /* For extern inline functions that get redefined we always
20+ silently ignored alway_inline flag. Better behaviour would
21+ be to be able to keep both bodies and use extern inline body
22+ for inlining, but we can't do that because frontends overwrite
23+ the body. */
24+ && !cg_edge->callee->local.redefined_extern_inline
25 /* Avoid warnings during early inline pass. */
26 && (!flag_unit_at_a_time || cgraph_global_info_ready))
27 {
28--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100
29+++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100
30@@ -0,0 +1,60 @@
31+/* PR tree-optimization/33763 */
32+/* { dg-do compile } */
33+/* { dg-options "-O2" } */
34+
35+typedef struct
36+{
37+ void *a;
38+ void *b;
39+} T;
40+extern void *foo (const char *, const char *);
41+extern void *bar (void *, const char *, T);
42+extern int baz (const char *, int);
43+
44+extern inline __attribute__ ((always_inline, gnu_inline)) int
45+baz (const char *x, int y)
46+{
47+ return 2;
48+}
49+
50+int
51+baz (const char *x, int y)
52+{
53+ return 1;
54+}
55+
56+int xa, xb;
57+
58+static void *
59+inl (const char *x, const char *y)
60+{
61+ T t = { &xa, &xb };
62+ int *f = (int *) __builtin_malloc (sizeof (int));
63+ const char *z;
64+ int o = 0;
65+ void *r = 0;
66+
67+ for (z = y; *z; z++)
68+ {
69+ if (*z == 'r')
70+ o |= 1;
71+ if (*z == 'w')
72+ o |= 2;
73+ }
74+ if (o == 1)
75+ *f = baz (x, 0);
76+ if (o == 2)
77+ *f = baz (x, 1);
78+ if (o == 3)
79+ *f = baz (x, 2);
80+
81+ if (o && *f > 0)
82+ r = bar (f, "w", t);
83+ return r;
84+}
85+
86+void *
87+foo (const char *x, const char *y)
88+{
89+ return inl (x, y);
90+}
91--- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100
92+++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100
93@@ -0,0 +1,60 @@
94+// PR tree-optimization/33763
95+// { dg-do compile }
96+// { dg-options "-O2" }
97+
98+typedef struct
99+{
100+ void *a;
101+ void *b;
102+} T;
103+extern void *foo (const char *, const char *);
104+extern void *bar (void *, const char *, T);
105+extern int baz (const char *, int);
106+
107+extern inline __attribute__ ((always_inline, gnu_inline)) int
108+baz (const char *x, int y)
109+{
110+ return 2;
111+}
112+
113+int
114+baz (const char *x, int y)
115+{
116+ return 1;
117+}
118+
119+int xa, xb;
120+
121+static void *
122+inl (const char *x, const char *y)
123+{
124+ T t = { &xa, &xb };
125+ int *f = (int *) __builtin_malloc (sizeof (int));
126+ const char *z;
127+ int o = 0;
128+ void *r = 0;
129+
130+ for (z = y; *z; z++)
131+ {
132+ if (*z == 'r')
133+ o |= 1;
134+ if (*z == 'w')
135+ o |= 2;
136+ }
137+ if (o == 1)
138+ *f = baz (x, 0);
139+ if (o == 2)
140+ *f = baz (x, 1);
141+ if (o == 3)
142+ *f = baz (x, 2);
143+
144+ if (o && *f > 0)
145+ r = bar (f, "w", t);
146+ return r;
147+}
148+
149+void *
150+foo (const char *x, const char *y)
151+{
152+ return inl (x, y);
153+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35440.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35440.patch
new file mode 100644
index 0000000000..6bf3f0d9d8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35440.patch
@@ -0,0 +1,56 @@
12008-03-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/35440
4 * c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
5 for all types.
6
7 * gcc.dg/pr35440.c: New test.
8
9--- gcc/c-pretty-print.c.jj 2008-02-11 14:48:12.000000000 +0100
10+++ gcc/c-pretty-print.c 2008-03-19 14:50:09.000000000 +0100
11@@ -1173,6 +1173,12 @@ pp_c_initializer_list (c_pretty_printer
12 tree type = TREE_TYPE (e);
13 const enum tree_code code = TREE_CODE (type);
14
15+ if (TREE_CODE (e) == CONSTRUCTOR)
16+ {
17+ pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
18+ return;
19+ }
20+
21 switch (code)
22 {
23 case RECORD_TYPE:
24@@ -1207,16 +1213,12 @@ pp_c_initializer_list (c_pretty_printer
25 case VECTOR_TYPE:
26 if (TREE_CODE (e) == VECTOR_CST)
27 pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
28- else if (TREE_CODE (e) == CONSTRUCTOR)
29- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
30 else
31 break;
32 return;
33
34 case COMPLEX_TYPE:
35- if (TREE_CODE (e) == CONSTRUCTOR)
36- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
37- else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
38+ if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
39 {
40 const bool cst = TREE_CODE (e) == COMPLEX_CST;
41 pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
42--- gcc/testsuite/gcc.dg/pr35440.c.jj 2008-03-19 15:57:13.000000000 +0100
43+++ gcc/testsuite/gcc.dg/pr35440.c 2008-03-19 15:47:35.000000000 +0100
44@@ -0,0 +1,12 @@
45+/* PR c/35440 */
46+/* { dg-do compile } */
47+/* { dg-options "-std=gnu99" } */
48+
49+struct A {};
50+struct B { int i; char j[2]; };
51+
52+void foo (void)
53+{
54+ (struct A){}(); /* { dg-error "called object" } */
55+ (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */
56+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35751.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35751.patch
new file mode 100644
index 0000000000..37b84275e2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35751.patch
@@ -0,0 +1,114 @@
12008-04-03 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/35751
4 * c-decl.c (finish_decl): If extern or static var has variable
5 size, set TREE_TYPE (decl) to error_mark_node.
6
7 * decl.c (layout_var_decl): If extern or static var has variable
8 size, set TREE_TYPE (decl) to error_mark_node.
9
10 * gcc.dg/gomp/pr35751.c: New test.
11 * g++.dg/gomp/pr35751.C: New test.
12
13--- gcc/c-decl.c.jj 2008-04-03 09:41:42.000000000 +0200
14+++ gcc/c-decl.c 2008-04-03 18:20:52.000000000 +0200
15@@ -3481,7 +3481,10 @@ finish_decl (tree decl, tree init, tree
16 if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
17 constant_expression_warning (DECL_SIZE (decl));
18 else
19- error ("storage size of %q+D isn%'t constant", decl);
20+ {
21+ error ("storage size of %q+D isn%'t constant", decl);
22+ TREE_TYPE (decl) = error_mark_node;
23+ }
24 }
25
26 if (TREE_USED (type))
27--- gcc/cp/decl.c.jj 2008-03-31 23:54:40.000000000 +0200
28+++ gcc/cp/decl.c 2008-04-03 18:30:19.000000000 +0200
29@@ -4442,7 +4442,10 @@ layout_var_decl (tree decl)
30 if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
31 constant_expression_warning (DECL_SIZE (decl));
32 else
33- error ("storage size of %qD isn't constant", decl);
34+ {
35+ error ("storage size of %qD isn't constant", decl);
36+ TREE_TYPE (decl) = error_mark_node;
37+ }
38 }
39 }
40
41--- gcc/testsuite/gcc.dg/gomp/pr35751.c.jj 2008-04-03 18:26:12.000000000 +0200
42+++ gcc/testsuite/gcc.dg/gomp/pr35751.c 2008-04-03 18:25:51.000000000 +0200
43@@ -0,0 +1,34 @@
44+/* PR c/35751 */
45+/* { dg-do compile } */
46+/* { dg-options "-fopenmp" } */
47+
48+void
49+foo (int i)
50+{
51+ extern int a[i]; /* { dg-error "must have no linkage|storage size of" } */
52+ static int b[i]; /* { dg-error "storage size of" } */
53+
54+#pragma omp parallel
55+ {
56+ a[0] = 0;
57+ b[0] = 0;
58+ }
59+
60+#pragma omp parallel shared (a, b)
61+ {
62+ a[0] = 0;
63+ b[0] = 0;
64+ }
65+
66+#pragma omp parallel private (a, b)
67+ {
68+ a[0] = 0;
69+ b[0] = 0;
70+ }
71+
72+#pragma omp parallel firstprivate (a, b)
73+ {
74+ a[0] = 0;
75+ b[0] = 0;
76+ }
77+}
78--- gcc/testsuite/g++.dg/gomp/pr35751.C.jj 2008-04-03 18:32:13.000000000 +0200
79+++ gcc/testsuite/g++.dg/gomp/pr35751.C 2008-04-03 18:32:32.000000000 +0200
80@@ -0,0 +1,34 @@
81+// PR c/35751
82+// { dg-do compile }
83+// { dg-options "-fopenmp" }
84+
85+void
86+foo (int i)
87+{
88+ extern int a[i]; // { dg-error "storage size of" }
89+ static int b[i]; // { dg-error "storage size of" }
90+
91+#pragma omp parallel
92+ {
93+ a[0] = 0;
94+ b[0] = 0;
95+ }
96+
97+#pragma omp parallel shared (a, b)
98+ {
99+ a[0] = 0;
100+ b[0] = 0;
101+ }
102+
103+#pragma omp parallel private (a, b)
104+ {
105+ a[0] = 0;
106+ b[0] = 0;
107+ }
108+
109+#pragma omp parallel firstprivate (a, b)
110+ {
111+ a[0] = 0;
112+ b[0] = 0;
113+ }
114+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh251682.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh251682.patch
new file mode 100644
index 0000000000..e96ae6f134
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh251682.patch
@@ -0,0 +1,89 @@
12008-04-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR pch/13675
4 * files.c (struct _cpp_file): Remove pch field.
5 (pch_open_file): Don't set file->pch, just file->pchname.
6 (should_stack_file): After pfile->cb.read_pch call
7 free pchname and clear pchname, don't close file->fd.
8 Test file->pchname instead of file->pch. Don't close fd after cb.
9 (_cpp_stack_include): Test file->pchname instead of file->pch.
10
11 * c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
12
13--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
14+++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
15@@ -106,9 +106,6 @@ struct _cpp_file
16
17 /* If BUFFER above contains the true contents of the file. */
18 bool buffer_valid;
19-
20- /* File is a PCH (on return from find_include_file). */
21- bool pch;
22 };
23
24 /* A singly-linked list for all searches for a given file name, with
25@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
26 }
27 closedir (pchdir);
28 }
29- if (valid)
30- file->pch = true;
31- else
32+ if (!valid)
33 *invalid_pch = true;
34 }
35
36@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
37 return false;
38
39 /* Handle PCH files immediately; don't stack them. */
40- if (file->pch)
41+ if (file->pchname)
42 {
43 pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
44- close (file->fd);
45 file->fd = -1;
46+ free ((void *) file->pchname);
47+ file->pchname = NULL;
48 return false;
49 }
50
51@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
52 complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
53 found a PCH file (in which case linemap_add is not called) or we
54 were included from the command-line. */
55- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
56+ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
57 pfile->line_table->highest_location--;
58
59 return _cpp_stack_file (pfile, file, type == IT_IMPORT);
60--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
61+++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
62@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
63 if (f == NULL)
64 {
65 cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
66+ close (fd);
67 return;
68 }
69
70@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
71 if (fread (&h, sizeof (h), 1, f) != 1)
72 {
73 cpp_errno (pfile, CPP_DL_ERROR, "reading");
74+ fclose (f);
75 return;
76 }
77
78@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
79 gt_pch_restore (f);
80
81 if (cpp_read_state (pfile, name, f, smd) != 0)
82- return;
83+ {
84+ fclose (f);
85+ return;
86+ }
87
88 fclose (f);
89
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh330771.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh330771.patch
new file mode 100644
index 0000000000..c894f83b43
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh330771.patch
@@ -0,0 +1,34 @@
12007-10-16 Jakub Jelinek <jakub@redhat.com>
2
3 * Makefile.am (libgcj_tools_la_LIBADD): Add.
4 * Makefile.in: Regenerated.
5
6--- libjava/Makefile.am.jj 2007-03-17 09:20:30.000000000 +0100
7+++ libjava/Makefile.am 2007-10-16 15:45:14.000000000 +0200
8@@ -262,6 +262,8 @@ EXTRA_libgcj_la_SOURCES = java/lang/Obje
9
10 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
11 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
12+## See jv_convert_LDADD.
13+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
14 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
15 -version-info `grep -v '^\#' $(srcdir)/libtool-version`
16 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
17--- libjava/Makefile.in.jj 2007-07-04 21:11:11.000000000 +0200
18+++ libjava/Makefile.in 2007-10-16 15:56:07.000000000 +0200
19@@ -146,7 +146,6 @@ am__objects_1 = gnu/gcj/xlib/lib_gnu_awt
20 am_lib_gnu_awt_xlib_la_OBJECTS = $(am__objects_1)
21 lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS)
22 @XLIB_AWT_TRUE@am_lib_gnu_awt_xlib_la_rpath = -rpath $(toolexeclibdir)
23-libgcj_tools_la_LIBADD =
24 am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo
25 libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
26 am__DEPENDENCIES_1 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
27@@ -894,6 +893,7 @@ libgcj_la_LINK = $(LIBLINK)
28 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
29 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
30 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
31+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
32 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
33 -version-info `grep -v '^\#' $(srcdir)/libtool-version`
34
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh341221.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh341221.patch
new file mode 100644
index 0000000000..28e73b07c3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh341221.patch
@@ -0,0 +1,28 @@
12007-10-21 Jakub Jelinek <jakub@redhat.com>
2
3 * doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
4 timestamp rather than from current date.
5 * doc/Makefile.in: Regenerated.
6
7--- libjava/classpath/doc/Makefile.am.jj 2007-12-07 17:55:00.000000000 +0100
8+++ libjava/classpath/doc/Makefile.am 2007-12-07 18:55:28.000000000 +0100
9@@ -30,7 +30,7 @@ TOOLS_MANFILES = \
10 gserialver.1 \
11 gtnameserv.1
12
13-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
14+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
15 TEXI2POD = perl $(srcdir)/texi2pod.pl
16 STAMP = echo timestamp >
17
18--- libjava/classpath/doc/Makefile.in.jj 2007-12-07 17:55:00.000000000 +0100
19+++ libjava/classpath/doc/Makefile.in 2007-12-07 18:55:43.000000000 +0100
20@@ -357,7 +357,7 @@ TOOLS_MANFILES = \
21 gserialver.1 \
22 gtnameserv.1
23
24-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
25+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
26 TEXI2POD = perl $(srcdir)/texi2pod.pl
27 STAMP = echo timestamp >
28 @GENINSRC_FALSE@STAMP_GENINSRC =
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..b3d38ad983
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
1* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
2 used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
3 directory.
4
5diff --git a/libgfortran/configure b/libgfortran/configure
6index f7d86fb..d0966ec 100755
7--- a/libgfortran/configure
8+++ b/libgfortran/configure
9@@ -4475,6 +4475,6 @@ exec 5>>./config.log
10
11 # We need gfortran to compile parts of the library
12 #AC_PROG_FC(gfortran)
13-FC="$GFORTRAN"
14+#FC="$GFORTRAN"
15 ac_ext=${FC_SRCEXT-f}
16 ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
17\ No newline at end of file
18diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
19index 4661306..9f83e55 100644
20--- a/libgfortran/configure.ac
21+++ b/libgfortran/configure.ac
22@@ -140,7 +140,7 @@ AC_SUBST(enable_static)
23
24 # We need gfortran to compile parts of the library
25 #AC_PROG_FC(gfortran)
26-FC="$GFORTRAN"
27+#FC="$GFORTRAN"
28 AC_PROG_FC(gfortran)
29
30 # extra LD Flags which are required for targets
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-static-linking.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-static-linking.patch
@@ -0,0 +1,48 @@
1f951 (fortran) links to MPFR and GMP of our staging area but when executing
2the command the libs can not be found. Use rpath like all the other apps in
3our staging bin/ directory.
4
5Patch the configure to avoid the regeneration...
6
7Index: gcc-4.2.2/configure
8===================================================================
9--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
10+++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
11@@ -2278,14 +2278,14 @@
12
13
14 if test "x$with_mpfr" != x; then
15- gmplibs="-L$with_mpfr/lib $gmplibs"
16+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
17 gmpinc="-I$with_mpfr/include"
18 fi
19 if test "x$with_mpfr_include" != x; then
20 gmpinc="-I$with_mpfr_include"
21 fi
22 if test "x$with_mpfr_lib" != x; then
23- gmplibs="-L$with_mpfr_lib $gmplibs"
24+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
25 fi
26
27 # Specify a location for gmp
28Index: gcc-4.2.2/configure.in
29===================================================================
30--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
31+++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
32@@ -1066,14 +1066,14 @@
33 AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
34
35 if test "x$with_mpfr" != x; then
36- gmplibs="-L$with_mpfr/lib $gmplibs"
37+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
38 gmpinc="-I$with_mpfr/include"
39 fi
40 if test "x$with_mpfr_include" != x; then
41 gmpinc="-I$with_mpfr_include"
42 fi
43 if test "x$with_mpfr_lib" != x; then
44- gmplibs="-L$with_mpfr_lib $gmplibs"
45+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
46 fi
47
48 # Specify a location for gmp
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch
new file mode 100644
index 0000000000..d1df8b2716
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,319 @@
1Adds support for Freescale Power architecture e300c2 and e300c3 cores.
2http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
3
4Leon Woestenberg <leonw@mailcan.com>
5
6---
7 gcc/config.gcc | 2
8 gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
9 gcc/config/rs6000/rs6000.c | 24 +++++
10 gcc/config/rs6000/rs6000.h | 4
11 gcc/config/rs6000/rs6000.md | 3
12 5 files changed, 220 insertions(+), 2 deletions(-)
13
14Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
18@@ -0,0 +1,189 @@
19+;; Pipeline description for Motorola PowerPC e300c3 core.
20+;; Copyright (C) 2003 Free Software Foundation, Inc.
21+;;
22+;; This file is part of GCC.
23+
24+;; GCC is free software; you can redistribute it and/or modify it
25+;; under the terms of the GNU General Public License as published
26+;; by the Free Software Foundation; either version 2, or (at your
27+;; option) any later version.
28+
29+;; GCC is distributed in the hope that it will be useful, but WITHOUT
30+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
31+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
32+;; License for more details.
33+
34+;; You should have received a copy of the GNU General Public License
35+;; along with GCC; see the file COPYING. If not, write to the
36+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
37+;; MA 02111-1307, USA.
38+
39+(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
40+(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
41+
42+;; We don't simulate general issue queue (GIC). If we have SU insn
43+;; and then SU1 insn, they can not be issued on the same cycle
44+;; (although SU1 insn and then SU insn can be issued) because the SU
45+;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
46+;; multipass insn scheduling will find the situation and issue the SU1
47+;; insn and then the SU insn.
48+(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
49+
50+;; We could describe completion buffers slots in combination with the
51+;; retirement units and the order of completion but the result
52+;; automaton would behave in the same way because we can not describe
53+;; real latency time with taking in order completion into account.
54+;; Actually we could define the real latency time by querying reserved
55+;; automaton units but the current scheduler uses latency time before
56+;; issuing insns and making any reservations.
57+;;
58+;; So our description is aimed to achieve a insn schedule in which the
59+;; insns would not wait in the completion buffer.
60+(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
61+
62+;; Branch unit:
63+(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
64+
65+;; IU:
66+(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
67+
68+;; IU: This used to describe non-pipelined division.
69+(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
70+
71+;; SRU:
72+(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
73+
74+;; Here we simplified LSU unit description not describing the stages.
75+(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
76+
77+;; FPU:
78+(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
79+
80+;; The following units are used to make automata deterministic
81+(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
82+(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
83+(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
84+(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
85+
86+;; The following sets to make automata deterministic when option ndfa is used.
87+(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
88+(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
89+(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
90+(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
91+
92+;; Some useful abbreviations.
93+(define_reservation "ppce300c3_decode"
94+ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
95+(define_reservation "ppce300c3_issue"
96+ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
97+(define_reservation "ppce300c3_retire"
98+ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
99+(define_reservation "ppce300c3_iu_stage0"
100+ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
101+
102+;; Compares can be executed either one of the IU or SRU
103+(define_insn_reservation "ppce300c3_cmp" 1
104+ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
105+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
106+ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
107+ +ppce300c3_retire")
108+
109+;; Other one cycle IU insns
110+(define_insn_reservation "ppce300c3_iu" 1
111+ (and (eq_attr "type" "integer,insert_word")
112+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
113+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
114+
115+;; Branch. Actually this latency time is not used by the scheduler.
116+(define_insn_reservation "ppce300c3_branch" 1
117+ (and (eq_attr "type" "jmpreg,branch")
118+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
119+ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
120+
121+;; Multiply is non-pipelined but can be executed in any IU
122+(define_insn_reservation "ppce300c3_multiply" 2
123+ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
124+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
125+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
126+ ppce300c3_iu_stage0+ppce300c3_retire")
127+
128+;; Divide. We use the average latency time here. We omit reserving a
129+;; retire unit because of the result automata will be huge.
130+(define_insn_reservation "ppce300c3_divide" 20
131+ (and (eq_attr "type" "idiv")
132+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
133+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
134+ ppce300c3_mu_div*19")
135+
136+;; CR logical
137+(define_insn_reservation "ppce300c3_cr_logical" 1
138+ (and (eq_attr "type" "cr_logical,delayed_cr")
139+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
140+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
141+
142+;; Mfcr
143+(define_insn_reservation "ppce300c3_mfcr" 1
144+ (and (eq_attr "type" "mfcr")
145+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
146+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
147+
148+;; Mtcrf
149+(define_insn_reservation "ppce300c3_mtcrf" 1
150+ (and (eq_attr "type" "mtcr")
151+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
152+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
153+
154+;; Mtjmpr
155+(define_insn_reservation "ppce300c3_mtjmpr" 1
156+ (and (eq_attr "type" "mtjmpr,mfjmpr")
157+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
158+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
159+
160+;; Float point instructions
161+(define_insn_reservation "ppce300c3_fpcompare" 3
162+ (and (eq_attr "type" "fpcompare")
163+ (eq_attr "cpu" "ppce300c3"))
164+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
165+
166+(define_insn_reservation "ppce300c3_fp" 3
167+ (and (eq_attr "type" "fp")
168+ (eq_attr "cpu" "ppce300c3"))
169+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
170+
171+(define_insn_reservation "ppce300c3_dmul" 4
172+ (and (eq_attr "type" "dmul")
173+ (eq_attr "cpu" "ppce300c3"))
174+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
175+
176+; Divides are not pipelined
177+(define_insn_reservation "ppce300c3_sdiv" 18
178+ (and (eq_attr "type" "sdiv")
179+ (eq_attr "cpu" "ppce300c3"))
180+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
181+
182+(define_insn_reservation "ppce300c3_ddiv" 33
183+ (and (eq_attr "type" "ddiv")
184+ (eq_attr "cpu" "ppce300c3"))
185+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
186+
187+;; Loads
188+(define_insn_reservation "ppce300c3_load" 2
189+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
190+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
191+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
192+
193+(define_insn_reservation "ppce300c3_fpload" 2
194+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
195+ (eq_attr "cpu" "ppce300c3"))
196+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
197+
198+;; Stores.
199+(define_insn_reservation "ppce300c3_store" 2
200+ (and (eq_attr "type" "store,store_ux,store_u")
201+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
202+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
203+
204+(define_insn_reservation "ppce300c3_fpstore" 2
205+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
206+ (eq_attr "cpu" "ppce300c3"))
207+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
208Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
209===================================================================
210--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
211+++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
212@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
213 1, /* prefetch streams /*/
214 };
215
216+/* Instruction costs on E300C2 and E300C3 cores. */
217+static const
218+struct processor_costs ppce300c2c3_cost = {
219+ COSTS_N_INSNS (4), /* mulsi */
220+ COSTS_N_INSNS (4), /* mulsi_const */
221+ COSTS_N_INSNS (4), /* mulsi_const9 */
222+ COSTS_N_INSNS (4), /* muldi */
223+ COSTS_N_INSNS (19), /* divsi */
224+ COSTS_N_INSNS (19), /* divdi */
225+ COSTS_N_INSNS (3), /* fp */
226+ COSTS_N_INSNS (4), /* dmul */
227+ COSTS_N_INSNS (18), /* sdiv */
228+ COSTS_N_INSNS (33), /* ddiv */
229+};
230+
231 /* Instruction costs on POWER4 and POWER5 processors. */
232 static const
233 struct processor_costs power4_cost = {
234@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
235 {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
236 /* 8548 has a dummy entry for now. */
237 {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
238+ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
239+ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
240 {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
241 {"970", PROCESSOR_POWER4,
242 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
243@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
244 rs6000_cost = &ppc8540_cost;
245 break;
246
247+ case PROCESSOR_PPCE300C2:
248+ case PROCESSOR_PPCE300C3:
249+ rs6000_cost = &ppce300c2c3_cost;
250+ break;
251+
252 case PROCESSOR_POWER4:
253 case PROCESSOR_POWER5:
254 rs6000_cost = &power4_cost;
255@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
256 case CPU_PPC7400:
257 case CPU_PPC8540:
258 case CPU_CELL:
259+ case CPU_PPCE300C2:
260+ case CPU_PPCE300C3:
261 return 2;
262 case CPU_RIOS2:
263 case CPU_PPC604:
264Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
265===================================================================
266--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
267+++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
268@@ -117,6 +117,8 @@
269 %{mcpu=G5: -mpower4 -maltivec} \
270 %{mcpu=8540: -me500} \
271 %{mcpu=8548: -me500} \
272+%{mcpu=e300c2: -mppc} \
273+%{mcpu=e300c3: -mppc -mpmr} \
274 %{maltivec: -maltivec} \
275 -many"
276
277@@ -262,6 +264,8 @@ enum processor_type
278 PROCESSOR_PPC7400,
279 PROCESSOR_PPC7450,
280 PROCESSOR_PPC8540,
281+ PROCESSOR_PPCE300C2,
282+ PROCESSOR_PPCE300C3,
283 PROCESSOR_POWER4,
284 PROCESSOR_POWER5,
285 PROCESSOR_POWER6,
286Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
287===================================================================
288--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
289+++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
290@@ -133,7 +133,7 @@
291 ;; Processor type -- this attribute must exactly match the processor_type
292 ;; enumeration in rs6000.h.
293
294-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
295+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell,ppce300c2,ppce300c3"
296 (const (symbol_ref "rs6000_cpu_attr")))
297
298
299@@ -166,6 +166,7 @@
300 (include "7xx.md")
301 (include "7450.md")
302 (include "8540.md")
303+(include "e300c2c3.md")
304 (include "power4.md")
305 (include "power5.md")
306 (include "power6.md")
307Index: gcc-4.3.1/gcc/config.gcc
308===================================================================
309--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
310+++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
311@@ -3144,7 +3144,7 @@ case "${target}" in
312 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
313 | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
314 | 601 | 602 | 603 | 603e | ec603e | 604 \
315- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
316+ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
317 | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
318 # OK
319 ;;
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch
new file mode 100644
index 0000000000..81522a8f57
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch
@@ -0,0 +1,23 @@
1Change gcc build : Enable m4 and m4-nofpu (needed for kernel) for sh4-gnu-linux
2
3Signed-off-by: Carl Shaw <carl.shaw@st.com>
4
5Index: gcc/gcc/config.gcc
6===================================================================
7--- gcc.orig/gcc/config.gcc 2008-07-18 10:37:54.000000000 +0100
8+++ gcc/gcc/config.gcc 2008-07-18 11:00:42.000000000 +0100
9@@ -2097,11 +2097,12 @@
10 if test x${sh_multilibs} = x ; then
11 case ${target} in
12 sh64-superh-linux* | \
13- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
14 sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
15- sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
16+ sh-superh-* | \
17+ sh4-*-linux*) sh_multilibs=m4,m4-nofpu ;;
18 sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
19 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
20+ sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
21 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
22 esac
23 if test x$with_fp = xno; then
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..f33e6c1ea6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,31 @@
1---
2 configure | 2 +-
3 configure.ac | 2 +-
4 2 files changed, 2 insertions(+), 2 deletions(-)
5
6Index: gcc-4.3.1/configure.ac
7===================================================================
8--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700
9+++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700
10@@ -2352,7 +2352,7 @@ fi
11 # for target_alias and gcc doesn't manage it consistently.
12 target_configargs="--cache-file=./config.cache ${target_configargs}"
13
14-FLAGS_FOR_TARGET=
15+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
16 case " $target_configdirs " in
17 *" newlib "*)
18 case " $target_configargs " in
19Index: gcc-4.3.1/configure
20===================================================================
21--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700
22+++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700
23@@ -5841,7 +5841,7 @@ fi
24 # for target_alias and gcc doesn't manage it consistently.
25 target_configargs="--cache-file=./config.cache ${target_configargs}"
26
27-FLAGS_FOR_TARGET=
28+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
29 case " $target_configdirs " in
30 *" newlib "*)
31 case " $target_configargs " in
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..1d3936bc39
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,6691 @@
1Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
2
3This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
4
5Other changes I had to do include:
6
7- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
8
9- passing the right CFLAGS to configure scripts as exported environment variables
10
11I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
12
13Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
14
15Paolo
16
172008-02-19 Paolo Bonzini <bonzini@gnu.org>
18
19 PR bootstrap/32009
20 PR bootstrap/32161
21
22 * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
23 * configure: Regenerate.
24
25 * Makefile.def: Define stage_libcflags for all bootstrap stages.
26 * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
27 STAGE4_LIBCFLAGS): New.
28 (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
29 $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
30 (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
31 (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
32 (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
33 for target modules. Don't export LIBCFLAGS.
34 (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
35 $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
36 the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
37 (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
38 $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
39 * Makefile.in: Regenerate.
40
41config:
422008-02-19 Paolo Bonzini <bonzini@gnu.org>
43
44 PR bootstrap/32009
45 * mh-ppc-darwin (BOOT_CFLAGS): Reenable.
46
47gcc:
482008-02-19 Paolo Bonzini <bonzini@gnu.org>
49
50 PR bootstrap/32009
51 * doc/install.texi: Correct references to CFLAGS, replacing them
52 with BOOT_CFLAGS. Document flags used during bootstrap for
53 target libraries.
54
55
56---
57 Makefile.def | 25
58 Makefile.in | 1845 ++++++++++++++++++++++++++++++-------------------
59 Makefile.tpl | 91 +-
60 config/mh-ppc-darwin | 3
61 configure | 36
62 configure.ac | 32
63 gcc/Makefile.in | 2
64 gcc/configure | 6
65 gcc/configure.ac | 3
66 gcc/doc/install.texi | 56 -
67 libiberty/Makefile.in | 162 ++--
68 libiberty/configure | 46 -
69 libiberty/configure.ac | 43 -
70 13 files changed, 1454 insertions(+), 896 deletions(-)
71
72Index: gcc-4.3.3/configure.ac
73===================================================================
74--- gcc-4.3.3.orig/configure.ac 2008-02-01 20:29:30.000000000 -0700
75+++ gcc-4.3.3/configure.ac 2009-04-29 18:03:50.025603468 -0700
76@@ -1667,6 +1667,38 @@
77 [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
78 AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
79
80+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
81+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
82+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
83+# We want to ensure that TARGET libraries (which we know are built with
84+# gcc) are built with "-O2 -g", so include those options when setting
85+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
86+if test "x$CFLAGS_FOR_TARGET" = x; then
87+ CFLAGS_FOR_TARGET=$CFLAGS
88+ case " $CFLAGS " in
89+ *" -O2 "*) ;;
90+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
91+ esac
92+ case " $CFLAGS " in
93+ *" -g "* | *" -g3 "*) ;;
94+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
95+ esac
96+fi
97+AC_SUBST(CFLAGS_FOR_TARGET)
98+
99+if test "x$CXXFLAGS_FOR_TARGET" = x; then
100+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
101+ case " $CXXFLAGS " in
102+ *" -O2 "*) ;;
103+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
104+ esac
105+ case " $CXXFLAGS " in
106+ *" -g "* | *" -g3 "*) ;;
107+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
108+ esac
109+fi
110+AC_SUBST(CXXFLAGS_FOR_TARGET)
111+
112 # Handle --with-headers=XXX. If the value is not "yes", the contents of
113 # the named directory are copied to $(tooldir)/sys-include.
114 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
115Index: gcc-4.3.3/Makefile.def
116===================================================================
117--- gcc-4.3.3.orig/Makefile.def 2007-10-23 08:53:18.000000000 -0700
118+++ gcc-4.3.3/Makefile.def 2009-04-29 18:03:50.029603058 -0700
119@@ -214,6 +214,7 @@
120 flags_to_pass = { flag= INSTALL_DATA ; };
121 flags_to_pass = { flag= INSTALL_PROGRAM ; };
122 flags_to_pass = { flag= INSTALL_SCRIPT ; };
123+flags_to_pass = { flag= LDFLAGS_FOR_BUILD ; };
124 flags_to_pass = { flag= LEX ; };
125 flags_to_pass = { flag= M4 ; };
126 flags_to_pass = { flag= MAKE ; };
127@@ -511,43 +512,51 @@
128 // compiler probably has never heard of them.
129 stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \
130 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
131- stage_cflags='$(STAGE1_CFLAGS)' ; };
132+ stage_cflags='$(STAGE1_CFLAGS)' ;
133+ stage_libcflags='$(STAGE1_LIBCFLAGS)' ; };
134 bootstrap_stage = {
135 id=2 ; prev=1 ;
136 bootstrap_target=bootstrap2 ;
137 stage_configure_flags="@stage2_werror_flag@" ;
138- stage_cflags="$(STAGE2_CFLAGS)" ; };
139+ stage_cflags="$(STAGE2_CFLAGS)" ;
140+ stage_libcflags="$(STAGE2_LIBCFLAGS)" ; };
141 bootstrap_stage = {
142 id=b2g0 ; prev=1 ;
143 bootstrap_target=bootstrap2-debug ;
144 stage_configure_flags="@stage2_werror_flag@" ;
145- stage_cflags="$(STAGE2_CFLAGS) -g0" ; };
146+ stage_cflags="$(STAGE2_CFLAGS) -g0" ;
147+ stage_libcflags="$(STAGE2_LIBCFLAGS) -g0" ; };
148 bootstrap_stage = {
149 id=3 ; prev=2 ; lean=1 ;
150 compare_target=compare ;
151 bootstrap_target=bootstrap ;
152 cleanstrap_target=cleanstrap ;
153 stage_configure_flags="@stage2_werror_flag@" ;
154- stage_cflags="$(STAGE3_CFLAGS)" ; };
155+ stage_cflags="$(STAGE3_CFLAGS)" ;
156+ stage_libcflags="$(STAGE3_LIBCFLAGS)" ; };
157 bootstrap_stage = {
158 id=b3g2 ; prev=b2g0 ; lean=1 ;
159 compare_target=compare-debug ;
160 bootstrap_target=bootstrap-debug ;
161 cleanstrap_target=cleanstrap-debug ;
162 stage_configure_flags="@stage2_werror_flag@" ;
163- stage_cflags="$(STAGE3_CFLAGS) -g2" ; };
164+ stage_cflags="$(STAGE3_CFLAGS) -g2" ;
165+ stage_libcflags="$(STAGE3_LIBCFLAGS) -g2" ; };
166 bootstrap_stage = {
167 id=4 ; prev=3 ; lean=2 ;
168 compare_target=compare3 ;
169 bootstrap_target=bootstrap4 ;
170 stage_configure_flags="@stage2_werror_flag@" ;
171- stage_cflags="$(STAGE4_CFLAGS)" ; };
172+ stage_cflags="$(STAGE4_CFLAGS)" ;
173+ stage_libcflags="$(STAGE4_CFLAGS)" ; };
174 bootstrap_stage = {
175 id=profile ; prev=1 ;
176 stage_configure_flags="@stage2_werror_flag@" ;
177- stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ; };
178+ stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ;
179+ stage_libcflags='$(STAGE2_LIBCFLAGS) -fprofile-generate' ; };
180 bootstrap_stage = {
181 id=feedback ; prev=profile ;
182 bootstrap_target=profiledbootstrap ;
183 stage_configure_flags="@stage2_werror_flag@" ;
184- stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ; };
185+ stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ;
186+ stage_libcflags='$(STAGE3_LIBCFLAGS) -fprofile-use' ; };
187Index: gcc-4.3.3/Makefile.tpl
188===================================================================
189--- gcc-4.3.3.orig/Makefile.tpl 2008-08-16 00:28:01.000000000 -0700
190+++ gcc-4.3.3/Makefile.tpl 2009-04-29 18:04:16.836611837 -0700
191@@ -23,6 +23,14 @@
192 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
193 #
194
195+# First, test for a proper version of make, but only where one is required.
196+
197+@if gcc
198+ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty.
199+$(error GNU make version 3.80 or newer is required.)
200+endif
201+@endif gcc
202+
203 # -------------------------------
204 # Standard Autoconf-set variables
205 # -------------------------------
206@@ -139,6 +147,13 @@
207 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
208 WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
209
210+# These variables must be set on the make command line for directories
211+# built for the build system to override those in BASE_FLAGS_TO_PASSS.
212+EXTRA_BUILD_FLAGS = \
213+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
214+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
215+ LIBCFLAGS=""
216+
217 # This is the list of directories to built for the host system.
218 SUBDIRS = @configdirs@
219 # This is set by the configure script to the arguments to use when configuring
220@@ -153,6 +168,7 @@
221 HOST_EXPORTS = \
222 $(BASE_EXPORTS) \
223 CC="$(CC)"; export CC; \
224+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
225 CFLAGS="$(CFLAGS)"; export CFLAGS; \
226 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
227 CXX="$(CXX)"; export CXX; \
228@@ -207,10 +223,10 @@
229 AR="$(AR_FOR_TARGET)"; export AR; \
230 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
231 CC="$(CC_FOR_TARGET)"; export CC; \
232- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
233+ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
234 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
235 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
236- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
237+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
238 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
239 GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
240 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
241@@ -323,7 +339,6 @@
242 LIBCFLAGS = $(CFLAGS)
243 CXXFLAGS = @CXXFLAGS@
244 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
245-PICFLAG =
246
247 # Only build the C compiler for stage1, because that is the only one that
248 # we can guarantee will build with the native compiler, and also it is the
249@@ -331,14 +346,19 @@
250 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
251 # overrideable (for a bootstrap build stage1 also builds gcc.info).
252
253-STAGE1_CFLAGS=@stage1_cflags@
254 STAGE1_CHECKING=@stage1_checking@
255 STAGE1_LANGUAGES=@stage1_languages@
256
257+STAGE1_CFLAGS=@stage1_cflags@
258 STAGE2_CFLAGS=$(BOOT_CFLAGS)
259 STAGE3_CFLAGS=$(BOOT_CFLAGS)
260 STAGE4_CFLAGS=$(BOOT_CFLAGS)
261
262+STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
263+STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
264+STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
265+STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
266+
267 do-compare = @do_compare@
268 do-compare3 = $(do-compare)
269 do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
270@@ -377,22 +397,14 @@
271 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
272 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
273
274-# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
275-# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
276-# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
277-# We want to ensure that TARGET libraries (which we know are built with
278-# gcc) are built with "-O2 -g", so prepend those options when setting
279-# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
280-CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
281- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
282+CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
283+CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
284 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
285 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
286-CXXFLAGS_FOR_TARGET = -O2 -g $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
287- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
288+
289 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
290 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
291-LDFLAGS_FOR_TARGET =
292-PICFLAG_FOR_TARGET =
293+LDFLAGS_FOR_TARGET = @LDFLAGS@
294
295 # ------------------------------------
296 # Miscellaneous targets and flag lists
297@@ -492,19 +504,20 @@
298 # Flags to pass down to makes which are built with the target environment.
299 # The double $ decreases the length of the command line; those variables
300 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
301-# COMPILER_ prefixed variables are not passed down so we expand them here.
302+# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
303+# so we expand them here.
304 EXTRA_TARGET_FLAGS = \
305 'AR=$$(AR_FOR_TARGET)' \
306 'AS=$(COMPILER_AS_FOR_TARGET)' \
307 'CC=$$(CC_FOR_TARGET)' \
308- 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
309+ 'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
310 'CXX=$$(CXX_FOR_TARGET)' \
311- 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
312+ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
313 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
314 'LD=$(COMPILER_LD_FOR_TARGET)' \
315 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
316- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
317- 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
318+ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
319+ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
320 'NM=$(COMPILER_NM_FOR_TARGET)' \
321 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
322 'RANLIB=$$(RANLIB_FOR_TARGET)' \
323@@ -852,9 +865,11 @@
324 fi; \
325 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
326 [+exports+][+ IF prev +] \
327- [+poststage1_exports+][+ ENDIF prev +] \
328+ [+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \
329+ CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
330+ CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \
331 CFLAGS="[+stage_cflags+]"; export CFLAGS; \
332- LIBCFLAGS="[+stage_cflags+]"; export LIBCFLAGS; \
333+ CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \
334 echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
335 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
336 cd [+subdir+]/[+module+] || exit 1; \
337@@ -891,7 +906,8 @@
338 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
339 [+exports+] \
340 (cd [+subdir+]/[+module+] && \
341- $(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
342+ $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
343+ $(TARGET-[+prefix+][+module+]))
344 @endif [+prefix+][+module+]
345
346 [+ IF bootstrap +]
347@@ -911,8 +927,11 @@
348 [+exports+][+ IF prev +] \
349 [+poststage1_exports+][+ ENDIF prev +] \
350 cd [+subdir+]/[+module+] && \
351- $(MAKE) [+args+] \
352- CFLAGS="[+stage_cflags+]" LIBCFLAGS="[+stage_cflags+]" [+
353+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
354+ CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \
355+ LIBCFLAGS="[+stage_libcflags+]" \
356+ CFLAGS_FOR_TARGET="[+stage_libcflags+]" \
357+ CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+
358 IF prev +][+poststage1_args+][+ ENDIF prev
359 +] [+extra_make_flags+] \
360 $(TARGET-stage[+id+]-[+prefix+][+module+])
361@@ -945,7 +964,8 @@
362 target_alias=(get "target" "${target_alias}")
363 args="$(BUILD_CONFIGARGS)" no-config-site=true +]
364
365-[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
366+[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
367+ args="$(EXTRA_BUILD_FLAGS)" +]
368 [+ ENDFOR build_module +]
369
370 # --------------------------------------
371@@ -962,7 +982,7 @@
372 [+ all prefix="" subdir="$(HOST_SUBDIR)"
373 exports="$(HOST_EXPORTS)"
374 poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
375- args="$(FLAGS_TO_PASS)"
376+ args="$(EXTRA_HOST_FLAGS)"
377 poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
378
379 .PHONY: check-[+module+] maybe-check-[+module+]
380@@ -1060,7 +1080,7 @@
381
382 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
383 exports="$(RAW_CXX_TARGET_EXPORTS)"
384- args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
385+ args="$(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
386 [+ ELSE +]
387 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
388 check_multilibs=true
389@@ -1071,7 +1091,7 @@
390
391 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
392 exports="$(NORMAL_TARGET_EXPORTS)"
393- args="$(TARGET_FLAGS_TO_PASS)" +]
394+ args="$(EXTRA_TARGET_FLAGS)" +]
395 [+ ENDIF +]
396
397 .PHONY: check-target-[+module+] maybe-check-target-[+module+]
398@@ -1301,7 +1321,7 @@
399
400 # Bubble a bug fix through all the stages up to stage [+id+]. They are
401 # remade, but not reconfigured. The next stage (if any) will not be
402-# reconfigured as well.
403+# reconfigured either.
404 .PHONY: stage[+id+]-bubble
405 stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
406 @r=`${PWD_COMMAND}`; export r; \
407@@ -1440,11 +1460,11 @@
408 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
409
410 .PHONY: restrap
411-restrap:
412+restrap::
413 @: $(MAKE); $(stage)
414 rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
415 +]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
416- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
417+restrap:: all
418 @endif gcc-bootstrap
419
420 # --------------------------------------
421@@ -1475,7 +1495,7 @@
422
423 [+ ;; These Scheme functions build the bulk of the dependencies.
424 ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
425- ;; where "maybe-" is only included if HARD is true, and all-gcc
426+ ;; where "maybe-" is only included if HARD is not true, and all-gcc
427 ;; is taken from VAR-NAME.
428 (define dep-target (lambda (module-kind var-name hard)
429 (string-append
430@@ -1633,7 +1653,8 @@
431
432 # Rebuilding configure.
433 AUTOCONF = autoconf
434-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
435+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
436+ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
437 cd $(srcdir) && $(AUTOCONF)
438
439 # ------------------------------
440Index: gcc-4.3.3/config/mh-ppc-darwin
441===================================================================
442--- gcc-4.3.3.orig/config/mh-ppc-darwin 2007-05-23 07:26:31.000000000 -0700
443+++ gcc-4.3.3/config/mh-ppc-darwin 2009-04-29 18:03:50.057603252 -0700
444@@ -2,5 +2,4 @@
445 # position-independent-code -- the usual default on Darwin. This fix speeds
446 # compiles by 3-5%.
447
448-# Broken because of PR32009.
449-# BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
450+BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
451Index: gcc-4.3.3/gcc/doc/install.texi
452===================================================================
453--- gcc-4.3.3.orig/gcc/doc/install.texi 2009-01-06 17:52:26.000000000 -0700
454+++ gcc-4.3.3/gcc/doc/install.texi 2009-04-29 18:03:50.065603803 -0700
455@@ -1778,33 +1778,35 @@
456 stage2 of the 3-stage bootstrap of the compiler are deleted as
457 soon as they are no longer needed.
458
459-If you want to save additional space during the bootstrap and in
460-the final installation as well, you can build the compiler binaries
461-without debugging information as in the following example. This will save
462-roughly 40% of disk space both for the bootstrap and the final installation.
463-(Libraries will still contain debugging information.)
464-
465-@smallexample
466- make CFLAGS='-O' LIBCFLAGS='-g -O2' \
467- LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
468-@end smallexample
469-
470-If you wish to use non-default GCC flags when compiling the stage2 and
471-stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
472-@samp{make}. Non-default optimization flags are less well
473-tested here than the default of @samp{-g -O2}, but should still work.
474-In a few cases, you may find that you need to specify special flags such
475-as @option{-msoft-float} here to complete the bootstrap; or, if the
476-native compiler miscompiles the stage1 compiler, you may need to work
477-around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the
478-stage1 compiler that were miscompiled, or by using @samp{make
479+If you wish to use non-default GCC flags when compiling the stage2
480+and stage3 compilers, set @code{BOOT_CFLAGS} on the command line when
481+doing @samp{make}. For example, if you want to save additional space
482+during the bootstrap and in the final installation as well, you can
483+build the compiler binaries without debugging information as in the
484+following example. This will save roughly 40% of disk space both for
485+the bootstrap and the final installation. (Libraries will still contain
486+debugging information.)
487+
488+@smallexample
489+ make BOOT_CFLAGS='-O' bootstrap
490+@end smallexample
491+
492+You can place non-default optimization flags into @code{BOOT_CFLAGS}; they
493+are less well tested here than the default of @samp{-g -O2}, but should
494+still work. In a few cases, you may find that you need to specify special
495+flags such as @option{-msoft-float} here to complete the bootstrap; or,
496+if the native compiler miscompiles the stage1 compiler, you may need
497+to work around this, by choosing @code{BOOT_CFLAGS} to avoid the parts
498+of the stage1 compiler that were miscompiled, or by using @samp{make
499 bootstrap4} to increase the number of stages of bootstrap.
500
501-Note that using non-standard @code{CFLAGS} can cause bootstrap to fail
502-if these trigger a warning with the new compiler. For example using
503-@samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will cause bootstrap
504-failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
505-
506+@code{BOOT_CFLAGS} does not apply to bootstrapped target libraries.
507+Since these are always compiled with the compiler currently being
508+bootstrapped, you can use @code{CFLAGS_FOR_TARGET} to modify their
509+compilation flags, as for non-bootstrapped target libraries.
510+Again, if the native compiler miscompiles the stage1 compiler, you may
511+need to work around this by avoiding non-working parts of the stage1
512+compiler. Use @code{STAGE1_LIBCFLAGS} to this end.
513
514 If you used the flag @option{--enable-languages=@dots{}} to restrict
515 the compilers to be built, only those you've actually enabled will be
516@@ -2687,8 +2689,8 @@
517 stamp.
518
519 @samp{make compare} may fail on old versions of DEC Unix unless you add
520-@option{-save-temps} to @code{CFLAGS}. On these systems, the name of the
521-assembler input file is stored in the object file, and that makes
522+@option{-save-temps} to @code{BOOT_CFLAGS}. On these systems, the name
523+of the assembler input file is stored in the object file, and that makes
524 comparison fail if it differs between the @code{stage1} and
525 @code{stage2} compilations. The option @option{-save-temps} forces a
526 fixed name to be used for the assembler input file, instead of a
527Index: gcc-4.3.3/Makefile.in
528===================================================================
529--- gcc-4.3.3.orig/Makefile.in 2008-08-16 00:28:01.000000000 -0700
530+++ gcc-4.3.3/Makefile.in 2009-04-29 18:04:32.133111439 -0700
531@@ -20,6 +20,14 @@
532 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
533 #
534
535+# First, test for a proper version of make, but only where one is required.
536+
537+@if gcc
538+ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty.
539+$(error GNU make version 3.80 or newer is required.)
540+endif
541+@endif gcc
542+
543 # -------------------------------
544 # Standard Autoconf-set variables
545 # -------------------------------
546@@ -136,6 +144,13 @@
547 WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
548 WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
549
550+# These variables must be set on the make command line for directories
551+# built for the build system to override those in BASE_FLAGS_TO_PASSS.
552+EXTRA_BUILD_FLAGS = \
553+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
554+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
555+ LIBCFLAGS=""
556+
557 # This is the list of directories to built for the host system.
558 SUBDIRS = @configdirs@
559 # This is set by the configure script to the arguments to use when configuring
560@@ -150,6 +165,7 @@
561 HOST_EXPORTS = \
562 $(BASE_EXPORTS) \
563 CC="$(CC)"; export CC; \
564+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
565 CFLAGS="$(CFLAGS)"; export CFLAGS; \
566 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
567 CXX="$(CXX)"; export CXX; \
568@@ -204,10 +220,10 @@
569 AR="$(AR_FOR_TARGET)"; export AR; \
570 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
571 CC="$(CC_FOR_TARGET)"; export CC; \
572- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
573+ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
574 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
575 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
576- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
577+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
578 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
579 GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
580 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
581@@ -320,7 +336,6 @@
582 LIBCFLAGS = $(CFLAGS)
583 CXXFLAGS = @CXXFLAGS@
584 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
585-PICFLAG =
586
587 # Only build the C compiler for stage1, because that is the only one that
588 # we can guarantee will build with the native compiler, and also it is the
589@@ -328,14 +343,19 @@
590 # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
591 # overrideable (for a bootstrap build stage1 also builds gcc.info).
592
593-STAGE1_CFLAGS=@stage1_cflags@
594 STAGE1_CHECKING=@stage1_checking@
595 STAGE1_LANGUAGES=@stage1_languages@
596
597+STAGE1_CFLAGS=@stage1_cflags@
598 STAGE2_CFLAGS=$(BOOT_CFLAGS)
599 STAGE3_CFLAGS=$(BOOT_CFLAGS)
600 STAGE4_CFLAGS=$(BOOT_CFLAGS)
601
602+STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
603+STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
604+STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
605+STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
606+
607 do-compare = @do_compare@
608 do-compare3 = $(do-compare)
609 do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
610@@ -374,22 +394,14 @@
611 COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
612 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
613
614-# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
615-# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
616-# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
617-# We want to ensure that TARGET libraries (which we know are built with
618-# gcc) are built with "-O2 -g", so prepend those options when setting
619-# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
620-CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
621- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
622+CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
623+CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
624 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
625 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
626-CXXFLAGS_FOR_TARGET = -O2 -g $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
627- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
628+
629 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
630 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
631-LDFLAGS_FOR_TARGET =
632-PICFLAG_FOR_TARGET =
633+LDFLAGS_FOR_TARGET = @LDFLAGS@
634
635 # ------------------------------------
636 # Miscellaneous targets and flag lists
637@@ -496,6 +508,7 @@
638 "INSTALL_DATA=$(INSTALL_DATA)" \
639 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
640 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
641+ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \
642 "LEX=$(LEX)" \
643 "M4=$(M4)" \
644 "MAKE=$(MAKE)" \
645@@ -592,19 +605,20 @@
646 # Flags to pass down to makes which are built with the target environment.
647 # The double $ decreases the length of the command line; those variables
648 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
649-# COMPILER_ prefixed variables are not passed down so we expand them here.
650+# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
651+# so we expand them here.
652 EXTRA_TARGET_FLAGS = \
653 'AR=$$(AR_FOR_TARGET)' \
654 'AS=$(COMPILER_AS_FOR_TARGET)' \
655 'CC=$$(CC_FOR_TARGET)' \
656- 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
657+ 'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
658 'CXX=$$(CXX_FOR_TARGET)' \
659- 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
660+ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
661 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
662 'LD=$(COMPILER_LD_FOR_TARGET)' \
663 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
664- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
665- 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
666+ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
667+ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
668 'NM=$(COMPILER_NM_FOR_TARGET)' \
669 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
670 'RANLIB=$$(RANLIB_FOR_TARGET)' \
671@@ -2738,7 +2752,8 @@
672 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
673 $(BUILD_EXPORTS) \
674 (cd $(BUILD_SUBDIR)/libiberty && \
675- $(MAKE) $(TARGET-build-libiberty))
676+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
677+ $(TARGET-build-libiberty))
678 @endif build-libiberty
679
680
681@@ -2793,7 +2808,8 @@
682 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
683 $(BUILD_EXPORTS) \
684 (cd $(BUILD_SUBDIR)/bison && \
685- $(MAKE) $(TARGET-build-bison))
686+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
687+ $(TARGET-build-bison))
688 @endif build-bison
689
690
691@@ -2848,7 +2864,8 @@
692 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
693 $(BUILD_EXPORTS) \
694 (cd $(BUILD_SUBDIR)/byacc && \
695- $(MAKE) $(TARGET-build-byacc))
696+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
697+ $(TARGET-build-byacc))
698 @endif build-byacc
699
700
701@@ -2903,7 +2920,8 @@
702 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
703 $(BUILD_EXPORTS) \
704 (cd $(BUILD_SUBDIR)/flex && \
705- $(MAKE) $(TARGET-build-flex))
706+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
707+ $(TARGET-build-flex))
708 @endif build-flex
709
710
711@@ -2958,7 +2976,8 @@
712 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
713 $(BUILD_EXPORTS) \
714 (cd $(BUILD_SUBDIR)/m4 && \
715- $(MAKE) $(TARGET-build-m4))
716+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
717+ $(TARGET-build-m4))
718 @endif build-m4
719
720
721@@ -3013,7 +3032,8 @@
722 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
723 $(BUILD_EXPORTS) \
724 (cd $(BUILD_SUBDIR)/texinfo && \
725- $(MAKE) $(TARGET-build-texinfo))
726+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
727+ $(TARGET-build-texinfo))
728 @endif build-texinfo
729
730
731@@ -3068,7 +3088,8 @@
732 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
733 $(BUILD_EXPORTS) \
734 (cd $(BUILD_SUBDIR)/fixincludes && \
735- $(MAKE) $(TARGET-build-fixincludes))
736+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
737+ $(TARGET-build-fixincludes))
738 @endif build-fixincludes
739
740
741@@ -3127,7 +3148,8 @@
742 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
743 $(HOST_EXPORTS) \
744 (cd $(HOST_SUBDIR)/ash && \
745- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ash))
746+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
747+ $(TARGET-ash))
748 @endif ash
749
750
751@@ -3551,7 +3573,8 @@
752 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
753 $(HOST_EXPORTS) \
754 (cd $(HOST_SUBDIR)/autoconf && \
755- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-autoconf))
756+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
757+ $(TARGET-autoconf))
758 @endif autoconf
759
760
761@@ -3975,7 +3998,8 @@
762 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
763 $(HOST_EXPORTS) \
764 (cd $(HOST_SUBDIR)/automake && \
765- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-automake))
766+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
767+ $(TARGET-automake))
768 @endif automake
769
770
771@@ -4399,7 +4423,8 @@
772 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
773 $(HOST_EXPORTS) \
774 (cd $(HOST_SUBDIR)/bash && \
775- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bash))
776+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
777+ $(TARGET-bash))
778 @endif bash
779
780
781@@ -4816,9 +4841,9 @@
782 @r=`${PWD_COMMAND}`; export r; \
783 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
784 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
785- $(HOST_EXPORTS) \
786+ $(HOST_EXPORTS) \
787 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
788- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
789+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
790 echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \
791 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
792 cd $(HOST_SUBDIR)/bfd || exit 1; \
793@@ -4847,9 +4872,9 @@
794 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
795 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
796 $(HOST_EXPORTS) \
797- $(POSTSTAGE1_HOST_EXPORTS) \
798+ $(POSTSTAGE1_HOST_EXPORTS) \
799 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
800- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
801+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
802 echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \
803 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
804 cd $(HOST_SUBDIR)/bfd || exit 1; \
805@@ -4878,9 +4903,9 @@
806 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
807 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
808 $(HOST_EXPORTS) \
809- $(POSTSTAGE1_HOST_EXPORTS) \
810+ $(POSTSTAGE1_HOST_EXPORTS) \
811 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
812- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
813+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
814 echo Configuring stage b2g0 in $(HOST_SUBDIR)/bfd ; \
815 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
816 cd $(HOST_SUBDIR)/bfd || exit 1; \
817@@ -4909,9 +4934,9 @@
818 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
819 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
820 $(HOST_EXPORTS) \
821- $(POSTSTAGE1_HOST_EXPORTS) \
822+ $(POSTSTAGE1_HOST_EXPORTS) \
823 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
824- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
825+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
826 echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \
827 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
828 cd $(HOST_SUBDIR)/bfd || exit 1; \
829@@ -4940,9 +4965,9 @@
830 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
831 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
832 $(HOST_EXPORTS) \
833- $(POSTSTAGE1_HOST_EXPORTS) \
834+ $(POSTSTAGE1_HOST_EXPORTS) \
835 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
836- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
837+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
838 echo Configuring stage b3g2 in $(HOST_SUBDIR)/bfd ; \
839 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
840 cd $(HOST_SUBDIR)/bfd || exit 1; \
841@@ -4971,9 +4996,9 @@
842 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
843 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
844 $(HOST_EXPORTS) \
845- $(POSTSTAGE1_HOST_EXPORTS) \
846+ $(POSTSTAGE1_HOST_EXPORTS) \
847 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
848- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
849+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
850 echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
851 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
852 cd $(HOST_SUBDIR)/bfd || exit 1; \
853@@ -5002,9 +5027,9 @@
854 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
855 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
856 $(HOST_EXPORTS) \
857- $(POSTSTAGE1_HOST_EXPORTS) \
858+ $(POSTSTAGE1_HOST_EXPORTS) \
859 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
860- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
861+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
862 echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
863 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
864 cd $(HOST_SUBDIR)/bfd || exit 1; \
865@@ -5033,9 +5058,9 @@
866 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
867 test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
868 $(HOST_EXPORTS) \
869- $(POSTSTAGE1_HOST_EXPORTS) \
870+ $(POSTSTAGE1_HOST_EXPORTS) \
871 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
872- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
873+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
874 echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
875 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
876 cd $(HOST_SUBDIR)/bfd || exit 1; \
877@@ -5070,7 +5095,8 @@
878 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
879 $(HOST_EXPORTS) \
880 (cd $(HOST_SUBDIR)/bfd && \
881- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bfd))
882+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
883+ $(TARGET-bfd))
884 @endif bfd
885
886
887@@ -5089,8 +5115,11 @@
888 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
889 $(HOST_EXPORTS) \
890 cd $(HOST_SUBDIR)/bfd && \
891- $(MAKE) $(FLAGS_TO_PASS) \
892- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
893+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
894+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
895+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
896+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
897+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
898 $(TARGET-stage1-bfd)
899
900 maybe-clean-stage1-bfd: clean-stage1-bfd
901@@ -5103,7 +5132,7 @@
902 $(MAKE) stage1-start; \
903 fi; \
904 cd $(HOST_SUBDIR)/bfd && \
905- $(MAKE) $(FLAGS_TO_PASS) \
906+ $(MAKE) $(EXTRA_HOST_FLAGS) \
907 clean
908 @endif bfd-bootstrap
909
910@@ -5123,8 +5152,11 @@
911 $(HOST_EXPORTS) \
912 $(POSTSTAGE1_HOST_EXPORTS) \
913 cd $(HOST_SUBDIR)/bfd && \
914- $(MAKE) $(FLAGS_TO_PASS) \
915- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
916+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
917+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
918+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
919+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
920+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
921 $(TARGET-stage2-bfd)
922
923 maybe-clean-stage2-bfd: clean-stage2-bfd
924@@ -5137,7 +5169,7 @@
925 $(MAKE) stage2-start; \
926 fi; \
927 cd $(HOST_SUBDIR)/bfd && \
928- $(MAKE) $(FLAGS_TO_PASS) \
929+ $(MAKE) $(EXTRA_HOST_FLAGS) \
930 $(POSTSTAGE1_FLAGS_TO_PASS) \
931 clean
932 @endif bfd-bootstrap
933@@ -5158,8 +5190,11 @@
934 $(HOST_EXPORTS) \
935 $(POSTSTAGE1_HOST_EXPORTS) \
936 cd $(HOST_SUBDIR)/bfd && \
937- $(MAKE) $(FLAGS_TO_PASS) \
938- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
939+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
940+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
941+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
942+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
943+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
944 $(TARGET-stageb2g0-bfd)
945
946 maybe-clean-stageb2g0-bfd: clean-stageb2g0-bfd
947@@ -5172,7 +5207,7 @@
948 $(MAKE) stageb2g0-start; \
949 fi; \
950 cd $(HOST_SUBDIR)/bfd && \
951- $(MAKE) $(FLAGS_TO_PASS) \
952+ $(MAKE) $(EXTRA_HOST_FLAGS) \
953 $(POSTSTAGE1_FLAGS_TO_PASS) \
954 clean
955 @endif bfd-bootstrap
956@@ -5193,8 +5228,11 @@
957 $(HOST_EXPORTS) \
958 $(POSTSTAGE1_HOST_EXPORTS) \
959 cd $(HOST_SUBDIR)/bfd && \
960- $(MAKE) $(FLAGS_TO_PASS) \
961- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
962+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
963+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
964+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
965+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
966+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
967 $(TARGET-stage3-bfd)
968
969 maybe-clean-stage3-bfd: clean-stage3-bfd
970@@ -5207,7 +5245,7 @@
971 $(MAKE) stage3-start; \
972 fi; \
973 cd $(HOST_SUBDIR)/bfd && \
974- $(MAKE) $(FLAGS_TO_PASS) \
975+ $(MAKE) $(EXTRA_HOST_FLAGS) \
976 $(POSTSTAGE1_FLAGS_TO_PASS) \
977 clean
978 @endif bfd-bootstrap
979@@ -5228,8 +5266,11 @@
980 $(HOST_EXPORTS) \
981 $(POSTSTAGE1_HOST_EXPORTS) \
982 cd $(HOST_SUBDIR)/bfd && \
983- $(MAKE) $(FLAGS_TO_PASS) \
984- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
985+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
986+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
987+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
988+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
989+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
990 $(TARGET-stageb3g2-bfd)
991
992 maybe-clean-stageb3g2-bfd: clean-stageb3g2-bfd
993@@ -5242,7 +5283,7 @@
994 $(MAKE) stageb3g2-start; \
995 fi; \
996 cd $(HOST_SUBDIR)/bfd && \
997- $(MAKE) $(FLAGS_TO_PASS) \
998+ $(MAKE) $(EXTRA_HOST_FLAGS) \
999 $(POSTSTAGE1_FLAGS_TO_PASS) \
1000 clean
1001 @endif bfd-bootstrap
1002@@ -5263,8 +5304,11 @@
1003 $(HOST_EXPORTS) \
1004 $(POSTSTAGE1_HOST_EXPORTS) \
1005 cd $(HOST_SUBDIR)/bfd && \
1006- $(MAKE) $(FLAGS_TO_PASS) \
1007- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1008+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1009+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
1010+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
1011+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
1012+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1013 $(TARGET-stage4-bfd)
1014
1015 maybe-clean-stage4-bfd: clean-stage4-bfd
1016@@ -5277,7 +5321,7 @@
1017 $(MAKE) stage4-start; \
1018 fi; \
1019 cd $(HOST_SUBDIR)/bfd && \
1020- $(MAKE) $(FLAGS_TO_PASS) \
1021+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1022 $(POSTSTAGE1_FLAGS_TO_PASS) \
1023 clean
1024 @endif bfd-bootstrap
1025@@ -5298,8 +5342,11 @@
1026 $(HOST_EXPORTS) \
1027 $(POSTSTAGE1_HOST_EXPORTS) \
1028 cd $(HOST_SUBDIR)/bfd && \
1029- $(MAKE) $(FLAGS_TO_PASS) \
1030- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
1031+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1032+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
1033+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1034+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1035+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1036 $(TARGET-stageprofile-bfd)
1037
1038 maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
1039@@ -5312,7 +5359,7 @@
1040 $(MAKE) stageprofile-start; \
1041 fi; \
1042 cd $(HOST_SUBDIR)/bfd && \
1043- $(MAKE) $(FLAGS_TO_PASS) \
1044+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1045 $(POSTSTAGE1_FLAGS_TO_PASS) \
1046 clean
1047 @endif bfd-bootstrap
1048@@ -5333,8 +5380,11 @@
1049 $(HOST_EXPORTS) \
1050 $(POSTSTAGE1_HOST_EXPORTS) \
1051 cd $(HOST_SUBDIR)/bfd && \
1052- $(MAKE) $(FLAGS_TO_PASS) \
1053- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
1054+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1055+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
1056+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1057+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1058+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1059 $(TARGET-stagefeedback-bfd)
1060
1061 maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
1062@@ -5347,7 +5397,7 @@
1063 $(MAKE) stagefeedback-start; \
1064 fi; \
1065 cd $(HOST_SUBDIR)/bfd && \
1066- $(MAKE) $(FLAGS_TO_PASS) \
1067+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1068 $(POSTSTAGE1_FLAGS_TO_PASS) \
1069 clean
1070 @endif bfd-bootstrap
1071@@ -5754,9 +5804,9 @@
1072 @r=`${PWD_COMMAND}`; export r; \
1073 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1074 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1075- $(HOST_EXPORTS) \
1076+ $(HOST_EXPORTS) \
1077 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
1078- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
1079+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
1080 echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
1081 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1082 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1083@@ -5785,9 +5835,9 @@
1084 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1085 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1086 $(HOST_EXPORTS) \
1087- $(POSTSTAGE1_HOST_EXPORTS) \
1088+ $(POSTSTAGE1_HOST_EXPORTS) \
1089 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
1090- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
1091+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
1092 echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
1093 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1094 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1095@@ -5816,9 +5866,9 @@
1096 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1097 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1098 $(HOST_EXPORTS) \
1099- $(POSTSTAGE1_HOST_EXPORTS) \
1100+ $(POSTSTAGE1_HOST_EXPORTS) \
1101 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
1102- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
1103+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
1104 echo Configuring stage b2g0 in $(HOST_SUBDIR)/opcodes ; \
1105 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1106 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1107@@ -5847,9 +5897,9 @@
1108 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1109 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1110 $(HOST_EXPORTS) \
1111- $(POSTSTAGE1_HOST_EXPORTS) \
1112+ $(POSTSTAGE1_HOST_EXPORTS) \
1113 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
1114- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
1115+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
1116 echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
1117 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1118 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1119@@ -5878,9 +5928,9 @@
1120 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1121 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1122 $(HOST_EXPORTS) \
1123- $(POSTSTAGE1_HOST_EXPORTS) \
1124+ $(POSTSTAGE1_HOST_EXPORTS) \
1125 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
1126- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
1127+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
1128 echo Configuring stage b3g2 in $(HOST_SUBDIR)/opcodes ; \
1129 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1130 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1131@@ -5909,9 +5959,9 @@
1132 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1133 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1134 $(HOST_EXPORTS) \
1135- $(POSTSTAGE1_HOST_EXPORTS) \
1136+ $(POSTSTAGE1_HOST_EXPORTS) \
1137 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
1138- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
1139+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
1140 echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
1141 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1142 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1143@@ -5940,9 +5990,9 @@
1144 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1145 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1146 $(HOST_EXPORTS) \
1147- $(POSTSTAGE1_HOST_EXPORTS) \
1148+ $(POSTSTAGE1_HOST_EXPORTS) \
1149 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
1150- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
1151+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
1152 echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
1153 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1154 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1155@@ -5971,9 +6021,9 @@
1156 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1157 test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
1158 $(HOST_EXPORTS) \
1159- $(POSTSTAGE1_HOST_EXPORTS) \
1160+ $(POSTSTAGE1_HOST_EXPORTS) \
1161 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
1162- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
1163+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
1164 echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
1165 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
1166 cd $(HOST_SUBDIR)/opcodes || exit 1; \
1167@@ -6008,7 +6058,8 @@
1168 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1169 $(HOST_EXPORTS) \
1170 (cd $(HOST_SUBDIR)/opcodes && \
1171- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-opcodes))
1172+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1173+ $(TARGET-opcodes))
1174 @endif opcodes
1175
1176
1177@@ -6027,8 +6078,11 @@
1178 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1179 $(HOST_EXPORTS) \
1180 cd $(HOST_SUBDIR)/opcodes && \
1181- $(MAKE) $(FLAGS_TO_PASS) \
1182- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
1183+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1184+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
1185+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
1186+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
1187+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
1188 $(TARGET-stage1-opcodes)
1189
1190 maybe-clean-stage1-opcodes: clean-stage1-opcodes
1191@@ -6041,7 +6095,7 @@
1192 $(MAKE) stage1-start; \
1193 fi; \
1194 cd $(HOST_SUBDIR)/opcodes && \
1195- $(MAKE) $(FLAGS_TO_PASS) \
1196+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1197 clean
1198 @endif opcodes-bootstrap
1199
1200@@ -6061,8 +6115,11 @@
1201 $(HOST_EXPORTS) \
1202 $(POSTSTAGE1_HOST_EXPORTS) \
1203 cd $(HOST_SUBDIR)/opcodes && \
1204- $(MAKE) $(FLAGS_TO_PASS) \
1205- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1206+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1207+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
1208+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
1209+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
1210+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1211 $(TARGET-stage2-opcodes)
1212
1213 maybe-clean-stage2-opcodes: clean-stage2-opcodes
1214@@ -6075,7 +6132,7 @@
1215 $(MAKE) stage2-start; \
1216 fi; \
1217 cd $(HOST_SUBDIR)/opcodes && \
1218- $(MAKE) $(FLAGS_TO_PASS) \
1219+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1220 $(POSTSTAGE1_FLAGS_TO_PASS) \
1221 clean
1222 @endif opcodes-bootstrap
1223@@ -6096,8 +6153,11 @@
1224 $(HOST_EXPORTS) \
1225 $(POSTSTAGE1_HOST_EXPORTS) \
1226 cd $(HOST_SUBDIR)/opcodes && \
1227- $(MAKE) $(FLAGS_TO_PASS) \
1228- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
1229+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1230+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
1231+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
1232+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
1233+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1234 $(TARGET-stageb2g0-opcodes)
1235
1236 maybe-clean-stageb2g0-opcodes: clean-stageb2g0-opcodes
1237@@ -6110,7 +6170,7 @@
1238 $(MAKE) stageb2g0-start; \
1239 fi; \
1240 cd $(HOST_SUBDIR)/opcodes && \
1241- $(MAKE) $(FLAGS_TO_PASS) \
1242+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1243 $(POSTSTAGE1_FLAGS_TO_PASS) \
1244 clean
1245 @endif opcodes-bootstrap
1246@@ -6131,8 +6191,11 @@
1247 $(HOST_EXPORTS) \
1248 $(POSTSTAGE1_HOST_EXPORTS) \
1249 cd $(HOST_SUBDIR)/opcodes && \
1250- $(MAKE) $(FLAGS_TO_PASS) \
1251- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1252+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1253+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
1254+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
1255+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
1256+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1257 $(TARGET-stage3-opcodes)
1258
1259 maybe-clean-stage3-opcodes: clean-stage3-opcodes
1260@@ -6145,7 +6208,7 @@
1261 $(MAKE) stage3-start; \
1262 fi; \
1263 cd $(HOST_SUBDIR)/opcodes && \
1264- $(MAKE) $(FLAGS_TO_PASS) \
1265+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1266 $(POSTSTAGE1_FLAGS_TO_PASS) \
1267 clean
1268 @endif opcodes-bootstrap
1269@@ -6166,8 +6229,11 @@
1270 $(HOST_EXPORTS) \
1271 $(POSTSTAGE1_HOST_EXPORTS) \
1272 cd $(HOST_SUBDIR)/opcodes && \
1273- $(MAKE) $(FLAGS_TO_PASS) \
1274- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
1275+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1276+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
1277+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
1278+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
1279+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1280 $(TARGET-stageb3g2-opcodes)
1281
1282 maybe-clean-stageb3g2-opcodes: clean-stageb3g2-opcodes
1283@@ -6180,7 +6246,7 @@
1284 $(MAKE) stageb3g2-start; \
1285 fi; \
1286 cd $(HOST_SUBDIR)/opcodes && \
1287- $(MAKE) $(FLAGS_TO_PASS) \
1288+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1289 $(POSTSTAGE1_FLAGS_TO_PASS) \
1290 clean
1291 @endif opcodes-bootstrap
1292@@ -6201,8 +6267,11 @@
1293 $(HOST_EXPORTS) \
1294 $(POSTSTAGE1_HOST_EXPORTS) \
1295 cd $(HOST_SUBDIR)/opcodes && \
1296- $(MAKE) $(FLAGS_TO_PASS) \
1297- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1298+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1299+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
1300+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
1301+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
1302+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1303 $(TARGET-stage4-opcodes)
1304
1305 maybe-clean-stage4-opcodes: clean-stage4-opcodes
1306@@ -6215,7 +6284,7 @@
1307 $(MAKE) stage4-start; \
1308 fi; \
1309 cd $(HOST_SUBDIR)/opcodes && \
1310- $(MAKE) $(FLAGS_TO_PASS) \
1311+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1312 $(POSTSTAGE1_FLAGS_TO_PASS) \
1313 clean
1314 @endif opcodes-bootstrap
1315@@ -6236,8 +6305,11 @@
1316 $(HOST_EXPORTS) \
1317 $(POSTSTAGE1_HOST_EXPORTS) \
1318 cd $(HOST_SUBDIR)/opcodes && \
1319- $(MAKE) $(FLAGS_TO_PASS) \
1320- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
1321+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1322+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
1323+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1324+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1325+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1326 $(TARGET-stageprofile-opcodes)
1327
1328 maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
1329@@ -6250,7 +6322,7 @@
1330 $(MAKE) stageprofile-start; \
1331 fi; \
1332 cd $(HOST_SUBDIR)/opcodes && \
1333- $(MAKE) $(FLAGS_TO_PASS) \
1334+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1335 $(POSTSTAGE1_FLAGS_TO_PASS) \
1336 clean
1337 @endif opcodes-bootstrap
1338@@ -6271,8 +6343,11 @@
1339 $(HOST_EXPORTS) \
1340 $(POSTSTAGE1_HOST_EXPORTS) \
1341 cd $(HOST_SUBDIR)/opcodes && \
1342- $(MAKE) $(FLAGS_TO_PASS) \
1343- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
1344+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1345+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
1346+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1347+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1348+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1349 $(TARGET-stagefeedback-opcodes)
1350
1351 maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
1352@@ -6285,7 +6360,7 @@
1353 $(MAKE) stagefeedback-start; \
1354 fi; \
1355 cd $(HOST_SUBDIR)/opcodes && \
1356- $(MAKE) $(FLAGS_TO_PASS) \
1357+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1358 $(POSTSTAGE1_FLAGS_TO_PASS) \
1359 clean
1360 @endif opcodes-bootstrap
1361@@ -6692,9 +6767,9 @@
1362 @r=`${PWD_COMMAND}`; export r; \
1363 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1364 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1365- $(HOST_EXPORTS) \
1366+ $(HOST_EXPORTS) \
1367 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
1368- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
1369+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
1370 echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \
1371 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1372 cd $(HOST_SUBDIR)/binutils || exit 1; \
1373@@ -6723,9 +6798,9 @@
1374 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1375 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1376 $(HOST_EXPORTS) \
1377- $(POSTSTAGE1_HOST_EXPORTS) \
1378+ $(POSTSTAGE1_HOST_EXPORTS) \
1379 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
1380- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
1381+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
1382 echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \
1383 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1384 cd $(HOST_SUBDIR)/binutils || exit 1; \
1385@@ -6754,9 +6829,9 @@
1386 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1387 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1388 $(HOST_EXPORTS) \
1389- $(POSTSTAGE1_HOST_EXPORTS) \
1390+ $(POSTSTAGE1_HOST_EXPORTS) \
1391 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
1392- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
1393+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
1394 echo Configuring stage b2g0 in $(HOST_SUBDIR)/binutils ; \
1395 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1396 cd $(HOST_SUBDIR)/binutils || exit 1; \
1397@@ -6785,9 +6860,9 @@
1398 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1399 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1400 $(HOST_EXPORTS) \
1401- $(POSTSTAGE1_HOST_EXPORTS) \
1402+ $(POSTSTAGE1_HOST_EXPORTS) \
1403 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
1404- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
1405+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
1406 echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \
1407 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1408 cd $(HOST_SUBDIR)/binutils || exit 1; \
1409@@ -6816,9 +6891,9 @@
1410 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1411 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1412 $(HOST_EXPORTS) \
1413- $(POSTSTAGE1_HOST_EXPORTS) \
1414+ $(POSTSTAGE1_HOST_EXPORTS) \
1415 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
1416- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
1417+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
1418 echo Configuring stage b3g2 in $(HOST_SUBDIR)/binutils ; \
1419 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1420 cd $(HOST_SUBDIR)/binutils || exit 1; \
1421@@ -6847,9 +6922,9 @@
1422 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1423 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1424 $(HOST_EXPORTS) \
1425- $(POSTSTAGE1_HOST_EXPORTS) \
1426+ $(POSTSTAGE1_HOST_EXPORTS) \
1427 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
1428- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
1429+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
1430 echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \
1431 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1432 cd $(HOST_SUBDIR)/binutils || exit 1; \
1433@@ -6878,9 +6953,9 @@
1434 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1435 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1436 $(HOST_EXPORTS) \
1437- $(POSTSTAGE1_HOST_EXPORTS) \
1438+ $(POSTSTAGE1_HOST_EXPORTS) \
1439 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
1440- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
1441+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
1442 echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \
1443 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1444 cd $(HOST_SUBDIR)/binutils || exit 1; \
1445@@ -6909,9 +6984,9 @@
1446 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1447 test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
1448 $(HOST_EXPORTS) \
1449- $(POSTSTAGE1_HOST_EXPORTS) \
1450+ $(POSTSTAGE1_HOST_EXPORTS) \
1451 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
1452- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
1453+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
1454 echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \
1455 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
1456 cd $(HOST_SUBDIR)/binutils || exit 1; \
1457@@ -6946,7 +7021,8 @@
1458 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1459 $(HOST_EXPORTS) \
1460 (cd $(HOST_SUBDIR)/binutils && \
1461- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-binutils))
1462+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1463+ $(TARGET-binutils))
1464 @endif binutils
1465
1466
1467@@ -6965,8 +7041,11 @@
1468 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1469 $(HOST_EXPORTS) \
1470 cd $(HOST_SUBDIR)/binutils && \
1471- $(MAKE) $(FLAGS_TO_PASS) \
1472- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
1473+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1474+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
1475+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
1476+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
1477+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
1478 $(TARGET-stage1-binutils)
1479
1480 maybe-clean-stage1-binutils: clean-stage1-binutils
1481@@ -6979,7 +7058,7 @@
1482 $(MAKE) stage1-start; \
1483 fi; \
1484 cd $(HOST_SUBDIR)/binutils && \
1485- $(MAKE) $(FLAGS_TO_PASS) \
1486+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1487 clean
1488 @endif binutils-bootstrap
1489
1490@@ -6999,8 +7078,11 @@
1491 $(HOST_EXPORTS) \
1492 $(POSTSTAGE1_HOST_EXPORTS) \
1493 cd $(HOST_SUBDIR)/binutils && \
1494- $(MAKE) $(FLAGS_TO_PASS) \
1495- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1496+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1497+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
1498+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
1499+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
1500+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1501 $(TARGET-stage2-binutils)
1502
1503 maybe-clean-stage2-binutils: clean-stage2-binutils
1504@@ -7013,7 +7095,7 @@
1505 $(MAKE) stage2-start; \
1506 fi; \
1507 cd $(HOST_SUBDIR)/binutils && \
1508- $(MAKE) $(FLAGS_TO_PASS) \
1509+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1510 $(POSTSTAGE1_FLAGS_TO_PASS) \
1511 clean
1512 @endif binutils-bootstrap
1513@@ -7034,8 +7116,11 @@
1514 $(HOST_EXPORTS) \
1515 $(POSTSTAGE1_HOST_EXPORTS) \
1516 cd $(HOST_SUBDIR)/binutils && \
1517- $(MAKE) $(FLAGS_TO_PASS) \
1518- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
1519+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1520+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
1521+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
1522+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
1523+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1524 $(TARGET-stageb2g0-binutils)
1525
1526 maybe-clean-stageb2g0-binutils: clean-stageb2g0-binutils
1527@@ -7048,7 +7133,7 @@
1528 $(MAKE) stageb2g0-start; \
1529 fi; \
1530 cd $(HOST_SUBDIR)/binutils && \
1531- $(MAKE) $(FLAGS_TO_PASS) \
1532+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1533 $(POSTSTAGE1_FLAGS_TO_PASS) \
1534 clean
1535 @endif binutils-bootstrap
1536@@ -7069,8 +7154,11 @@
1537 $(HOST_EXPORTS) \
1538 $(POSTSTAGE1_HOST_EXPORTS) \
1539 cd $(HOST_SUBDIR)/binutils && \
1540- $(MAKE) $(FLAGS_TO_PASS) \
1541- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1542+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1543+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
1544+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
1545+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
1546+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1547 $(TARGET-stage3-binutils)
1548
1549 maybe-clean-stage3-binutils: clean-stage3-binutils
1550@@ -7083,7 +7171,7 @@
1551 $(MAKE) stage3-start; \
1552 fi; \
1553 cd $(HOST_SUBDIR)/binutils && \
1554- $(MAKE) $(FLAGS_TO_PASS) \
1555+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1556 $(POSTSTAGE1_FLAGS_TO_PASS) \
1557 clean
1558 @endif binutils-bootstrap
1559@@ -7104,8 +7192,11 @@
1560 $(HOST_EXPORTS) \
1561 $(POSTSTAGE1_HOST_EXPORTS) \
1562 cd $(HOST_SUBDIR)/binutils && \
1563- $(MAKE) $(FLAGS_TO_PASS) \
1564- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
1565+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1566+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
1567+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
1568+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
1569+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1570 $(TARGET-stageb3g2-binutils)
1571
1572 maybe-clean-stageb3g2-binutils: clean-stageb3g2-binutils
1573@@ -7118,7 +7209,7 @@
1574 $(MAKE) stageb3g2-start; \
1575 fi; \
1576 cd $(HOST_SUBDIR)/binutils && \
1577- $(MAKE) $(FLAGS_TO_PASS) \
1578+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1579 $(POSTSTAGE1_FLAGS_TO_PASS) \
1580 clean
1581 @endif binutils-bootstrap
1582@@ -7139,8 +7230,11 @@
1583 $(HOST_EXPORTS) \
1584 $(POSTSTAGE1_HOST_EXPORTS) \
1585 cd $(HOST_SUBDIR)/binutils && \
1586- $(MAKE) $(FLAGS_TO_PASS) \
1587- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1588+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1589+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
1590+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
1591+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
1592+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1593 $(TARGET-stage4-binutils)
1594
1595 maybe-clean-stage4-binutils: clean-stage4-binutils
1596@@ -7153,7 +7247,7 @@
1597 $(MAKE) stage4-start; \
1598 fi; \
1599 cd $(HOST_SUBDIR)/binutils && \
1600- $(MAKE) $(FLAGS_TO_PASS) \
1601+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1602 $(POSTSTAGE1_FLAGS_TO_PASS) \
1603 clean
1604 @endif binutils-bootstrap
1605@@ -7174,8 +7268,11 @@
1606 $(HOST_EXPORTS) \
1607 $(POSTSTAGE1_HOST_EXPORTS) \
1608 cd $(HOST_SUBDIR)/binutils && \
1609- $(MAKE) $(FLAGS_TO_PASS) \
1610- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
1611+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1612+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
1613+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1614+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
1615+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1616 $(TARGET-stageprofile-binutils)
1617
1618 maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
1619@@ -7188,7 +7285,7 @@
1620 $(MAKE) stageprofile-start; \
1621 fi; \
1622 cd $(HOST_SUBDIR)/binutils && \
1623- $(MAKE) $(FLAGS_TO_PASS) \
1624+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1625 $(POSTSTAGE1_FLAGS_TO_PASS) \
1626 clean
1627 @endif binutils-bootstrap
1628@@ -7209,8 +7306,11 @@
1629 $(HOST_EXPORTS) \
1630 $(POSTSTAGE1_HOST_EXPORTS) \
1631 cd $(HOST_SUBDIR)/binutils && \
1632- $(MAKE) $(FLAGS_TO_PASS) \
1633- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
1634+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1635+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
1636+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1637+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
1638+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1639 $(TARGET-stagefeedback-binutils)
1640
1641 maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
1642@@ -7223,7 +7323,7 @@
1643 $(MAKE) stagefeedback-start; \
1644 fi; \
1645 cd $(HOST_SUBDIR)/binutils && \
1646- $(MAKE) $(FLAGS_TO_PASS) \
1647+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1648 $(POSTSTAGE1_FLAGS_TO_PASS) \
1649 clean
1650 @endif binutils-bootstrap
1651@@ -7637,7 +7737,8 @@
1652 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1653 $(HOST_EXPORTS) \
1654 (cd $(HOST_SUBDIR)/bison && \
1655- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bison))
1656+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1657+ $(TARGET-bison))
1658 @endif bison
1659
1660
1661@@ -8064,7 +8165,8 @@
1662 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1663 $(HOST_EXPORTS) \
1664 (cd $(HOST_SUBDIR)/byacc && \
1665- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-byacc))
1666+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1667+ $(TARGET-byacc))
1668 @endif byacc
1669
1670
1671@@ -8491,7 +8593,8 @@
1672 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1673 $(HOST_EXPORTS) \
1674 (cd $(HOST_SUBDIR)/bzip2 && \
1675- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bzip2))
1676+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1677+ $(TARGET-bzip2))
1678 @endif bzip2
1679
1680
1681@@ -8915,7 +9018,8 @@
1682 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1683 $(HOST_EXPORTS) \
1684 (cd $(HOST_SUBDIR)/dejagnu && \
1685- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dejagnu))
1686+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1687+ $(TARGET-dejagnu))
1688 @endif dejagnu
1689
1690
1691@@ -9339,7 +9443,8 @@
1692 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1693 $(HOST_EXPORTS) \
1694 (cd $(HOST_SUBDIR)/diff && \
1695- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-diff))
1696+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1697+ $(TARGET-diff))
1698 @endif diff
1699
1700
1701@@ -9763,7 +9868,8 @@
1702 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1703 $(HOST_EXPORTS) \
1704 (cd $(HOST_SUBDIR)/dosutils && \
1705- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dosutils))
1706+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1707+ $(TARGET-dosutils))
1708 @endif dosutils
1709
1710
1711@@ -10181,7 +10287,8 @@
1712 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1713 $(HOST_EXPORTS) \
1714 (cd $(HOST_SUBDIR)/etc && \
1715- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-etc))
1716+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1717+ $(TARGET-etc))
1718 @endif etc
1719
1720
1721@@ -10605,7 +10712,8 @@
1722 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1723 $(HOST_EXPORTS) \
1724 (cd $(HOST_SUBDIR)/fastjar && \
1725- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fastjar))
1726+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1727+ $(TARGET-fastjar))
1728 @endif fastjar
1729
1730
1731@@ -11032,7 +11140,8 @@
1732 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1733 $(HOST_EXPORTS) \
1734 (cd $(HOST_SUBDIR)/fileutils && \
1735- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fileutils))
1736+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1737+ $(TARGET-fileutils))
1738 @endif fileutils
1739
1740
1741@@ -11456,7 +11565,8 @@
1742 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1743 $(HOST_EXPORTS) \
1744 (cd $(HOST_SUBDIR)/findutils && \
1745- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-findutils))
1746+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1747+ $(TARGET-findutils))
1748 @endif findutils
1749
1750
1751@@ -11880,7 +11990,8 @@
1752 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1753 $(HOST_EXPORTS) \
1754 (cd $(HOST_SUBDIR)/find && \
1755- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-find))
1756+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1757+ $(TARGET-find))
1758 @endif find
1759
1760
1761@@ -12304,7 +12415,8 @@
1762 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1763 $(HOST_EXPORTS) \
1764 (cd $(HOST_SUBDIR)/fixincludes && \
1765- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fixincludes))
1766+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1767+ $(TARGET-fixincludes))
1768 @endif fixincludes
1769
1770
1771@@ -12712,7 +12824,8 @@
1772 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1773 $(HOST_EXPORTS) \
1774 (cd $(HOST_SUBDIR)/flex && \
1775- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-flex))
1776+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1777+ $(TARGET-flex))
1778 @endif flex
1779
1780
1781@@ -13132,9 +13245,9 @@
1782 @r=`${PWD_COMMAND}`; export r; \
1783 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1784 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1785- $(HOST_EXPORTS) \
1786+ $(HOST_EXPORTS) \
1787 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
1788- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
1789+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
1790 echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \
1791 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1792 cd $(HOST_SUBDIR)/gas || exit 1; \
1793@@ -13163,9 +13276,9 @@
1794 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1795 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1796 $(HOST_EXPORTS) \
1797- $(POSTSTAGE1_HOST_EXPORTS) \
1798+ $(POSTSTAGE1_HOST_EXPORTS) \
1799 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
1800- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
1801+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
1802 echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \
1803 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1804 cd $(HOST_SUBDIR)/gas || exit 1; \
1805@@ -13194,9 +13307,9 @@
1806 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1807 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1808 $(HOST_EXPORTS) \
1809- $(POSTSTAGE1_HOST_EXPORTS) \
1810+ $(POSTSTAGE1_HOST_EXPORTS) \
1811 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
1812- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
1813+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
1814 echo Configuring stage b2g0 in $(HOST_SUBDIR)/gas ; \
1815 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1816 cd $(HOST_SUBDIR)/gas || exit 1; \
1817@@ -13225,9 +13338,9 @@
1818 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1819 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1820 $(HOST_EXPORTS) \
1821- $(POSTSTAGE1_HOST_EXPORTS) \
1822+ $(POSTSTAGE1_HOST_EXPORTS) \
1823 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
1824- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
1825+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
1826 echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \
1827 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1828 cd $(HOST_SUBDIR)/gas || exit 1; \
1829@@ -13256,9 +13369,9 @@
1830 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1831 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1832 $(HOST_EXPORTS) \
1833- $(POSTSTAGE1_HOST_EXPORTS) \
1834+ $(POSTSTAGE1_HOST_EXPORTS) \
1835 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
1836- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
1837+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
1838 echo Configuring stage b3g2 in $(HOST_SUBDIR)/gas ; \
1839 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1840 cd $(HOST_SUBDIR)/gas || exit 1; \
1841@@ -13287,9 +13400,9 @@
1842 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1843 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1844 $(HOST_EXPORTS) \
1845- $(POSTSTAGE1_HOST_EXPORTS) \
1846+ $(POSTSTAGE1_HOST_EXPORTS) \
1847 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
1848- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
1849+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
1850 echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \
1851 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1852 cd $(HOST_SUBDIR)/gas || exit 1; \
1853@@ -13318,9 +13431,9 @@
1854 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1855 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1856 $(HOST_EXPORTS) \
1857- $(POSTSTAGE1_HOST_EXPORTS) \
1858+ $(POSTSTAGE1_HOST_EXPORTS) \
1859 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
1860- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
1861+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
1862 echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \
1863 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1864 cd $(HOST_SUBDIR)/gas || exit 1; \
1865@@ -13349,9 +13462,9 @@
1866 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1867 test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
1868 $(HOST_EXPORTS) \
1869- $(POSTSTAGE1_HOST_EXPORTS) \
1870+ $(POSTSTAGE1_HOST_EXPORTS) \
1871 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
1872- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
1873+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
1874 echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \
1875 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
1876 cd $(HOST_SUBDIR)/gas || exit 1; \
1877@@ -13386,7 +13499,8 @@
1878 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1879 $(HOST_EXPORTS) \
1880 (cd $(HOST_SUBDIR)/gas && \
1881- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gas))
1882+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
1883+ $(TARGET-gas))
1884 @endif gas
1885
1886
1887@@ -13405,8 +13519,11 @@
1888 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1889 $(HOST_EXPORTS) \
1890 cd $(HOST_SUBDIR)/gas && \
1891- $(MAKE) $(FLAGS_TO_PASS) \
1892- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
1893+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1894+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
1895+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
1896+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
1897+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
1898 $(TARGET-stage1-gas)
1899
1900 maybe-clean-stage1-gas: clean-stage1-gas
1901@@ -13419,7 +13536,7 @@
1902 $(MAKE) stage1-start; \
1903 fi; \
1904 cd $(HOST_SUBDIR)/gas && \
1905- $(MAKE) $(FLAGS_TO_PASS) \
1906+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1907 clean
1908 @endif gas-bootstrap
1909
1910@@ -13439,8 +13556,11 @@
1911 $(HOST_EXPORTS) \
1912 $(POSTSTAGE1_HOST_EXPORTS) \
1913 cd $(HOST_SUBDIR)/gas && \
1914- $(MAKE) $(FLAGS_TO_PASS) \
1915- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1916+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1917+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
1918+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
1919+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
1920+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1921 $(TARGET-stage2-gas)
1922
1923 maybe-clean-stage2-gas: clean-stage2-gas
1924@@ -13453,7 +13573,7 @@
1925 $(MAKE) stage2-start; \
1926 fi; \
1927 cd $(HOST_SUBDIR)/gas && \
1928- $(MAKE) $(FLAGS_TO_PASS) \
1929+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1930 $(POSTSTAGE1_FLAGS_TO_PASS) \
1931 clean
1932 @endif gas-bootstrap
1933@@ -13474,8 +13594,11 @@
1934 $(HOST_EXPORTS) \
1935 $(POSTSTAGE1_HOST_EXPORTS) \
1936 cd $(HOST_SUBDIR)/gas && \
1937- $(MAKE) $(FLAGS_TO_PASS) \
1938- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
1939+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1940+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
1941+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
1942+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
1943+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1944 $(TARGET-stageb2g0-gas)
1945
1946 maybe-clean-stageb2g0-gas: clean-stageb2g0-gas
1947@@ -13488,7 +13611,7 @@
1948 $(MAKE) stageb2g0-start; \
1949 fi; \
1950 cd $(HOST_SUBDIR)/gas && \
1951- $(MAKE) $(FLAGS_TO_PASS) \
1952+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1953 $(POSTSTAGE1_FLAGS_TO_PASS) \
1954 clean
1955 @endif gas-bootstrap
1956@@ -13509,8 +13632,11 @@
1957 $(HOST_EXPORTS) \
1958 $(POSTSTAGE1_HOST_EXPORTS) \
1959 cd $(HOST_SUBDIR)/gas && \
1960- $(MAKE) $(FLAGS_TO_PASS) \
1961- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
1962+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1963+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
1964+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
1965+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
1966+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1967 $(TARGET-stage3-gas)
1968
1969 maybe-clean-stage3-gas: clean-stage3-gas
1970@@ -13523,7 +13649,7 @@
1971 $(MAKE) stage3-start; \
1972 fi; \
1973 cd $(HOST_SUBDIR)/gas && \
1974- $(MAKE) $(FLAGS_TO_PASS) \
1975+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1976 $(POSTSTAGE1_FLAGS_TO_PASS) \
1977 clean
1978 @endif gas-bootstrap
1979@@ -13544,8 +13670,11 @@
1980 $(HOST_EXPORTS) \
1981 $(POSTSTAGE1_HOST_EXPORTS) \
1982 cd $(HOST_SUBDIR)/gas && \
1983- $(MAKE) $(FLAGS_TO_PASS) \
1984- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
1985+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
1986+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
1987+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
1988+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
1989+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
1990 $(TARGET-stageb3g2-gas)
1991
1992 maybe-clean-stageb3g2-gas: clean-stageb3g2-gas
1993@@ -13558,7 +13687,7 @@
1994 $(MAKE) stageb3g2-start; \
1995 fi; \
1996 cd $(HOST_SUBDIR)/gas && \
1997- $(MAKE) $(FLAGS_TO_PASS) \
1998+ $(MAKE) $(EXTRA_HOST_FLAGS) \
1999 $(POSTSTAGE1_FLAGS_TO_PASS) \
2000 clean
2001 @endif gas-bootstrap
2002@@ -13579,8 +13708,11 @@
2003 $(HOST_EXPORTS) \
2004 $(POSTSTAGE1_HOST_EXPORTS) \
2005 cd $(HOST_SUBDIR)/gas && \
2006- $(MAKE) $(FLAGS_TO_PASS) \
2007- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2008+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2009+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
2010+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
2011+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
2012+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2013 $(TARGET-stage4-gas)
2014
2015 maybe-clean-stage4-gas: clean-stage4-gas
2016@@ -13593,7 +13725,7 @@
2017 $(MAKE) stage4-start; \
2018 fi; \
2019 cd $(HOST_SUBDIR)/gas && \
2020- $(MAKE) $(FLAGS_TO_PASS) \
2021+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2022 $(POSTSTAGE1_FLAGS_TO_PASS) \
2023 clean
2024 @endif gas-bootstrap
2025@@ -13614,8 +13746,11 @@
2026 $(HOST_EXPORTS) \
2027 $(POSTSTAGE1_HOST_EXPORTS) \
2028 cd $(HOST_SUBDIR)/gas && \
2029- $(MAKE) $(FLAGS_TO_PASS) \
2030- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
2031+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2032+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
2033+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2034+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2035+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2036 $(TARGET-stageprofile-gas)
2037
2038 maybe-clean-stageprofile-gas: clean-stageprofile-gas
2039@@ -13628,7 +13763,7 @@
2040 $(MAKE) stageprofile-start; \
2041 fi; \
2042 cd $(HOST_SUBDIR)/gas && \
2043- $(MAKE) $(FLAGS_TO_PASS) \
2044+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2045 $(POSTSTAGE1_FLAGS_TO_PASS) \
2046 clean
2047 @endif gas-bootstrap
2048@@ -13649,8 +13784,11 @@
2049 $(HOST_EXPORTS) \
2050 $(POSTSTAGE1_HOST_EXPORTS) \
2051 cd $(HOST_SUBDIR)/gas && \
2052- $(MAKE) $(FLAGS_TO_PASS) \
2053- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
2054+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2055+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
2056+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2057+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2058+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2059 $(TARGET-stagefeedback-gas)
2060
2061 maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
2062@@ -13663,7 +13801,7 @@
2063 $(MAKE) stagefeedback-start; \
2064 fi; \
2065 cd $(HOST_SUBDIR)/gas && \
2066- $(MAKE) $(FLAGS_TO_PASS) \
2067+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2068 $(POSTSTAGE1_FLAGS_TO_PASS) \
2069 clean
2070 @endif gas-bootstrap
2071@@ -14070,9 +14208,9 @@
2072 @r=`${PWD_COMMAND}`; export r; \
2073 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2074 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2075- $(HOST_EXPORTS) \
2076+ $(HOST_EXPORTS) \
2077 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
2078- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
2079+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
2080 echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \
2081 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2082 cd $(HOST_SUBDIR)/gcc || exit 1; \
2083@@ -14101,9 +14239,9 @@
2084 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2085 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2086 $(HOST_EXPORTS) \
2087- $(POSTSTAGE1_HOST_EXPORTS) \
2088+ $(POSTSTAGE1_HOST_EXPORTS) \
2089 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
2090- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
2091+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
2092 echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \
2093 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2094 cd $(HOST_SUBDIR)/gcc || exit 1; \
2095@@ -14132,9 +14270,9 @@
2096 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2097 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2098 $(HOST_EXPORTS) \
2099- $(POSTSTAGE1_HOST_EXPORTS) \
2100+ $(POSTSTAGE1_HOST_EXPORTS) \
2101 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
2102- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
2103+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
2104 echo Configuring stage b2g0 in $(HOST_SUBDIR)/gcc ; \
2105 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2106 cd $(HOST_SUBDIR)/gcc || exit 1; \
2107@@ -14163,9 +14301,9 @@
2108 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2109 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2110 $(HOST_EXPORTS) \
2111- $(POSTSTAGE1_HOST_EXPORTS) \
2112+ $(POSTSTAGE1_HOST_EXPORTS) \
2113 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
2114- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
2115+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
2116 echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \
2117 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2118 cd $(HOST_SUBDIR)/gcc || exit 1; \
2119@@ -14194,9 +14332,9 @@
2120 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2121 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2122 $(HOST_EXPORTS) \
2123- $(POSTSTAGE1_HOST_EXPORTS) \
2124+ $(POSTSTAGE1_HOST_EXPORTS) \
2125 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
2126- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
2127+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
2128 echo Configuring stage b3g2 in $(HOST_SUBDIR)/gcc ; \
2129 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2130 cd $(HOST_SUBDIR)/gcc || exit 1; \
2131@@ -14225,9 +14363,9 @@
2132 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2133 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2134 $(HOST_EXPORTS) \
2135- $(POSTSTAGE1_HOST_EXPORTS) \
2136+ $(POSTSTAGE1_HOST_EXPORTS) \
2137 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
2138- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
2139+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
2140 echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \
2141 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2142 cd $(HOST_SUBDIR)/gcc || exit 1; \
2143@@ -14256,9 +14394,9 @@
2144 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2145 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2146 $(HOST_EXPORTS) \
2147- $(POSTSTAGE1_HOST_EXPORTS) \
2148+ $(POSTSTAGE1_HOST_EXPORTS) \
2149 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
2150- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
2151+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
2152 echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \
2153 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2154 cd $(HOST_SUBDIR)/gcc || exit 1; \
2155@@ -14287,9 +14425,9 @@
2156 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2157 test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
2158 $(HOST_EXPORTS) \
2159- $(POSTSTAGE1_HOST_EXPORTS) \
2160+ $(POSTSTAGE1_HOST_EXPORTS) \
2161 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
2162- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
2163+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
2164 echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \
2165 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
2166 cd $(HOST_SUBDIR)/gcc || exit 1; \
2167@@ -14324,7 +14462,8 @@
2168 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2169 $(HOST_EXPORTS) \
2170 (cd $(HOST_SUBDIR)/gcc && \
2171- $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(TARGET-gcc))
2172+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
2173+ $(TARGET-gcc))
2174 @endif gcc
2175
2176
2177@@ -14343,8 +14482,11 @@
2178 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2179 $(HOST_EXPORTS) \
2180 cd $(HOST_SUBDIR)/gcc && \
2181- $(MAKE) $(FLAGS_TO_PASS) \
2182- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) \
2183+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2184+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
2185+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
2186+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
2187+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
2188 $(TARGET-stage1-gcc)
2189
2190 maybe-clean-stage1-gcc: clean-stage1-gcc
2191@@ -14357,7 +14499,7 @@
2192 $(MAKE) stage1-start; \
2193 fi; \
2194 cd $(HOST_SUBDIR)/gcc && \
2195- $(MAKE) $(FLAGS_TO_PASS) \
2196+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2197 $(EXTRA_GCC_FLAGS) clean
2198 @endif gcc-bootstrap
2199
2200@@ -14377,8 +14519,11 @@
2201 $(HOST_EXPORTS) \
2202 $(POSTSTAGE1_HOST_EXPORTS) \
2203 cd $(HOST_SUBDIR)/gcc && \
2204- $(MAKE) $(FLAGS_TO_PASS) \
2205- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2206+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2207+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
2208+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
2209+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
2210+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2211 $(TARGET-stage2-gcc)
2212
2213 maybe-clean-stage2-gcc: clean-stage2-gcc
2214@@ -14391,7 +14536,7 @@
2215 $(MAKE) stage2-start; \
2216 fi; \
2217 cd $(HOST_SUBDIR)/gcc && \
2218- $(MAKE) $(FLAGS_TO_PASS) \
2219+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2220 $(POSTSTAGE1_FLAGS_TO_PASS) \
2221 $(EXTRA_GCC_FLAGS) clean
2222 @endif gcc-bootstrap
2223@@ -14412,8 +14557,11 @@
2224 $(HOST_EXPORTS) \
2225 $(POSTSTAGE1_HOST_EXPORTS) \
2226 cd $(HOST_SUBDIR)/gcc && \
2227- $(MAKE) $(FLAGS_TO_PASS) \
2228- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2229+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2230+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
2231+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
2232+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
2233+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2234 $(TARGET-stageb2g0-gcc)
2235
2236 maybe-clean-stageb2g0-gcc: clean-stageb2g0-gcc
2237@@ -14426,7 +14574,7 @@
2238 $(MAKE) stageb2g0-start; \
2239 fi; \
2240 cd $(HOST_SUBDIR)/gcc && \
2241- $(MAKE) $(FLAGS_TO_PASS) \
2242+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2243 $(POSTSTAGE1_FLAGS_TO_PASS) \
2244 $(EXTRA_GCC_FLAGS) clean
2245 @endif gcc-bootstrap
2246@@ -14447,8 +14595,11 @@
2247 $(HOST_EXPORTS) \
2248 $(POSTSTAGE1_HOST_EXPORTS) \
2249 cd $(HOST_SUBDIR)/gcc && \
2250- $(MAKE) $(FLAGS_TO_PASS) \
2251- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2252+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2253+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
2254+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
2255+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
2256+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2257 $(TARGET-stage3-gcc)
2258
2259 maybe-clean-stage3-gcc: clean-stage3-gcc
2260@@ -14461,7 +14612,7 @@
2261 $(MAKE) stage3-start; \
2262 fi; \
2263 cd $(HOST_SUBDIR)/gcc && \
2264- $(MAKE) $(FLAGS_TO_PASS) \
2265+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2266 $(POSTSTAGE1_FLAGS_TO_PASS) \
2267 $(EXTRA_GCC_FLAGS) clean
2268 @endif gcc-bootstrap
2269@@ -14482,8 +14633,11 @@
2270 $(HOST_EXPORTS) \
2271 $(POSTSTAGE1_HOST_EXPORTS) \
2272 cd $(HOST_SUBDIR)/gcc && \
2273- $(MAKE) $(FLAGS_TO_PASS) \
2274- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2275+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2276+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
2277+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
2278+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
2279+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2280 $(TARGET-stageb3g2-gcc)
2281
2282 maybe-clean-stageb3g2-gcc: clean-stageb3g2-gcc
2283@@ -14496,7 +14650,7 @@
2284 $(MAKE) stageb3g2-start; \
2285 fi; \
2286 cd $(HOST_SUBDIR)/gcc && \
2287- $(MAKE) $(FLAGS_TO_PASS) \
2288+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2289 $(POSTSTAGE1_FLAGS_TO_PASS) \
2290 $(EXTRA_GCC_FLAGS) clean
2291 @endif gcc-bootstrap
2292@@ -14517,8 +14671,11 @@
2293 $(HOST_EXPORTS) \
2294 $(POSTSTAGE1_HOST_EXPORTS) \
2295 cd $(HOST_SUBDIR)/gcc && \
2296- $(MAKE) $(FLAGS_TO_PASS) \
2297- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2298+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2299+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
2300+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
2301+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
2302+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2303 $(TARGET-stage4-gcc)
2304
2305 maybe-clean-stage4-gcc: clean-stage4-gcc
2306@@ -14531,7 +14688,7 @@
2307 $(MAKE) stage4-start; \
2308 fi; \
2309 cd $(HOST_SUBDIR)/gcc && \
2310- $(MAKE) $(FLAGS_TO_PASS) \
2311+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2312 $(POSTSTAGE1_FLAGS_TO_PASS) \
2313 $(EXTRA_GCC_FLAGS) clean
2314 @endif gcc-bootstrap
2315@@ -14552,8 +14709,11 @@
2316 $(HOST_EXPORTS) \
2317 $(POSTSTAGE1_HOST_EXPORTS) \
2318 cd $(HOST_SUBDIR)/gcc && \
2319- $(MAKE) $(FLAGS_TO_PASS) \
2320- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2321+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2322+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
2323+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2324+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2325+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2326 $(TARGET-stageprofile-gcc)
2327
2328 maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
2329@@ -14566,7 +14726,7 @@
2330 $(MAKE) stageprofile-start; \
2331 fi; \
2332 cd $(HOST_SUBDIR)/gcc && \
2333- $(MAKE) $(FLAGS_TO_PASS) \
2334+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2335 $(POSTSTAGE1_FLAGS_TO_PASS) \
2336 $(EXTRA_GCC_FLAGS) clean
2337 @endif gcc-bootstrap
2338@@ -14587,8 +14747,11 @@
2339 $(HOST_EXPORTS) \
2340 $(POSTSTAGE1_HOST_EXPORTS) \
2341 cd $(HOST_SUBDIR)/gcc && \
2342- $(MAKE) $(FLAGS_TO_PASS) \
2343- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2344+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2345+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
2346+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2347+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2348+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
2349 $(TARGET-stagefeedback-gcc)
2350
2351 maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
2352@@ -14601,7 +14764,7 @@
2353 $(MAKE) stagefeedback-start; \
2354 fi; \
2355 cd $(HOST_SUBDIR)/gcc && \
2356- $(MAKE) $(FLAGS_TO_PASS) \
2357+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2358 $(POSTSTAGE1_FLAGS_TO_PASS) \
2359 $(EXTRA_GCC_FLAGS) clean
2360 @endif gcc-bootstrap
2361@@ -15015,7 +15178,8 @@
2362 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2363 $(HOST_EXPORTS) \
2364 (cd $(HOST_SUBDIR)/gawk && \
2365- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gawk))
2366+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2367+ $(TARGET-gawk))
2368 @endif gawk
2369
2370
2371@@ -15439,7 +15603,8 @@
2372 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2373 $(HOST_EXPORTS) \
2374 (cd $(HOST_SUBDIR)/gettext && \
2375- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gettext))
2376+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2377+ $(TARGET-gettext))
2378 @endif gettext
2379
2380
2381@@ -15856,9 +16021,9 @@
2382 @r=`${PWD_COMMAND}`; export r; \
2383 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2384 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2385- $(HOST_EXPORTS) \
2386+ $(HOST_EXPORTS) \
2387 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
2388- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
2389+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
2390 echo Configuring stage 1 in $(HOST_SUBDIR)/gmp ; \
2391 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2392 cd $(HOST_SUBDIR)/gmp || exit 1; \
2393@@ -15887,9 +16052,9 @@
2394 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2395 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2396 $(HOST_EXPORTS) \
2397- $(POSTSTAGE1_HOST_EXPORTS) \
2398+ $(POSTSTAGE1_HOST_EXPORTS) \
2399 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
2400- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
2401+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
2402 echo Configuring stage 2 in $(HOST_SUBDIR)/gmp ; \
2403 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2404 cd $(HOST_SUBDIR)/gmp || exit 1; \
2405@@ -15918,9 +16083,9 @@
2406 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2407 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2408 $(HOST_EXPORTS) \
2409- $(POSTSTAGE1_HOST_EXPORTS) \
2410+ $(POSTSTAGE1_HOST_EXPORTS) \
2411 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
2412- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
2413+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
2414 echo Configuring stage b2g0 in $(HOST_SUBDIR)/gmp ; \
2415 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2416 cd $(HOST_SUBDIR)/gmp || exit 1; \
2417@@ -15949,9 +16114,9 @@
2418 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2419 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2420 $(HOST_EXPORTS) \
2421- $(POSTSTAGE1_HOST_EXPORTS) \
2422+ $(POSTSTAGE1_HOST_EXPORTS) \
2423 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
2424- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
2425+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
2426 echo Configuring stage 3 in $(HOST_SUBDIR)/gmp ; \
2427 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2428 cd $(HOST_SUBDIR)/gmp || exit 1; \
2429@@ -15980,9 +16145,9 @@
2430 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2431 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2432 $(HOST_EXPORTS) \
2433- $(POSTSTAGE1_HOST_EXPORTS) \
2434+ $(POSTSTAGE1_HOST_EXPORTS) \
2435 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
2436- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
2437+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
2438 echo Configuring stage b3g2 in $(HOST_SUBDIR)/gmp ; \
2439 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2440 cd $(HOST_SUBDIR)/gmp || exit 1; \
2441@@ -16011,9 +16176,9 @@
2442 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2443 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2444 $(HOST_EXPORTS) \
2445- $(POSTSTAGE1_HOST_EXPORTS) \
2446+ $(POSTSTAGE1_HOST_EXPORTS) \
2447 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
2448- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
2449+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
2450 echo Configuring stage 4 in $(HOST_SUBDIR)/gmp ; \
2451 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2452 cd $(HOST_SUBDIR)/gmp || exit 1; \
2453@@ -16042,9 +16207,9 @@
2454 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2455 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2456 $(HOST_EXPORTS) \
2457- $(POSTSTAGE1_HOST_EXPORTS) \
2458+ $(POSTSTAGE1_HOST_EXPORTS) \
2459 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
2460- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
2461+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
2462 echo Configuring stage profile in $(HOST_SUBDIR)/gmp ; \
2463 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2464 cd $(HOST_SUBDIR)/gmp || exit 1; \
2465@@ -16073,9 +16238,9 @@
2466 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2467 test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
2468 $(HOST_EXPORTS) \
2469- $(POSTSTAGE1_HOST_EXPORTS) \
2470+ $(POSTSTAGE1_HOST_EXPORTS) \
2471 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
2472- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
2473+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
2474 echo Configuring stage feedback in $(HOST_SUBDIR)/gmp ; \
2475 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
2476 cd $(HOST_SUBDIR)/gmp || exit 1; \
2477@@ -16110,7 +16275,8 @@
2478 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2479 $(HOST_EXPORTS) \
2480 (cd $(HOST_SUBDIR)/gmp && \
2481- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gmp))
2482+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2483+ $(TARGET-gmp))
2484 @endif gmp
2485
2486
2487@@ -16129,8 +16295,11 @@
2488 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2489 $(HOST_EXPORTS) \
2490 cd $(HOST_SUBDIR)/gmp && \
2491- $(MAKE) $(FLAGS_TO_PASS) \
2492- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
2493+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2494+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
2495+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
2496+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
2497+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
2498 $(TARGET-stage1-gmp)
2499
2500 maybe-clean-stage1-gmp: clean-stage1-gmp
2501@@ -16143,7 +16312,7 @@
2502 $(MAKE) stage1-start; \
2503 fi; \
2504 cd $(HOST_SUBDIR)/gmp && \
2505- $(MAKE) $(FLAGS_TO_PASS) \
2506+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2507 clean
2508 @endif gmp-bootstrap
2509
2510@@ -16163,8 +16332,11 @@
2511 $(HOST_EXPORTS) \
2512 $(POSTSTAGE1_HOST_EXPORTS) \
2513 cd $(HOST_SUBDIR)/gmp && \
2514- $(MAKE) $(FLAGS_TO_PASS) \
2515- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2516+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2517+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
2518+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
2519+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
2520+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2521 $(TARGET-stage2-gmp)
2522
2523 maybe-clean-stage2-gmp: clean-stage2-gmp
2524@@ -16177,7 +16349,7 @@
2525 $(MAKE) stage2-start; \
2526 fi; \
2527 cd $(HOST_SUBDIR)/gmp && \
2528- $(MAKE) $(FLAGS_TO_PASS) \
2529+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2530 $(POSTSTAGE1_FLAGS_TO_PASS) \
2531 clean
2532 @endif gmp-bootstrap
2533@@ -16198,8 +16370,11 @@
2534 $(HOST_EXPORTS) \
2535 $(POSTSTAGE1_HOST_EXPORTS) \
2536 cd $(HOST_SUBDIR)/gmp && \
2537- $(MAKE) $(FLAGS_TO_PASS) \
2538- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
2539+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2540+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
2541+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
2542+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
2543+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2544 $(TARGET-stageb2g0-gmp)
2545
2546 maybe-clean-stageb2g0-gmp: clean-stageb2g0-gmp
2547@@ -16212,7 +16387,7 @@
2548 $(MAKE) stageb2g0-start; \
2549 fi; \
2550 cd $(HOST_SUBDIR)/gmp && \
2551- $(MAKE) $(FLAGS_TO_PASS) \
2552+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2553 $(POSTSTAGE1_FLAGS_TO_PASS) \
2554 clean
2555 @endif gmp-bootstrap
2556@@ -16233,8 +16408,11 @@
2557 $(HOST_EXPORTS) \
2558 $(POSTSTAGE1_HOST_EXPORTS) \
2559 cd $(HOST_SUBDIR)/gmp && \
2560- $(MAKE) $(FLAGS_TO_PASS) \
2561- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2562+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2563+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
2564+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
2565+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
2566+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2567 $(TARGET-stage3-gmp)
2568
2569 maybe-clean-stage3-gmp: clean-stage3-gmp
2570@@ -16247,7 +16425,7 @@
2571 $(MAKE) stage3-start; \
2572 fi; \
2573 cd $(HOST_SUBDIR)/gmp && \
2574- $(MAKE) $(FLAGS_TO_PASS) \
2575+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2576 $(POSTSTAGE1_FLAGS_TO_PASS) \
2577 clean
2578 @endif gmp-bootstrap
2579@@ -16268,8 +16446,11 @@
2580 $(HOST_EXPORTS) \
2581 $(POSTSTAGE1_HOST_EXPORTS) \
2582 cd $(HOST_SUBDIR)/gmp && \
2583- $(MAKE) $(FLAGS_TO_PASS) \
2584- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
2585+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2586+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
2587+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
2588+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
2589+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2590 $(TARGET-stageb3g2-gmp)
2591
2592 maybe-clean-stageb3g2-gmp: clean-stageb3g2-gmp
2593@@ -16282,7 +16463,7 @@
2594 $(MAKE) stageb3g2-start; \
2595 fi; \
2596 cd $(HOST_SUBDIR)/gmp && \
2597- $(MAKE) $(FLAGS_TO_PASS) \
2598+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2599 $(POSTSTAGE1_FLAGS_TO_PASS) \
2600 clean
2601 @endif gmp-bootstrap
2602@@ -16303,8 +16484,11 @@
2603 $(HOST_EXPORTS) \
2604 $(POSTSTAGE1_HOST_EXPORTS) \
2605 cd $(HOST_SUBDIR)/gmp && \
2606- $(MAKE) $(FLAGS_TO_PASS) \
2607- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2608+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2609+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
2610+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
2611+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
2612+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2613 $(TARGET-stage4-gmp)
2614
2615 maybe-clean-stage4-gmp: clean-stage4-gmp
2616@@ -16317,7 +16501,7 @@
2617 $(MAKE) stage4-start; \
2618 fi; \
2619 cd $(HOST_SUBDIR)/gmp && \
2620- $(MAKE) $(FLAGS_TO_PASS) \
2621+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2622 $(POSTSTAGE1_FLAGS_TO_PASS) \
2623 clean
2624 @endif gmp-bootstrap
2625@@ -16338,8 +16522,11 @@
2626 $(HOST_EXPORTS) \
2627 $(POSTSTAGE1_HOST_EXPORTS) \
2628 cd $(HOST_SUBDIR)/gmp && \
2629- $(MAKE) $(FLAGS_TO_PASS) \
2630- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
2631+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2632+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
2633+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2634+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2635+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2636 $(TARGET-stageprofile-gmp)
2637
2638 maybe-clean-stageprofile-gmp: clean-stageprofile-gmp
2639@@ -16352,7 +16539,7 @@
2640 $(MAKE) stageprofile-start; \
2641 fi; \
2642 cd $(HOST_SUBDIR)/gmp && \
2643- $(MAKE) $(FLAGS_TO_PASS) \
2644+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2645 $(POSTSTAGE1_FLAGS_TO_PASS) \
2646 clean
2647 @endif gmp-bootstrap
2648@@ -16373,8 +16560,11 @@
2649 $(HOST_EXPORTS) \
2650 $(POSTSTAGE1_HOST_EXPORTS) \
2651 cd $(HOST_SUBDIR)/gmp && \
2652- $(MAKE) $(FLAGS_TO_PASS) \
2653- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
2654+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2655+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
2656+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2657+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2658+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2659 $(TARGET-stagefeedback-gmp)
2660
2661 maybe-clean-stagefeedback-gmp: clean-stagefeedback-gmp
2662@@ -16387,7 +16577,7 @@
2663 $(MAKE) stagefeedback-start; \
2664 fi; \
2665 cd $(HOST_SUBDIR)/gmp && \
2666- $(MAKE) $(FLAGS_TO_PASS) \
2667+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2668 $(POSTSTAGE1_FLAGS_TO_PASS) \
2669 clean
2670 @endif gmp-bootstrap
2671@@ -16788,9 +16978,9 @@
2672 @r=`${PWD_COMMAND}`; export r; \
2673 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2674 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2675- $(HOST_EXPORTS) \
2676+ $(HOST_EXPORTS) \
2677 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
2678- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
2679+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
2680 echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
2681 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2682 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2683@@ -16819,9 +17009,9 @@
2684 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2685 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2686 $(HOST_EXPORTS) \
2687- $(POSTSTAGE1_HOST_EXPORTS) \
2688+ $(POSTSTAGE1_HOST_EXPORTS) \
2689 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
2690- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
2691+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
2692 echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
2693 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2694 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2695@@ -16850,9 +17040,9 @@
2696 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2697 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2698 $(HOST_EXPORTS) \
2699- $(POSTSTAGE1_HOST_EXPORTS) \
2700+ $(POSTSTAGE1_HOST_EXPORTS) \
2701 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
2702- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
2703+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
2704 echo Configuring stage b2g0 in $(HOST_SUBDIR)/mpfr ; \
2705 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2706 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2707@@ -16881,9 +17071,9 @@
2708 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2709 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2710 $(HOST_EXPORTS) \
2711- $(POSTSTAGE1_HOST_EXPORTS) \
2712+ $(POSTSTAGE1_HOST_EXPORTS) \
2713 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
2714- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
2715+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
2716 echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
2717 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2718 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2719@@ -16912,9 +17102,9 @@
2720 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2721 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2722 $(HOST_EXPORTS) \
2723- $(POSTSTAGE1_HOST_EXPORTS) \
2724+ $(POSTSTAGE1_HOST_EXPORTS) \
2725 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
2726- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
2727+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
2728 echo Configuring stage b3g2 in $(HOST_SUBDIR)/mpfr ; \
2729 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2730 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2731@@ -16943,9 +17133,9 @@
2732 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2733 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2734 $(HOST_EXPORTS) \
2735- $(POSTSTAGE1_HOST_EXPORTS) \
2736+ $(POSTSTAGE1_HOST_EXPORTS) \
2737 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
2738- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
2739+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
2740 echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
2741 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2742 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2743@@ -16974,9 +17164,9 @@
2744 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2745 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2746 $(HOST_EXPORTS) \
2747- $(POSTSTAGE1_HOST_EXPORTS) \
2748+ $(POSTSTAGE1_HOST_EXPORTS) \
2749 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
2750- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
2751+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
2752 echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
2753 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2754 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2755@@ -17005,9 +17195,9 @@
2756 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2757 test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
2758 $(HOST_EXPORTS) \
2759- $(POSTSTAGE1_HOST_EXPORTS) \
2760+ $(POSTSTAGE1_HOST_EXPORTS) \
2761 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
2762- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
2763+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
2764 echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
2765 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
2766 cd $(HOST_SUBDIR)/mpfr || exit 1; \
2767@@ -17042,7 +17232,8 @@
2768 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2769 $(HOST_EXPORTS) \
2770 (cd $(HOST_SUBDIR)/mpfr && \
2771- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mpfr))
2772+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2773+ $(TARGET-mpfr))
2774 @endif mpfr
2775
2776
2777@@ -17061,8 +17252,11 @@
2778 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2779 $(HOST_EXPORTS) \
2780 cd $(HOST_SUBDIR)/mpfr && \
2781- $(MAKE) $(FLAGS_TO_PASS) \
2782- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
2783+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2784+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
2785+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
2786+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
2787+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
2788 $(TARGET-stage1-mpfr)
2789
2790 maybe-clean-stage1-mpfr: clean-stage1-mpfr
2791@@ -17075,7 +17269,7 @@
2792 $(MAKE) stage1-start; \
2793 fi; \
2794 cd $(HOST_SUBDIR)/mpfr && \
2795- $(MAKE) $(FLAGS_TO_PASS) \
2796+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2797 clean
2798 @endif mpfr-bootstrap
2799
2800@@ -17095,8 +17289,11 @@
2801 $(HOST_EXPORTS) \
2802 $(POSTSTAGE1_HOST_EXPORTS) \
2803 cd $(HOST_SUBDIR)/mpfr && \
2804- $(MAKE) $(FLAGS_TO_PASS) \
2805- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2806+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2807+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
2808+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
2809+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
2810+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2811 $(TARGET-stage2-mpfr)
2812
2813 maybe-clean-stage2-mpfr: clean-stage2-mpfr
2814@@ -17109,7 +17306,7 @@
2815 $(MAKE) stage2-start; \
2816 fi; \
2817 cd $(HOST_SUBDIR)/mpfr && \
2818- $(MAKE) $(FLAGS_TO_PASS) \
2819+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2820 $(POSTSTAGE1_FLAGS_TO_PASS) \
2821 clean
2822 @endif mpfr-bootstrap
2823@@ -17130,8 +17327,11 @@
2824 $(HOST_EXPORTS) \
2825 $(POSTSTAGE1_HOST_EXPORTS) \
2826 cd $(HOST_SUBDIR)/mpfr && \
2827- $(MAKE) $(FLAGS_TO_PASS) \
2828- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
2829+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2830+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
2831+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
2832+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
2833+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2834 $(TARGET-stageb2g0-mpfr)
2835
2836 maybe-clean-stageb2g0-mpfr: clean-stageb2g0-mpfr
2837@@ -17144,7 +17344,7 @@
2838 $(MAKE) stageb2g0-start; \
2839 fi; \
2840 cd $(HOST_SUBDIR)/mpfr && \
2841- $(MAKE) $(FLAGS_TO_PASS) \
2842+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2843 $(POSTSTAGE1_FLAGS_TO_PASS) \
2844 clean
2845 @endif mpfr-bootstrap
2846@@ -17165,8 +17365,11 @@
2847 $(HOST_EXPORTS) \
2848 $(POSTSTAGE1_HOST_EXPORTS) \
2849 cd $(HOST_SUBDIR)/mpfr && \
2850- $(MAKE) $(FLAGS_TO_PASS) \
2851- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2852+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2853+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
2854+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
2855+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
2856+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2857 $(TARGET-stage3-mpfr)
2858
2859 maybe-clean-stage3-mpfr: clean-stage3-mpfr
2860@@ -17179,7 +17382,7 @@
2861 $(MAKE) stage3-start; \
2862 fi; \
2863 cd $(HOST_SUBDIR)/mpfr && \
2864- $(MAKE) $(FLAGS_TO_PASS) \
2865+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2866 $(POSTSTAGE1_FLAGS_TO_PASS) \
2867 clean
2868 @endif mpfr-bootstrap
2869@@ -17200,8 +17403,11 @@
2870 $(HOST_EXPORTS) \
2871 $(POSTSTAGE1_HOST_EXPORTS) \
2872 cd $(HOST_SUBDIR)/mpfr && \
2873- $(MAKE) $(FLAGS_TO_PASS) \
2874- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
2875+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2876+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
2877+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
2878+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
2879+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2880 $(TARGET-stageb3g2-mpfr)
2881
2882 maybe-clean-stageb3g2-mpfr: clean-stageb3g2-mpfr
2883@@ -17214,7 +17420,7 @@
2884 $(MAKE) stageb3g2-start; \
2885 fi; \
2886 cd $(HOST_SUBDIR)/mpfr && \
2887- $(MAKE) $(FLAGS_TO_PASS) \
2888+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2889 $(POSTSTAGE1_FLAGS_TO_PASS) \
2890 clean
2891 @endif mpfr-bootstrap
2892@@ -17235,8 +17441,11 @@
2893 $(HOST_EXPORTS) \
2894 $(POSTSTAGE1_HOST_EXPORTS) \
2895 cd $(HOST_SUBDIR)/mpfr && \
2896- $(MAKE) $(FLAGS_TO_PASS) \
2897- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
2898+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2899+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
2900+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
2901+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
2902+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2903 $(TARGET-stage4-mpfr)
2904
2905 maybe-clean-stage4-mpfr: clean-stage4-mpfr
2906@@ -17249,7 +17458,7 @@
2907 $(MAKE) stage4-start; \
2908 fi; \
2909 cd $(HOST_SUBDIR)/mpfr && \
2910- $(MAKE) $(FLAGS_TO_PASS) \
2911+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2912 $(POSTSTAGE1_FLAGS_TO_PASS) \
2913 clean
2914 @endif mpfr-bootstrap
2915@@ -17270,8 +17479,11 @@
2916 $(HOST_EXPORTS) \
2917 $(POSTSTAGE1_HOST_EXPORTS) \
2918 cd $(HOST_SUBDIR)/mpfr && \
2919- $(MAKE) $(FLAGS_TO_PASS) \
2920- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
2921+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2922+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
2923+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2924+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
2925+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2926 $(TARGET-stageprofile-mpfr)
2927
2928 maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr
2929@@ -17284,7 +17496,7 @@
2930 $(MAKE) stageprofile-start; \
2931 fi; \
2932 cd $(HOST_SUBDIR)/mpfr && \
2933- $(MAKE) $(FLAGS_TO_PASS) \
2934+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2935 $(POSTSTAGE1_FLAGS_TO_PASS) \
2936 clean
2937 @endif mpfr-bootstrap
2938@@ -17305,8 +17517,11 @@
2939 $(HOST_EXPORTS) \
2940 $(POSTSTAGE1_HOST_EXPORTS) \
2941 cd $(HOST_SUBDIR)/mpfr && \
2942- $(MAKE) $(FLAGS_TO_PASS) \
2943- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
2944+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
2945+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
2946+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2947+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
2948+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
2949 $(TARGET-stagefeedback-mpfr)
2950
2951 maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr
2952@@ -17319,7 +17534,7 @@
2953 $(MAKE) stagefeedback-start; \
2954 fi; \
2955 cd $(HOST_SUBDIR)/mpfr && \
2956- $(MAKE) $(FLAGS_TO_PASS) \
2957+ $(MAKE) $(EXTRA_HOST_FLAGS) \
2958 $(POSTSTAGE1_FLAGS_TO_PASS) \
2959 clean
2960 @endif mpfr-bootstrap
2961@@ -17727,7 +17942,8 @@
2962 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2963 $(HOST_EXPORTS) \
2964 (cd $(HOST_SUBDIR)/gnuserv && \
2965- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnuserv))
2966+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2967+ $(TARGET-gnuserv))
2968 @endif gnuserv
2969
2970
2971@@ -18151,7 +18367,8 @@
2972 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2973 $(HOST_EXPORTS) \
2974 (cd $(HOST_SUBDIR)/gprof && \
2975- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gprof))
2976+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2977+ $(TARGET-gprof))
2978 @endif gprof
2979
2980
2981@@ -18575,7 +18792,8 @@
2982 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2983 $(HOST_EXPORTS) \
2984 (cd $(HOST_SUBDIR)/gzip && \
2985- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gzip))
2986+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2987+ $(TARGET-gzip))
2988 @endif gzip
2989
2990
2991@@ -18999,7 +19217,8 @@
2992 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
2993 $(HOST_EXPORTS) \
2994 (cd $(HOST_SUBDIR)/hello && \
2995- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-hello))
2996+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
2997+ $(TARGET-hello))
2998 @endif hello
2999
3000
3001@@ -19423,7 +19642,8 @@
3002 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3003 $(HOST_EXPORTS) \
3004 (cd $(HOST_SUBDIR)/indent && \
3005- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-indent))
3006+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3007+ $(TARGET-indent))
3008 @endif indent
3009
3010
3011@@ -19840,9 +20060,9 @@
3012 @r=`${PWD_COMMAND}`; export r; \
3013 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3014 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3015- $(HOST_EXPORTS) \
3016+ $(HOST_EXPORTS) \
3017 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
3018- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
3019+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
3020 echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \
3021 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3022 cd $(HOST_SUBDIR)/intl || exit 1; \
3023@@ -19871,9 +20091,9 @@
3024 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3025 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3026 $(HOST_EXPORTS) \
3027- $(POSTSTAGE1_HOST_EXPORTS) \
3028+ $(POSTSTAGE1_HOST_EXPORTS) \
3029 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
3030- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
3031+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
3032 echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \
3033 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3034 cd $(HOST_SUBDIR)/intl || exit 1; \
3035@@ -19902,9 +20122,9 @@
3036 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3037 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3038 $(HOST_EXPORTS) \
3039- $(POSTSTAGE1_HOST_EXPORTS) \
3040+ $(POSTSTAGE1_HOST_EXPORTS) \
3041 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
3042- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
3043+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
3044 echo Configuring stage b2g0 in $(HOST_SUBDIR)/intl ; \
3045 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3046 cd $(HOST_SUBDIR)/intl || exit 1; \
3047@@ -19933,9 +20153,9 @@
3048 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3049 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3050 $(HOST_EXPORTS) \
3051- $(POSTSTAGE1_HOST_EXPORTS) \
3052+ $(POSTSTAGE1_HOST_EXPORTS) \
3053 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
3054- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
3055+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
3056 echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \
3057 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3058 cd $(HOST_SUBDIR)/intl || exit 1; \
3059@@ -19964,9 +20184,9 @@
3060 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3061 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3062 $(HOST_EXPORTS) \
3063- $(POSTSTAGE1_HOST_EXPORTS) \
3064+ $(POSTSTAGE1_HOST_EXPORTS) \
3065 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
3066- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
3067+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
3068 echo Configuring stage b3g2 in $(HOST_SUBDIR)/intl ; \
3069 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3070 cd $(HOST_SUBDIR)/intl || exit 1; \
3071@@ -19995,9 +20215,9 @@
3072 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3073 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3074 $(HOST_EXPORTS) \
3075- $(POSTSTAGE1_HOST_EXPORTS) \
3076+ $(POSTSTAGE1_HOST_EXPORTS) \
3077 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
3078- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
3079+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
3080 echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \
3081 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3082 cd $(HOST_SUBDIR)/intl || exit 1; \
3083@@ -20026,9 +20246,9 @@
3084 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3085 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3086 $(HOST_EXPORTS) \
3087- $(POSTSTAGE1_HOST_EXPORTS) \
3088+ $(POSTSTAGE1_HOST_EXPORTS) \
3089 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
3090- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
3091+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
3092 echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \
3093 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3094 cd $(HOST_SUBDIR)/intl || exit 1; \
3095@@ -20057,9 +20277,9 @@
3096 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3097 test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
3098 $(HOST_EXPORTS) \
3099- $(POSTSTAGE1_HOST_EXPORTS) \
3100+ $(POSTSTAGE1_HOST_EXPORTS) \
3101 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
3102- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
3103+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
3104 echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \
3105 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
3106 cd $(HOST_SUBDIR)/intl || exit 1; \
3107@@ -20094,7 +20314,8 @@
3108 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3109 $(HOST_EXPORTS) \
3110 (cd $(HOST_SUBDIR)/intl && \
3111- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-intl))
3112+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3113+ $(TARGET-intl))
3114 @endif intl
3115
3116
3117@@ -20113,8 +20334,11 @@
3118 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3119 $(HOST_EXPORTS) \
3120 cd $(HOST_SUBDIR)/intl && \
3121- $(MAKE) $(FLAGS_TO_PASS) \
3122- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
3123+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3124+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
3125+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
3126+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
3127+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
3128 $(TARGET-stage1-intl)
3129
3130 maybe-clean-stage1-intl: clean-stage1-intl
3131@@ -20127,7 +20351,7 @@
3132 $(MAKE) stage1-start; \
3133 fi; \
3134 cd $(HOST_SUBDIR)/intl && \
3135- $(MAKE) $(FLAGS_TO_PASS) \
3136+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3137 clean
3138 @endif intl-bootstrap
3139
3140@@ -20147,8 +20371,11 @@
3141 $(HOST_EXPORTS) \
3142 $(POSTSTAGE1_HOST_EXPORTS) \
3143 cd $(HOST_SUBDIR)/intl && \
3144- $(MAKE) $(FLAGS_TO_PASS) \
3145- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3146+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3147+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
3148+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
3149+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
3150+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3151 $(TARGET-stage2-intl)
3152
3153 maybe-clean-stage2-intl: clean-stage2-intl
3154@@ -20161,7 +20388,7 @@
3155 $(MAKE) stage2-start; \
3156 fi; \
3157 cd $(HOST_SUBDIR)/intl && \
3158- $(MAKE) $(FLAGS_TO_PASS) \
3159+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3160 $(POSTSTAGE1_FLAGS_TO_PASS) \
3161 clean
3162 @endif intl-bootstrap
3163@@ -20182,8 +20409,11 @@
3164 $(HOST_EXPORTS) \
3165 $(POSTSTAGE1_HOST_EXPORTS) \
3166 cd $(HOST_SUBDIR)/intl && \
3167- $(MAKE) $(FLAGS_TO_PASS) \
3168- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
3169+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3170+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
3171+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
3172+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
3173+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3174 $(TARGET-stageb2g0-intl)
3175
3176 maybe-clean-stageb2g0-intl: clean-stageb2g0-intl
3177@@ -20196,7 +20426,7 @@
3178 $(MAKE) stageb2g0-start; \
3179 fi; \
3180 cd $(HOST_SUBDIR)/intl && \
3181- $(MAKE) $(FLAGS_TO_PASS) \
3182+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3183 $(POSTSTAGE1_FLAGS_TO_PASS) \
3184 clean
3185 @endif intl-bootstrap
3186@@ -20217,8 +20447,11 @@
3187 $(HOST_EXPORTS) \
3188 $(POSTSTAGE1_HOST_EXPORTS) \
3189 cd $(HOST_SUBDIR)/intl && \
3190- $(MAKE) $(FLAGS_TO_PASS) \
3191- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3192+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3193+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
3194+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
3195+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
3196+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3197 $(TARGET-stage3-intl)
3198
3199 maybe-clean-stage3-intl: clean-stage3-intl
3200@@ -20231,7 +20464,7 @@
3201 $(MAKE) stage3-start; \
3202 fi; \
3203 cd $(HOST_SUBDIR)/intl && \
3204- $(MAKE) $(FLAGS_TO_PASS) \
3205+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3206 $(POSTSTAGE1_FLAGS_TO_PASS) \
3207 clean
3208 @endif intl-bootstrap
3209@@ -20252,8 +20485,11 @@
3210 $(HOST_EXPORTS) \
3211 $(POSTSTAGE1_HOST_EXPORTS) \
3212 cd $(HOST_SUBDIR)/intl && \
3213- $(MAKE) $(FLAGS_TO_PASS) \
3214- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
3215+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3216+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
3217+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
3218+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
3219+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3220 $(TARGET-stageb3g2-intl)
3221
3222 maybe-clean-stageb3g2-intl: clean-stageb3g2-intl
3223@@ -20266,7 +20502,7 @@
3224 $(MAKE) stageb3g2-start; \
3225 fi; \
3226 cd $(HOST_SUBDIR)/intl && \
3227- $(MAKE) $(FLAGS_TO_PASS) \
3228+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3229 $(POSTSTAGE1_FLAGS_TO_PASS) \
3230 clean
3231 @endif intl-bootstrap
3232@@ -20287,8 +20523,11 @@
3233 $(HOST_EXPORTS) \
3234 $(POSTSTAGE1_HOST_EXPORTS) \
3235 cd $(HOST_SUBDIR)/intl && \
3236- $(MAKE) $(FLAGS_TO_PASS) \
3237- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3238+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3239+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
3240+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
3241+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
3242+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3243 $(TARGET-stage4-intl)
3244
3245 maybe-clean-stage4-intl: clean-stage4-intl
3246@@ -20301,7 +20540,7 @@
3247 $(MAKE) stage4-start; \
3248 fi; \
3249 cd $(HOST_SUBDIR)/intl && \
3250- $(MAKE) $(FLAGS_TO_PASS) \
3251+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3252 $(POSTSTAGE1_FLAGS_TO_PASS) \
3253 clean
3254 @endif intl-bootstrap
3255@@ -20322,8 +20561,11 @@
3256 $(HOST_EXPORTS) \
3257 $(POSTSTAGE1_HOST_EXPORTS) \
3258 cd $(HOST_SUBDIR)/intl && \
3259- $(MAKE) $(FLAGS_TO_PASS) \
3260- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
3261+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3262+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
3263+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3264+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3265+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3266 $(TARGET-stageprofile-intl)
3267
3268 maybe-clean-stageprofile-intl: clean-stageprofile-intl
3269@@ -20336,7 +20578,7 @@
3270 $(MAKE) stageprofile-start; \
3271 fi; \
3272 cd $(HOST_SUBDIR)/intl && \
3273- $(MAKE) $(FLAGS_TO_PASS) \
3274+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3275 $(POSTSTAGE1_FLAGS_TO_PASS) \
3276 clean
3277 @endif intl-bootstrap
3278@@ -20357,8 +20599,11 @@
3279 $(HOST_EXPORTS) \
3280 $(POSTSTAGE1_HOST_EXPORTS) \
3281 cd $(HOST_SUBDIR)/intl && \
3282- $(MAKE) $(FLAGS_TO_PASS) \
3283- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
3284+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3285+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
3286+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3287+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3288+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3289 $(TARGET-stagefeedback-intl)
3290
3291 maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
3292@@ -20371,7 +20616,7 @@
3293 $(MAKE) stagefeedback-start; \
3294 fi; \
3295 cd $(HOST_SUBDIR)/intl && \
3296- $(MAKE) $(FLAGS_TO_PASS) \
3297+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3298 $(POSTSTAGE1_FLAGS_TO_PASS) \
3299 clean
3300 @endif intl-bootstrap
3301@@ -20785,7 +21030,8 @@
3302 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3303 $(HOST_EXPORTS) \
3304 (cd $(HOST_SUBDIR)/tcl && \
3305- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tcl))
3306+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3307+ $(TARGET-tcl))
3308 @endif tcl
3309
3310
3311@@ -21194,7 +21440,8 @@
3312 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3313 $(HOST_EXPORTS) \
3314 (cd $(HOST_SUBDIR)/itcl && \
3315- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-itcl))
3316+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3317+ $(TARGET-itcl))
3318 @endif itcl
3319
3320
3321@@ -21611,9 +21858,9 @@
3322 @r=`${PWD_COMMAND}`; export r; \
3323 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3324 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3325- $(HOST_EXPORTS) \
3326+ $(HOST_EXPORTS) \
3327 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
3328- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
3329+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
3330 echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \
3331 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3332 cd $(HOST_SUBDIR)/ld || exit 1; \
3333@@ -21642,9 +21889,9 @@
3334 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3335 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3336 $(HOST_EXPORTS) \
3337- $(POSTSTAGE1_HOST_EXPORTS) \
3338+ $(POSTSTAGE1_HOST_EXPORTS) \
3339 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
3340- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
3341+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
3342 echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \
3343 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3344 cd $(HOST_SUBDIR)/ld || exit 1; \
3345@@ -21673,9 +21920,9 @@
3346 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3347 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3348 $(HOST_EXPORTS) \
3349- $(POSTSTAGE1_HOST_EXPORTS) \
3350+ $(POSTSTAGE1_HOST_EXPORTS) \
3351 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
3352- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
3353+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
3354 echo Configuring stage b2g0 in $(HOST_SUBDIR)/ld ; \
3355 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3356 cd $(HOST_SUBDIR)/ld || exit 1; \
3357@@ -21704,9 +21951,9 @@
3358 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3359 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3360 $(HOST_EXPORTS) \
3361- $(POSTSTAGE1_HOST_EXPORTS) \
3362+ $(POSTSTAGE1_HOST_EXPORTS) \
3363 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
3364- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
3365+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
3366 echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \
3367 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3368 cd $(HOST_SUBDIR)/ld || exit 1; \
3369@@ -21735,9 +21982,9 @@
3370 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3371 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3372 $(HOST_EXPORTS) \
3373- $(POSTSTAGE1_HOST_EXPORTS) \
3374+ $(POSTSTAGE1_HOST_EXPORTS) \
3375 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
3376- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
3377+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
3378 echo Configuring stage b3g2 in $(HOST_SUBDIR)/ld ; \
3379 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3380 cd $(HOST_SUBDIR)/ld || exit 1; \
3381@@ -21766,9 +22013,9 @@
3382 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3383 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3384 $(HOST_EXPORTS) \
3385- $(POSTSTAGE1_HOST_EXPORTS) \
3386+ $(POSTSTAGE1_HOST_EXPORTS) \
3387 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
3388- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
3389+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
3390 echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \
3391 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3392 cd $(HOST_SUBDIR)/ld || exit 1; \
3393@@ -21797,9 +22044,9 @@
3394 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3395 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3396 $(HOST_EXPORTS) \
3397- $(POSTSTAGE1_HOST_EXPORTS) \
3398+ $(POSTSTAGE1_HOST_EXPORTS) \
3399 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
3400- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
3401+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
3402 echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \
3403 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3404 cd $(HOST_SUBDIR)/ld || exit 1; \
3405@@ -21828,9 +22075,9 @@
3406 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3407 test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
3408 $(HOST_EXPORTS) \
3409- $(POSTSTAGE1_HOST_EXPORTS) \
3410+ $(POSTSTAGE1_HOST_EXPORTS) \
3411 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
3412- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
3413+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
3414 echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \
3415 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
3416 cd $(HOST_SUBDIR)/ld || exit 1; \
3417@@ -21865,7 +22112,8 @@
3418 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3419 $(HOST_EXPORTS) \
3420 (cd $(HOST_SUBDIR)/ld && \
3421- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ld))
3422+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3423+ $(TARGET-ld))
3424 @endif ld
3425
3426
3427@@ -21884,8 +22132,11 @@
3428 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3429 $(HOST_EXPORTS) \
3430 cd $(HOST_SUBDIR)/ld && \
3431- $(MAKE) $(FLAGS_TO_PASS) \
3432- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
3433+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3434+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
3435+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
3436+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
3437+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
3438 $(TARGET-stage1-ld)
3439
3440 maybe-clean-stage1-ld: clean-stage1-ld
3441@@ -21898,7 +22149,7 @@
3442 $(MAKE) stage1-start; \
3443 fi; \
3444 cd $(HOST_SUBDIR)/ld && \
3445- $(MAKE) $(FLAGS_TO_PASS) \
3446+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3447 clean
3448 @endif ld-bootstrap
3449
3450@@ -21918,8 +22169,11 @@
3451 $(HOST_EXPORTS) \
3452 $(POSTSTAGE1_HOST_EXPORTS) \
3453 cd $(HOST_SUBDIR)/ld && \
3454- $(MAKE) $(FLAGS_TO_PASS) \
3455- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3456+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3457+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
3458+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
3459+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
3460+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3461 $(TARGET-stage2-ld)
3462
3463 maybe-clean-stage2-ld: clean-stage2-ld
3464@@ -21932,7 +22186,7 @@
3465 $(MAKE) stage2-start; \
3466 fi; \
3467 cd $(HOST_SUBDIR)/ld && \
3468- $(MAKE) $(FLAGS_TO_PASS) \
3469+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3470 $(POSTSTAGE1_FLAGS_TO_PASS) \
3471 clean
3472 @endif ld-bootstrap
3473@@ -21953,8 +22207,11 @@
3474 $(HOST_EXPORTS) \
3475 $(POSTSTAGE1_HOST_EXPORTS) \
3476 cd $(HOST_SUBDIR)/ld && \
3477- $(MAKE) $(FLAGS_TO_PASS) \
3478- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
3479+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3480+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
3481+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
3482+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
3483+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3484 $(TARGET-stageb2g0-ld)
3485
3486 maybe-clean-stageb2g0-ld: clean-stageb2g0-ld
3487@@ -21967,7 +22224,7 @@
3488 $(MAKE) stageb2g0-start; \
3489 fi; \
3490 cd $(HOST_SUBDIR)/ld && \
3491- $(MAKE) $(FLAGS_TO_PASS) \
3492+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3493 $(POSTSTAGE1_FLAGS_TO_PASS) \
3494 clean
3495 @endif ld-bootstrap
3496@@ -21988,8 +22245,11 @@
3497 $(HOST_EXPORTS) \
3498 $(POSTSTAGE1_HOST_EXPORTS) \
3499 cd $(HOST_SUBDIR)/ld && \
3500- $(MAKE) $(FLAGS_TO_PASS) \
3501- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3502+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3503+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
3504+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
3505+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
3506+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3507 $(TARGET-stage3-ld)
3508
3509 maybe-clean-stage3-ld: clean-stage3-ld
3510@@ -22002,7 +22262,7 @@
3511 $(MAKE) stage3-start; \
3512 fi; \
3513 cd $(HOST_SUBDIR)/ld && \
3514- $(MAKE) $(FLAGS_TO_PASS) \
3515+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3516 $(POSTSTAGE1_FLAGS_TO_PASS) \
3517 clean
3518 @endif ld-bootstrap
3519@@ -22023,8 +22283,11 @@
3520 $(HOST_EXPORTS) \
3521 $(POSTSTAGE1_HOST_EXPORTS) \
3522 cd $(HOST_SUBDIR)/ld && \
3523- $(MAKE) $(FLAGS_TO_PASS) \
3524- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
3525+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3526+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
3527+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
3528+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
3529+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3530 $(TARGET-stageb3g2-ld)
3531
3532 maybe-clean-stageb3g2-ld: clean-stageb3g2-ld
3533@@ -22037,7 +22300,7 @@
3534 $(MAKE) stageb3g2-start; \
3535 fi; \
3536 cd $(HOST_SUBDIR)/ld && \
3537- $(MAKE) $(FLAGS_TO_PASS) \
3538+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3539 $(POSTSTAGE1_FLAGS_TO_PASS) \
3540 clean
3541 @endif ld-bootstrap
3542@@ -22058,8 +22321,11 @@
3543 $(HOST_EXPORTS) \
3544 $(POSTSTAGE1_HOST_EXPORTS) \
3545 cd $(HOST_SUBDIR)/ld && \
3546- $(MAKE) $(FLAGS_TO_PASS) \
3547- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3548+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3549+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
3550+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
3551+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
3552+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3553 $(TARGET-stage4-ld)
3554
3555 maybe-clean-stage4-ld: clean-stage4-ld
3556@@ -22072,7 +22338,7 @@
3557 $(MAKE) stage4-start; \
3558 fi; \
3559 cd $(HOST_SUBDIR)/ld && \
3560- $(MAKE) $(FLAGS_TO_PASS) \
3561+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3562 $(POSTSTAGE1_FLAGS_TO_PASS) \
3563 clean
3564 @endif ld-bootstrap
3565@@ -22093,8 +22359,11 @@
3566 $(HOST_EXPORTS) \
3567 $(POSTSTAGE1_HOST_EXPORTS) \
3568 cd $(HOST_SUBDIR)/ld && \
3569- $(MAKE) $(FLAGS_TO_PASS) \
3570- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
3571+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3572+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
3573+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3574+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3575+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3576 $(TARGET-stageprofile-ld)
3577
3578 maybe-clean-stageprofile-ld: clean-stageprofile-ld
3579@@ -22107,7 +22376,7 @@
3580 $(MAKE) stageprofile-start; \
3581 fi; \
3582 cd $(HOST_SUBDIR)/ld && \
3583- $(MAKE) $(FLAGS_TO_PASS) \
3584+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3585 $(POSTSTAGE1_FLAGS_TO_PASS) \
3586 clean
3587 @endif ld-bootstrap
3588@@ -22128,8 +22397,11 @@
3589 $(HOST_EXPORTS) \
3590 $(POSTSTAGE1_HOST_EXPORTS) \
3591 cd $(HOST_SUBDIR)/ld && \
3592- $(MAKE) $(FLAGS_TO_PASS) \
3593- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
3594+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3595+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
3596+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3597+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3598+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3599 $(TARGET-stagefeedback-ld)
3600
3601 maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
3602@@ -22142,7 +22414,7 @@
3603 $(MAKE) stagefeedback-start; \
3604 fi; \
3605 cd $(HOST_SUBDIR)/ld && \
3606- $(MAKE) $(FLAGS_TO_PASS) \
3607+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3608 $(POSTSTAGE1_FLAGS_TO_PASS) \
3609 clean
3610 @endif ld-bootstrap
3611@@ -22549,9 +22821,9 @@
3612 @r=`${PWD_COMMAND}`; export r; \
3613 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3614 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3615- $(HOST_EXPORTS) \
3616+ $(HOST_EXPORTS) \
3617 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
3618- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
3619+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
3620 echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \
3621 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3622 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3623@@ -22580,9 +22852,9 @@
3624 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3625 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3626 $(HOST_EXPORTS) \
3627- $(POSTSTAGE1_HOST_EXPORTS) \
3628+ $(POSTSTAGE1_HOST_EXPORTS) \
3629 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
3630- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
3631+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
3632 echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \
3633 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3634 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3635@@ -22611,9 +22883,9 @@
3636 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3637 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3638 $(HOST_EXPORTS) \
3639- $(POSTSTAGE1_HOST_EXPORTS) \
3640+ $(POSTSTAGE1_HOST_EXPORTS) \
3641 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
3642- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
3643+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
3644 echo Configuring stage b2g0 in $(HOST_SUBDIR)/libcpp ; \
3645 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3646 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3647@@ -22642,9 +22914,9 @@
3648 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3649 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3650 $(HOST_EXPORTS) \
3651- $(POSTSTAGE1_HOST_EXPORTS) \
3652+ $(POSTSTAGE1_HOST_EXPORTS) \
3653 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
3654- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
3655+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
3656 echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \
3657 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3658 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3659@@ -22673,9 +22945,9 @@
3660 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3661 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3662 $(HOST_EXPORTS) \
3663- $(POSTSTAGE1_HOST_EXPORTS) \
3664+ $(POSTSTAGE1_HOST_EXPORTS) \
3665 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
3666- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
3667+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
3668 echo Configuring stage b3g2 in $(HOST_SUBDIR)/libcpp ; \
3669 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3670 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3671@@ -22704,9 +22976,9 @@
3672 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3673 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3674 $(HOST_EXPORTS) \
3675- $(POSTSTAGE1_HOST_EXPORTS) \
3676+ $(POSTSTAGE1_HOST_EXPORTS) \
3677 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
3678- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
3679+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
3680 echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \
3681 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3682 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3683@@ -22735,9 +23007,9 @@
3684 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3685 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3686 $(HOST_EXPORTS) \
3687- $(POSTSTAGE1_HOST_EXPORTS) \
3688+ $(POSTSTAGE1_HOST_EXPORTS) \
3689 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
3690- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
3691+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
3692 echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \
3693 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3694 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3695@@ -22766,9 +23038,9 @@
3696 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3697 test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
3698 $(HOST_EXPORTS) \
3699- $(POSTSTAGE1_HOST_EXPORTS) \
3700+ $(POSTSTAGE1_HOST_EXPORTS) \
3701 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
3702- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
3703+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
3704 echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \
3705 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
3706 cd $(HOST_SUBDIR)/libcpp || exit 1; \
3707@@ -22803,7 +23075,8 @@
3708 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3709 $(HOST_EXPORTS) \
3710 (cd $(HOST_SUBDIR)/libcpp && \
3711- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libcpp))
3712+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
3713+ $(TARGET-libcpp))
3714 @endif libcpp
3715
3716
3717@@ -22822,8 +23095,11 @@
3718 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3719 $(HOST_EXPORTS) \
3720 cd $(HOST_SUBDIR)/libcpp && \
3721- $(MAKE) $(FLAGS_TO_PASS) \
3722- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
3723+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3724+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
3725+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
3726+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
3727+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
3728 $(TARGET-stage1-libcpp)
3729
3730 maybe-clean-stage1-libcpp: clean-stage1-libcpp
3731@@ -22836,7 +23112,7 @@
3732 $(MAKE) stage1-start; \
3733 fi; \
3734 cd $(HOST_SUBDIR)/libcpp && \
3735- $(MAKE) $(FLAGS_TO_PASS) \
3736+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3737 clean
3738 @endif libcpp-bootstrap
3739
3740@@ -22856,8 +23132,11 @@
3741 $(HOST_EXPORTS) \
3742 $(POSTSTAGE1_HOST_EXPORTS) \
3743 cd $(HOST_SUBDIR)/libcpp && \
3744- $(MAKE) $(FLAGS_TO_PASS) \
3745- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3746+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3747+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
3748+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
3749+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
3750+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3751 $(TARGET-stage2-libcpp)
3752
3753 maybe-clean-stage2-libcpp: clean-stage2-libcpp
3754@@ -22870,7 +23149,7 @@
3755 $(MAKE) stage2-start; \
3756 fi; \
3757 cd $(HOST_SUBDIR)/libcpp && \
3758- $(MAKE) $(FLAGS_TO_PASS) \
3759+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3760 $(POSTSTAGE1_FLAGS_TO_PASS) \
3761 clean
3762 @endif libcpp-bootstrap
3763@@ -22891,8 +23170,11 @@
3764 $(HOST_EXPORTS) \
3765 $(POSTSTAGE1_HOST_EXPORTS) \
3766 cd $(HOST_SUBDIR)/libcpp && \
3767- $(MAKE) $(FLAGS_TO_PASS) \
3768- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
3769+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3770+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
3771+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
3772+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
3773+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3774 $(TARGET-stageb2g0-libcpp)
3775
3776 maybe-clean-stageb2g0-libcpp: clean-stageb2g0-libcpp
3777@@ -22905,7 +23187,7 @@
3778 $(MAKE) stageb2g0-start; \
3779 fi; \
3780 cd $(HOST_SUBDIR)/libcpp && \
3781- $(MAKE) $(FLAGS_TO_PASS) \
3782+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3783 $(POSTSTAGE1_FLAGS_TO_PASS) \
3784 clean
3785 @endif libcpp-bootstrap
3786@@ -22926,8 +23208,11 @@
3787 $(HOST_EXPORTS) \
3788 $(POSTSTAGE1_HOST_EXPORTS) \
3789 cd $(HOST_SUBDIR)/libcpp && \
3790- $(MAKE) $(FLAGS_TO_PASS) \
3791- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3792+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3793+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
3794+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
3795+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
3796+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3797 $(TARGET-stage3-libcpp)
3798
3799 maybe-clean-stage3-libcpp: clean-stage3-libcpp
3800@@ -22940,7 +23225,7 @@
3801 $(MAKE) stage3-start; \
3802 fi; \
3803 cd $(HOST_SUBDIR)/libcpp && \
3804- $(MAKE) $(FLAGS_TO_PASS) \
3805+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3806 $(POSTSTAGE1_FLAGS_TO_PASS) \
3807 clean
3808 @endif libcpp-bootstrap
3809@@ -22961,8 +23246,11 @@
3810 $(HOST_EXPORTS) \
3811 $(POSTSTAGE1_HOST_EXPORTS) \
3812 cd $(HOST_SUBDIR)/libcpp && \
3813- $(MAKE) $(FLAGS_TO_PASS) \
3814- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
3815+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3816+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
3817+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
3818+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
3819+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3820 $(TARGET-stageb3g2-libcpp)
3821
3822 maybe-clean-stageb3g2-libcpp: clean-stageb3g2-libcpp
3823@@ -22975,7 +23263,7 @@
3824 $(MAKE) stageb3g2-start; \
3825 fi; \
3826 cd $(HOST_SUBDIR)/libcpp && \
3827- $(MAKE) $(FLAGS_TO_PASS) \
3828+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3829 $(POSTSTAGE1_FLAGS_TO_PASS) \
3830 clean
3831 @endif libcpp-bootstrap
3832@@ -22996,8 +23284,11 @@
3833 $(HOST_EXPORTS) \
3834 $(POSTSTAGE1_HOST_EXPORTS) \
3835 cd $(HOST_SUBDIR)/libcpp && \
3836- $(MAKE) $(FLAGS_TO_PASS) \
3837- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
3838+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3839+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
3840+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
3841+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
3842+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3843 $(TARGET-stage4-libcpp)
3844
3845 maybe-clean-stage4-libcpp: clean-stage4-libcpp
3846@@ -23010,7 +23301,7 @@
3847 $(MAKE) stage4-start; \
3848 fi; \
3849 cd $(HOST_SUBDIR)/libcpp && \
3850- $(MAKE) $(FLAGS_TO_PASS) \
3851+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3852 $(POSTSTAGE1_FLAGS_TO_PASS) \
3853 clean
3854 @endif libcpp-bootstrap
3855@@ -23031,8 +23322,11 @@
3856 $(HOST_EXPORTS) \
3857 $(POSTSTAGE1_HOST_EXPORTS) \
3858 cd $(HOST_SUBDIR)/libcpp && \
3859- $(MAKE) $(FLAGS_TO_PASS) \
3860- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
3861+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3862+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
3863+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3864+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
3865+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3866 $(TARGET-stageprofile-libcpp)
3867
3868 maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
3869@@ -23045,7 +23339,7 @@
3870 $(MAKE) stageprofile-start; \
3871 fi; \
3872 cd $(HOST_SUBDIR)/libcpp && \
3873- $(MAKE) $(FLAGS_TO_PASS) \
3874+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3875 $(POSTSTAGE1_FLAGS_TO_PASS) \
3876 clean
3877 @endif libcpp-bootstrap
3878@@ -23066,8 +23360,11 @@
3879 $(HOST_EXPORTS) \
3880 $(POSTSTAGE1_HOST_EXPORTS) \
3881 cd $(HOST_SUBDIR)/libcpp && \
3882- $(MAKE) $(FLAGS_TO_PASS) \
3883- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
3884+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
3885+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
3886+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3887+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
3888+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
3889 $(TARGET-stagefeedback-libcpp)
3890
3891 maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
3892@@ -23080,7 +23377,7 @@
3893 $(MAKE) stagefeedback-start; \
3894 fi; \
3895 cd $(HOST_SUBDIR)/libcpp && \
3896- $(MAKE) $(FLAGS_TO_PASS) \
3897+ $(MAKE) $(EXTRA_HOST_FLAGS) \
3898 $(POSTSTAGE1_FLAGS_TO_PASS) \
3899 clean
3900 @endif libcpp-bootstrap
3901@@ -23487,9 +23784,9 @@
3902 @r=`${PWD_COMMAND}`; export r; \
3903 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3904 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3905- $(HOST_EXPORTS) \
3906+ $(HOST_EXPORTS) \
3907 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
3908- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
3909+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
3910 echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \
3911 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3912 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3913@@ -23518,9 +23815,9 @@
3914 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3915 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3916 $(HOST_EXPORTS) \
3917- $(POSTSTAGE1_HOST_EXPORTS) \
3918+ $(POSTSTAGE1_HOST_EXPORTS) \
3919 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
3920- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
3921+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
3922 echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \
3923 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3924 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3925@@ -23549,9 +23846,9 @@
3926 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3927 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3928 $(HOST_EXPORTS) \
3929- $(POSTSTAGE1_HOST_EXPORTS) \
3930+ $(POSTSTAGE1_HOST_EXPORTS) \
3931 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
3932- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
3933+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
3934 echo Configuring stage b2g0 in $(HOST_SUBDIR)/libdecnumber ; \
3935 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3936 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3937@@ -23580,9 +23877,9 @@
3938 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3939 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3940 $(HOST_EXPORTS) \
3941- $(POSTSTAGE1_HOST_EXPORTS) \
3942+ $(POSTSTAGE1_HOST_EXPORTS) \
3943 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
3944- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
3945+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
3946 echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \
3947 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3948 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3949@@ -23611,9 +23908,9 @@
3950 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3951 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3952 $(HOST_EXPORTS) \
3953- $(POSTSTAGE1_HOST_EXPORTS) \
3954+ $(POSTSTAGE1_HOST_EXPORTS) \
3955 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
3956- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
3957+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
3958 echo Configuring stage b3g2 in $(HOST_SUBDIR)/libdecnumber ; \
3959 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3960 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3961@@ -23642,9 +23939,9 @@
3962 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3963 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3964 $(HOST_EXPORTS) \
3965- $(POSTSTAGE1_HOST_EXPORTS) \
3966+ $(POSTSTAGE1_HOST_EXPORTS) \
3967 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
3968- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
3969+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
3970 echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \
3971 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3972 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3973@@ -23673,9 +23970,9 @@
3974 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3975 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3976 $(HOST_EXPORTS) \
3977- $(POSTSTAGE1_HOST_EXPORTS) \
3978+ $(POSTSTAGE1_HOST_EXPORTS) \
3979 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
3980- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
3981+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
3982 echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \
3983 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3984 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3985@@ -23704,9 +24001,9 @@
3986 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3987 test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
3988 $(HOST_EXPORTS) \
3989- $(POSTSTAGE1_HOST_EXPORTS) \
3990+ $(POSTSTAGE1_HOST_EXPORTS) \
3991 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
3992- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
3993+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
3994 echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \
3995 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
3996 cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
3997@@ -23741,7 +24038,8 @@
3998 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
3999 $(HOST_EXPORTS) \
4000 (cd $(HOST_SUBDIR)/libdecnumber && \
4001- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libdecnumber))
4002+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4003+ $(TARGET-libdecnumber))
4004 @endif libdecnumber
4005
4006
4007@@ -23760,8 +24058,11 @@
4008 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4009 $(HOST_EXPORTS) \
4010 cd $(HOST_SUBDIR)/libdecnumber && \
4011- $(MAKE) $(FLAGS_TO_PASS) \
4012- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
4013+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4014+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
4015+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
4016+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
4017+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
4018 $(TARGET-stage1-libdecnumber)
4019
4020 maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber
4021@@ -23774,7 +24075,7 @@
4022 $(MAKE) stage1-start; \
4023 fi; \
4024 cd $(HOST_SUBDIR)/libdecnumber && \
4025- $(MAKE) $(FLAGS_TO_PASS) \
4026+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4027 clean
4028 @endif libdecnumber-bootstrap
4029
4030@@ -23794,8 +24095,11 @@
4031 $(HOST_EXPORTS) \
4032 $(POSTSTAGE1_HOST_EXPORTS) \
4033 cd $(HOST_SUBDIR)/libdecnumber && \
4034- $(MAKE) $(FLAGS_TO_PASS) \
4035- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4036+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4037+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
4038+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
4039+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
4040+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4041 $(TARGET-stage2-libdecnumber)
4042
4043 maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber
4044@@ -23808,7 +24112,7 @@
4045 $(MAKE) stage2-start; \
4046 fi; \
4047 cd $(HOST_SUBDIR)/libdecnumber && \
4048- $(MAKE) $(FLAGS_TO_PASS) \
4049+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4050 $(POSTSTAGE1_FLAGS_TO_PASS) \
4051 clean
4052 @endif libdecnumber-bootstrap
4053@@ -23829,8 +24133,11 @@
4054 $(HOST_EXPORTS) \
4055 $(POSTSTAGE1_HOST_EXPORTS) \
4056 cd $(HOST_SUBDIR)/libdecnumber && \
4057- $(MAKE) $(FLAGS_TO_PASS) \
4058- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
4059+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4060+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
4061+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
4062+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
4063+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4064 $(TARGET-stageb2g0-libdecnumber)
4065
4066 maybe-clean-stageb2g0-libdecnumber: clean-stageb2g0-libdecnumber
4067@@ -23843,7 +24150,7 @@
4068 $(MAKE) stageb2g0-start; \
4069 fi; \
4070 cd $(HOST_SUBDIR)/libdecnumber && \
4071- $(MAKE) $(FLAGS_TO_PASS) \
4072+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4073 $(POSTSTAGE1_FLAGS_TO_PASS) \
4074 clean
4075 @endif libdecnumber-bootstrap
4076@@ -23864,8 +24171,11 @@
4077 $(HOST_EXPORTS) \
4078 $(POSTSTAGE1_HOST_EXPORTS) \
4079 cd $(HOST_SUBDIR)/libdecnumber && \
4080- $(MAKE) $(FLAGS_TO_PASS) \
4081- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4082+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4083+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
4084+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
4085+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
4086+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4087 $(TARGET-stage3-libdecnumber)
4088
4089 maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber
4090@@ -23878,7 +24188,7 @@
4091 $(MAKE) stage3-start; \
4092 fi; \
4093 cd $(HOST_SUBDIR)/libdecnumber && \
4094- $(MAKE) $(FLAGS_TO_PASS) \
4095+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4096 $(POSTSTAGE1_FLAGS_TO_PASS) \
4097 clean
4098 @endif libdecnumber-bootstrap
4099@@ -23899,8 +24209,11 @@
4100 $(HOST_EXPORTS) \
4101 $(POSTSTAGE1_HOST_EXPORTS) \
4102 cd $(HOST_SUBDIR)/libdecnumber && \
4103- $(MAKE) $(FLAGS_TO_PASS) \
4104- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
4105+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4106+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
4107+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
4108+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
4109+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4110 $(TARGET-stageb3g2-libdecnumber)
4111
4112 maybe-clean-stageb3g2-libdecnumber: clean-stageb3g2-libdecnumber
4113@@ -23913,7 +24226,7 @@
4114 $(MAKE) stageb3g2-start; \
4115 fi; \
4116 cd $(HOST_SUBDIR)/libdecnumber && \
4117- $(MAKE) $(FLAGS_TO_PASS) \
4118+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4119 $(POSTSTAGE1_FLAGS_TO_PASS) \
4120 clean
4121 @endif libdecnumber-bootstrap
4122@@ -23934,8 +24247,11 @@
4123 $(HOST_EXPORTS) \
4124 $(POSTSTAGE1_HOST_EXPORTS) \
4125 cd $(HOST_SUBDIR)/libdecnumber && \
4126- $(MAKE) $(FLAGS_TO_PASS) \
4127- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4128+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4129+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
4130+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
4131+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
4132+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4133 $(TARGET-stage4-libdecnumber)
4134
4135 maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber
4136@@ -23948,7 +24264,7 @@
4137 $(MAKE) stage4-start; \
4138 fi; \
4139 cd $(HOST_SUBDIR)/libdecnumber && \
4140- $(MAKE) $(FLAGS_TO_PASS) \
4141+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4142 $(POSTSTAGE1_FLAGS_TO_PASS) \
4143 clean
4144 @endif libdecnumber-bootstrap
4145@@ -23969,8 +24285,11 @@
4146 $(HOST_EXPORTS) \
4147 $(POSTSTAGE1_HOST_EXPORTS) \
4148 cd $(HOST_SUBDIR)/libdecnumber && \
4149- $(MAKE) $(FLAGS_TO_PASS) \
4150- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
4151+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4152+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
4153+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4154+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4155+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4156 $(TARGET-stageprofile-libdecnumber)
4157
4158 maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber
4159@@ -23983,7 +24302,7 @@
4160 $(MAKE) stageprofile-start; \
4161 fi; \
4162 cd $(HOST_SUBDIR)/libdecnumber && \
4163- $(MAKE) $(FLAGS_TO_PASS) \
4164+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4165 $(POSTSTAGE1_FLAGS_TO_PASS) \
4166 clean
4167 @endif libdecnumber-bootstrap
4168@@ -24004,8 +24323,11 @@
4169 $(HOST_EXPORTS) \
4170 $(POSTSTAGE1_HOST_EXPORTS) \
4171 cd $(HOST_SUBDIR)/libdecnumber && \
4172- $(MAKE) $(FLAGS_TO_PASS) \
4173- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
4174+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4175+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
4176+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4177+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4178+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4179 $(TARGET-stagefeedback-libdecnumber)
4180
4181 maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber
4182@@ -24018,7 +24340,7 @@
4183 $(MAKE) stagefeedback-start; \
4184 fi; \
4185 cd $(HOST_SUBDIR)/libdecnumber && \
4186- $(MAKE) $(FLAGS_TO_PASS) \
4187+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4188 $(POSTSTAGE1_FLAGS_TO_PASS) \
4189 clean
4190 @endif libdecnumber-bootstrap
4191@@ -24432,7 +24754,8 @@
4192 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4193 $(HOST_EXPORTS) \
4194 (cd $(HOST_SUBDIR)/libgui && \
4195- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libgui))
4196+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4197+ $(TARGET-libgui))
4198 @endif libgui
4199
4200
4201@@ -24849,9 +25172,9 @@
4202 @r=`${PWD_COMMAND}`; export r; \
4203 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4204 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4205- $(HOST_EXPORTS) \
4206+ $(HOST_EXPORTS) \
4207 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
4208- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
4209+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
4210 echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \
4211 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4212 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4213@@ -24880,9 +25203,9 @@
4214 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4215 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4216 $(HOST_EXPORTS) \
4217- $(POSTSTAGE1_HOST_EXPORTS) \
4218+ $(POSTSTAGE1_HOST_EXPORTS) \
4219 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
4220- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
4221+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
4222 echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \
4223 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4224 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4225@@ -24911,9 +25234,9 @@
4226 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4227 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4228 $(HOST_EXPORTS) \
4229- $(POSTSTAGE1_HOST_EXPORTS) \
4230+ $(POSTSTAGE1_HOST_EXPORTS) \
4231 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
4232- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
4233+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
4234 echo Configuring stage b2g0 in $(HOST_SUBDIR)/libiberty ; \
4235 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4236 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4237@@ -24942,9 +25265,9 @@
4238 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4239 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4240 $(HOST_EXPORTS) \
4241- $(POSTSTAGE1_HOST_EXPORTS) \
4242+ $(POSTSTAGE1_HOST_EXPORTS) \
4243 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
4244- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
4245+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
4246 echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \
4247 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4248 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4249@@ -24973,9 +25296,9 @@
4250 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4251 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4252 $(HOST_EXPORTS) \
4253- $(POSTSTAGE1_HOST_EXPORTS) \
4254+ $(POSTSTAGE1_HOST_EXPORTS) \
4255 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
4256- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
4257+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
4258 echo Configuring stage b3g2 in $(HOST_SUBDIR)/libiberty ; \
4259 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4260 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4261@@ -25004,9 +25327,9 @@
4262 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4263 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4264 $(HOST_EXPORTS) \
4265- $(POSTSTAGE1_HOST_EXPORTS) \
4266+ $(POSTSTAGE1_HOST_EXPORTS) \
4267 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
4268- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
4269+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
4270 echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \
4271 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4272 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4273@@ -25035,9 +25358,9 @@
4274 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4275 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4276 $(HOST_EXPORTS) \
4277- $(POSTSTAGE1_HOST_EXPORTS) \
4278+ $(POSTSTAGE1_HOST_EXPORTS) \
4279 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
4280- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
4281+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
4282 echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \
4283 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4284 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4285@@ -25066,9 +25389,9 @@
4286 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4287 test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
4288 $(HOST_EXPORTS) \
4289- $(POSTSTAGE1_HOST_EXPORTS) \
4290+ $(POSTSTAGE1_HOST_EXPORTS) \
4291 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
4292- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
4293+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
4294 echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \
4295 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
4296 cd $(HOST_SUBDIR)/libiberty || exit 1; \
4297@@ -25103,7 +25426,8 @@
4298 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4299 $(HOST_EXPORTS) \
4300 (cd $(HOST_SUBDIR)/libiberty && \
4301- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libiberty))
4302+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4303+ $(TARGET-libiberty))
4304 @endif libiberty
4305
4306
4307@@ -25122,8 +25446,11 @@
4308 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4309 $(HOST_EXPORTS) \
4310 cd $(HOST_SUBDIR)/libiberty && \
4311- $(MAKE) $(FLAGS_TO_PASS) \
4312- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
4313+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4314+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
4315+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
4316+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
4317+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
4318 $(TARGET-stage1-libiberty)
4319
4320 maybe-clean-stage1-libiberty: clean-stage1-libiberty
4321@@ -25136,7 +25463,7 @@
4322 $(MAKE) stage1-start; \
4323 fi; \
4324 cd $(HOST_SUBDIR)/libiberty && \
4325- $(MAKE) $(FLAGS_TO_PASS) \
4326+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4327 clean
4328 @endif libiberty-bootstrap
4329
4330@@ -25156,8 +25483,11 @@
4331 $(HOST_EXPORTS) \
4332 $(POSTSTAGE1_HOST_EXPORTS) \
4333 cd $(HOST_SUBDIR)/libiberty && \
4334- $(MAKE) $(FLAGS_TO_PASS) \
4335- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4336+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4337+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
4338+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
4339+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
4340+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4341 $(TARGET-stage2-libiberty)
4342
4343 maybe-clean-stage2-libiberty: clean-stage2-libiberty
4344@@ -25170,7 +25500,7 @@
4345 $(MAKE) stage2-start; \
4346 fi; \
4347 cd $(HOST_SUBDIR)/libiberty && \
4348- $(MAKE) $(FLAGS_TO_PASS) \
4349+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4350 $(POSTSTAGE1_FLAGS_TO_PASS) \
4351 clean
4352 @endif libiberty-bootstrap
4353@@ -25191,8 +25521,11 @@
4354 $(HOST_EXPORTS) \
4355 $(POSTSTAGE1_HOST_EXPORTS) \
4356 cd $(HOST_SUBDIR)/libiberty && \
4357- $(MAKE) $(FLAGS_TO_PASS) \
4358- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
4359+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4360+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
4361+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
4362+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
4363+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4364 $(TARGET-stageb2g0-libiberty)
4365
4366 maybe-clean-stageb2g0-libiberty: clean-stageb2g0-libiberty
4367@@ -25205,7 +25538,7 @@
4368 $(MAKE) stageb2g0-start; \
4369 fi; \
4370 cd $(HOST_SUBDIR)/libiberty && \
4371- $(MAKE) $(FLAGS_TO_PASS) \
4372+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4373 $(POSTSTAGE1_FLAGS_TO_PASS) \
4374 clean
4375 @endif libiberty-bootstrap
4376@@ -25226,8 +25559,11 @@
4377 $(HOST_EXPORTS) \
4378 $(POSTSTAGE1_HOST_EXPORTS) \
4379 cd $(HOST_SUBDIR)/libiberty && \
4380- $(MAKE) $(FLAGS_TO_PASS) \
4381- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4382+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4383+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
4384+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
4385+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
4386+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4387 $(TARGET-stage3-libiberty)
4388
4389 maybe-clean-stage3-libiberty: clean-stage3-libiberty
4390@@ -25240,7 +25576,7 @@
4391 $(MAKE) stage3-start; \
4392 fi; \
4393 cd $(HOST_SUBDIR)/libiberty && \
4394- $(MAKE) $(FLAGS_TO_PASS) \
4395+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4396 $(POSTSTAGE1_FLAGS_TO_PASS) \
4397 clean
4398 @endif libiberty-bootstrap
4399@@ -25261,8 +25597,11 @@
4400 $(HOST_EXPORTS) \
4401 $(POSTSTAGE1_HOST_EXPORTS) \
4402 cd $(HOST_SUBDIR)/libiberty && \
4403- $(MAKE) $(FLAGS_TO_PASS) \
4404- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
4405+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4406+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
4407+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
4408+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
4409+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4410 $(TARGET-stageb3g2-libiberty)
4411
4412 maybe-clean-stageb3g2-libiberty: clean-stageb3g2-libiberty
4413@@ -25275,7 +25614,7 @@
4414 $(MAKE) stageb3g2-start; \
4415 fi; \
4416 cd $(HOST_SUBDIR)/libiberty && \
4417- $(MAKE) $(FLAGS_TO_PASS) \
4418+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4419 $(POSTSTAGE1_FLAGS_TO_PASS) \
4420 clean
4421 @endif libiberty-bootstrap
4422@@ -25296,8 +25635,11 @@
4423 $(HOST_EXPORTS) \
4424 $(POSTSTAGE1_HOST_EXPORTS) \
4425 cd $(HOST_SUBDIR)/libiberty && \
4426- $(MAKE) $(FLAGS_TO_PASS) \
4427- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4428+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4429+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
4430+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
4431+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
4432+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4433 $(TARGET-stage4-libiberty)
4434
4435 maybe-clean-stage4-libiberty: clean-stage4-libiberty
4436@@ -25310,7 +25652,7 @@
4437 $(MAKE) stage4-start; \
4438 fi; \
4439 cd $(HOST_SUBDIR)/libiberty && \
4440- $(MAKE) $(FLAGS_TO_PASS) \
4441+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4442 $(POSTSTAGE1_FLAGS_TO_PASS) \
4443 clean
4444 @endif libiberty-bootstrap
4445@@ -25331,8 +25673,11 @@
4446 $(HOST_EXPORTS) \
4447 $(POSTSTAGE1_HOST_EXPORTS) \
4448 cd $(HOST_SUBDIR)/libiberty && \
4449- $(MAKE) $(FLAGS_TO_PASS) \
4450- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
4451+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4452+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
4453+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4454+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4455+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4456 $(TARGET-stageprofile-libiberty)
4457
4458 maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
4459@@ -25345,7 +25690,7 @@
4460 $(MAKE) stageprofile-start; \
4461 fi; \
4462 cd $(HOST_SUBDIR)/libiberty && \
4463- $(MAKE) $(FLAGS_TO_PASS) \
4464+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4465 $(POSTSTAGE1_FLAGS_TO_PASS) \
4466 clean
4467 @endif libiberty-bootstrap
4468@@ -25366,8 +25711,11 @@
4469 $(HOST_EXPORTS) \
4470 $(POSTSTAGE1_HOST_EXPORTS) \
4471 cd $(HOST_SUBDIR)/libiberty && \
4472- $(MAKE) $(FLAGS_TO_PASS) \
4473- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
4474+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4475+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
4476+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4477+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4478+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4479 $(TARGET-stagefeedback-libiberty)
4480
4481 maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
4482@@ -25380,7 +25728,7 @@
4483 $(MAKE) stagefeedback-start; \
4484 fi; \
4485 cd $(HOST_SUBDIR)/libiberty && \
4486- $(MAKE) $(FLAGS_TO_PASS) \
4487+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4488 $(POSTSTAGE1_FLAGS_TO_PASS) \
4489 clean
4490 @endif libiberty-bootstrap
4491@@ -25794,7 +26142,8 @@
4492 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4493 $(HOST_EXPORTS) \
4494 (cd $(HOST_SUBDIR)/libtool && \
4495- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtool))
4496+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4497+ $(TARGET-libtool))
4498 @endif libtool
4499
4500
4501@@ -26218,7 +26567,8 @@
4502 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4503 $(HOST_EXPORTS) \
4504 (cd $(HOST_SUBDIR)/m4 && \
4505- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-m4))
4506+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4507+ $(TARGET-m4))
4508 @endif m4
4509
4510
4511@@ -26642,7 +26992,8 @@
4512 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4513 $(HOST_EXPORTS) \
4514 (cd $(HOST_SUBDIR)/make && \
4515- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-make))
4516+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4517+ $(TARGET-make))
4518 @endif make
4519
4520
4521@@ -27066,7 +27417,8 @@
4522 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4523 $(HOST_EXPORTS) \
4524 (cd $(HOST_SUBDIR)/mmalloc && \
4525- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mmalloc))
4526+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4527+ $(TARGET-mmalloc))
4528 @endif mmalloc
4529
4530
4531@@ -27484,7 +27836,8 @@
4532 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4533 $(HOST_EXPORTS) \
4534 (cd $(HOST_SUBDIR)/patch && \
4535- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-patch))
4536+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4537+ $(TARGET-patch))
4538 @endif patch
4539
4540
4541@@ -27908,7 +28261,8 @@
4542 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4543 $(HOST_EXPORTS) \
4544 (cd $(HOST_SUBDIR)/perl && \
4545- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-perl))
4546+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4547+ $(TARGET-perl))
4548 @endif perl
4549
4550
4551@@ -28332,7 +28686,8 @@
4552 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4553 $(HOST_EXPORTS) \
4554 (cd $(HOST_SUBDIR)/prms && \
4555- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-prms))
4556+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4557+ $(TARGET-prms))
4558 @endif prms
4559
4560
4561@@ -28756,7 +29111,8 @@
4562 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4563 $(HOST_EXPORTS) \
4564 (cd $(HOST_SUBDIR)/rcs && \
4565- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-rcs))
4566+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4567+ $(TARGET-rcs))
4568 @endif rcs
4569
4570
4571@@ -29180,7 +29536,8 @@
4572 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4573 $(HOST_EXPORTS) \
4574 (cd $(HOST_SUBDIR)/readline && \
4575- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-readline))
4576+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4577+ $(TARGET-readline))
4578 @endif readline
4579
4580
4581@@ -29604,7 +29961,8 @@
4582 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4583 $(HOST_EXPORTS) \
4584 (cd $(HOST_SUBDIR)/release && \
4585- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-release))
4586+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4587+ $(TARGET-release))
4588 @endif release
4589
4590
4591@@ -30016,7 +30374,8 @@
4592 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4593 $(HOST_EXPORTS) \
4594 (cd $(HOST_SUBDIR)/recode && \
4595- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-recode))
4596+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4597+ $(TARGET-recode))
4598 @endif recode
4599
4600
4601@@ -30440,7 +30799,8 @@
4602 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4603 $(HOST_EXPORTS) \
4604 (cd $(HOST_SUBDIR)/sed && \
4605- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sed))
4606+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4607+ $(TARGET-sed))
4608 @endif sed
4609
4610
4611@@ -30864,7 +31224,8 @@
4612 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4613 $(HOST_EXPORTS) \
4614 (cd $(HOST_SUBDIR)/send-pr && \
4615- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-send-pr))
4616+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4617+ $(TARGET-send-pr))
4618 @endif send-pr
4619
4620
4621@@ -31288,7 +31649,8 @@
4622 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4623 $(HOST_EXPORTS) \
4624 (cd $(HOST_SUBDIR)/shellutils && \
4625- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-shellutils))
4626+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4627+ $(TARGET-shellutils))
4628 @endif shellutils
4629
4630
4631@@ -31712,7 +32074,8 @@
4632 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4633 $(HOST_EXPORTS) \
4634 (cd $(HOST_SUBDIR)/sid && \
4635- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sid))
4636+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4637+ $(TARGET-sid))
4638 @endif sid
4639
4640
4641@@ -32136,7 +32499,8 @@
4642 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4643 $(HOST_EXPORTS) \
4644 (cd $(HOST_SUBDIR)/sim && \
4645- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sim))
4646+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4647+ $(TARGET-sim))
4648 @endif sim
4649
4650
4651@@ -32560,7 +32924,8 @@
4652 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4653 $(HOST_EXPORTS) \
4654 (cd $(HOST_SUBDIR)/tar && \
4655- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tar))
4656+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4657+ $(TARGET-tar))
4658 @endif tar
4659
4660
4661@@ -32984,7 +33349,8 @@
4662 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4663 $(HOST_EXPORTS) \
4664 (cd $(HOST_SUBDIR)/texinfo && \
4665- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-texinfo))
4666+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4667+ $(TARGET-texinfo))
4668 @endif texinfo
4669
4670
4671@@ -33402,7 +33768,8 @@
4672 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4673 $(HOST_EXPORTS) \
4674 (cd $(HOST_SUBDIR)/textutils && \
4675- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-textutils))
4676+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4677+ $(TARGET-textutils))
4678 @endif textutils
4679
4680
4681@@ -33826,7 +34193,8 @@
4682 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4683 $(HOST_EXPORTS) \
4684 (cd $(HOST_SUBDIR)/time && \
4685- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-time))
4686+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4687+ $(TARGET-time))
4688 @endif time
4689
4690
4691@@ -34250,7 +34618,8 @@
4692 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4693 $(HOST_EXPORTS) \
4694 (cd $(HOST_SUBDIR)/uudecode && \
4695- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-uudecode))
4696+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4697+ $(TARGET-uudecode))
4698 @endif uudecode
4699
4700
4701@@ -34674,7 +35043,8 @@
4702 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4703 $(HOST_EXPORTS) \
4704 (cd $(HOST_SUBDIR)/wdiff && \
4705- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-wdiff))
4706+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4707+ $(TARGET-wdiff))
4708 @endif wdiff
4709
4710
4711@@ -35098,7 +35468,8 @@
4712 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4713 $(HOST_EXPORTS) \
4714 (cd $(HOST_SUBDIR)/zip && \
4715- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zip))
4716+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4717+ $(TARGET-zip))
4718 @endif zip
4719
4720
4721@@ -35518,9 +35889,9 @@
4722 @r=`${PWD_COMMAND}`; export r; \
4723 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4724 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4725- $(HOST_EXPORTS) \
4726+ $(HOST_EXPORTS) \
4727 CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
4728- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
4729+ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
4730 echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \
4731 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4732 cd $(HOST_SUBDIR)/zlib || exit 1; \
4733@@ -35549,9 +35920,9 @@
4734 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4735 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4736 $(HOST_EXPORTS) \
4737- $(POSTSTAGE1_HOST_EXPORTS) \
4738+ $(POSTSTAGE1_HOST_EXPORTS) \
4739 CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
4740- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
4741+ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
4742 echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \
4743 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4744 cd $(HOST_SUBDIR)/zlib || exit 1; \
4745@@ -35580,9 +35951,9 @@
4746 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4747 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4748 $(HOST_EXPORTS) \
4749- $(POSTSTAGE1_HOST_EXPORTS) \
4750+ $(POSTSTAGE1_HOST_EXPORTS) \
4751 CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
4752- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
4753+ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
4754 echo Configuring stage b2g0 in $(HOST_SUBDIR)/zlib ; \
4755 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4756 cd $(HOST_SUBDIR)/zlib || exit 1; \
4757@@ -35611,9 +35982,9 @@
4758 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4759 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4760 $(HOST_EXPORTS) \
4761- $(POSTSTAGE1_HOST_EXPORTS) \
4762+ $(POSTSTAGE1_HOST_EXPORTS) \
4763 CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
4764- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
4765+ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
4766 echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \
4767 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4768 cd $(HOST_SUBDIR)/zlib || exit 1; \
4769@@ -35642,9 +36013,9 @@
4770 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4771 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4772 $(HOST_EXPORTS) \
4773- $(POSTSTAGE1_HOST_EXPORTS) \
4774+ $(POSTSTAGE1_HOST_EXPORTS) \
4775 CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
4776- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
4777+ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
4778 echo Configuring stage b3g2 in $(HOST_SUBDIR)/zlib ; \
4779 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4780 cd $(HOST_SUBDIR)/zlib || exit 1; \
4781@@ -35673,9 +36044,9 @@
4782 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4783 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4784 $(HOST_EXPORTS) \
4785- $(POSTSTAGE1_HOST_EXPORTS) \
4786+ $(POSTSTAGE1_HOST_EXPORTS) \
4787 CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
4788- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
4789+ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
4790 echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \
4791 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4792 cd $(HOST_SUBDIR)/zlib || exit 1; \
4793@@ -35704,9 +36075,9 @@
4794 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4795 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4796 $(HOST_EXPORTS) \
4797- $(POSTSTAGE1_HOST_EXPORTS) \
4798+ $(POSTSTAGE1_HOST_EXPORTS) \
4799 CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
4800- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
4801+ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
4802 echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \
4803 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4804 cd $(HOST_SUBDIR)/zlib || exit 1; \
4805@@ -35735,9 +36106,9 @@
4806 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4807 test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
4808 $(HOST_EXPORTS) \
4809- $(POSTSTAGE1_HOST_EXPORTS) \
4810+ $(POSTSTAGE1_HOST_EXPORTS) \
4811 CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
4812- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
4813+ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
4814 echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \
4815 $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
4816 cd $(HOST_SUBDIR)/zlib || exit 1; \
4817@@ -35772,7 +36143,8 @@
4818 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4819 $(HOST_EXPORTS) \
4820 (cd $(HOST_SUBDIR)/zlib && \
4821- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zlib))
4822+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
4823+ $(TARGET-zlib))
4824 @endif zlib
4825
4826
4827@@ -35791,8 +36163,11 @@
4828 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
4829 $(HOST_EXPORTS) \
4830 cd $(HOST_SUBDIR)/zlib && \
4831- $(MAKE) $(FLAGS_TO_PASS) \
4832- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
4833+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4834+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
4835+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
4836+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
4837+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
4838 $(TARGET-stage1-zlib)
4839
4840 maybe-clean-stage1-zlib: clean-stage1-zlib
4841@@ -35805,7 +36180,7 @@
4842 $(MAKE) stage1-start; \
4843 fi; \
4844 cd $(HOST_SUBDIR)/zlib && \
4845- $(MAKE) $(FLAGS_TO_PASS) \
4846+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4847 clean
4848 @endif zlib-bootstrap
4849
4850@@ -35825,8 +36200,11 @@
4851 $(HOST_EXPORTS) \
4852 $(POSTSTAGE1_HOST_EXPORTS) \
4853 cd $(HOST_SUBDIR)/zlib && \
4854- $(MAKE) $(FLAGS_TO_PASS) \
4855- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4856+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4857+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
4858+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
4859+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
4860+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4861 $(TARGET-stage2-zlib)
4862
4863 maybe-clean-stage2-zlib: clean-stage2-zlib
4864@@ -35839,7 +36217,7 @@
4865 $(MAKE) stage2-start; \
4866 fi; \
4867 cd $(HOST_SUBDIR)/zlib && \
4868- $(MAKE) $(FLAGS_TO_PASS) \
4869+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4870 $(POSTSTAGE1_FLAGS_TO_PASS) \
4871 clean
4872 @endif zlib-bootstrap
4873@@ -35860,8 +36238,11 @@
4874 $(HOST_EXPORTS) \
4875 $(POSTSTAGE1_HOST_EXPORTS) \
4876 cd $(HOST_SUBDIR)/zlib && \
4877- $(MAKE) $(FLAGS_TO_PASS) \
4878- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
4879+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4880+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
4881+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
4882+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
4883+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4884 $(TARGET-stageb2g0-zlib)
4885
4886 maybe-clean-stageb2g0-zlib: clean-stageb2g0-zlib
4887@@ -35874,7 +36255,7 @@
4888 $(MAKE) stageb2g0-start; \
4889 fi; \
4890 cd $(HOST_SUBDIR)/zlib && \
4891- $(MAKE) $(FLAGS_TO_PASS) \
4892+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4893 $(POSTSTAGE1_FLAGS_TO_PASS) \
4894 clean
4895 @endif zlib-bootstrap
4896@@ -35895,8 +36276,11 @@
4897 $(HOST_EXPORTS) \
4898 $(POSTSTAGE1_HOST_EXPORTS) \
4899 cd $(HOST_SUBDIR)/zlib && \
4900- $(MAKE) $(FLAGS_TO_PASS) \
4901- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4902+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4903+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
4904+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
4905+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
4906+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4907 $(TARGET-stage3-zlib)
4908
4909 maybe-clean-stage3-zlib: clean-stage3-zlib
4910@@ -35909,7 +36293,7 @@
4911 $(MAKE) stage3-start; \
4912 fi; \
4913 cd $(HOST_SUBDIR)/zlib && \
4914- $(MAKE) $(FLAGS_TO_PASS) \
4915+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4916 $(POSTSTAGE1_FLAGS_TO_PASS) \
4917 clean
4918 @endif zlib-bootstrap
4919@@ -35930,8 +36314,11 @@
4920 $(HOST_EXPORTS) \
4921 $(POSTSTAGE1_HOST_EXPORTS) \
4922 cd $(HOST_SUBDIR)/zlib && \
4923- $(MAKE) $(FLAGS_TO_PASS) \
4924- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
4925+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4926+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
4927+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
4928+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
4929+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4930 $(TARGET-stageb3g2-zlib)
4931
4932 maybe-clean-stageb3g2-zlib: clean-stageb3g2-zlib
4933@@ -35944,7 +36331,7 @@
4934 $(MAKE) stageb3g2-start; \
4935 fi; \
4936 cd $(HOST_SUBDIR)/zlib && \
4937- $(MAKE) $(FLAGS_TO_PASS) \
4938+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4939 $(POSTSTAGE1_FLAGS_TO_PASS) \
4940 clean
4941 @endif zlib-bootstrap
4942@@ -35965,8 +36352,11 @@
4943 $(HOST_EXPORTS) \
4944 $(POSTSTAGE1_HOST_EXPORTS) \
4945 cd $(HOST_SUBDIR)/zlib && \
4946- $(MAKE) $(FLAGS_TO_PASS) \
4947- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
4948+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4949+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
4950+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
4951+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
4952+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4953 $(TARGET-stage4-zlib)
4954
4955 maybe-clean-stage4-zlib: clean-stage4-zlib
4956@@ -35979,7 +36369,7 @@
4957 $(MAKE) stage4-start; \
4958 fi; \
4959 cd $(HOST_SUBDIR)/zlib && \
4960- $(MAKE) $(FLAGS_TO_PASS) \
4961+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4962 $(POSTSTAGE1_FLAGS_TO_PASS) \
4963 clean
4964 @endif zlib-bootstrap
4965@@ -36000,8 +36390,11 @@
4966 $(HOST_EXPORTS) \
4967 $(POSTSTAGE1_HOST_EXPORTS) \
4968 cd $(HOST_SUBDIR)/zlib && \
4969- $(MAKE) $(FLAGS_TO_PASS) \
4970- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
4971+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4972+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
4973+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4974+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
4975+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4976 $(TARGET-stageprofile-zlib)
4977
4978 maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
4979@@ -36014,7 +36407,7 @@
4980 $(MAKE) stageprofile-start; \
4981 fi; \
4982 cd $(HOST_SUBDIR)/zlib && \
4983- $(MAKE) $(FLAGS_TO_PASS) \
4984+ $(MAKE) $(EXTRA_HOST_FLAGS) \
4985 $(POSTSTAGE1_FLAGS_TO_PASS) \
4986 clean
4987 @endif zlib-bootstrap
4988@@ -36035,8 +36428,11 @@
4989 $(HOST_EXPORTS) \
4990 $(POSTSTAGE1_HOST_EXPORTS) \
4991 cd $(HOST_SUBDIR)/zlib && \
4992- $(MAKE) $(FLAGS_TO_PASS) \
4993- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
4994+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
4995+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
4996+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4997+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
4998+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
4999 $(TARGET-stagefeedback-zlib)
5000
5001 maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
5002@@ -36049,7 +36445,7 @@
5003 $(MAKE) stagefeedback-start; \
5004 fi; \
5005 cd $(HOST_SUBDIR)/zlib && \
5006- $(MAKE) $(FLAGS_TO_PASS) \
5007+ $(MAKE) $(EXTRA_HOST_FLAGS) \
5008 $(POSTSTAGE1_FLAGS_TO_PASS) \
5009 clean
5010 @endif zlib-bootstrap
5011@@ -36451,7 +36847,8 @@
5012 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5013 $(HOST_EXPORTS) \
5014 (cd $(HOST_SUBDIR)/gdb && \
5015- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-gdb))
5016+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
5017+ $(TARGET-gdb))
5018 @endif gdb
5019
5020
5021@@ -36875,7 +37272,8 @@
5022 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5023 $(HOST_EXPORTS) \
5024 (cd $(HOST_SUBDIR)/expect && \
5025- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-expect))
5026+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
5027+ $(TARGET-expect))
5028 @endif expect
5029
5030
5031@@ -37299,7 +37697,8 @@
5032 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5033 $(HOST_EXPORTS) \
5034 (cd $(HOST_SUBDIR)/guile && \
5035- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-guile))
5036+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
5037+ $(TARGET-guile))
5038 @endif guile
5039
5040
5041@@ -37723,7 +38122,8 @@
5042 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5043 $(HOST_EXPORTS) \
5044 (cd $(HOST_SUBDIR)/tk && \
5045- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-tk))
5046+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
5047+ $(TARGET-tk))
5048 @endif tk
5049
5050
5051@@ -38147,7 +38547,8 @@
5052 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5053 $(HOST_EXPORTS) \
5054 (cd $(HOST_SUBDIR)/libtermcap && \
5055- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtermcap))
5056+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
5057+ $(TARGET-libtermcap))
5058 @endif libtermcap
5059
5060
5061@@ -38505,7 +38906,8 @@
5062 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5063 $(HOST_EXPORTS) \
5064 (cd $(HOST_SUBDIR)/utils && \
5065- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-utils))
5066+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
5067+ $(TARGET-utils))
5068 @endif utils
5069
5070
5071@@ -38923,7 +39325,8 @@
5072 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5073 $(HOST_EXPORTS) \
5074 (cd $(HOST_SUBDIR)/gnattools && \
5075- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnattools))
5076+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
5077+ $(TARGET-gnattools))
5078 @endif gnattools
5079
5080
5081@@ -39368,7 +39771,8 @@
5082 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5083 $(RAW_CXX_TARGET_EXPORTS) \
5084 (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
5085- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libstdc++-v3))
5086+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
5087+ $(TARGET-target-libstdc++-v3))
5088 @endif target-libstdc++-v3
5089
5090
5091@@ -39809,7 +40213,8 @@
5092 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5093 $(NORMAL_TARGET_EXPORTS) \
5094 (cd $(TARGET_SUBDIR)/libmudflap && \
5095- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libmudflap))
5096+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5097+ $(TARGET-target-libmudflap))
5098 @endif target-libmudflap
5099
5100
5101@@ -40250,7 +40655,8 @@
5102 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5103 $(NORMAL_TARGET_EXPORTS) \
5104 (cd $(TARGET_SUBDIR)/libssp && \
5105- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libssp))
5106+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5107+ $(TARGET-target-libssp))
5108 @endif target-libssp
5109
5110
5111@@ -40691,7 +41097,8 @@
5112 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5113 $(NORMAL_TARGET_EXPORTS) \
5114 (cd $(TARGET_SUBDIR)/newlib && \
5115- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
5116+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5117+ $(TARGET-target-newlib))
5118 @endif target-newlib
5119
5120
5121@@ -41137,9 +41544,9 @@
5122 mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
5123 fi; \
5124 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5125- $(NORMAL_TARGET_EXPORTS) \
5126- CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
5127- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
5128+ $(NORMAL_TARGET_EXPORTS) \
5129+ CFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5130+ CXXFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5131 echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc ; \
5132 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5133 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5134@@ -41180,9 +41587,9 @@
5135 fi; \
5136 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5137 $(NORMAL_TARGET_EXPORTS) \
5138- \
5139- CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
5140- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
5141+ \
5142+ CFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5143+ CXXFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5144 echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc ; \
5145 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5146 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5147@@ -41223,9 +41630,9 @@
5148 fi; \
5149 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5150 $(NORMAL_TARGET_EXPORTS) \
5151- \
5152- CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
5153- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
5154+ \
5155+ CFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5156+ CXXFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5157 echo Configuring stage b2g0 in $(TARGET_SUBDIR)/libgcc ; \
5158 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5159 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5160@@ -41266,9 +41673,9 @@
5161 fi; \
5162 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5163 $(NORMAL_TARGET_EXPORTS) \
5164- \
5165- CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
5166- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
5167+ \
5168+ CFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5169+ CXXFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5170 echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc ; \
5171 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5172 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5173@@ -41309,9 +41716,9 @@
5174 fi; \
5175 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5176 $(NORMAL_TARGET_EXPORTS) \
5177- \
5178- CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
5179- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
5180+ \
5181+ CFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5182+ CXXFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5183 echo Configuring stage b3g2 in $(TARGET_SUBDIR)/libgcc ; \
5184 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5185 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5186@@ -41352,9 +41759,9 @@
5187 fi; \
5188 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5189 $(NORMAL_TARGET_EXPORTS) \
5190- \
5191- CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
5192- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
5193+ \
5194+ CFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5195+ CXXFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5196 echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc ; \
5197 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5198 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5199@@ -41395,9 +41802,9 @@
5200 fi; \
5201 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5202 $(NORMAL_TARGET_EXPORTS) \
5203- \
5204- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
5205- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
5206+ \
5207+ CFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5208+ CXXFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5209 echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc ; \
5210 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5211 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5212@@ -41438,9 +41845,9 @@
5213 fi; \
5214 test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
5215 $(NORMAL_TARGET_EXPORTS) \
5216- \
5217- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
5218- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
5219+ \
5220+ CFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
5221+ CXXFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
5222 echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc ; \
5223 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
5224 cd $(TARGET_SUBDIR)/libgcc || exit 1; \
5225@@ -41475,7 +41882,8 @@
5226 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5227 $(NORMAL_TARGET_EXPORTS) \
5228 (cd $(TARGET_SUBDIR)/libgcc && \
5229- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgcc))
5230+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5231+ $(TARGET-target-libgcc))
5232 @endif target-libgcc
5233
5234
5235@@ -41494,8 +41902,11 @@
5236 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5237 $(NORMAL_TARGET_EXPORTS) \
5238 cd $(TARGET_SUBDIR)/libgcc && \
5239- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5240- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
5241+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5242+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
5243+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
5244+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
5245+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
5246 $(TARGET-stage1-target-libgcc)
5247
5248 maybe-clean-stage1-target-libgcc: clean-stage1-target-libgcc
5249@@ -41508,7 +41919,7 @@
5250 $(MAKE) stage1-start; \
5251 fi; \
5252 cd $(TARGET_SUBDIR)/libgcc && \
5253- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5254+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5255 clean
5256 @endif target-libgcc-bootstrap
5257
5258@@ -41528,8 +41939,11 @@
5259 $(NORMAL_TARGET_EXPORTS) \
5260 \
5261 cd $(TARGET_SUBDIR)/libgcc && \
5262- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5263- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" \
5264+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5265+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
5266+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
5267+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
5268+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
5269 $(TARGET-stage2-target-libgcc)
5270
5271 maybe-clean-stage2-target-libgcc: clean-stage2-target-libgcc
5272@@ -41542,7 +41956,7 @@
5273 $(MAKE) stage2-start; \
5274 fi; \
5275 cd $(TARGET_SUBDIR)/libgcc && \
5276- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5277+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5278 \
5279 clean
5280 @endif target-libgcc-bootstrap
5281@@ -41563,8 +41977,11 @@
5282 $(NORMAL_TARGET_EXPORTS) \
5283 \
5284 cd $(TARGET_SUBDIR)/libgcc && \
5285- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5286- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" \
5287+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5288+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
5289+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
5290+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
5291+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_TARGET_FLAGS) \
5292 $(TARGET-stageb2g0-target-libgcc)
5293
5294 maybe-clean-stageb2g0-target-libgcc: clean-stageb2g0-target-libgcc
5295@@ -41577,7 +41994,7 @@
5296 $(MAKE) stageb2g0-start; \
5297 fi; \
5298 cd $(TARGET_SUBDIR)/libgcc && \
5299- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5300+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5301 \
5302 clean
5303 @endif target-libgcc-bootstrap
5304@@ -41598,8 +42015,11 @@
5305 $(NORMAL_TARGET_EXPORTS) \
5306 \
5307 cd $(TARGET_SUBDIR)/libgcc && \
5308- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5309- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" \
5310+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5311+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
5312+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
5313+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
5314+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
5315 $(TARGET-stage3-target-libgcc)
5316
5317 maybe-clean-stage3-target-libgcc: clean-stage3-target-libgcc
5318@@ -41612,7 +42032,7 @@
5319 $(MAKE) stage3-start; \
5320 fi; \
5321 cd $(TARGET_SUBDIR)/libgcc && \
5322- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5323+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5324 \
5325 clean
5326 @endif target-libgcc-bootstrap
5327@@ -41633,8 +42053,11 @@
5328 $(NORMAL_TARGET_EXPORTS) \
5329 \
5330 cd $(TARGET_SUBDIR)/libgcc && \
5331- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5332- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" \
5333+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5334+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
5335+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
5336+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
5337+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_TARGET_FLAGS) \
5338 $(TARGET-stageb3g2-target-libgcc)
5339
5340 maybe-clean-stageb3g2-target-libgcc: clean-stageb3g2-target-libgcc
5341@@ -41647,7 +42070,7 @@
5342 $(MAKE) stageb3g2-start; \
5343 fi; \
5344 cd $(TARGET_SUBDIR)/libgcc && \
5345- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5346+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5347 \
5348 clean
5349 @endif target-libgcc-bootstrap
5350@@ -41668,8 +42091,11 @@
5351 $(NORMAL_TARGET_EXPORTS) \
5352 \
5353 cd $(TARGET_SUBDIR)/libgcc && \
5354- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5355- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" \
5356+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5357+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
5358+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
5359+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
5360+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_TARGET_FLAGS) \
5361 $(TARGET-stage4-target-libgcc)
5362
5363 maybe-clean-stage4-target-libgcc: clean-stage4-target-libgcc
5364@@ -41682,7 +42108,7 @@
5365 $(MAKE) stage4-start; \
5366 fi; \
5367 cd $(TARGET_SUBDIR)/libgcc && \
5368- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5369+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5370 \
5371 clean
5372 @endif target-libgcc-bootstrap
5373@@ -41703,8 +42129,11 @@
5374 $(NORMAL_TARGET_EXPORTS) \
5375 \
5376 cd $(TARGET_SUBDIR)/libgcc && \
5377- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5378- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
5379+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5380+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
5381+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
5382+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
5383+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_TARGET_FLAGS) \
5384 $(TARGET-stageprofile-target-libgcc)
5385
5386 maybe-clean-stageprofile-target-libgcc: clean-stageprofile-target-libgcc
5387@@ -41717,7 +42146,7 @@
5388 $(MAKE) stageprofile-start; \
5389 fi; \
5390 cd $(TARGET_SUBDIR)/libgcc && \
5391- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5392+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5393 \
5394 clean
5395 @endif target-libgcc-bootstrap
5396@@ -41738,8 +42167,11 @@
5397 $(NORMAL_TARGET_EXPORTS) \
5398 \
5399 cd $(TARGET_SUBDIR)/libgcc && \
5400- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5401- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
5402+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
5403+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
5404+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
5405+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
5406+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_TARGET_FLAGS) \
5407 $(TARGET-stagefeedback-target-libgcc)
5408
5409 maybe-clean-stagefeedback-target-libgcc: clean-stagefeedback-target-libgcc
5410@@ -41752,7 +42184,7 @@
5411 $(MAKE) stagefeedback-start; \
5412 fi; \
5413 cd $(TARGET_SUBDIR)/libgcc && \
5414- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
5415+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
5416 \
5417 clean
5418 @endif target-libgcc-bootstrap
5419@@ -42191,7 +42623,8 @@
5420 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5421 $(NORMAL_TARGET_EXPORTS) \
5422 (cd $(TARGET_SUBDIR)/libgfortran && \
5423- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
5424+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5425+ $(TARGET-target-libgfortran))
5426 @endif target-libgfortran
5427
5428
5429@@ -42632,7 +43065,8 @@
5430 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5431 $(NORMAL_TARGET_EXPORTS) \
5432 (cd $(TARGET_SUBDIR)/libobjc && \
5433- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libobjc))
5434+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5435+ $(TARGET-target-libobjc))
5436 @endif target-libobjc
5437
5438
5439@@ -43073,7 +43507,8 @@
5440 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5441 $(NORMAL_TARGET_EXPORTS) \
5442 (cd $(TARGET_SUBDIR)/libtermcap && \
5443- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libtermcap))
5444+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5445+ $(TARGET-target-libtermcap))
5446 @endif target-libtermcap
5447
5448
5449@@ -43449,7 +43884,8 @@
5450 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5451 $(NORMAL_TARGET_EXPORTS) \
5452 (cd $(TARGET_SUBDIR)/winsup && \
5453- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-winsup))
5454+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5455+ $(TARGET-target-winsup))
5456 @endif target-winsup
5457
5458
5459@@ -43890,7 +44326,8 @@
5460 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5461 $(NORMAL_TARGET_EXPORTS) \
5462 (cd $(TARGET_SUBDIR)/libgloss && \
5463- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgloss))
5464+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5465+ $(TARGET-target-libgloss))
5466 @endif target-libgloss
5467
5468
5469@@ -44326,7 +44763,8 @@
5470 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5471 $(NORMAL_TARGET_EXPORTS) \
5472 (cd $(TARGET_SUBDIR)/libiberty && \
5473- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libiberty))
5474+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5475+ $(TARGET-target-libiberty))
5476 @endif target-libiberty
5477
5478
5479@@ -44767,7 +45205,8 @@
5480 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5481 $(NORMAL_TARGET_EXPORTS) \
5482 (cd $(TARGET_SUBDIR)/gperf && \
5483- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-gperf))
5484+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5485+ $(TARGET-target-gperf))
5486 @endif target-gperf
5487
5488
5489@@ -45208,7 +45647,8 @@
5490 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5491 $(NORMAL_TARGET_EXPORTS) \
5492 (cd $(TARGET_SUBDIR)/examples && \
5493- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-examples))
5494+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5495+ $(TARGET-target-examples))
5496 @endif target-examples
5497
5498
5499@@ -45639,7 +46079,8 @@
5500 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5501 $(NORMAL_TARGET_EXPORTS) \
5502 (cd $(TARGET_SUBDIR)/libffi && \
5503- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libffi))
5504+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5505+ $(TARGET-target-libffi))
5506 @endif target-libffi
5507
5508
5509@@ -46080,7 +46521,8 @@
5510 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5511 $(RAW_CXX_TARGET_EXPORTS) \
5512 (cd $(TARGET_SUBDIR)/libjava && \
5513- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libjava))
5514+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
5515+ $(TARGET-target-libjava))
5516 @endif target-libjava
5517
5518
5519@@ -46521,7 +46963,8 @@
5520 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5521 $(NORMAL_TARGET_EXPORTS) \
5522 (cd $(TARGET_SUBDIR)/zlib && \
5523- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-zlib))
5524+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5525+ $(TARGET-target-zlib))
5526 @endif target-zlib
5527
5528
5529@@ -46962,7 +47405,8 @@
5530 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5531 $(NORMAL_TARGET_EXPORTS) \
5532 (cd $(TARGET_SUBDIR)/boehm-gc && \
5533- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-boehm-gc))
5534+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5535+ $(TARGET-target-boehm-gc))
5536 @endif target-boehm-gc
5537
5538
5539@@ -47403,7 +47847,8 @@
5540 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5541 $(NORMAL_TARGET_EXPORTS) \
5542 (cd $(TARGET_SUBDIR)/qthreads && \
5543- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-qthreads))
5544+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5545+ $(TARGET-target-qthreads))
5546 @endif target-qthreads
5547
5548
5549@@ -47844,7 +48289,8 @@
5550 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5551 $(NORMAL_TARGET_EXPORTS) \
5552 (cd $(TARGET_SUBDIR)/rda && \
5553- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-rda))
5554+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5555+ $(TARGET-target-rda))
5556 @endif target-rda
5557
5558
5559@@ -48285,7 +48731,8 @@
5560 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5561 $(NORMAL_TARGET_EXPORTS) \
5562 (cd $(TARGET_SUBDIR)/libada && \
5563- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libada))
5564+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5565+ $(TARGET-target-libada))
5566 @endif target-libada
5567
5568
5569@@ -48726,7 +49173,8 @@
5570 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5571 $(NORMAL_TARGET_EXPORTS) \
5572 (cd $(TARGET_SUBDIR)/libgomp && \
5573- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgomp))
5574+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
5575+ $(TARGET-target-libgomp))
5576 @endif target-libgomp
5577
5578
5579@@ -49359,7 +49807,7 @@
5580
5581 # Bubble a bug fix through all the stages up to stage 1. They are
5582 # remade, but not reconfigured. The next stage (if any) will not be
5583-# reconfigured as well.
5584+# reconfigured either.
5585 .PHONY: stage1-bubble
5586 stage1-bubble::
5587 @r=`${PWD_COMMAND}`; export r; \
5588@@ -49570,7 +50018,7 @@
5589
5590 # Bubble a bug fix through all the stages up to stage 2. They are
5591 # remade, but not reconfigured. The next stage (if any) will not be
5592-# reconfigured as well.
5593+# reconfigured either.
5594 .PHONY: stage2-bubble
5595 stage2-bubble:: stage1-bubble
5596 @r=`${PWD_COMMAND}`; export r; \
5597@@ -49802,7 +50250,7 @@
5598
5599 # Bubble a bug fix through all the stages up to stage b2g0. They are
5600 # remade, but not reconfigured. The next stage (if any) will not be
5601-# reconfigured as well.
5602+# reconfigured either.
5603 .PHONY: stageb2g0-bubble
5604 stageb2g0-bubble:: stage1-bubble
5605 @r=`${PWD_COMMAND}`; export r; \
5606@@ -50034,7 +50482,7 @@
5607
5608 # Bubble a bug fix through all the stages up to stage 3. They are
5609 # remade, but not reconfigured. The next stage (if any) will not be
5610-# reconfigured as well.
5611+# reconfigured either.
5612 .PHONY: stage3-bubble
5613 stage3-bubble:: stage2-bubble
5614 @r=`${PWD_COMMAND}`; export r; \
5615@@ -50320,7 +50768,7 @@
5616
5617 # Bubble a bug fix through all the stages up to stage b3g2. They are
5618 # remade, but not reconfigured. The next stage (if any) will not be
5619-# reconfigured as well.
5620+# reconfigured either.
5621 .PHONY: stageb3g2-bubble
5622 stageb3g2-bubble:: stageb2g0-bubble
5623 @r=`${PWD_COMMAND}`; export r; \
5624@@ -50606,7 +51054,7 @@
5625
5626 # Bubble a bug fix through all the stages up to stage 4. They are
5627 # remade, but not reconfigured. The next stage (if any) will not be
5628-# reconfigured as well.
5629+# reconfigured either.
5630 .PHONY: stage4-bubble
5631 stage4-bubble:: stage3-bubble
5632 @r=`${PWD_COMMAND}`; export r; \
5633@@ -50881,7 +51329,7 @@
5634
5635 # Bubble a bug fix through all the stages up to stage profile. They are
5636 # remade, but not reconfigured. The next stage (if any) will not be
5637-# reconfigured as well.
5638+# reconfigured either.
5639 .PHONY: stageprofile-bubble
5640 stageprofile-bubble:: stage1-bubble
5641 @r=`${PWD_COMMAND}`; export r; \
5642@@ -51092,7 +51540,7 @@
5643
5644 # Bubble a bug fix through all the stages up to stage feedback. They are
5645 # remade, but not reconfigured. The next stage (if any) will not be
5646-# reconfigured as well.
5647+# reconfigured either.
5648 .PHONY: stagefeedback-bubble
5649 stagefeedback-bubble:: stageprofile-bubble
5650 @r=`${PWD_COMMAND}`; export r; \
5651@@ -51175,10 +51623,10 @@
5652 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
5653
5654 .PHONY: restrap
5655-restrap:
5656+restrap::
5657 @: $(MAKE); $(stage)
5658 rm -rf stage1-$(TARGET_SUBDIR) stage2-* stageb2g0-* stage3-* stageb3g2-* stage4-* stageprofile-* stagefeedback-*
5659- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
5660+restrap:: all
5661 @endif gcc-bootstrap
5662
5663 # --------------------------------------
5664@@ -52004,7 +52452,8 @@
5665
5666 # Rebuilding configure.
5667 AUTOCONF = autoconf
5668-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
5669+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
5670+ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
5671 cd $(srcdir) && $(AUTOCONF)
5672
5673 # ------------------------------
5674Index: gcc-4.3.3/configure
5675===================================================================
5676--- gcc-4.3.3.orig/configure 2008-02-01 20:29:30.000000000 -0700
5677+++ gcc-4.3.3/configure 2009-04-29 18:03:50.204611816 -0700
5678@@ -272,7 +272,7 @@
5679 PACKAGE_BUGREPORT=
5680
5681 ac_unique_file="move-if-change"
5682-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 build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
5683+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 build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
5684 ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
5685
5686 # Initialize some variables set by options.
5687@@ -5147,6 +5147,38 @@
5688 fi;
5689
5690
5691+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
5692+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
5693+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
5694+# We want to ensure that TARGET libraries (which we know are built with
5695+# gcc) are built with "-O2 -g", so include those options when setting
5696+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
5697+if test "x$CFLAGS_FOR_TARGET" = x; then
5698+ CFLAGS_FOR_TARGET=$CFLAGS
5699+ case " $CFLAGS " in
5700+ *" -O2 "*) ;;
5701+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
5702+ esac
5703+ case " $CFLAGS " in
5704+ *" -g "* | *" -g3 "*) ;;
5705+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
5706+ esac
5707+fi
5708+
5709+
5710+if test "x$CXXFLAGS_FOR_TARGET" = x; then
5711+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
5712+ case " $CXXFLAGS " in
5713+ *" -O2 "*) ;;
5714+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
5715+ esac
5716+ case " $CXXFLAGS " in
5717+ *" -g "* | *" -g3 "*) ;;
5718+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
5719+ esac
5720+fi
5721+
5722+
5723 # Handle --with-headers=XXX. If the value is not "yes", the contents of
5724 # the named directory are copied to $(tooldir)/sys-include.
5725 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
5726@@ -12825,6 +12857,8 @@
5727 s,@stage1_languages@,$stage1_languages,;t t
5728 s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t
5729 s,@DEBUG_PREFIX_CFLAGS_FOR_TARGET@,$DEBUG_PREFIX_CFLAGS_FOR_TARGET,;t t
5730+s,@CFLAGS_FOR_TARGET@,$CFLAGS_FOR_TARGET,;t t
5731+s,@CXXFLAGS_FOR_TARGET@,$CXXFLAGS_FOR_TARGET,;t t
5732 s,@RPATH_ENVVAR@,$RPATH_ENVVAR,;t t
5733 s,@tooldir@,$tooldir,;t t
5734 s,@build_tooldir@,$build_tooldir,;t t
5735Index: gcc-4.3.3/libiberty/Makefile.in
5736===================================================================
5737--- gcc-4.3.3.orig/libiberty/Makefile.in 2007-07-24 23:26:45.000000000 -0700
5738+++ gcc-4.3.3/libiberty/Makefile.in 2009-04-29 18:03:50.212612133 -0700
5739@@ -60,7 +60,7 @@
5740 MAKEINFO = @MAKEINFO@
5741 PERL = @PERL@
5742
5743-PICFLAG =
5744+PICFLAG = @PICFLAG@
5745
5746 MAKEOVERRIDES =
5747
5748@@ -143,10 +143,11 @@
5749 pex-unix.c pex-win32.c \
5750 physmem.c putenv.c \
5751 random.c regex.c rename.c rindex.c \
5752- safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c spaces.c \
5753- splay-tree.c stpcpy.c stpncpy.c strcasecmp.c strchr.c strdup.c \
5754- strerror.c strncasecmp.c strncmp.c strrchr.c strsignal.c \
5755- strstr.c strtod.c strtol.c strtoul.c strndup.c strverscmp.c \
5756+ safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c \
5757+ spaces.c splay-tree.c stpcpy.c stpncpy.c strcasecmp.c \
5758+ strchr.c strdup.c strerror.c strncasecmp.c strncmp.c \
5759+ strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \
5760+ strndup.c strverscmp.c \
5761 tmpnam.c \
5762 unlink-if-ordinary.c \
5763 vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
5764@@ -156,7 +157,8 @@
5765
5766 # These are always included in the library. The first four are listed
5767 # first and by compile time to optimize parallel builds.
5768-REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
5769+REQUIRED_OFILES = \
5770+ ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
5771 ./alloca.o ./argv.o \
5772 ./choose-temp.o ./concat.o ./cp-demint.o \
5773 ./dyn-string.o \
5774@@ -473,13 +475,13 @@
5775 config.status: $(srcdir)/configure
5776 $(SHELL) ./config.status --recheck
5777
5778-# Depending on stamp-h makes sure that config.status has been re-run
5779+# Depending on config.h makes sure that config.status has been re-run
5780 # if needed. This prevents problems with parallel builds, in case
5781 # subdirectories need to run config.status also.
5782 all-subdir check-subdir installcheck-subdir info-subdir \
5783 install-info-subdir clean-info-subdir dvi-subdir pdf-subdir install-subdir \
5784 etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
5785-maintainer-clean-subdir: stamp-h
5786+maintainer-clean-subdir: config.h
5787 @subdirs='$(SUBDIRS)'; \
5788 target=`echo $@ | sed -e 's/-subdir//'`; \
5789 for dir in $$subdirs ; do \
5790@@ -496,40 +498,41 @@
5791 # The dependencies in the remainder of this file are automatically
5792 # generated by "make maint-deps". Manual edits will be lost.
5793
5794-./_doprnt.o: $(srcdir)/_doprnt.c stamp-h $(INCDIR)/ansidecl.h \
5795+./_doprnt.o: $(srcdir)/_doprnt.c config.h $(INCDIR)/ansidecl.h \
5796 $(INCDIR)/safe-ctype.h
5797 if [ x"$(PICFLAG)" != x ]; then \
5798 $(COMPILE.c) $(PICFLAG) $(srcdir)/_doprnt.c -o pic/$@; \
5799 else true; fi
5800 $(COMPILE.c) $(srcdir)/_doprnt.c $(OUTPUT_OPTION)
5801
5802-./alloca.o: $(srcdir)/alloca.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
5803+./alloca.o: $(srcdir)/alloca.c config.h $(INCDIR)/ansidecl.h \
5804+ $(INCDIR)/libiberty.h
5805 if [ x"$(PICFLAG)" != x ]; then \
5806 $(COMPILE.c) $(PICFLAG) $(srcdir)/alloca.c -o pic/$@; \
5807 else true; fi
5808 $(COMPILE.c) $(srcdir)/alloca.c $(OUTPUT_OPTION)
5809
5810-./argv.o: $(srcdir)/argv.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
5811+./argv.o: $(srcdir)/argv.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
5812 $(INCDIR)/safe-ctype.h
5813 if [ x"$(PICFLAG)" != x ]; then \
5814 $(COMPILE.c) $(PICFLAG) $(srcdir)/argv.c -o pic/$@; \
5815 else true; fi
5816 $(COMPILE.c) $(srcdir)/argv.c $(OUTPUT_OPTION)
5817
5818-./asprintf.o: $(srcdir)/asprintf.c stamp-h $(INCDIR)/ansidecl.h \
5819+./asprintf.o: $(srcdir)/asprintf.c config.h $(INCDIR)/ansidecl.h \
5820 $(INCDIR)/libiberty.h
5821 if [ x"$(PICFLAG)" != x ]; then \
5822 $(COMPILE.c) $(PICFLAG) $(srcdir)/asprintf.c -o pic/$@; \
5823 else true; fi
5824 $(COMPILE.c) $(srcdir)/asprintf.c $(OUTPUT_OPTION)
5825
5826-./atexit.o: $(srcdir)/atexit.c stamp-h
5827+./atexit.o: $(srcdir)/atexit.c config.h
5828 if [ x"$(PICFLAG)" != x ]; then \
5829 $(COMPILE.c) $(PICFLAG) $(srcdir)/atexit.c -o pic/$@; \
5830 else true; fi
5831 $(COMPILE.c) $(srcdir)/atexit.c $(OUTPUT_OPTION)
5832
5833-./basename.o: $(srcdir)/basename.c stamp-h $(INCDIR)/ansidecl.h \
5834+./basename.o: $(srcdir)/basename.c config.h $(INCDIR)/ansidecl.h \
5835 $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
5836 if [ x"$(PICFLAG)" != x ]; then \
5837 $(COMPILE.c) $(PICFLAG) $(srcdir)/basename.c -o pic/$@; \
5838@@ -548,7 +551,7 @@
5839 else true; fi
5840 $(COMPILE.c) $(srcdir)/bcopy.c $(OUTPUT_OPTION)
5841
5842-./bsearch.o: $(srcdir)/bsearch.c stamp-h $(INCDIR)/ansidecl.h
5843+./bsearch.o: $(srcdir)/bsearch.c config.h $(INCDIR)/ansidecl.h
5844 if [ x"$(PICFLAG)" != x ]; then \
5845 $(COMPILE.c) $(PICFLAG) $(srcdir)/bsearch.c -o pic/$@; \
5846 else true; fi
5847@@ -566,20 +569,21 @@
5848 else true; fi
5849 $(COMPILE.c) $(srcdir)/calloc.c $(OUTPUT_OPTION)
5850
5851-./choose-temp.o: $(srcdir)/choose-temp.c stamp-h $(INCDIR)/ansidecl.h \
5852+./choose-temp.o: $(srcdir)/choose-temp.c config.h $(INCDIR)/ansidecl.h \
5853 $(INCDIR)/libiberty.h
5854 if [ x"$(PICFLAG)" != x ]; then \
5855 $(COMPILE.c) $(PICFLAG) $(srcdir)/choose-temp.c -o pic/$@; \
5856 else true; fi
5857 $(COMPILE.c) $(srcdir)/choose-temp.c $(OUTPUT_OPTION)
5858
5859-./clock.o: $(srcdir)/clock.c stamp-h
5860+./clock.o: $(srcdir)/clock.c config.h
5861 if [ x"$(PICFLAG)" != x ]; then \
5862 $(COMPILE.c) $(PICFLAG) $(srcdir)/clock.c -o pic/$@; \
5863 else true; fi
5864 $(COMPILE.c) $(srcdir)/clock.c $(OUTPUT_OPTION)
5865
5866-./concat.o: $(srcdir)/concat.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
5867+./concat.o: $(srcdir)/concat.c config.h $(INCDIR)/ansidecl.h \
5868+ $(INCDIR)/libiberty.h
5869 if [ x"$(PICFLAG)" != x ]; then \
5870 $(COMPILE.c) $(PICFLAG) $(srcdir)/concat.c -o pic/$@; \
5871 else true; fi
5872@@ -591,7 +595,7 @@
5873 else true; fi
5874 $(COMPILE.c) $(srcdir)/copysign.c $(OUTPUT_OPTION)
5875
5876-./cp-demangle.o: $(srcdir)/cp-demangle.c stamp-h $(INCDIR)/ansidecl.h \
5877+./cp-demangle.o: $(srcdir)/cp-demangle.c config.h $(INCDIR)/ansidecl.h \
5878 $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \
5879 $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
5880 if [ x"$(PICFLAG)" != x ]; then \
5881@@ -599,7 +603,7 @@
5882 else true; fi
5883 $(COMPILE.c) $(srcdir)/cp-demangle.c $(OUTPUT_OPTION)
5884
5885-./cp-demint.o: $(srcdir)/cp-demint.c stamp-h $(INCDIR)/ansidecl.h \
5886+./cp-demint.o: $(srcdir)/cp-demint.c config.h $(INCDIR)/ansidecl.h \
5887 $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \
5888 $(INCDIR)/libiberty.h
5889 if [ x"$(PICFLAG)" != x ]; then \
5890@@ -607,7 +611,7 @@
5891 else true; fi
5892 $(COMPILE.c) $(srcdir)/cp-demint.c $(OUTPUT_OPTION)
5893
5894-./cplus-dem.o: $(srcdir)/cplus-dem.c stamp-h $(INCDIR)/ansidecl.h \
5895+./cplus-dem.o: $(srcdir)/cplus-dem.c config.h $(INCDIR)/ansidecl.h \
5896 $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
5897 $(INCDIR)/safe-ctype.h
5898 if [ x"$(PICFLAG)" != x ]; then \
5899@@ -615,14 +619,14 @@
5900 else true; fi
5901 $(COMPILE.c) $(srcdir)/cplus-dem.c $(OUTPUT_OPTION)
5902
5903-./dyn-string.o: $(srcdir)/dyn-string.c stamp-h $(INCDIR)/ansidecl.h \
5904+./dyn-string.o: $(srcdir)/dyn-string.c config.h $(INCDIR)/ansidecl.h \
5905 $(INCDIR)/dyn-string.h $(INCDIR)/libiberty.h
5906 if [ x"$(PICFLAG)" != x ]; then \
5907 $(COMPILE.c) $(PICFLAG) $(srcdir)/dyn-string.c -o pic/$@; \
5908 else true; fi
5909 $(COMPILE.c) $(srcdir)/dyn-string.c $(OUTPUT_OPTION)
5910
5911-./fdmatch.o: $(srcdir)/fdmatch.c stamp-h $(INCDIR)/ansidecl.h \
5912+./fdmatch.o: $(srcdir)/fdmatch.c config.h $(INCDIR)/ansidecl.h \
5913 $(INCDIR)/libiberty.h
5914 if [ x"$(PICFLAG)" != x ]; then \
5915 $(COMPILE.c) $(PICFLAG) $(srcdir)/fdmatch.c -o pic/$@; \
5916@@ -635,93 +639,94 @@
5917 else true; fi
5918 $(COMPILE.c) $(srcdir)/ffs.c $(OUTPUT_OPTION)
5919
5920-./fibheap.o: $(srcdir)/fibheap.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
5921- $(INCDIR)/libiberty.h
5922+./fibheap.o: $(srcdir)/fibheap.c config.h $(INCDIR)/ansidecl.h \
5923+ $(INCDIR)/fibheap.h $(INCDIR)/libiberty.h
5924 if [ x"$(PICFLAG)" != x ]; then \
5925 $(COMPILE.c) $(PICFLAG) $(srcdir)/fibheap.c -o pic/$@; \
5926 else true; fi
5927 $(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION)
5928
5929-./filename_cmp.o: $(srcdir)/filename_cmp.c stamp-h $(INCDIR)/filenames.h \
5930+./filename_cmp.o: $(srcdir)/filename_cmp.c config.h $(INCDIR)/filenames.h \
5931 $(INCDIR)/safe-ctype.h
5932 if [ x"$(PICFLAG)" != x ]; then \
5933 $(COMPILE.c) $(PICFLAG) $(srcdir)/filename_cmp.c -o pic/$@; \
5934 else true; fi
5935 $(COMPILE.c) $(srcdir)/filename_cmp.c $(OUTPUT_OPTION)
5936
5937-./floatformat.o: $(srcdir)/floatformat.c stamp-h $(INCDIR)/ansidecl.h \
5938+./floatformat.o: $(srcdir)/floatformat.c config.h $(INCDIR)/ansidecl.h \
5939 $(INCDIR)/floatformat.h $(INCDIR)/libiberty.h
5940 if [ x"$(PICFLAG)" != x ]; then \
5941 $(COMPILE.c) $(PICFLAG) $(srcdir)/floatformat.c -o pic/$@; \
5942 else true; fi
5943 $(COMPILE.c) $(srcdir)/floatformat.c $(OUTPUT_OPTION)
5944
5945-./fnmatch.o: $(srcdir)/fnmatch.c stamp-h $(INCDIR)/fnmatch.h \
5946+./fnmatch.o: $(srcdir)/fnmatch.c config.h $(INCDIR)/fnmatch.h \
5947 $(INCDIR)/safe-ctype.h
5948 if [ x"$(PICFLAG)" != x ]; then \
5949 $(COMPILE.c) $(PICFLAG) $(srcdir)/fnmatch.c -o pic/$@; \
5950 else true; fi
5951 $(COMPILE.c) $(srcdir)/fnmatch.c $(OUTPUT_OPTION)
5952
5953-./fopen_unlocked.o: $(srcdir)/fopen_unlocked.c stamp-h $(INCDIR)/ansidecl.h \
5954+./fopen_unlocked.o: $(srcdir)/fopen_unlocked.c config.h $(INCDIR)/ansidecl.h \
5955 $(INCDIR)/libiberty.h
5956 if [ x"$(PICFLAG)" != x ]; then \
5957 $(COMPILE.c) $(PICFLAG) $(srcdir)/fopen_unlocked.c -o pic/$@; \
5958 else true; fi
5959 $(COMPILE.c) $(srcdir)/fopen_unlocked.c $(OUTPUT_OPTION)
5960
5961-./getcwd.o: $(srcdir)/getcwd.c stamp-h
5962+./getcwd.o: $(srcdir)/getcwd.c config.h
5963 if [ x"$(PICFLAG)" != x ]; then \
5964 $(COMPILE.c) $(PICFLAG) $(srcdir)/getcwd.c -o pic/$@; \
5965 else true; fi
5966 $(COMPILE.c) $(srcdir)/getcwd.c $(OUTPUT_OPTION)
5967
5968-./getopt.o: $(srcdir)/getopt.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h
5969+./getopt.o: $(srcdir)/getopt.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h
5970 if [ x"$(PICFLAG)" != x ]; then \
5971 $(COMPILE.c) $(PICFLAG) $(srcdir)/getopt.c -o pic/$@; \
5972 else true; fi
5973 $(COMPILE.c) $(srcdir)/getopt.c $(OUTPUT_OPTION)
5974
5975-./getopt1.o: $(srcdir)/getopt1.c stamp-h $(INCDIR)/getopt.h
5976+./getopt1.o: $(srcdir)/getopt1.c config.h $(INCDIR)/getopt.h
5977 if [ x"$(PICFLAG)" != x ]; then \
5978 $(COMPILE.c) $(PICFLAG) $(srcdir)/getopt1.c -o pic/$@; \
5979 else true; fi
5980 $(COMPILE.c) $(srcdir)/getopt1.c $(OUTPUT_OPTION)
5981
5982-./getpagesize.o: $(srcdir)/getpagesize.c stamp-h
5983+./getpagesize.o: $(srcdir)/getpagesize.c config.h
5984 if [ x"$(PICFLAG)" != x ]; then \
5985 $(COMPILE.c) $(PICFLAG) $(srcdir)/getpagesize.c -o pic/$@; \
5986 else true; fi
5987 $(COMPILE.c) $(srcdir)/getpagesize.c $(OUTPUT_OPTION)
5988
5989-./getpwd.o: $(srcdir)/getpwd.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
5990+./getpwd.o: $(srcdir)/getpwd.c config.h $(INCDIR)/ansidecl.h \
5991+ $(INCDIR)/libiberty.h
5992 if [ x"$(PICFLAG)" != x ]; then \
5993 $(COMPILE.c) $(PICFLAG) $(srcdir)/getpwd.c -o pic/$@; \
5994 else true; fi
5995 $(COMPILE.c) $(srcdir)/getpwd.c $(OUTPUT_OPTION)
5996
5997-./getruntime.o: $(srcdir)/getruntime.c stamp-h $(INCDIR)/ansidecl.h \
5998+./getruntime.o: $(srcdir)/getruntime.c config.h $(INCDIR)/ansidecl.h \
5999 $(INCDIR)/libiberty.h
6000 if [ x"$(PICFLAG)" != x ]; then \
6001 $(COMPILE.c) $(PICFLAG) $(srcdir)/getruntime.c -o pic/$@; \
6002 else true; fi
6003 $(COMPILE.c) $(srcdir)/getruntime.c $(OUTPUT_OPTION)
6004
6005-./gettimeofday.o: $(srcdir)/gettimeofday.c stamp-h $(INCDIR)/ansidecl.h \
6006+./gettimeofday.o: $(srcdir)/gettimeofday.c config.h $(INCDIR)/ansidecl.h \
6007 $(INCDIR)/libiberty.h
6008 if [ x"$(PICFLAG)" != x ]; then \
6009 $(COMPILE.c) $(PICFLAG) $(srcdir)/gettimeofday.c -o pic/$@; \
6010 else true; fi
6011 $(COMPILE.c) $(srcdir)/gettimeofday.c $(OUTPUT_OPTION)
6012
6013-./hashtab.o: $(srcdir)/hashtab.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
6014- $(INCDIR)/libiberty.h
6015+./hashtab.o: $(srcdir)/hashtab.c config.h $(INCDIR)/ansidecl.h \
6016+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
6017 if [ x"$(PICFLAG)" != x ]; then \
6018 $(COMPILE.c) $(PICFLAG) $(srcdir)/hashtab.c -o pic/$@; \
6019 else true; fi
6020 $(COMPILE.c) $(srcdir)/hashtab.c $(OUTPUT_OPTION)
6021
6022-./hex.o: $(srcdir)/hex.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
6023+./hex.o: $(srcdir)/hex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
6024 $(INCDIR)/safe-ctype.h
6025 if [ x"$(PICFLAG)" != x ]; then \
6026 $(COMPILE.c) $(PICFLAG) $(srcdir)/hex.c -o pic/$@; \
6027@@ -740,7 +745,7 @@
6028 else true; fi
6029 $(COMPILE.c) $(srcdir)/insque.c $(OUTPUT_OPTION)
6030
6031-./lbasename.o: $(srcdir)/lbasename.c stamp-h $(INCDIR)/ansidecl.h \
6032+./lbasename.o: $(srcdir)/lbasename.c config.h $(INCDIR)/ansidecl.h \
6033 $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
6034 $(INCDIR)/safe-ctype.h
6035 if [ x"$(PICFLAG)" != x ]; then \
6036@@ -748,28 +753,28 @@
6037 else true; fi
6038 $(COMPILE.c) $(srcdir)/lbasename.c $(OUTPUT_OPTION)
6039
6040-./lrealpath.o: $(srcdir)/lrealpath.c stamp-h $(INCDIR)/ansidecl.h \
6041+./lrealpath.o: $(srcdir)/lrealpath.c config.h $(INCDIR)/ansidecl.h \
6042 $(INCDIR)/libiberty.h
6043 if [ x"$(PICFLAG)" != x ]; then \
6044 $(COMPILE.c) $(PICFLAG) $(srcdir)/lrealpath.c -o pic/$@; \
6045 else true; fi
6046 $(COMPILE.c) $(srcdir)/lrealpath.c $(OUTPUT_OPTION)
6047
6048-./make-relative-prefix.o: $(srcdir)/make-relative-prefix.c stamp-h \
6049+./make-relative-prefix.o: $(srcdir)/make-relative-prefix.c config.h \
6050 $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
6051 if [ x"$(PICFLAG)" != x ]; then \
6052 $(COMPILE.c) $(PICFLAG) $(srcdir)/make-relative-prefix.c -o pic/$@; \
6053 else true; fi
6054 $(COMPILE.c) $(srcdir)/make-relative-prefix.c $(OUTPUT_OPTION)
6055
6056-./make-temp-file.o: $(srcdir)/make-temp-file.c stamp-h $(INCDIR)/ansidecl.h \
6057+./make-temp-file.o: $(srcdir)/make-temp-file.c config.h $(INCDIR)/ansidecl.h \
6058 $(INCDIR)/libiberty.h
6059 if [ x"$(PICFLAG)" != x ]; then \
6060 $(COMPILE.c) $(PICFLAG) $(srcdir)/make-temp-file.c -o pic/$@; \
6061 else true; fi
6062 $(COMPILE.c) $(srcdir)/make-temp-file.c $(OUTPUT_OPTION)
6063
6064-./md5.o: $(srcdir)/md5.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
6065+./md5.o: $(srcdir)/md5.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
6066 if [ x"$(PICFLAG)" != x ]; then \
6067 $(COMPILE.c) $(PICFLAG) $(srcdir)/md5.c -o pic/$@; \
6068 else true; fi
6069@@ -811,7 +816,7 @@
6070 else true; fi
6071 $(COMPILE.c) $(srcdir)/memset.c $(OUTPUT_OPTION)
6072
6073-./mkstemps.o: $(srcdir)/mkstemps.c stamp-h $(INCDIR)/ansidecl.h
6074+./mkstemps.o: $(srcdir)/mkstemps.c config.h $(INCDIR)/ansidecl.h
6075 if [ x"$(PICFLAG)" != x ]; then \
6076 $(COMPILE.c) $(PICFLAG) $(srcdir)/mkstemps.c -o pic/$@; \
6077 else true; fi
6078@@ -823,41 +828,41 @@
6079 else true; fi
6080 $(COMPILE.c) $(srcdir)/msdos.c $(OUTPUT_OPTION)
6081
6082-./objalloc.o: $(srcdir)/objalloc.c stamp-h $(INCDIR)/ansidecl.h \
6083+./objalloc.o: $(srcdir)/objalloc.c config.h $(INCDIR)/ansidecl.h \
6084 $(INCDIR)/objalloc.h
6085 if [ x"$(PICFLAG)" != x ]; then \
6086 $(COMPILE.c) $(PICFLAG) $(srcdir)/objalloc.c -o pic/$@; \
6087 else true; fi
6088 $(COMPILE.c) $(srcdir)/objalloc.c $(OUTPUT_OPTION)
6089
6090-./obstack.o: $(srcdir)/obstack.c stamp-h $(INCDIR)/obstack.h
6091+./obstack.o: $(srcdir)/obstack.c config.h $(INCDIR)/obstack.h
6092 if [ x"$(PICFLAG)" != x ]; then \
6093 $(COMPILE.c) $(PICFLAG) $(srcdir)/obstack.c -o pic/$@; \
6094 else true; fi
6095 $(COMPILE.c) $(srcdir)/obstack.c $(OUTPUT_OPTION)
6096
6097-./partition.o: $(srcdir)/partition.c stamp-h $(INCDIR)/ansidecl.h \
6098+./partition.o: $(srcdir)/partition.c config.h $(INCDIR)/ansidecl.h \
6099 $(INCDIR)/libiberty.h $(INCDIR)/partition.h
6100 if [ x"$(PICFLAG)" != x ]; then \
6101 $(COMPILE.c) $(PICFLAG) $(srcdir)/partition.c -o pic/$@; \
6102 else true; fi
6103 $(COMPILE.c) $(srcdir)/partition.c $(OUTPUT_OPTION)
6104
6105-./pex-common.o: $(srcdir)/pex-common.c stamp-h $(INCDIR)/ansidecl.h \
6106+./pex-common.o: $(srcdir)/pex-common.c config.h $(INCDIR)/ansidecl.h \
6107 $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
6108 if [ x"$(PICFLAG)" != x ]; then \
6109 $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-common.c -o pic/$@; \
6110 else true; fi
6111 $(COMPILE.c) $(srcdir)/pex-common.c $(OUTPUT_OPTION)
6112
6113-./pex-djgpp.o: $(srcdir)/pex-djgpp.c stamp-h $(INCDIR)/ansidecl.h \
6114+./pex-djgpp.o: $(srcdir)/pex-djgpp.c config.h $(INCDIR)/ansidecl.h \
6115 $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
6116 if [ x"$(PICFLAG)" != x ]; then \
6117 $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-djgpp.c -o pic/$@; \
6118 else true; fi
6119 $(COMPILE.c) $(srcdir)/pex-djgpp.c $(OUTPUT_OPTION)
6120
6121-./pex-msdos.o: $(srcdir)/pex-msdos.c stamp-h $(INCDIR)/ansidecl.h \
6122+./pex-msdos.o: $(srcdir)/pex-msdos.c config.h $(INCDIR)/ansidecl.h \
6123 $(INCDIR)/libiberty.h $(srcdir)/pex-common.h \
6124 $(INCDIR)/safe-ctype.h
6125 if [ x"$(PICFLAG)" != x ]; then \
6126@@ -865,42 +870,42 @@
6127 else true; fi
6128 $(COMPILE.c) $(srcdir)/pex-msdos.c $(OUTPUT_OPTION)
6129
6130-./pex-one.o: $(srcdir)/pex-one.c stamp-h $(INCDIR)/ansidecl.h \
6131+./pex-one.o: $(srcdir)/pex-one.c config.h $(INCDIR)/ansidecl.h \
6132 $(INCDIR)/libiberty.h
6133 if [ x"$(PICFLAG)" != x ]; then \
6134 $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-one.c -o pic/$@; \
6135 else true; fi
6136 $(COMPILE.c) $(srcdir)/pex-one.c $(OUTPUT_OPTION)
6137
6138-./pex-unix.o: $(srcdir)/pex-unix.c stamp-h $(INCDIR)/ansidecl.h \
6139+./pex-unix.o: $(srcdir)/pex-unix.c config.h $(INCDIR)/ansidecl.h \
6140 $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
6141 if [ x"$(PICFLAG)" != x ]; then \
6142 $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-unix.c -o pic/$@; \
6143 else true; fi
6144 $(COMPILE.c) $(srcdir)/pex-unix.c $(OUTPUT_OPTION)
6145
6146-./pex-win32.o: $(srcdir)/pex-win32.c stamp-h $(INCDIR)/ansidecl.h \
6147+./pex-win32.o: $(srcdir)/pex-win32.c config.h $(INCDIR)/ansidecl.h \
6148 $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
6149 if [ x"$(PICFLAG)" != x ]; then \
6150 $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-win32.c -o pic/$@; \
6151 else true; fi
6152 $(COMPILE.c) $(srcdir)/pex-win32.c $(OUTPUT_OPTION)
6153
6154-./pexecute.o: $(srcdir)/pexecute.c stamp-h $(INCDIR)/ansidecl.h \
6155+./pexecute.o: $(srcdir)/pexecute.c config.h $(INCDIR)/ansidecl.h \
6156 $(INCDIR)/libiberty.h
6157 if [ x"$(PICFLAG)" != x ]; then \
6158 $(COMPILE.c) $(PICFLAG) $(srcdir)/pexecute.c -o pic/$@; \
6159 else true; fi
6160 $(COMPILE.c) $(srcdir)/pexecute.c $(OUTPUT_OPTION)
6161
6162-./physmem.o: $(srcdir)/physmem.c stamp-h $(INCDIR)/ansidecl.h \
6163+./physmem.o: $(srcdir)/physmem.c config.h $(INCDIR)/ansidecl.h \
6164 $(INCDIR)/libiberty.h
6165 if [ x"$(PICFLAG)" != x ]; then \
6166 $(COMPILE.c) $(PICFLAG) $(srcdir)/physmem.c -o pic/$@; \
6167 else true; fi
6168 $(COMPILE.c) $(srcdir)/physmem.c $(OUTPUT_OPTION)
6169
6170-./putenv.o: $(srcdir)/putenv.c stamp-h $(INCDIR)/ansidecl.h
6171+./putenv.o: $(srcdir)/putenv.c config.h $(INCDIR)/ansidecl.h
6172 if [ x"$(PICFLAG)" != x ]; then \
6173 $(COMPILE.c) $(PICFLAG) $(srcdir)/putenv.c -o pic/$@; \
6174 else true; fi
6175@@ -912,14 +917,14 @@
6176 else true; fi
6177 $(COMPILE.c) $(srcdir)/random.c $(OUTPUT_OPTION)
6178
6179-./regex.o: $(srcdir)/regex.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
6180+./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
6181 $(INCDIR)/xregex2.h
6182 if [ x"$(PICFLAG)" != x ]; then \
6183 $(COMPILE.c) $(PICFLAG) $(srcdir)/regex.c -o pic/$@; \
6184 else true; fi
6185 $(COMPILE.c) $(srcdir)/regex.c $(OUTPUT_OPTION)
6186
6187-./rename.o: $(srcdir)/rename.c stamp-h $(INCDIR)/ansidecl.h
6188+./rename.o: $(srcdir)/rename.c config.h $(INCDIR)/ansidecl.h
6189 if [ x"$(PICFLAG)" != x ]; then \
6190 $(COMPILE.c) $(PICFLAG) $(srcdir)/rename.c -o pic/$@; \
6191 else true; fi
6192@@ -938,7 +943,7 @@
6193 else true; fi
6194 $(COMPILE.c) $(srcdir)/safe-ctype.c $(OUTPUT_OPTION)
6195
6196-./setenv.o: $(srcdir)/setenv.c stamp-h $(INCDIR)/ansidecl.h
6197+./setenv.o: $(srcdir)/setenv.c config.h $(INCDIR)/ansidecl.h
6198 if [ x"$(PICFLAG)" != x ]; then \
6199 $(COMPILE.c) $(PICFLAG) $(srcdir)/setenv.c -o pic/$@; \
6200 else true; fi
6201@@ -956,20 +961,21 @@
6202 else true; fi
6203 $(COMPILE.c) $(srcdir)/snprintf.c $(OUTPUT_OPTION)
6204
6205-./sort.o: $(srcdir)/sort.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
6206+./sort.o: $(srcdir)/sort.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
6207 $(INCDIR)/sort.h
6208 if [ x"$(PICFLAG)" != x ]; then \
6209 $(COMPILE.c) $(PICFLAG) $(srcdir)/sort.c -o pic/$@; \
6210 else true; fi
6211 $(COMPILE.c) $(srcdir)/sort.c $(OUTPUT_OPTION)
6212
6213-./spaces.o: $(srcdir)/spaces.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
6214+./spaces.o: $(srcdir)/spaces.c config.h $(INCDIR)/ansidecl.h \
6215+ $(INCDIR)/libiberty.h
6216 if [ x"$(PICFLAG)" != x ]; then \
6217 $(COMPILE.c) $(PICFLAG) $(srcdir)/spaces.c -o pic/$@; \
6218 else true; fi
6219 $(COMPILE.c) $(srcdir)/spaces.c $(OUTPUT_OPTION)
6220
6221-./splay-tree.o: $(srcdir)/splay-tree.c stamp-h $(INCDIR)/ansidecl.h \
6222+./splay-tree.o: $(srcdir)/splay-tree.c config.h $(INCDIR)/ansidecl.h \
6223 $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h
6224 if [ x"$(PICFLAG)" != x ]; then \
6225 $(COMPILE.c) $(PICFLAG) $(srcdir)/splay-tree.c -o pic/$@; \
6226@@ -1006,7 +1012,7 @@
6227 else true; fi
6228 $(COMPILE.c) $(srcdir)/strdup.c $(OUTPUT_OPTION)
6229
6230-./strerror.o: $(srcdir)/strerror.c stamp-h $(INCDIR)/ansidecl.h \
6231+./strerror.o: $(srcdir)/strerror.c config.h $(INCDIR)/ansidecl.h \
6232 $(INCDIR)/libiberty.h
6233 if [ x"$(PICFLAG)" != x ]; then \
6234 $(COMPILE.c) $(PICFLAG) $(srcdir)/strerror.c -o pic/$@; \
6235@@ -1037,7 +1043,7 @@
6236 else true; fi
6237 $(COMPILE.c) $(srcdir)/strrchr.c $(OUTPUT_OPTION)
6238
6239-./strsignal.o: $(srcdir)/strsignal.c stamp-h $(INCDIR)/ansidecl.h \
6240+./strsignal.o: $(srcdir)/strsignal.c config.h $(INCDIR)/ansidecl.h \
6241 $(INCDIR)/libiberty.h
6242 if [ x"$(PICFLAG)" != x ]; then \
6243 $(COMPILE.c) $(PICFLAG) $(srcdir)/strsignal.c -o pic/$@; \
6244@@ -1056,13 +1062,13 @@
6245 else true; fi
6246 $(COMPILE.c) $(srcdir)/strtod.c $(OUTPUT_OPTION)
6247
6248-./strtol.o: $(srcdir)/strtol.c stamp-h $(INCDIR)/safe-ctype.h
6249+./strtol.o: $(srcdir)/strtol.c config.h $(INCDIR)/safe-ctype.h
6250 if [ x"$(PICFLAG)" != x ]; then \
6251 $(COMPILE.c) $(PICFLAG) $(srcdir)/strtol.c -o pic/$@; \
6252 else true; fi
6253 $(COMPILE.c) $(srcdir)/strtol.c $(OUTPUT_OPTION)
6254
6255-./strtoul.o: $(srcdir)/strtoul.c stamp-h $(INCDIR)/ansidecl.h \
6256+./strtoul.o: $(srcdir)/strtoul.c config.h $(INCDIR)/ansidecl.h \
6257 $(INCDIR)/safe-ctype.h
6258 if [ x"$(PICFLAG)" != x ]; then \
6259 $(COMPILE.c) $(PICFLAG) $(srcdir)/strtoul.c -o pic/$@; \
6260@@ -1082,14 +1088,14 @@
6261 else true; fi
6262 $(COMPILE.c) $(srcdir)/tmpnam.c $(OUTPUT_OPTION)
6263
6264-./unlink-if-ordinary.o: $(srcdir)/unlink-if-ordinary.c stamp-h \
6265+./unlink-if-ordinary.o: $(srcdir)/unlink-if-ordinary.c config.h \
6266 $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
6267 if [ x"$(PICFLAG)" != x ]; then \
6268 $(COMPILE.c) $(PICFLAG) $(srcdir)/unlink-if-ordinary.c -o pic/$@; \
6269 else true; fi
6270 $(COMPILE.c) $(srcdir)/unlink-if-ordinary.c $(OUTPUT_OPTION)
6271
6272-./vasprintf.o: $(srcdir)/vasprintf.c stamp-h $(INCDIR)/ansidecl.h \
6273+./vasprintf.o: $(srcdir)/vasprintf.c config.h $(INCDIR)/ansidecl.h \
6274 $(INCDIR)/libiberty.h
6275 if [ x"$(PICFLAG)" != x ]; then \
6276 $(COMPILE.c) $(PICFLAG) $(srcdir)/vasprintf.c -o pic/$@; \
6277@@ -1114,7 +1120,7 @@
6278 else true; fi
6279 $(COMPILE.c) $(srcdir)/vprintf.c $(OUTPUT_OPTION)
6280
6281-./vsnprintf.o: $(srcdir)/vsnprintf.c stamp-h $(INCDIR)/ansidecl.h \
6282+./vsnprintf.o: $(srcdir)/vsnprintf.c config.h $(INCDIR)/ansidecl.h \
6283 $(INCDIR)/libiberty.h
6284 if [ x"$(PICFLAG)" != x ]; then \
6285 $(COMPILE.c) $(PICFLAG) $(srcdir)/vsnprintf.c -o pic/$@; \
6286@@ -1127,54 +1133,54 @@
6287 else true; fi
6288 $(COMPILE.c) $(srcdir)/vsprintf.c $(OUTPUT_OPTION)
6289
6290-./waitpid.o: $(srcdir)/waitpid.c stamp-h $(INCDIR)/ansidecl.h
6291+./waitpid.o: $(srcdir)/waitpid.c config.h $(INCDIR)/ansidecl.h
6292 if [ x"$(PICFLAG)" != x ]; then \
6293 $(COMPILE.c) $(PICFLAG) $(srcdir)/waitpid.c -o pic/$@; \
6294 else true; fi
6295 $(COMPILE.c) $(srcdir)/waitpid.c $(OUTPUT_OPTION)
6296
6297-./xatexit.o: $(srcdir)/xatexit.c stamp-h $(INCDIR)/ansidecl.h \
6298+./xatexit.o: $(srcdir)/xatexit.c config.h $(INCDIR)/ansidecl.h \
6299 $(INCDIR)/libiberty.h
6300 if [ x"$(PICFLAG)" != x ]; then \
6301 $(COMPILE.c) $(PICFLAG) $(srcdir)/xatexit.c -o pic/$@; \
6302 else true; fi
6303 $(COMPILE.c) $(srcdir)/xatexit.c $(OUTPUT_OPTION)
6304
6305-./xexit.o: $(srcdir)/xexit.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
6306+./xexit.o: $(srcdir)/xexit.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
6307 if [ x"$(PICFLAG)" != x ]; then \
6308 $(COMPILE.c) $(PICFLAG) $(srcdir)/xexit.c -o pic/$@; \
6309 else true; fi
6310 $(COMPILE.c) $(srcdir)/xexit.c $(OUTPUT_OPTION)
6311
6312-./xmalloc.o: $(srcdir)/xmalloc.c stamp-h $(INCDIR)/ansidecl.h \
6313+./xmalloc.o: $(srcdir)/xmalloc.c config.h $(INCDIR)/ansidecl.h \
6314 $(INCDIR)/libiberty.h
6315 if [ x"$(PICFLAG)" != x ]; then \
6316 $(COMPILE.c) $(PICFLAG) $(srcdir)/xmalloc.c -o pic/$@; \
6317 else true; fi
6318 $(COMPILE.c) $(srcdir)/xmalloc.c $(OUTPUT_OPTION)
6319
6320-./xmemdup.o: $(srcdir)/xmemdup.c stamp-h $(INCDIR)/ansidecl.h \
6321+./xmemdup.o: $(srcdir)/xmemdup.c config.h $(INCDIR)/ansidecl.h \
6322 $(INCDIR)/libiberty.h
6323 if [ x"$(PICFLAG)" != x ]; then \
6324 $(COMPILE.c) $(PICFLAG) $(srcdir)/xmemdup.c -o pic/$@; \
6325 else true; fi
6326 $(COMPILE.c) $(srcdir)/xmemdup.c $(OUTPUT_OPTION)
6327
6328-./xstrdup.o: $(srcdir)/xstrdup.c stamp-h $(INCDIR)/ansidecl.h \
6329+./xstrdup.o: $(srcdir)/xstrdup.c config.h $(INCDIR)/ansidecl.h \
6330 $(INCDIR)/libiberty.h
6331 if [ x"$(PICFLAG)" != x ]; then \
6332 $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrdup.c -o pic/$@; \
6333 else true; fi
6334 $(COMPILE.c) $(srcdir)/xstrdup.c $(OUTPUT_OPTION)
6335
6336-./xstrerror.o: $(srcdir)/xstrerror.c stamp-h $(INCDIR)/ansidecl.h \
6337+./xstrerror.o: $(srcdir)/xstrerror.c config.h $(INCDIR)/ansidecl.h \
6338 $(INCDIR)/libiberty.h
6339 if [ x"$(PICFLAG)" != x ]; then \
6340 $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrerror.c -o pic/$@; \
6341 else true; fi
6342 $(COMPILE.c) $(srcdir)/xstrerror.c $(OUTPUT_OPTION)
6343
6344-./xstrndup.o: $(srcdir)/xstrndup.c stamp-h $(INCDIR)/ansidecl.h \
6345+./xstrndup.o: $(srcdir)/xstrndup.c config.h $(INCDIR)/ansidecl.h \
6346 $(INCDIR)/libiberty.h
6347 if [ x"$(PICFLAG)" != x ]; then \
6348 $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrndup.c -o pic/$@; \
6349Index: gcc-4.3.3/libiberty/configure
6350===================================================================
6351--- gcc-4.3.3.orig/libiberty/configure 2007-07-17 10:52:28.000000000 -0700
6352+++ gcc-4.3.3/libiberty/configure 2009-04-29 18:03:50.224612238 -0700
6353@@ -309,7 +309,7 @@
6354 # include <unistd.h>
6355 #endif"
6356
6357-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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST datarootdir docdir htmldir LTLIBOBJS'
6358+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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PICFLAG EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST datarootdir docdir htmldir LTLIBOBJS'
6359 ac_subst_files='host_makefile_frag'
6360
6361 # Initialize some variables set by options.
6362@@ -3699,9 +3699,7 @@
6363 esac
6364
6365 if [ -n "${frag}" ]; then
6366- frags=${libiberty_topdir}/libiberty/config/$frag
6367-else
6368- frags=
6369+ frag=${libiberty_topdir}/libiberty/config/$frag
6370 fi
6371
6372 # If they didn't specify --enable-shared, don't generate shared libs.
6373@@ -3712,34 +3710,35 @@
6374 *) shared=yes ;;
6375 esac
6376 if [ "${shared}" = "yes" ]; then
6377- frag=
6378 case "${host}" in
6379 *-*-cygwin*) ;;
6380- alpha*-*-linux*) frag=mh-elfalphapic ;;
6381- arm*-*-*) frag=mh-armpic ;;
6382- hppa*-*-*) frag=mh-papic ;;
6383+ alpha*-*-linux*) PICFLAG=-fPIC ;;
6384+ arm*-*-*) PICFLAG=-fPIC ;;
6385+ hppa*-*-*) PICFLAG=-fPIC ;;
6386+ i370-*-*) PICFLAG=-fPIC ;;
6387+ ia64-*-*) PICFLAG=-fpic ;;
6388 i[34567]86-*-* | x86_64-*-*)
6389- frag=mh-x86pic ;;
6390+ PICFLAG=-fpic ;;
6391+ m68k-*-*) PICFLAG=-fpic ;;
6392+ mips*-*-linux) PICFLAG=-fPIC ;;
6393 powerpc*-*-aix*) ;;
6394- powerpc*-*-*) frag=mh-ppcpic ;;
6395- sparc*-*-*) frag=mh-sparcpic ;;
6396- s390*-*-*) frag=mh-s390pic ;;
6397- *) frag=mh-${host_cpu}pic ;;
6398+ powerpc*-*-*) PICFLAG=-fPIC ;;
6399+ sparc*-*-*) case "${CFLAGS}" in
6400+ *-fpic* ) PICFLAG=-fpic ;;
6401+ * ) PICFLAG=-fPIC ;;
6402+ esac ;;
6403+ s390*-*-*) PICFLAG=-fpic ;;
6404 esac
6405- if [ -n "${frag}" ]; then
6406- frags="${frags} ${libiberty_topdir}/config/${frag}"
6407- fi
6408 fi
6409
6410+
6411 echo "# Warning: this fragment is automatically generated" > temp-frag
6412
6413-for frag in ${frags}; do
6414- if [ -f ${frag} ]; then
6415- echo "Appending ${frag} to xhost-mkfrag"
6416- echo "# Following fragment copied from ${frag}" >> temp-frag
6417- cat ${frag} >> temp-frag
6418- fi
6419-done
6420+if [ -n "${frag}" ] && [ -f "${frag}" ]; then
6421+ echo "Appending ${frag} to xhost-mkfrag"
6422+ echo "# Following fragment copied from ${frag}" >> temp-frag
6423+ cat ${frag} >> temp-frag
6424+fi
6425
6426 # record if we want to build shared libs.
6427 if [ "${shared}" = "yes" ]; then
6428@@ -9671,6 +9670,7 @@
6429 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
6430 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
6431 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
6432+s,@PICFLAG@,$PICFLAG,;t t
6433 s,@EGREP@,$EGREP,;t t
6434 s,@LIBOBJS@,$LIBOBJS,;t t
6435 s,@CHECK@,$CHECK,;t t
6436Index: gcc-4.3.3/libiberty/configure.ac
6437===================================================================
6438--- gcc-4.3.3.orig/libiberty/configure.ac 2007-07-17 10:52:28.000000000 -0700
6439+++ gcc-4.3.3/libiberty/configure.ac 2009-04-29 18:03:50.224612238 -0700
6440@@ -187,9 +187,7 @@
6441 esac
6442
6443 if [[ -n "${frag}" ]]; then
6444- frags=${libiberty_topdir}/libiberty/config/$frag
6445-else
6446- frags=
6447+ frag=${libiberty_topdir}/libiberty/config/$frag
6448 fi
6449
6450 # If they didn't specify --enable-shared, don't generate shared libs.
6451@@ -200,34 +198,35 @@
6452 *) shared=yes ;;
6453 esac
6454 if [[ "${shared}" = "yes" ]]; then
6455- frag=
6456 case "${host}" in
6457 *-*-cygwin*) ;;
6458- alpha*-*-linux*) frag=mh-elfalphapic ;;
6459- arm*-*-*) frag=mh-armpic ;;
6460- hppa*-*-*) frag=mh-papic ;;
6461+ alpha*-*-linux*) PICFLAG=-fPIC ;;
6462+ arm*-*-*) PICFLAG=-fPIC ;;
6463+ hppa*-*-*) PICFLAG=-fPIC ;;
6464+ i370-*-*) PICFLAG=-fPIC ;;
6465+ ia64-*-*) PICFLAG=-fpic ;;
6466 i[[34567]]86-*-* | x86_64-*-*)
6467- frag=mh-x86pic ;;
6468+ PICFLAG=-fpic ;;
6469+ m68k-*-*) PICFLAG=-fpic ;;
6470+ mips*-*-linux) PICFLAG=-fPIC ;;
6471 powerpc*-*-aix*) ;;
6472- powerpc*-*-*) frag=mh-ppcpic ;;
6473- sparc*-*-*) frag=mh-sparcpic ;;
6474- s390*-*-*) frag=mh-s390pic ;;
6475- *) frag=mh-${host_cpu}pic ;;
6476+ powerpc*-*-*) PICFLAG=-fPIC ;;
6477+ sparc*-*-*) case "${CFLAGS}" in
6478+ *-fpic* ) PICFLAG=-fpic ;;
6479+ * ) PICFLAG=-fPIC ;;
6480+ esac ;;
6481+ s390*-*-*) PICFLAG=-fpic ;;
6482 esac
6483- if [[ -n "${frag}" ]]; then
6484- frags="${frags} ${libiberty_topdir}/config/${frag}"
6485- fi
6486 fi
6487+AC_SUBST(PICFLAG)
6488
6489 echo "# Warning: this fragment is automatically generated" > temp-frag
6490
6491-for frag in ${frags}; do
6492- if [[ -f ${frag} ]]; then
6493- echo "Appending ${frag} to xhost-mkfrag"
6494- echo "# Following fragment copied from ${frag}" >> temp-frag
6495- cat ${frag} >> temp-frag
6496- fi
6497-done
6498+if [[ -n "${frag}" ]] && [[ -f "${frag}" ]]; then
6499+ echo "Appending ${frag} to xhost-mkfrag"
6500+ echo "# Following fragment copied from ${frag}" >> temp-frag
6501+ cat ${frag} >> temp-frag
6502+fi
6503
6504 # record if we want to build shared libs.
6505 if [[ "${shared}" = "yes" ]]; then
6506Index: gcc-4.3.3/gcc/Makefile.in
6507===================================================================
6508--- gcc-4.3.3.orig/gcc/Makefile.in 2009-04-29 17:55:20.000000000 -0700
6509+++ gcc-4.3.3/gcc/Makefile.in 2009-04-29 18:03:50.236612117 -0700
6510@@ -689,7 +689,7 @@
6511 BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
6512
6513 # Native linker and preprocessor flags. For x-fragment overrides.
6514-BUILD_LDFLAGS=$(LDFLAGS)
6515+BUILD_LDFLAGS=@BUILD_LDFLAGS@
6516 BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
6517
6518 # Actual name to use when installing a native compiler.
6519Index: gcc-4.3.3/gcc/configure
6520===================================================================
6521--- gcc-4.3.3.orig/gcc/configure 2009-04-29 17:55:27.000000000 -0700
6522+++ gcc-4.3.3/gcc/configure 2009-04-29 18:03:50.256611768 -0700
6523@@ -458,7 +458,7 @@
6524 # include <unistd.h>
6525 #endif"
6526
6527-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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
6528+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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
6529 ac_subst_files='language_hooks'
6530
6531 # Initialize some variables set by options.
6532@@ -12972,6 +12972,7 @@
6533 esac
6534 saved_CFLAGS="${CFLAGS}"
6535 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
6536+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
6537 CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
6538 --enable-languages=${enable_languages-all} \
6539 --target=$target_alias --host=$build_alias --build=$build_alias
6540@@ -13469,6 +13470,7 @@
6541 # These are the normal (build=host) settings:
6542 CC_FOR_BUILD='$(CC)'
6543 BUILD_CFLAGS='$(ALL_CFLAGS)'
6544+BUILD_LDFLAGS='$(LDFLAGS)'
6545 STMP_FIXINC=stmp-fixinc
6546
6547 # Possibly disable fixproto, on a per-target basis.
6548@@ -13486,6 +13488,7 @@
6549 if test x$build != x$host || test "x$coverage_flags" != x
6550 then
6551 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
6552+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
6553
6554 if test "x$TARGET_SYSTEM_ROOT" = x; then
6555 if test "x$STMP_FIXPROTO" != x; then
6556@@ -14064,13 +14067,13 @@
6557 else
6558 lt_cv_nm_interface="BSD nm"
6559 echo "int some_variable = 0;" > conftest.$ac_ext
6560- (eval echo "\"\$as_me:14067: $ac_compile\"" >&5)
6561+ (eval echo "\"\$as_me:14070: $ac_compile\"" >&5)
6562 (eval "$ac_compile" 2>conftest.err)
6563 cat conftest.err >&5
6564- (eval echo "\"\$as_me:14070: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6565+ (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6566 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6567 cat conftest.err >&5
6568- (eval echo "\"\$as_me:14073: output\"" >&5)
6569+ (eval echo "\"\$as_me:14076: output\"" >&5)
6570 cat conftest.out >&5
6571 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6572 lt_cv_nm_interface="MS dumpbin"
6573@@ -15125,7 +15128,7 @@
6574 ;;
6575 *-*-irix6*)
6576 # Find out which ABI we are using.
6577- echo '#line 15128 "configure"' > conftest.$ac_ext
6578+ echo '#line 15131 "configure"' > conftest.$ac_ext
6579 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6580 (eval $ac_compile) 2>&5
6581 ac_status=$?
6582@@ -15745,11 +15748,11 @@
6583 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6584 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6585 -e 's:$: $lt_compiler_flag:'`
6586- (eval echo "\"\$as_me:15748: $lt_compile\"" >&5)
6587+ (eval echo "\"\$as_me:15751: $lt_compile\"" >&5)
6588 (eval "$lt_compile" 2>conftest.err)
6589 ac_status=$?
6590 cat conftest.err >&5
6591- echo "$as_me:15752: \$? = $ac_status" >&5
6592+ echo "$as_me:15755: \$? = $ac_status" >&5
6593 if (exit $ac_status) && test -s "$ac_outfile"; then
6594 # The compiler can only warn and ignore the option if not recognized
6595 # So say no if there are warnings other than the usual output.
6596@@ -16067,11 +16070,11 @@
6597 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6598 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6599 -e 's:$: $lt_compiler_flag:'`
6600- (eval echo "\"\$as_me:16070: $lt_compile\"" >&5)
6601+ (eval echo "\"\$as_me:16073: $lt_compile\"" >&5)
6602 (eval "$lt_compile" 2>conftest.err)
6603 ac_status=$?
6604 cat conftest.err >&5
6605- echo "$as_me:16074: \$? = $ac_status" >&5
6606+ echo "$as_me:16077: \$? = $ac_status" >&5
6607 if (exit $ac_status) && test -s "$ac_outfile"; then
6608 # The compiler can only warn and ignore the option if not recognized
6609 # So say no if there are warnings other than the usual output.
6610@@ -16172,11 +16175,11 @@
6611 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6612 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6613 -e 's:$: $lt_compiler_flag:'`
6614- (eval echo "\"\$as_me:16175: $lt_compile\"" >&5)
6615+ (eval echo "\"\$as_me:16178: $lt_compile\"" >&5)
6616 (eval "$lt_compile" 2>out/conftest.err)
6617 ac_status=$?
6618 cat out/conftest.err >&5
6619- echo "$as_me:16179: \$? = $ac_status" >&5
6620+ echo "$as_me:16182: \$? = $ac_status" >&5
6621 if (exit $ac_status) && test -s out/conftest2.$ac_objext
6622 then
6623 # The compiler can only warn and ignore the option if not recognized
6624@@ -16227,11 +16230,11 @@
6625 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6626 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6627 -e 's:$: $lt_compiler_flag:'`
6628- (eval echo "\"\$as_me:16230: $lt_compile\"" >&5)
6629+ (eval echo "\"\$as_me:16233: $lt_compile\"" >&5)
6630 (eval "$lt_compile" 2>out/conftest.err)
6631 ac_status=$?
6632 cat out/conftest.err >&5
6633- echo "$as_me:16234: \$? = $ac_status" >&5
6634+ echo "$as_me:16237: \$? = $ac_status" >&5
6635 if (exit $ac_status) && test -s out/conftest2.$ac_objext
6636 then
6637 # The compiler can only warn and ignore the option if not recognized
6638@@ -19024,7 +19027,7 @@
6639 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6640 lt_status=$lt_dlunknown
6641 cat > conftest.$ac_ext <<_LT_EOF
6642-#line 19027 "configure"
6643+#line 19030 "configure"
6644 #include "confdefs.h"
6645
6646 #if HAVE_DLFCN_H
6647@@ -19124,7 +19127,7 @@
6648 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6649 lt_status=$lt_dlunknown
6650 cat > conftest.$ac_ext <<_LT_EOF
6651-#line 19127 "configure"
6652+#line 19130 "configure"
6653 #include "confdefs.h"
6654
6655 #if HAVE_DLFCN_H
6656@@ -23934,6 +23937,7 @@
6657 s,@inhibit_libc@,$inhibit_libc,;t t
6658 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
6659 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
6660+s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
6661 s,@STMP_FIXINC@,$STMP_FIXINC,;t t
6662 s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
6663 s,@collect2@,$collect2,;t t
6664Index: gcc-4.3.3/gcc/configure.ac
6665===================================================================
6666--- gcc-4.3.3.orig/gcc/configure.ac 2009-04-29 17:55:27.000000000 -0700
6667+++ gcc-4.3.3/gcc/configure.ac 2009-04-29 18:03:50.264611238 -0700
6668@@ -1480,6 +1480,7 @@
6669 esac
6670 saved_CFLAGS="${CFLAGS}"
6671 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
6672+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
6673 CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
6674 --enable-languages=${enable_languages-all} \
6675 --target=$target_alias --host=$build_alias --build=$build_alias
6676@@ -1776,6 +1777,7 @@
6677 # These are the normal (build=host) settings:
6678 CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
6679 BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
6680+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
6681 STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
6682
6683 # Possibly disable fixproto, on a per-target basis.
6684@@ -1793,6 +1795,7 @@
6685 if test x$build != x$host || test "x$coverage_flags" != x
6686 then
6687 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
6688+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
6689
6690 if test "x$TARGET_SYSTEM_ROOT" = x; then
6691 if test "x$STMP_FIXPROTO" != x; then
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-arm-frename-registers.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-arm-frename-registers.patch
new file mode 100644
index 0000000000..280b90358e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-arm-frename-registers.patch
@@ -0,0 +1,25 @@
1http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
2Index: gcc-4.3.0/gcc/regrename.c
3===================================================================
4--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
5+++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
6@@ -782,6 +782,10 @@
7 || (predicated && recog_data.operand_type[i] == OP_OUT))
8 recog_data.operand_type[i] = OP_INOUT;
9 }
10+ /* Unshare dup_loc RTL */
11+ for (i = 0; i < recog_data.n_dups; i++)
12+ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
13+
14
15 /* Step 1: Close chains for which we have overlapping reads. */
16 for (i = 0; i < n_ops; i++)
17@@ -813,7 +817,7 @@
18 OP_IN, 0);
19
20 for (i = 0; i < recog_data.n_dups; i++)
21- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
22+ *recog_data.dup_loc[i] = old_dups[i];
23 for (i = 0; i < n_ops; i++)
24 *recog_data.operand_loc[i] = old_operands[i];
25 if (recog_data.n_dups)
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-flags-for-build.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-flags-for-build.patch
new file mode 100644
index 0000000000..43a9d73dcf
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-flags-for-build.patch
@@ -0,0 +1,279 @@
1Index: gcc-4.3.2/Makefile.def
2===================================================================
3--- gcc-4.3.2.orig/Makefile.def 2008-08-28 18:21:19.000000000 -0700
4+++ gcc-4.3.2/Makefile.def 2008-08-28 18:21:41.000000000 -0700
5@@ -207,6 +207,7 @@
6 flags_to_pass = { flag= BISON ; };
7 flags_to_pass = { flag= CC_FOR_BUILD ; };
8 flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
9+flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
10 flags_to_pass = { flag= CXX_FOR_BUILD ; };
11 flags_to_pass = { flag= EXPECT ; };
12 flags_to_pass = { flag= FLEX ; };
13Index: gcc-4.3.2/gcc/Makefile.in
14===================================================================
15--- gcc-4.3.2.orig/gcc/Makefile.in 2008-08-28 18:21:20.000000000 -0700
16+++ gcc-4.3.2/gcc/Makefile.in 2008-08-28 18:21:41.000000000 -0700
17@@ -673,7 +673,7 @@
18
19 # Native linker and preprocessor flags. For x-fragment overrides.
20 BUILD_LDFLAGS=@BUILD_LDFLAGS@
21-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
22+BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS)
23
24 # Actual name to use when installing a native compiler.
25 GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
26Index: gcc-4.3.2/gcc/configure.ac
27===================================================================
28--- gcc-4.3.2.orig/gcc/configure.ac 2008-08-28 18:21:20.000000000 -0700
29+++ gcc-4.3.2/gcc/configure.ac 2008-08-28 18:21:41.000000000 -0700
30@@ -1775,10 +1775,11 @@
31 # Also, we cannot run fixincludes or fix-header.
32
33 # These are the normal (build=host) settings:
34-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
35-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
36-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
37-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
38+CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
39+BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
40+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
41+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS)
42+STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
43
44 # Possibly disable fixproto, on a per-target basis.
45 case ${use_fixproto} in
46@@ -1796,6 +1797,7 @@
47 then
48 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
49 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
50+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
51
52 if test "x$TARGET_SYSTEM_ROOT" = x; then
53 if test "x$STMP_FIXPROTO" != x; then
54Index: gcc-4.3.2/Makefile.in
55===================================================================
56--- gcc-4.3.2.orig/Makefile.in 2008-08-28 18:21:20.000000000 -0700
57+++ gcc-4.3.2/Makefile.in 2008-08-28 18:21:41.000000000 -0700
58@@ -272,6 +272,7 @@
59 AS_FOR_BUILD = @AS_FOR_BUILD@
60 CC_FOR_BUILD = @CC_FOR_BUILD@
61 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
62+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
63 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
64 CXX_FOR_BUILD = @CXX_FOR_BUILD@
65 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
66@@ -502,6 +503,7 @@
67 "BISON=$(BISON)" \
68 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
69 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
70+ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
71 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
72 "EXPECT=$(EXPECT)" \
73 "FLEX=$(FLEX)" \
74Index: gcc-4.3.2/gcc/configure
75===================================================================
76--- gcc-4.3.2.orig/gcc/configure 2008-08-28 18:21:20.000000000 -0700
77+++ gcc-4.3.2/gcc/configure 2008-08-28 18:21:50.000000000 -0700
78@@ -458,7 +458,7 @@
79 # include <unistd.h>
80 #endif"
81
82-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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
83+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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS BUILD_CPPFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
84 ac_subst_files='language_hooks'
85
86 # Initialize some variables set by options.
87@@ -13471,6 +13471,7 @@
88 CC_FOR_BUILD='$(CC)'
89 BUILD_CFLAGS='$(ALL_CFLAGS)'
90 BUILD_LDFLAGS='$(LDFLAGS)'
91+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)'
92 STMP_FIXINC=stmp-fixinc
93
94 # Possibly disable fixproto, on a per-target basis.
95@@ -13489,6 +13490,7 @@
96 then
97 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
98 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
99+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
100
101 if test "x$TARGET_SYSTEM_ROOT" = x; then
102 if test "x$STMP_FIXPROTO" != x; then
103@@ -14067,13 +14069,13 @@
104 else
105 lt_cv_nm_interface="BSD nm"
106 echo "int some_variable = 0;" > conftest.$ac_ext
107- (eval echo "\"\$as_me:14070: $ac_compile\"" >&5)
108+ (eval echo "\"\$as_me:14072: $ac_compile\"" >&5)
109 (eval "$ac_compile" 2>conftest.err)
110 cat conftest.err >&5
111- (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
112+ (eval echo "\"\$as_me:14075: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
113 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
114 cat conftest.err >&5
115- (eval echo "\"\$as_me:14076: output\"" >&5)
116+ (eval echo "\"\$as_me:14078: output\"" >&5)
117 cat conftest.out >&5
118 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
119 lt_cv_nm_interface="MS dumpbin"
120@@ -15128,7 +15130,7 @@
121 ;;
122 *-*-irix6*)
123 # Find out which ABI we are using.
124- echo '#line 15131 "configure"' > conftest.$ac_ext
125+ echo '#line 15133 "configure"' > conftest.$ac_ext
126 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
127 (eval $ac_compile) 2>&5
128 ac_status=$?
129@@ -15748,11 +15750,11 @@
130 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
131 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
132 -e 's:$: $lt_compiler_flag:'`
133- (eval echo "\"\$as_me:15751: $lt_compile\"" >&5)
134+ (eval echo "\"\$as_me:15753: $lt_compile\"" >&5)
135 (eval "$lt_compile" 2>conftest.err)
136 ac_status=$?
137 cat conftest.err >&5
138- echo "$as_me:15755: \$? = $ac_status" >&5
139+ echo "$as_me:15757: \$? = $ac_status" >&5
140 if (exit $ac_status) && test -s "$ac_outfile"; then
141 # The compiler can only warn and ignore the option if not recognized
142 # So say no if there are warnings other than the usual output.
143@@ -16070,11 +16072,11 @@
144 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
145 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
146 -e 's:$: $lt_compiler_flag:'`
147- (eval echo "\"\$as_me:16073: $lt_compile\"" >&5)
148+ (eval echo "\"\$as_me:16075: $lt_compile\"" >&5)
149 (eval "$lt_compile" 2>conftest.err)
150 ac_status=$?
151 cat conftest.err >&5
152- echo "$as_me:16077: \$? = $ac_status" >&5
153+ echo "$as_me:16079: \$? = $ac_status" >&5
154 if (exit $ac_status) && test -s "$ac_outfile"; then
155 # The compiler can only warn and ignore the option if not recognized
156 # So say no if there are warnings other than the usual output.
157@@ -16175,11 +16177,11 @@
158 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
159 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
160 -e 's:$: $lt_compiler_flag:'`
161- (eval echo "\"\$as_me:16178: $lt_compile\"" >&5)
162+ (eval echo "\"\$as_me:16180: $lt_compile\"" >&5)
163 (eval "$lt_compile" 2>out/conftest.err)
164 ac_status=$?
165 cat out/conftest.err >&5
166- echo "$as_me:16182: \$? = $ac_status" >&5
167+ echo "$as_me:16184: \$? = $ac_status" >&5
168 if (exit $ac_status) && test -s out/conftest2.$ac_objext
169 then
170 # The compiler can only warn and ignore the option if not recognized
171@@ -16230,11 +16232,11 @@
172 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
173 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
174 -e 's:$: $lt_compiler_flag:'`
175- (eval echo "\"\$as_me:16233: $lt_compile\"" >&5)
176+ (eval echo "\"\$as_me:16235: $lt_compile\"" >&5)
177 (eval "$lt_compile" 2>out/conftest.err)
178 ac_status=$?
179 cat out/conftest.err >&5
180- echo "$as_me:16237: \$? = $ac_status" >&5
181+ echo "$as_me:16239: \$? = $ac_status" >&5
182 if (exit $ac_status) && test -s out/conftest2.$ac_objext
183 then
184 # The compiler can only warn and ignore the option if not recognized
185@@ -19027,7 +19029,7 @@
186 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
187 lt_status=$lt_dlunknown
188 cat > conftest.$ac_ext <<_LT_EOF
189-#line 19030 "configure"
190+#line 19032 "configure"
191 #include "confdefs.h"
192
193 #if HAVE_DLFCN_H
194@@ -19127,7 +19129,7 @@
195 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
196 lt_status=$lt_dlunknown
197 cat > conftest.$ac_ext <<_LT_EOF
198-#line 19130 "configure"
199+#line 19132 "configure"
200 #include "confdefs.h"
201
202 #if HAVE_DLFCN_H
203@@ -23938,6 +23940,7 @@
204 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
205 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
206 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
207+s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
208 s,@STMP_FIXINC@,$STMP_FIXINC,;t t
209 s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
210 s,@collect2@,$collect2,;t t
211Index: gcc-4.3.2/Makefile.tpl
212===================================================================
213--- gcc-4.3.2.orig/Makefile.tpl 2008-08-28 18:21:20.000000000 -0700
214+++ gcc-4.3.2/Makefile.tpl 2008-08-28 18:21:41.000000000 -0700
215@@ -275,6 +275,7 @@
216 AS_FOR_BUILD = @AS_FOR_BUILD@
217 CC_FOR_BUILD = @CC_FOR_BUILD@
218 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
219+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
220 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
221 CXX_FOR_BUILD = @CXX_FOR_BUILD@
222 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
223Index: gcc-4.3.2/configure
224===================================================================
225--- gcc-4.3.2.orig/configure 2008-08-28 18:21:20.000000000 -0700
226+++ gcc-4.3.2/configure 2008-08-28 18:21:41.000000000 -0700
227@@ -272,7 +272,7 @@
228 PACKAGE_BUGREPORT=
229
230 ac_unique_file="move-if-change"
231-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 build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
232+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 build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
233 ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
234
235 # Initialize some variables set by options.
236@@ -5914,6 +5914,7 @@
237 # our build compiler if desired.
238 if test x"${build}" = x"${host}" ; then
239 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
240+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
241 CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
242 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
243 fi
244@@ -5991,6 +5992,7 @@
245
246
247
248+
249 # Generate default definitions for YACC, M4, LEX and other programs that run
250 # on the build machine. These are used if the Makefile can't locate these
251 # programs in objdir.
252@@ -12874,6 +12876,7 @@
253 s,@AS_FOR_BUILD@,$AS_FOR_BUILD,;t t
254 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
255 s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
256+s,@CPPFLAGS_FOR_BUILD@,$CPPFLAGS_FOR_BUILD,;t t
257 s,@CXXFLAGS_FOR_BUILD@,$CXXFLAGS_FOR_BUILD,;t t
258 s,@CXX_FOR_BUILD@,$CXX_FOR_BUILD,;t t
259 s,@DLLTOOL_FOR_BUILD@,$DLLTOOL_FOR_BUILD,;t t
260Index: gcc-4.3.2/configure.ac
261===================================================================
262--- gcc-4.3.2.orig/configure.ac 2008-08-28 18:21:20.000000000 -0700
263+++ gcc-4.3.2/configure.ac 2008-08-28 18:21:41.000000000 -0700
264@@ -2425,6 +2425,7 @@
265 # our build compiler if desired.
266 if test x"${build}" = x"${host}" ; then
267 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
268+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
269 CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
270 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
271 fi
272@@ -2489,6 +2490,7 @@
273 AC_SUBST(AS_FOR_BUILD)
274 AC_SUBST(CC_FOR_BUILD)
275 AC_SUBST(CFLAGS_FOR_BUILD)
276+AC_SUBST(CPPFLAGS_FOR_BUILD)
277 AC_SUBST(CXXFLAGS_FOR_BUILD)
278 AC_SUBST(CXX_FOR_BUILD)
279 AC_SUBST(DLLTOOL_FOR_BUILD)
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-release-branch/PR-36500-fix-neon.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-release-branch/PR-36500-fix-neon.patch
new file mode 100644
index 0000000000..971dfe7e29
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-release-branch/PR-36500-fix-neon.patch
@@ -0,0 +1,265 @@
1--- foo/gcc/config/arm/arm.c 2008/06/11 10:51:34 136660
2+++ foo/gcc/config/arm/arm.c 2008/06/11 10:52:55 136661
3@@ -14830,124 +14830,190 @@
4 {
5 unsigned int i, fcode = ARM_BUILTIN_NEON_BASE;
6
7+ tree neon_intQI_type_node;
8+ tree neon_intHI_type_node;
9+ tree neon_polyQI_type_node;
10+ tree neon_polyHI_type_node;
11+ tree neon_intSI_type_node;
12+ tree neon_intDI_type_node;
13+ tree neon_float_type_node;
14+
15+ tree intQI_pointer_node;
16+ tree intHI_pointer_node;
17+ tree intSI_pointer_node;
18+ tree intDI_pointer_node;
19+ tree float_pointer_node;
20+
21+ tree const_intQI_node;
22+ tree const_intHI_node;
23+ tree const_intSI_node;
24+ tree const_intDI_node;
25+ tree const_float_node;
26+
27+ tree const_intQI_pointer_node;
28+ tree const_intHI_pointer_node;
29+ tree const_intSI_pointer_node;
30+ tree const_intDI_pointer_node;
31+ tree const_float_pointer_node;
32+
33+ tree V8QI_type_node;
34+ tree V4HI_type_node;
35+ tree V2SI_type_node;
36+ tree V2SF_type_node;
37+ tree V16QI_type_node;
38+ tree V8HI_type_node;
39+ tree V4SI_type_node;
40+ tree V4SF_type_node;
41+ tree V2DI_type_node;
42+
43+ tree intUQI_type_node;
44+ tree intUHI_type_node;
45+ tree intUSI_type_node;
46+ tree intUDI_type_node;
47+
48+ tree intEI_type_node;
49+ tree intOI_type_node;
50+ tree intCI_type_node;
51+ tree intXI_type_node;
52+
53+ tree V8QI_pointer_node;
54+ tree V4HI_pointer_node;
55+ tree V2SI_pointer_node;
56+ tree V2SF_pointer_node;
57+ tree V16QI_pointer_node;
58+ tree V8HI_pointer_node;
59+ tree V4SI_pointer_node;
60+ tree V4SF_pointer_node;
61+ tree V2DI_pointer_node;
62+
63+ tree void_ftype_pv8qi_v8qi_v8qi;
64+ tree void_ftype_pv4hi_v4hi_v4hi;
65+ tree void_ftype_pv2si_v2si_v2si;
66+ tree void_ftype_pv2sf_v2sf_v2sf;
67+ tree void_ftype_pdi_di_di;
68+ tree void_ftype_pv16qi_v16qi_v16qi;
69+ tree void_ftype_pv8hi_v8hi_v8hi;
70+ tree void_ftype_pv4si_v4si_v4si;
71+ tree void_ftype_pv4sf_v4sf_v4sf;
72+ tree void_ftype_pv2di_v2di_v2di;
73+
74+ tree reinterp_ftype_dreg[5][5];
75+ tree reinterp_ftype_qreg[5][5];
76+ tree dreg_types[5], qreg_types[5];
77+
78 /* Create distinguished type nodes for NEON vector element types,
79 and pointers to values of such types, so we can detect them later. */
80- tree neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
81- tree neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
82- tree neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
83- tree neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
84- tree neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
85- tree neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
86- tree neon_float_type_node = make_node (REAL_TYPE);
87-
88- tree intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
89- tree intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
90- tree intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
91- tree intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
92- tree float_pointer_node = build_pointer_type (neon_float_type_node);
93+ neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
94+ neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
95+ neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
96+ neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
97+ neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
98+ neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
99+ neon_float_type_node = make_node (REAL_TYPE);
100+ TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
101+ layout_type (neon_float_type_node);
102+
103+ intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
104+ intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
105+ intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
106+ intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
107+ float_pointer_node = build_pointer_type (neon_float_type_node);
108
109 /* Next create constant-qualified versions of the above types. */
110- tree const_intQI_node = build_qualified_type (neon_intQI_type_node,
111- TYPE_QUAL_CONST);
112- tree const_intHI_node = build_qualified_type (neon_intHI_type_node,
113- TYPE_QUAL_CONST);
114- tree const_intSI_node = build_qualified_type (neon_intSI_type_node,
115- TYPE_QUAL_CONST);
116- tree const_intDI_node = build_qualified_type (neon_intDI_type_node,
117- TYPE_QUAL_CONST);
118- tree const_float_node = build_qualified_type (neon_float_type_node,
119- TYPE_QUAL_CONST);
120-
121- tree const_intQI_pointer_node = build_pointer_type (const_intQI_node);
122- tree const_intHI_pointer_node = build_pointer_type (const_intHI_node);
123- tree const_intSI_pointer_node = build_pointer_type (const_intSI_node);
124- tree const_intDI_pointer_node = build_pointer_type (const_intDI_node);
125- tree const_float_pointer_node = build_pointer_type (const_float_node);
126+ const_intQI_node = build_qualified_type (neon_intQI_type_node,
127+ TYPE_QUAL_CONST);
128+ const_intHI_node = build_qualified_type (neon_intHI_type_node,
129+ TYPE_QUAL_CONST);
130+ const_intSI_node = build_qualified_type (neon_intSI_type_node,
131+ TYPE_QUAL_CONST);
132+ const_intDI_node = build_qualified_type (neon_intDI_type_node,
133+ TYPE_QUAL_CONST);
134+ const_float_node = build_qualified_type (neon_float_type_node,
135+ TYPE_QUAL_CONST);
136+
137+ const_intQI_pointer_node = build_pointer_type (const_intQI_node);
138+ const_intHI_pointer_node = build_pointer_type (const_intHI_node);
139+ const_intSI_pointer_node = build_pointer_type (const_intSI_node);
140+ const_intDI_pointer_node = build_pointer_type (const_intDI_node);
141+ const_float_pointer_node = build_pointer_type (const_float_node);
142
143 /* Now create vector types based on our NEON element types. */
144 /* 64-bit vectors. */
145- tree V8QI_type_node =
146+ V8QI_type_node =
147 build_vector_type_for_mode (neon_intQI_type_node, V8QImode);
148- tree V4HI_type_node =
149+ V4HI_type_node =
150 build_vector_type_for_mode (neon_intHI_type_node, V4HImode);
151- tree V2SI_type_node =
152+ V2SI_type_node =
153 build_vector_type_for_mode (neon_intSI_type_node, V2SImode);
154- tree V2SF_type_node =
155+ V2SF_type_node =
156 build_vector_type_for_mode (neon_float_type_node, V2SFmode);
157 /* 128-bit vectors. */
158- tree V16QI_type_node =
159+ V16QI_type_node =
160 build_vector_type_for_mode (neon_intQI_type_node, V16QImode);
161- tree V8HI_type_node =
162+ V8HI_type_node =
163 build_vector_type_for_mode (neon_intHI_type_node, V8HImode);
164- tree V4SI_type_node =
165+ V4SI_type_node =
166 build_vector_type_for_mode (neon_intSI_type_node, V4SImode);
167- tree V4SF_type_node =
168+ V4SF_type_node =
169 build_vector_type_for_mode (neon_float_type_node, V4SFmode);
170- tree V2DI_type_node =
171+ V2DI_type_node =
172 build_vector_type_for_mode (neon_intDI_type_node, V2DImode);
173
174 /* Unsigned integer types for various mode sizes. */
175- tree intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
176- tree intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
177- tree intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
178- tree intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
179+ intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
180+ intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
181+ intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
182+ intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
183
184 /* Opaque integer types for structures of vectors. */
185- tree intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
186- tree intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
187- tree intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
188- tree intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
189+ intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
190+ intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
191+ intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
192+ intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
193
194 /* Pointers to vector types. */
195- tree V8QI_pointer_node = build_pointer_type (V8QI_type_node);
196- tree V4HI_pointer_node = build_pointer_type (V4HI_type_node);
197- tree V2SI_pointer_node = build_pointer_type (V2SI_type_node);
198- tree V2SF_pointer_node = build_pointer_type (V2SF_type_node);
199- tree V16QI_pointer_node = build_pointer_type (V16QI_type_node);
200- tree V8HI_pointer_node = build_pointer_type (V8HI_type_node);
201- tree V4SI_pointer_node = build_pointer_type (V4SI_type_node);
202- tree V4SF_pointer_node = build_pointer_type (V4SF_type_node);
203- tree V2DI_pointer_node = build_pointer_type (V2DI_type_node);
204+ V8QI_pointer_node = build_pointer_type (V8QI_type_node);
205+ V4HI_pointer_node = build_pointer_type (V4HI_type_node);
206+ V2SI_pointer_node = build_pointer_type (V2SI_type_node);
207+ V2SF_pointer_node = build_pointer_type (V2SF_type_node);
208+ V16QI_pointer_node = build_pointer_type (V16QI_type_node);
209+ V8HI_pointer_node = build_pointer_type (V8HI_type_node);
210+ V4SI_pointer_node = build_pointer_type (V4SI_type_node);
211+ V4SF_pointer_node = build_pointer_type (V4SF_type_node);
212+ V2DI_pointer_node = build_pointer_type (V2DI_type_node);
213
214 /* Operations which return results as pairs. */
215- tree void_ftype_pv8qi_v8qi_v8qi =
216+ void_ftype_pv8qi_v8qi_v8qi =
217 build_function_type_list (void_type_node, V8QI_pointer_node, V8QI_type_node,
218 V8QI_type_node, NULL);
219- tree void_ftype_pv4hi_v4hi_v4hi =
220+ void_ftype_pv4hi_v4hi_v4hi =
221 build_function_type_list (void_type_node, V4HI_pointer_node, V4HI_type_node,
222 V4HI_type_node, NULL);
223- tree void_ftype_pv2si_v2si_v2si =
224+ void_ftype_pv2si_v2si_v2si =
225 build_function_type_list (void_type_node, V2SI_pointer_node, V2SI_type_node,
226 V2SI_type_node, NULL);
227- tree void_ftype_pv2sf_v2sf_v2sf =
228+ void_ftype_pv2sf_v2sf_v2sf =
229 build_function_type_list (void_type_node, V2SF_pointer_node, V2SF_type_node,
230 V2SF_type_node, NULL);
231- tree void_ftype_pdi_di_di =
232+ void_ftype_pdi_di_di =
233 build_function_type_list (void_type_node, intDI_pointer_node,
234 neon_intDI_type_node, neon_intDI_type_node, NULL);
235- tree void_ftype_pv16qi_v16qi_v16qi =
236+ void_ftype_pv16qi_v16qi_v16qi =
237 build_function_type_list (void_type_node, V16QI_pointer_node,
238 V16QI_type_node, V16QI_type_node, NULL);
239- tree void_ftype_pv8hi_v8hi_v8hi =
240+ void_ftype_pv8hi_v8hi_v8hi =
241 build_function_type_list (void_type_node, V8HI_pointer_node, V8HI_type_node,
242 V8HI_type_node, NULL);
243- tree void_ftype_pv4si_v4si_v4si =
244+ void_ftype_pv4si_v4si_v4si =
245 build_function_type_list (void_type_node, V4SI_pointer_node, V4SI_type_node,
246 V4SI_type_node, NULL);
247- tree void_ftype_pv4sf_v4sf_v4sf =
248+ void_ftype_pv4sf_v4sf_v4sf =
249 build_function_type_list (void_type_node, V4SF_pointer_node, V4SF_type_node,
250 V4SF_type_node, NULL);
251- tree void_ftype_pv2di_v2di_v2di =
252+ void_ftype_pv2di_v2di_v2di =
253 build_function_type_list (void_type_node, V2DI_pointer_node, V2DI_type_node,
254 V2DI_type_node, NULL);
255
256- tree reinterp_ftype_dreg[5][5];
257- tree reinterp_ftype_qreg[5][5];
258- tree dreg_types[5], qreg_types[5];
259-
260- TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
261- layout_type (neon_float_type_node);
262-
263 /* Define typedefs which exactly correspond to the modes we are basing vector
264 types on. If you change these names you'll need to change
265 the table used by arm_mangle_type too. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc41-configure.in.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
1--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
2+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
3@@ -1907,7 +1907,7 @@
4 *) gxx_include_dir=${with_gxx_include_dir} ;;
5 esac
6
7-FLAGS_FOR_TARGET=
8+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
9 case " $target_configdirs " in
10 *" newlib "*)
11 case " $target_configargs " in
12--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
13+++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
14@@ -2669,7 +2669,7 @@
15 *) gxx_include_dir=${with_gxx_include_dir} ;;
16 esac
17
18-FLAGS_FOR_TARGET=
19+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
20 case " $target_configdirs " in
21 *" newlib "*)
22 case " $target_configargs " in
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-build-id.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-build-id.patch
new file mode 100644
index 0000000000..4e162e6472
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-build-id.patch
@@ -0,0 +1,74 @@
12007-07-22 Roland McGrath <roland@redhat.com>
2
3 * config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
4 non-relocatable link.
5 * config/linux.h (LINK_EH_SPEC): Likewise.
6 * config/sparc/linux.h (LINK_EH_SPEC): Likewise.
7 * config/sparc/linux64.h (LINK_EH_SPEC): Likewise.
8 * config/alpha/elf.h (LINK_EH_SPEC): Likewise.
9 * config/ia64/linux.h (LINK_EH_SPEC): Likewise.
10
11--- gcc/config/rs6000/sysv4.h.~1~
12+++ gcc/config/rs6000/sysv4.h
13@@ -1044,7 +1044,7 @@ extern int fixuplabelno;
14 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
15
16 #if defined(HAVE_LD_EH_FRAME_HDR)
17-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
18+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
19 #endif
20
21 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
22--- gcc/config/linux.h.~1~
23+++ gcc/config/linux.h
24@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
25 } while (0)
26
27 #if defined(HAVE_LD_EH_FRAME_HDR)
28-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
29+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
30 #endif
31
32 /* Define this so we can compile MS code for use with WINE. */
33--- gcc/config/sparc/linux64.h.~1~
34+++ gcc/config/sparc/linux64.h
35@@ -316,7 +316,7 @@ do { \
36 #define DITF_CONVERSION_LIBFUNCS 1
37
38 #if defined(HAVE_LD_EH_FRAME_HDR)
39-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
40+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
41 #endif
42
43 #ifdef HAVE_AS_TLS
44--- gcc/config/sparc/linux.h.~1~
45+++ gcc/config/sparc/linux.h
46@@ -188,7 +188,7 @@ do { \
47 #define DITF_CONVERSION_LIBFUNCS 1
48
49 #if defined(HAVE_LD_EH_FRAME_HDR)
50-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
51+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
52 #endif
53
54 #ifdef HAVE_AS_TLS
55--- gcc/config/alpha/elf.h.~1~
56+++ gcc/config/alpha/elf.h
57@@ -453,5 +453,5 @@ extern int alpha_this_gpdisp_sequence_nu
58 I imagine that other systems will catch up. In the meantime, it
59 doesn't harm to make sure that the data exists to be used later. */
60 #if defined(HAVE_LD_EH_FRAME_HDR)
61-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
62+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
63 #endif
64--- gcc/config/ia64/linux.h.~1~
65+++ gcc/config/ia64/linux.h
66@@ -56,7 +56,7 @@ do { \
67 Signalize that because we have fde-glibc, we don't need all C shared libs
68 linked against -lgcc_s. */
69 #undef LINK_EH_SPEC
70-#define LINK_EH_SPEC ""
71+#define LINK_EH_SPEC "%{!r:--build-id} "
72
73 #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
74
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-ppc64-ia64-GNU-stack.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-ppc64-ia64-GNU-stack.patch
new file mode 100644
index 0000000000..d49f2b9855
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-ppc64-ia64-GNU-stack.patch
@@ -0,0 +1,86 @@
12007-08-27 Jakub Jelinek <jakub@redhat.com>
2
3 * config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
4 * config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use
5 rs6000_elf_end_indicate_exec_stack.
6 * config/ia64/ia64.c (ia64_linux_file_end): new.
7 * config/ia64/linux.h (TARGET_ASM_FILE_END): Use ia64_linux_file_end.
8
9--- gcc/config/rs6000/rs6000.c.jj 2007-12-07 18:41:08.000000000 +0100
10+++ gcc/config/rs6000/rs6000.c 2007-12-07 18:42:12.000000000 +0100
11@@ -746,6 +746,7 @@ static void rs6000_file_start (void);
12 static int rs6000_elf_reloc_rw_mask (void);
13 static void rs6000_elf_asm_out_constructor (rtx, int);
14 static void rs6000_elf_asm_out_destructor (rtx, int);
15+static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED;
16 static void rs6000_elf_asm_init_sections (void);
17 static section *rs6000_elf_select_rtx_section (enum machine_mode, rtx,
18 unsigned HOST_WIDE_INT);
19@@ -20418,6 +20419,20 @@ rs6000_elf_declare_function_name (FILE *
20 }
21 ASM_OUTPUT_LABEL (file, name);
22 }
23+
24+static void
25+rs6000_elf_end_indicate_exec_stack (void)
26+{
27+ if (TARGET_32BIT)
28+ file_end_indicate_exec_stack ();
29+ else
30+ {
31+ int saved_trampolines_created = trampolines_created;
32+ trampolines_created = 0;
33+ file_end_indicate_exec_stack ();
34+ trampolines_created = saved_trampolines_created;
35+ }
36+}
37 #endif
38
39 #if TARGET_XCOFF
40--- gcc/config/rs6000/linux64.h.jj 2007-12-07 17:18:06.000000000 +0100
41+++ gcc/config/rs6000/linux64.h 2007-12-07 18:41:21.000000000 +0100
42@@ -504,7 +504,7 @@ extern int dot_symbols;
43 #undef DRAFT_V4_STRUCT_RET
44 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
45
46-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
47+#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
48
49 #define TARGET_POSIX_IO
50
51--- gcc/config/ia64/linux.h.jj 2007-12-07 18:17:43.000000000 +0100
52+++ gcc/config/ia64/linux.h 2007-12-07 18:41:21.000000000 +0100
53@@ -5,7 +5,7 @@
54
55 #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
56
57-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
58+#define TARGET_ASM_FILE_END ia64_linux_file_end
59
60 /* This is for -profile to use -lc_p instead of -lc. */
61 #undef CC1_SPEC
62--- gcc/config/ia64/ia64.c.jj 2007-12-07 15:41:58.000000000 +0100
63+++ gcc/config/ia64/ia64.c 2007-12-07 18:43:18.000000000 +0100
64@@ -262,6 +262,8 @@ static section *ia64_select_rtx_section
65 static void ia64_output_dwarf_dtprel (FILE *, int, rtx)
66 ATTRIBUTE_UNUSED;
67 static unsigned int ia64_section_type_flags (tree, const char *, int);
68+static void ia64_linux_file_end (void)
69+ ATTRIBUTE_UNUSED;
70 static void ia64_init_libfuncs (void)
71 ATTRIBUTE_UNUSED;
72 static void ia64_hpux_init_libfuncs (void)
73@@ -9957,4 +9959,13 @@ ia64_c_mode_for_suffix (char suffix)
74 return VOIDmode;
75 }
76
77+static void
78+ia64_linux_file_end (void)
79+{
80+ int saved_trampolines_created = trampolines_created;
81+ trampolines_created = 0;
82+ file_end_indicate_exec_stack ();
83+ trampolines_created = saved_trampolines_created;
84+}
85+
86 #include "gt-ia64.h"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/gfortran.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/gfortran.patch
new file mode 100644
index 0000000000..96905e5d7d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gfortran.patch
@@ -0,0 +1,40 @@
1The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
2
3This target doesn't really have a 128-bit integer type, however it does use
4TImode to represent the return value of certain special ABI defined library
5functions. This results in type_for_size(TImode) being called.
6
7Because TImode deosn't correspond to any gfortran integer kind
8gfc_type_for_size returns NULL and we segfault shortly after.
9
10The patch below fixes this by making gfc_type_for_size handle TImode in the
11same way as the C frontend.
12
13Tested on x86_64-linux and arm-linux-gnueabi.
14Applied to trunk.
15
16Paul
17
182007-05-15 Paul Brook <paul@codesourcery.com>
19
20 gcc/fortran/
21 * trans-types.c (gfc_type_for_size): Handle signed TImode.
22
23Index: gcc-4.2.1/gcc/fortran/trans-types.c
24===================================================================
25--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
26+++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
27@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
28 if (type && bits == TYPE_PRECISION (type))
29 return type;
30 }
31+
32+ /* Handle TImode as a special case because it is used by some backends
33+ (eg. ARM) even though it is not available for normal use. */
34+#if HOST_BITS_PER_WIDE_INT >= 64
35+ if (bits == TYPE_PRECISION (intTI_type_node))
36+ return intTI_type_node;
37+#endif
38 }
39 else
40 {
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/headerpath.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/headerpath.patch
new file mode 100644
index 0000000000..a3a6aff270
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/headerpath.patch
@@ -0,0 +1,42 @@
1Index: gcc-4.3.3/gcc/Makefile.in
2===================================================================
3--- gcc-4.3.3.orig/gcc/Makefile.in 2009-09-11 17:51:50.000000000 +0100
4+++ gcc-4.3.3/gcc/Makefile.in 2009-09-11 17:56:48.000000000 +0100
5@@ -378,7 +378,7 @@
6 MD5_H = $(srcdir)/../include/md5.h
7
8 # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
9-NATIVE_SYSTEM_HEADER_DIR = /usr/include
10+NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
11 # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
12 CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
13
14Index: gcc-4.3.3/gcc/configure
15===================================================================
16--- gcc-4.3.3.orig/gcc/configure 2009-09-11 17:49:58.000000000 +0100
17+++ gcc-4.3.3/gcc/configure 2009-09-11 18:00:16.000000000 +0100
18@@ -7315,7 +7315,7 @@
19 enable_shared=yes
20 fi;
21
22-
23+NATIVE_SYSTEM_HEADER_DIR=$NATIVE_SYSTEM_HEADER_DIR
24
25 # Check whether --with-build-sysroot or --without-build-sysroot was given.
26 if test "${with_build_sysroot+set}" = set; then
27@@ -7323,7 +7323,6 @@
28
29 fi;
30
31-
32 # Check whether --with-sysroot or --without-sysroot was given.
33 if test "${with_sysroot+set}" = set; then
34 withval="$with_sysroot"
35@@ -23882,6 +23881,7 @@
36 s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
37 s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
38 s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
39+s,@NATIVE_SYSTEM_HEADER_DIR@,$NATIVE_SYSTEM_HEADER_DIR,;t t
40 s,@onestep@,$onestep,;t t
41 s,@PKGVERSION@,$PKGVERSION,;t t
42 s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/intermask-bigendian.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/intermask-bigendian.patch
new file mode 100644
index 0000000000..fdff3d3d86
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/intermask-bigendian.patch
@@ -0,0 +1,24 @@
1--- gcc-4.2.0/gcc/config/arm/bpabi.h
2+++ gcc-4.2.0/gcc/config/arm/bpabi.h
3@@ -33,9 +33,19 @@
4 #undef FPUTYPE_DEFAULT
5 #define FPUTYPE_DEFAULT FPUTYPE_VFP
6
7+/*
8+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
9+ * (big endian) configurations.
10+ */
11+#if TARGET_BIG_ENDIAN_DEFAULT
12+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
13+#else
14+#define TARGET_ENDIAN_DEFAULT 0
15+#endif
16+
17 /* EABI targets should enable interworking by default. */
18 #undef TARGET_DEFAULT
19-#define TARGET_DEFAULT MASK_INTERWORK
20+#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
21
22 /* The ARM BPABI functions return a boolean; they use no special
23 calling convention. */
24
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/ldflags.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/ldflags.patch
new file mode 100644
index 0000000000..9576f60778
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/ldflags.patch
@@ -0,0 +1,22 @@
1--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
2+++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
3@@ -334,7 +334,7 @@
4 CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
5 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
6 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
7-LDFLAGS_FOR_TARGET =
8+LDFLAGS_FOR_TARGET = @LDFLAGS@
9 PICFLAG_FOR_TARGET =
10
11 # ------------------------------------
12--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
13+++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
14@@ -337,7 +337,7 @@
15 CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
16 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
17 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
18-LDFLAGS_FOR_TARGET =
19+LDFLAGS_FOR_TARGET = @LDFLAGS@
20 PICFLAG_FOR_TARGET =
21
22 # ------------------------------------
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/optional_libstdc.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/optional_libstdc.patch
new file mode 100644
index 0000000000..0f74353a1f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/optional_libstdc.patch
@@ -0,0 +1,23 @@
1gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
2will not run correctly since my default the linker will try and link against libstdc++
3which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
4option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch
5adds such an option which only disables the -lstdc++ linkage.
6
7A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
8do this officially, the likely answer is don't build libstdc++ separately.
9
10RP 29/6/10
11
12Index: gcc-4.3.3/gcc/cp/g++spec.c
13===================================================================
14--- gcc-4.3.3.orig/gcc/cp/g++spec.c 2010-06-29 00:06:03.901695025 +0100
15+++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
16@@ -131,6 +131,7 @@
17 if (argv[i][0] == '-')
18 {
19 if (strcmp (argv[i], "-nostdlib") == 0
20+ || strcmp (argv[i], "-nostdlib++") == 0
21 || strcmp (argv[i], "-nodefaultlibs") == 0)
22 {
23 library = -1;
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/pr34130.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/pr34130.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.1.2/gcc/fold-const.c
2===================================================================
3--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
4+++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
5@@ -5339,7 +5339,10 @@
6 }
7 break;
8 }
9- /* FALLTHROUGH */
10+ /* If the constant is negative, we cannot simplify this. */
11+ if (tree_int_cst_sgn (c) == -1)
12+ break;
13+ /* FALLTHROUGH */
14 case NEGATE_EXPR:
15 if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
16 return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/pr35942.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/pr35942.patch
new file mode 100644
index 0000000000..da610f5189
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/pr35942.patch
@@ -0,0 +1,38 @@
1Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
2
3libstdc++-v3/ChangeLog:
42010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5
6 PR libstdc++/35942
7 * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
8 * configure: Regenerate.
9
10
11Index: gcc-4.3.3/libstdc++-v3/configure
12===================================================================
13--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
14+++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
15@@ -13759,6 +13759,9 @@
16
17
18
19+# Eliminate -lstdc++ addition to postdeps for cross compiles.
20+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
21+
22 # Possibly disable most of the library.
23 ## TODO: Consider skipping unncessary tests altogether in this case, rather
24 ## than just ignoring the results. Faster /and/ more correct, win win.
25Index: gcc-4.3.3/libstdc++-v3/configure.ac
26===================================================================
27--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
28+++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
29@@ -89,6 +89,9 @@
30 AC_SUBST(enable_shared)
31 AC_SUBST(enable_static)
32
33+# Eliminate -lstdc++ addition to postdeps for cross compiles.
34+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
35+
36 # Possibly disable most of the library.
37 ## TODO: Consider skipping unncessary tests altogether in this case, rather
38 ## than just ignoring the results. Faster /and/ more correct, win win.
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/sdk-libstdc++-includes.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..4377c2143b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
1--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
2+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
3@@ -32,7 +32,7 @@
4
5 libmath_la_SOURCES = stubs.c
6
7-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
8+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
9
10 # Only compiling "C" sources in this directory.
11 LIBTOOL = @LIBTOOL@ --tag CC
12--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
13+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
14@@ -18,7 +18,7 @@
15 $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
16
17 # -I/-D flags to pass when compiling.
18-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
19+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
20
21
22
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/sh3-installfix-fixheaders.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/sh3-installfix-fixheaders.patch
new file mode 100644
index 0000000000..a06cd2e075
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sh3-installfix-fixheaders.patch
@@ -0,0 +1,11 @@
1--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000
2+++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000
3@@ -3772,8 +3772,6 @@
4 $(INSTALL_SCRIPT) $(mkinstalldirs) \
5 $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
6 $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
7- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
8- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
9 else :; fi
10 echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
11 > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/sh_unwind.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/sh_unwind.patch
new file mode 100644
index 0000000000..94921636bc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sh_unwind.patch
@@ -0,0 +1,18 @@
1Index: gcc-4.2.4/gcc/config/sh/linux-unwind.h
2===================================================================
3--- gcc-4.2.4.orig/gcc/config/sh/linux-unwind.h 2008-10-04 00:05:29.434889757 +0200
4+++ gcc-4.2.4/gcc/config/sh/linux-unwind.h 2008-10-04 00:06:02.594883544 +0200
5@@ -26,6 +26,7 @@
6 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
7 Boston, MA 02110-1301, USA. */
8
9+#ifndef inhibit_libc
10 /* Do code reading to identify a signal frame, and set the frame
11 state data appropriately. See unwind-dw2.c for the structs. */
12
13@@ -251,3 +252,5 @@
14 return _URC_NO_REASON;
15 }
16 #endif /* defined (__SH5__) */
17+
18+#endif /* defined inhibit_libc */
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/sparseset_rule.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/sparseset_rule.patch
new file mode 100644
index 0000000000..7c8113add1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sparseset_rule.patch
@@ -0,0 +1,20 @@
1Fix a missing config.h dependency when building sparseset.o to prevent
2"conflicting types for 'strsignal'" error, which can intermittently crop
3up for high values of make -j.
4
5Thanks to Richard Purdie and Jeff Dike for their help in tracking this
6down.
7
8Scott Garman <scott.a.garman@intel.com> 2010-07-13
9diff -urN gcc-4.3.3.orig//gcc/Makefile.in gcc-4.3.3/gcc/Makefile.in
10--- gcc-4.3.3.orig//gcc/Makefile.in 2008-12-04 15:00:19.000000000 -0800
11+++ gcc-4.3.3/gcc/Makefile.in 2010-07-13 21:30:01.864681358 -0700
12@@ -1789,7 +1789,7 @@
13 $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H)
14 ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
15 $(EBITMAP_H)
16-sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h
17+sparseset.o: sparseset.c $(CONFIG_H) $(SYSTEM_H) sparseset.h
18
19 COLLECT2_OBJS = collect2.o tlink.o intl.o version.o
20 COLLECT2_LIBS = @COLLECT2_LIBS@
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/unbreak-armv4t.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/unbreak-armv4t.patch
new file mode 100644
index 0000000000..b3399abfdb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/unbreak-armv4t.patch
@@ -0,0 +1,12 @@
1diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
2--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
3+++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
4@@ -45,7 +45,7 @@
5 The ARM10TDMI core is the default for armv5t, so set
6 SUBTARGET_CPU_DEFAULT to achieve this. */
7 #undef SUBTARGET_CPU_DEFAULT
8-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
9+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
10
11 #undef SUBTARGET_EXTRA_LINK_SPEC
12 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-no-host-includes.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..1f3b062feb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
1Index: gcc-4.0.2/gcc/c-incpath.c
2===================================================================
3--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
4+++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
5@@ -350,6 +350,26 @@
6 p->construct = 0;
7 p->user_supplied_p = user_supplied_p;
8
9+#ifdef CROSS_DIRECTORY_STRUCTURE
10+ /* A common error when cross compiling is including
11+ host headers. This code below will try to fail fast
12+ for cross compiling. Currently we consider /usr/include,
13+ /opt/include and /sw/include as harmful. */
14+ {
15+ /* printf("Adding Path: %s\n", p->name ); */
16+ if( strstr(p->name, "/usr/include" ) == p->name ) {
17+ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
18+ abort();
19+ } else if( strstr(p->name, "/sw/include") == p->name ) {
20+ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
21+ abort();
22+ } else if( strstr(p->name, "/opt/include") == p->name ) {
23+ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
24+ abort();
25+ }
26+ }
27+#endif
28+
29 add_cpp_dir_path (p, chain);
30 }
31
diff --git a/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..a7722cbfc4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch
@@ -0,0 +1,28 @@
1upstream: n/a
2comment: Use the preprocessor we have just compiled instead the one of
3the system. There might be incompabilities between us and them.
4
5Index: gcc-4.3.1/Makefile.in
6===================================================================
7--- gcc-4.3.1.orig/Makefile.in 2008-08-19 01:09:56.000000000 -0700
8+++ gcc-4.3.1/Makefile.in 2008-08-19 01:13:27.000000000 -0700
9@@ -204,6 +204,7 @@
10 AR="$(AR_FOR_TARGET)"; export AR; \
11 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
12 CC="$(CC_FOR_TARGET)"; export CC; \
13+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
14 CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
15 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
16 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
17Index: gcc-4.3.1/Makefile.tpl
18===================================================================
19--- gcc-4.3.1.orig/Makefile.tpl 2008-08-21 00:07:58.000000000 -0700
20+++ gcc-4.3.1/Makefile.tpl 2008-08-21 00:09:52.000000000 -0700
21@@ -223,6 +223,7 @@
22 AR="$(AR_FOR_TARGET)"; export AR; \
23 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
24 CC="$(CC_FOR_TARGET)"; export CC; \
25+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
26 CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
27 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
28 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0.inc b/meta/recipes-devtools/gcc/gcc-4.5.0.inc
new file mode 100644
index 0000000000..6ca2f98bc8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0.inc
@@ -0,0 +1,81 @@
1require gcc-common.inc
2LICENSE = "GPLv3"
3
4DEPENDS =+ "mpfr gmp libmpc elfutils"
5NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native elfutils-native"
6
7SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
8 file://gcc-4.5.0_to_svn_162697.patch.bz2 \
9 file://gcc_revert_base_version_to_4.5.0.patch \
10 file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
11 file://100-uclibc-conf.patch \
12 file://gcc-uclibc-locale-ctype_touplow_t.patch \
13 file://cache-amnesia.patch \
14 file://gcc-flags-for-build.patch \
15 file://libstdc++-emit-__cxa_end_cleanup-in-text.patch \
16 file://arm-bswapsi2.patch \
17 file://gcc-pr43698-arm-rev-instr.patch \
18 \
19 file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \
20 file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \
21 file://fedora/gcc43-java-nomulti.patch;striplevel=0 \
22 file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \
23 file://fedora/gcc43-pr32139.patch;striplevel=0 \
24 file://fedora/gcc43-pr33763.patch;striplevel=0 \
25 file://fedora/gcc43-rh330771.patch;striplevel=0 \
26 file://fedora/gcc43-rh341221.patch;striplevel=0 \
27 file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \
28 file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \
29 file://103-uclibc-conf-noupstream.patch \
30 file://200-uclibc-locale.patch \
31 file://203-uclibc-locale-no__x.patch;striplevel=1 \
32 file://204-uclibc-locale-wchar_fix.patch;striplevel=1 \
33 file://205-uclibc-locale-update.patch;striplevel=1 \
34 file://301-missing-execinfo_h.patch \
35 file://302-c99-snprintf.patch \
36 file://303-c99-complex-ugly-hack.patch \
37 file://304-index_macro.patch \
38 file://305-libmudflap-susv3-legacy.patch \
39 file://306-libstdc++-namespace.patch \
40 file://740-sh-pr24836.patch \
41 file://800-arm-bigendian.patch \
42 file://904-flatten-switch-stmt-00.patch \
43 file://arm-nolibfloat.patch \
44 file://arm-softfloat.patch \
45 file://zecke-xgcc-cpp.patch \
46 file://gcc-poison-system-directories.patch \
47 file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
48 file://64bithack.patch \
49 file://optional_libstdc.patch \
50 "
51
52SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
53
54# Language Overrides
55FORTRAN = ""
56JAVA = ""
57
58#EXTRA_OECONF_BASE = " --enable-cheaders=c_std \
59# --enable-libssp \
60# --disable-bootstrap \
61# --disable-libgomp \
62# --disable-libmudflap"
63EXTRA_OECONF_BASE = " --enable-lto \
64 --enable-libssp \
65 --disable-bootstrap \
66 --disable-libgomp \
67 --disable-libmudflap \
68 --enable-cheaders=c_global "
69
70EXTRA_OECONF_INITIAL = "--disable-libmudflap \
71 --disable-libgomp \
72 --disable-libssp \
73 --enable-decimal-float=no"
74
75EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
76 --disable-libgomp \
77 --disable-libssp"
78
79EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float "
80EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float "
81EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/100-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/100-uclibc-conf.patch
new file mode 100644
index 0000000000..0b799607e8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/100-uclibc-conf.patch
@@ -0,0 +1,37 @@
1Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
2===================================================================
3--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
4+++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
5@@ -105,6 +105,10 @@
6 then
7 make all-gdb all-dejagnu all-ld || exit 1
8 make install-gdb install-dejagnu install-ld || exit 1
9+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
10+ then
11+ make all-gdb all-dejagnu all-ld || exit 1
12+ make install-gdb install-dejagnu install-ld || exit 1
13 elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
14 make bootstrap || exit 1
15 make install || exit 1
16Index: gcc-4.3.1/libjava/classpath/ltconfig
17===================================================================
18--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
19+++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
20@@ -603,7 +603,7 @@
21
22 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
23 case $host_os in
24-linux-gnu*) ;;
25+linux-gnu*|linux-uclibc*) ;;
26 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
27 esac
28
29@@ -1251,7 +1251,7 @@
30 ;;
31
32 # This must be Linux ELF.
33-linux-gnu*)
34+linux*)
35 version_type=linux
36 need_lib_prefix=no
37 need_version=no
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/103-uclibc-conf-noupstream.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/103-uclibc-conf-noupstream.patch
new file mode 100644
index 0000000000..f9d8ad9252
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,15 @@
1Corrects sub machine arch corectly
2
3Index: gcc-4.5.0/gcc/config.gcc
4===================================================================
5--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:17:43.809880847 -0700
6+++ gcc-4.5.0/gcc/config.gcc 2010-06-25 10:38:09.689882136 -0700
7@@ -2171,7 +2171,7 @@
8 ;;
9 sh-*-elf* | sh[12346l]*-*-elf* | \
10 sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
11- sh-*-linux* | sh[2346lbe]*-*-linux* | \
12+ sh*-*-linux* | sh[2346lbe]*-*-linux* | \
13 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
14 sh64-*-netbsd* | sh64l*-*-netbsd*)
15 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/200-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/200-uclibc-locale.patch
new file mode 100644
index 0000000000..32de11fc74
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/200-uclibc-locale.patch
@@ -0,0 +1,2840 @@
1Index: gcc-4.5.0/libstdc++-v3/acinclude.m4
2===================================================================
3--- gcc-4.5.0.orig/libstdc++-v3/acinclude.m4 2010-04-05 18:27:44.000000000 -0700
4+++ gcc-4.5.0/libstdc++-v3/acinclude.m4 2010-06-25 10:42:34.913881064 -0700
5@@ -1703,7 +1703,7 @@
6 AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
7 GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
8 [use MODEL for target locale package],
9- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
10+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
11
12 # Deal with gettext issues. Default to not using it (=no) until we detect
13 # support for it later. Let the user turn it off via --e/d, but let that
14@@ -1724,6 +1724,9 @@
15 # Default to "generic".
16 if test $enable_clocale_flag = auto; then
17 case ${target_os} in
18+ *-uclibc*)
19+ enable_clocale_flag=uclibc
20+ ;;
21 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
22 enable_clocale_flag=gnu
23 ;;
24@@ -1895,6 +1898,40 @@
25 CTIME_CC=config/locale/generic/time_members.cc
26 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
27 ;;
28+ uclibc)
29+ AC_MSG_RESULT(uclibc)
30+
31+ # Declare intention to use gettext, and add support for specific
32+ # languages.
33+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
34+ ALL_LINGUAS="de fr"
35+
36+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
37+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
38+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
39+ USE_NLS=yes
40+ fi
41+ # Export the build objects.
42+ for ling in $ALL_LINGUAS; do \
43+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
44+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
45+ done
46+ AC_SUBST(glibcxx_MOFILES)
47+ AC_SUBST(glibcxx_POFILES)
48+
49+ CLOCALE_H=config/locale/uclibc/c_locale.h
50+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
51+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
52+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
53+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
54+ CMESSAGES_H=config/locale/uclibc/messages_members.h
55+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
56+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
57+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
58+ CTIME_H=config/locale/uclibc/time_members.h
59+ CTIME_CC=config/locale/uclibc/time_members.cc
60+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
61+ ;;
62 esac
63
64 # This is where the testsuite looks for locale catalogs, using the
65Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
66===================================================================
67--- /dev/null 1970-01-01 00:00:00.000000000 +0000
68+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2010-06-25 10:42:34.913881064 -0700
69@@ -0,0 +1,63 @@
70+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
71+
72+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
73+//
74+// This file is part of the GNU ISO C++ Library. This library is free
75+// software; you can redistribute it and/or modify it under the
76+// terms of the GNU General Public License as published by the
77+// Free Software Foundation; either version 2, or (at your option)
78+// any later version.
79+
80+// This library is distributed in the hope that it will be useful,
81+// but WITHOUT ANY WARRANTY; without even the implied warranty of
82+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83+// GNU General Public License for more details.
84+
85+// You should have received a copy of the GNU General Public License along
86+// with this library; see the file COPYING. If not, write to the Free
87+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
88+// USA.
89+
90+// As a special exception, you may use this file as part of a free software
91+// library without restriction. Specifically, if other files instantiate
92+// templates or use macros or inline functions from this file, or you compile
93+// this file and link it with other files to produce an executable, this
94+// file does not by itself cause the resulting executable to be covered by
95+// the GNU General Public License. This exception does not however
96+// invalidate any other reasons why the executable file might be covered by
97+// the GNU General Public License.
98+
99+// Written by Jakub Jelinek <jakub@redhat.com>
100+
101+#include <bits/c++config.h>
102+#include <clocale>
103+
104+#ifdef __UCLIBC_MJN3_ONLY__
105+#warning clean this up
106+#endif
107+
108+#ifdef __UCLIBC_HAS_XLOCALE__
109+
110+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
111+extern "C" __typeof(strcoll_l) __strcoll_l;
112+extern "C" __typeof(strftime_l) __strftime_l;
113+extern "C" __typeof(strtod_l) __strtod_l;
114+extern "C" __typeof(strtof_l) __strtof_l;
115+extern "C" __typeof(strtold_l) __strtold_l;
116+extern "C" __typeof(strxfrm_l) __strxfrm_l;
117+extern "C" __typeof(newlocale) __newlocale;
118+extern "C" __typeof(freelocale) __freelocale;
119+extern "C" __typeof(duplocale) __duplocale;
120+extern "C" __typeof(uselocale) __uselocale;
121+
122+#ifdef _GLIBCXX_USE_WCHAR_T
123+extern "C" __typeof(iswctype_l) __iswctype_l;
124+extern "C" __typeof(towlower_l) __towlower_l;
125+extern "C" __typeof(towupper_l) __towupper_l;
126+extern "C" __typeof(wcscoll_l) __wcscoll_l;
127+extern "C" __typeof(wcsftime_l) __wcsftime_l;
128+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
129+extern "C" __typeof(wctype_l) __wctype_l;
130+#endif
131+
132+#endif // GLIBC 2.3 and later
133Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
134===================================================================
135--- /dev/null 1970-01-01 00:00:00.000000000 +0000
136+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2010-06-25 10:42:34.913881064 -0700
137@@ -0,0 +1,160 @@
138+// Wrapper for underlying C-language localization -*- C++ -*-
139+
140+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
141+//
142+// This file is part of the GNU ISO C++ Library. This library is free
143+// software; you can redistribute it and/or modify it under the
144+// terms of the GNU General Public License as published by the
145+// Free Software Foundation; either version 2, or (at your option)
146+// any later version.
147+
148+// This library is distributed in the hope that it will be useful,
149+// but WITHOUT ANY WARRANTY; without even the implied warranty of
150+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
151+// GNU General Public License for more details.
152+
153+// You should have received a copy of the GNU General Public License along
154+// with this library; see the file COPYING. If not, write to the Free
155+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
156+// USA.
157+
158+// As a special exception, you may use this file as part of a free software
159+// library without restriction. Specifically, if other files instantiate
160+// templates or use macros or inline functions from this file, or you compile
161+// this file and link it with other files to produce an executable, this
162+// file does not by itself cause the resulting executable to be covered by
163+// the GNU General Public License. This exception does not however
164+// invalidate any other reasons why the executable file might be covered by
165+// the GNU General Public License.
166+
167+//
168+// ISO C++ 14882: 22.8 Standard locale categories.
169+//
170+
171+// Written by Benjamin Kosnik <bkoz@redhat.com>
172+
173+#include <cerrno> // For errno
174+#include <locale>
175+#include <stdexcept>
176+#include <langinfo.h>
177+#include <bits/c++locale_internal.h>
178+
179+#ifndef __UCLIBC_HAS_XLOCALE__
180+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
181+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
182+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
183+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
184+#define __strtof_l(S, E, L) strtof((S), (E))
185+#define __strtod_l(S, E, L) strtod((S), (E))
186+#define __strtold_l(S, E, L) strtold((S), (E))
187+#warning should dummy __newlocale check for C|POSIX ?
188+#define __newlocale(a, b, c) NULL
189+#define __freelocale(a) ((void)0)
190+#define __duplocale(a) __c_locale()
191+#endif
192+
193+namespace std
194+{
195+ template<>
196+ void
197+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
198+ const __c_locale& __cloc)
199+ {
200+ if (!(__err & ios_base::failbit))
201+ {
202+ char* __sanity;
203+ errno = 0;
204+ float __f = __strtof_l(__s, &__sanity, __cloc);
205+ if (__sanity != __s && errno != ERANGE)
206+ __v = __f;
207+ else
208+ __err |= ios_base::failbit;
209+ }
210+ }
211+
212+ template<>
213+ void
214+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
215+ const __c_locale& __cloc)
216+ {
217+ if (!(__err & ios_base::failbit))
218+ {
219+ char* __sanity;
220+ errno = 0;
221+ double __d = __strtod_l(__s, &__sanity, __cloc);
222+ if (__sanity != __s && errno != ERANGE)
223+ __v = __d;
224+ else
225+ __err |= ios_base::failbit;
226+ }
227+ }
228+
229+ template<>
230+ void
231+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
232+ const __c_locale& __cloc)
233+ {
234+ if (!(__err & ios_base::failbit))
235+ {
236+ char* __sanity;
237+ errno = 0;
238+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
239+ if (__sanity != __s && errno != ERANGE)
240+ __v = __ld;
241+ else
242+ __err |= ios_base::failbit;
243+ }
244+ }
245+
246+ void
247+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
248+ __c_locale __old)
249+ {
250+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
251+#ifdef __UCLIBC_HAS_XLOCALE__
252+ if (!__cloc)
253+ {
254+ // This named locale is not supported by the underlying OS.
255+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
256+ "name not valid"));
257+ }
258+#endif
259+ }
260+
261+ void
262+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
263+ {
264+ if (_S_get_c_locale() != __cloc)
265+ __freelocale(__cloc);
266+ }
267+
268+ __c_locale
269+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
270+ { return __duplocale(__cloc); }
271+} // namespace std
272+
273+namespace __gnu_cxx
274+{
275+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
276+ {
277+ "LC_CTYPE",
278+ "LC_NUMERIC",
279+ "LC_TIME",
280+ "LC_COLLATE",
281+ "LC_MONETARY",
282+ "LC_MESSAGES",
283+#if _GLIBCXX_NUM_CATEGORIES != 0
284+ "LC_PAPER",
285+ "LC_NAME",
286+ "LC_ADDRESS",
287+ "LC_TELEPHONE",
288+ "LC_MEASUREMENT",
289+ "LC_IDENTIFICATION"
290+#endif
291+ };
292+}
293+
294+namespace std
295+{
296+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
297+} // namespace std
298Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.h
299===================================================================
300--- /dev/null 1970-01-01 00:00:00.000000000 +0000
301+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2010-06-25 10:42:34.913881064 -0700
302@@ -0,0 +1,117 @@
303+// Wrapper for underlying C-language localization -*- C++ -*-
304+
305+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
306+//
307+// This file is part of the GNU ISO C++ Library. This library is free
308+// software; you can redistribute it and/or modify it under the
309+// terms of the GNU General Public License as published by the
310+// Free Software Foundation; either version 2, or (at your option)
311+// any later version.
312+
313+// This library is distributed in the hope that it will be useful,
314+// but WITHOUT ANY WARRANTY; without even the implied warranty of
315+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
316+// GNU General Public License for more details.
317+
318+// You should have received a copy of the GNU General Public License along
319+// with this library; see the file COPYING. If not, write to the Free
320+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
321+// USA.
322+
323+// As a special exception, you may use this file as part of a free software
324+// library without restriction. Specifically, if other files instantiate
325+// templates or use macros or inline functions from this file, or you compile
326+// this file and link it with other files to produce an executable, this
327+// file does not by itself cause the resulting executable to be covered by
328+// the GNU General Public License. This exception does not however
329+// invalidate any other reasons why the executable file might be covered by
330+// the GNU General Public License.
331+
332+//
333+// ISO C++ 14882: 22.8 Standard locale categories.
334+//
335+
336+// Written by Benjamin Kosnik <bkoz@redhat.com>
337+
338+#ifndef _C_LOCALE_H
339+#define _C_LOCALE_H 1
340+
341+#pragma GCC system_header
342+
343+#include <cstring> // get std::strlen
344+#include <cstdio> // get std::snprintf or std::sprintf
345+#include <clocale>
346+#include <langinfo.h> // For codecvt
347+#ifdef __UCLIBC_MJN3_ONLY__
348+#warning fix this
349+#endif
350+#ifdef __UCLIBC_HAS_LOCALE__
351+#include <iconv.h> // For codecvt using iconv, iconv_t
352+#endif
353+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
354+#include <libintl.h> // For messages
355+#endif
356+
357+#ifdef __UCLIBC_MJN3_ONLY__
358+#warning what is _GLIBCXX_C_LOCALE_GNU for
359+#endif
360+#define _GLIBCXX_C_LOCALE_GNU 1
361+
362+#ifdef __UCLIBC_MJN3_ONLY__
363+#warning fix categories
364+#endif
365+// #define _GLIBCXX_NUM_CATEGORIES 6
366+#define _GLIBCXX_NUM_CATEGORIES 0
367+
368+#ifdef __UCLIBC_HAS_XLOCALE__
369+namespace __gnu_cxx
370+{
371+ extern "C" __typeof(uselocale) __uselocale;
372+}
373+#endif
374+
375+namespace std
376+{
377+#ifdef __UCLIBC_HAS_XLOCALE__
378+ typedef __locale_t __c_locale;
379+#else
380+ typedef int* __c_locale;
381+#endif
382+
383+ // Convert numeric value of type _Tv to string and return length of
384+ // string. If snprintf is available use it, otherwise fall back to
385+ // the unsafe sprintf which, in general, can be dangerous and should
386+ // be avoided.
387+ template<typename _Tv>
388+ int
389+ __convert_from_v(char* __out,
390+ const int __size __attribute__ ((__unused__)),
391+ const char* __fmt,
392+#ifdef __UCLIBC_HAS_XCLOCALE__
393+ _Tv __v, const __c_locale& __cloc, int __prec)
394+ {
395+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
396+#else
397+ _Tv __v, const __c_locale&, int __prec)
398+ {
399+# ifdef __UCLIBC_HAS_LOCALE__
400+ char* __old = std::setlocale(LC_ALL, NULL);
401+ char* __sav = new char[std::strlen(__old) + 1];
402+ std::strcpy(__sav, __old);
403+ std::setlocale(LC_ALL, "C");
404+# endif
405+#endif
406+
407+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
408+
409+#ifdef __UCLIBC_HAS_XCLOCALE__
410+ __gnu_cxx::__uselocale(__old);
411+#elif defined __UCLIBC_HAS_LOCALE__
412+ std::setlocale(LC_ALL, __sav);
413+ delete [] __sav;
414+#endif
415+ return __ret;
416+ }
417+}
418+
419+#endif
420Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
421===================================================================
422--- /dev/null 1970-01-01 00:00:00.000000000 +0000
423+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2010-06-25 10:42:34.913881064 -0700
424@@ -0,0 +1,308 @@
425+// std::codecvt implementation details, GNU version -*- C++ -*-
426+
427+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
428+//
429+// This file is part of the GNU ISO C++ Library. This library is free
430+// software; you can redistribute it and/or modify it under the
431+// terms of the GNU General Public License as published by the
432+// Free Software Foundation; either version 2, or (at your option)
433+// any later version.
434+
435+// This library is distributed in the hope that it will be useful,
436+// but WITHOUT ANY WARRANTY; without even the implied warranty of
437+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
438+// GNU General Public License for more details.
439+
440+// You should have received a copy of the GNU General Public License along
441+// with this library; see the file COPYING. If not, write to the Free
442+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
443+// USA.
444+
445+// As a special exception, you may use this file as part of a free software
446+// library without restriction. Specifically, if other files instantiate
447+// templates or use macros or inline functions from this file, or you compile
448+// this file and link it with other files to produce an executable, this
449+// file does not by itself cause the resulting executable to be covered by
450+// the GNU General Public License. This exception does not however
451+// invalidate any other reasons why the executable file might be covered by
452+// the GNU General Public License.
453+
454+//
455+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
456+//
457+
458+// Written by Benjamin Kosnik <bkoz@redhat.com>
459+
460+#include <locale>
461+#include <cstdlib> // For MB_CUR_MAX
462+#include <climits> // For MB_LEN_MAX
463+#include <bits/c++locale_internal.h>
464+
465+namespace std
466+{
467+ // Specializations.
468+#ifdef _GLIBCXX_USE_WCHAR_T
469+ codecvt_base::result
470+ codecvt<wchar_t, char, mbstate_t>::
471+ do_out(state_type& __state, const intern_type* __from,
472+ const intern_type* __from_end, const intern_type*& __from_next,
473+ extern_type* __to, extern_type* __to_end,
474+ extern_type*& __to_next) const
475+ {
476+ result __ret = ok;
477+ state_type __tmp_state(__state);
478+
479+#ifdef __UCLIBC_HAS_XLOCALE__
480+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
481+#endif
482+
483+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
484+ // in case we fall back to wcrtomb and then continue, in a loop.
485+ // NB: wcsnrtombs is a GNU extension
486+ for (__from_next = __from, __to_next = __to;
487+ __from_next < __from_end && __to_next < __to_end
488+ && __ret == ok;)
489+ {
490+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
491+ __from_end - __from_next);
492+ if (!__from_chunk_end)
493+ __from_chunk_end = __from_end;
494+
495+ __from = __from_next;
496+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
497+ __from_chunk_end - __from_next,
498+ __to_end - __to_next, &__state);
499+ if (__conv == static_cast<size_t>(-1))
500+ {
501+ // In case of error, in order to stop at the exact place we
502+ // have to start again from the beginning with a series of
503+ // wcrtomb.
504+ for (; __from < __from_next; ++__from)
505+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
506+ __state = __tmp_state;
507+ __ret = error;
508+ }
509+ else if (__from_next && __from_next < __from_chunk_end)
510+ {
511+ __to_next += __conv;
512+ __ret = partial;
513+ }
514+ else
515+ {
516+ __from_next = __from_chunk_end;
517+ __to_next += __conv;
518+ }
519+
520+ if (__from_next < __from_end && __ret == ok)
521+ {
522+ extern_type __buf[MB_LEN_MAX];
523+ __tmp_state = __state;
524+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
525+ if (__conv > static_cast<size_t>(__to_end - __to_next))
526+ __ret = partial;
527+ else
528+ {
529+ memcpy(__to_next, __buf, __conv);
530+ __state = __tmp_state;
531+ __to_next += __conv;
532+ ++__from_next;
533+ }
534+ }
535+ }
536+
537+#ifdef __UCLIBC_HAS_XLOCALE__
538+ __uselocale(__old);
539+#endif
540+
541+ return __ret;
542+ }
543+
544+ codecvt_base::result
545+ codecvt<wchar_t, char, mbstate_t>::
546+ do_in(state_type& __state, const extern_type* __from,
547+ const extern_type* __from_end, const extern_type*& __from_next,
548+ intern_type* __to, intern_type* __to_end,
549+ intern_type*& __to_next) const
550+ {
551+ result __ret = ok;
552+ state_type __tmp_state(__state);
553+
554+#ifdef __UCLIBC_HAS_XLOCALE__
555+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
556+#endif
557+
558+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
559+ // in case we store a L'\0' and then continue, in a loop.
560+ // NB: mbsnrtowcs is a GNU extension
561+ for (__from_next = __from, __to_next = __to;
562+ __from_next < __from_end && __to_next < __to_end
563+ && __ret == ok;)
564+ {
565+ const extern_type* __from_chunk_end;
566+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
567+ __from_end
568+ - __from_next));
569+ if (!__from_chunk_end)
570+ __from_chunk_end = __from_end;
571+
572+ __from = __from_next;
573+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
574+ __from_chunk_end - __from_next,
575+ __to_end - __to_next, &__state);
576+ if (__conv == static_cast<size_t>(-1))
577+ {
578+ // In case of error, in order to stop at the exact place we
579+ // have to start again from the beginning with a series of
580+ // mbrtowc.
581+ for (;; ++__to_next, __from += __conv)
582+ {
583+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
584+ &__tmp_state);
585+ if (__conv == static_cast<size_t>(-1)
586+ || __conv == static_cast<size_t>(-2))
587+ break;
588+ }
589+ __from_next = __from;
590+ __state = __tmp_state;
591+ __ret = error;
592+ }
593+ else if (__from_next && __from_next < __from_chunk_end)
594+ {
595+ // It is unclear what to return in this case (see DR 382).
596+ __to_next += __conv;
597+ __ret = partial;
598+ }
599+ else
600+ {
601+ __from_next = __from_chunk_end;
602+ __to_next += __conv;
603+ }
604+
605+ if (__from_next < __from_end && __ret == ok)
606+ {
607+ if (__to_next < __to_end)
608+ {
609+ // XXX Probably wrong for stateful encodings
610+ __tmp_state = __state;
611+ ++__from_next;
612+ *__to_next++ = L'\0';
613+ }
614+ else
615+ __ret = partial;
616+ }
617+ }
618+
619+#ifdef __UCLIBC_HAS_XLOCALE__
620+ __uselocale(__old);
621+#endif
622+
623+ return __ret;
624+ }
625+
626+ int
627+ codecvt<wchar_t, char, mbstate_t>::
628+ do_encoding() const throw()
629+ {
630+ // XXX This implementation assumes that the encoding is
631+ // stateless and is either single-byte or variable-width.
632+ int __ret = 0;
633+#ifdef __UCLIBC_HAS_XLOCALE__
634+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
635+#endif
636+ if (MB_CUR_MAX == 1)
637+ __ret = 1;
638+#ifdef __UCLIBC_HAS_XLOCALE__
639+ __uselocale(__old);
640+#endif
641+ return __ret;
642+ }
643+
644+ int
645+ codecvt<wchar_t, char, mbstate_t>::
646+ do_max_length() const throw()
647+ {
648+#ifdef __UCLIBC_HAS_XLOCALE__
649+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
650+#endif
651+ // XXX Probably wrong for stateful encodings.
652+ int __ret = MB_CUR_MAX;
653+#ifdef __UCLIBC_HAS_XLOCALE__
654+ __uselocale(__old);
655+#endif
656+ return __ret;
657+ }
658+
659+ int
660+ codecvt<wchar_t, char, mbstate_t>::
661+ do_length(state_type& __state, const extern_type* __from,
662+ const extern_type* __end, size_t __max) const
663+ {
664+ int __ret = 0;
665+ state_type __tmp_state(__state);
666+
667+#ifdef __UCLIBC_HAS_XLOCALE__
668+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
669+#endif
670+
671+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
672+ // in case we advance past it and then continue, in a loop.
673+ // NB: mbsnrtowcs is a GNU extension
674+
675+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
676+ // its fourth parameter (it wouldn't with NULL as first parameter).
677+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
678+ * __max));
679+ while (__from < __end && __max)
680+ {
681+ const extern_type* __from_chunk_end;
682+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
683+ __end
684+ - __from));
685+ if (!__from_chunk_end)
686+ __from_chunk_end = __end;
687+
688+ const extern_type* __tmp_from = __from;
689+ size_t __conv = mbsnrtowcs(__to, &__from,
690+ __from_chunk_end - __from,
691+ __max, &__state);
692+ if (__conv == static_cast<size_t>(-1))
693+ {
694+ // In case of error, in order to stop at the exact place we
695+ // have to start again from the beginning with a series of
696+ // mbrtowc.
697+ for (__from = __tmp_from;; __from += __conv)
698+ {
699+ __conv = mbrtowc(NULL, __from, __end - __from,
700+ &__tmp_state);
701+ if (__conv == static_cast<size_t>(-1)
702+ || __conv == static_cast<size_t>(-2))
703+ break;
704+ }
705+ __state = __tmp_state;
706+ __ret += __from - __tmp_from;
707+ break;
708+ }
709+ if (!__from)
710+ __from = __from_chunk_end;
711+
712+ __ret += __from - __tmp_from;
713+ __max -= __conv;
714+
715+ if (__from < __end && __max)
716+ {
717+ // XXX Probably wrong for stateful encodings
718+ __tmp_state = __state;
719+ ++__from;
720+ ++__ret;
721+ --__max;
722+ }
723+ }
724+
725+#ifdef __UCLIBC_HAS_XLOCALE__
726+ __uselocale(__old);
727+#endif
728+
729+ return __ret;
730+ }
731+#endif
732+}
733Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
734===================================================================
735--- /dev/null 1970-01-01 00:00:00.000000000 +0000
736+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2010-06-25 10:42:34.913881064 -0700
737@@ -0,0 +1,80 @@
738+// std::collate implementation details, GNU version -*- C++ -*-
739+
740+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
741+//
742+// This file is part of the GNU ISO C++ Library. This library is free
743+// software; you can redistribute it and/or modify it under the
744+// terms of the GNU General Public License as published by the
745+// Free Software Foundation; either version 2, or (at your option)
746+// any later version.
747+
748+// This library is distributed in the hope that it will be useful,
749+// but WITHOUT ANY WARRANTY; without even the implied warranty of
750+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
751+// GNU General Public License for more details.
752+
753+// You should have received a copy of the GNU General Public License along
754+// with this library; see the file COPYING. If not, write to the Free
755+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
756+// USA.
757+
758+// As a special exception, you may use this file as part of a free software
759+// library without restriction. Specifically, if other files instantiate
760+// templates or use macros or inline functions from this file, or you compile
761+// this file and link it with other files to produce an executable, this
762+// file does not by itself cause the resulting executable to be covered by
763+// the GNU General Public License. This exception does not however
764+// invalidate any other reasons why the executable file might be covered by
765+// the GNU General Public License.
766+
767+//
768+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
769+//
770+
771+// Written by Benjamin Kosnik <bkoz@redhat.com>
772+
773+#include <locale>
774+#include <bits/c++locale_internal.h>
775+
776+#ifndef __UCLIBC_HAS_XLOCALE__
777+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
778+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
779+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
780+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
781+#endif
782+
783+namespace std
784+{
785+ // These are basically extensions to char_traits, and perhaps should
786+ // be put there instead of here.
787+ template<>
788+ int
789+ collate<char>::_M_compare(const char* __one, const char* __two) const
790+ {
791+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
792+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
793+ }
794+
795+ template<>
796+ size_t
797+ collate<char>::_M_transform(char* __to, const char* __from,
798+ size_t __n) const
799+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
800+
801+#ifdef _GLIBCXX_USE_WCHAR_T
802+ template<>
803+ int
804+ collate<wchar_t>::_M_compare(const wchar_t* __one,
805+ const wchar_t* __two) const
806+ {
807+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
808+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
809+ }
810+
811+ template<>
812+ size_t
813+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
814+ size_t __n) const
815+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
816+#endif
817+}
818Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
819===================================================================
820--- /dev/null 1970-01-01 00:00:00.000000000 +0000
821+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2010-06-25 10:42:34.913881064 -0700
822@@ -0,0 +1,300 @@
823+// std::ctype implementation details, GNU version -*- C++ -*-
824+
825+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
826+//
827+// This file is part of the GNU ISO C++ Library. This library is free
828+// software; you can redistribute it and/or modify it under the
829+// terms of the GNU General Public License as published by the
830+// Free Software Foundation; either version 2, or (at your option)
831+// any later version.
832+
833+// This library is distributed in the hope that it will be useful,
834+// but WITHOUT ANY WARRANTY; without even the implied warranty of
835+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
836+// GNU General Public License for more details.
837+
838+// You should have received a copy of the GNU General Public License along
839+// with this library; see the file COPYING. If not, write to the Free
840+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
841+// USA.
842+
843+// As a special exception, you may use this file as part of a free software
844+// library without restriction. Specifically, if other files instantiate
845+// templates or use macros or inline functions from this file, or you compile
846+// this file and link it with other files to produce an executable, this
847+// file does not by itself cause the resulting executable to be covered by
848+// the GNU General Public License. This exception does not however
849+// invalidate any other reasons why the executable file might be covered by
850+// the GNU General Public License.
851+
852+//
853+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
854+//
855+
856+// Written by Benjamin Kosnik <bkoz@redhat.com>
857+
858+#define _LIBC
859+#include <locale>
860+#undef _LIBC
861+#include <bits/c++locale_internal.h>
862+
863+#ifndef __UCLIBC_HAS_XLOCALE__
864+#define __wctype_l(S, L) wctype((S))
865+#define __towupper_l(C, L) towupper((C))
866+#define __towlower_l(C, L) towlower((C))
867+#define __iswctype_l(C, M, L) iswctype((C), (M))
868+#endif
869+
870+namespace std
871+{
872+ // NB: The other ctype<char> specializations are in src/locale.cc and
873+ // various /config/os/* files.
874+ template<>
875+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
876+ : ctype<char>(0, false, __refs)
877+ {
878+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
879+ {
880+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
881+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
882+#ifdef __UCLIBC_HAS_XLOCALE__
883+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
884+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
885+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
886+#endif
887+ }
888+ }
889+
890+#ifdef _GLIBCXX_USE_WCHAR_T
891+ ctype<wchar_t>::__wmask_type
892+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
893+ {
894+ __wmask_type __ret;
895+ switch (__m)
896+ {
897+ case space:
898+ __ret = __wctype_l("space", _M_c_locale_ctype);
899+ break;
900+ case print:
901+ __ret = __wctype_l("print", _M_c_locale_ctype);
902+ break;
903+ case cntrl:
904+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
905+ break;
906+ case upper:
907+ __ret = __wctype_l("upper", _M_c_locale_ctype);
908+ break;
909+ case lower:
910+ __ret = __wctype_l("lower", _M_c_locale_ctype);
911+ break;
912+ case alpha:
913+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
914+ break;
915+ case digit:
916+ __ret = __wctype_l("digit", _M_c_locale_ctype);
917+ break;
918+ case punct:
919+ __ret = __wctype_l("punct", _M_c_locale_ctype);
920+ break;
921+ case xdigit:
922+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
923+ break;
924+ case alnum:
925+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
926+ break;
927+ case graph:
928+ __ret = __wctype_l("graph", _M_c_locale_ctype);
929+ break;
930+ default:
931+ __ret = __wmask_type();
932+ }
933+ return __ret;
934+ }
935+
936+ wchar_t
937+ ctype<wchar_t>::do_toupper(wchar_t __c) const
938+ { return __towupper_l(__c, _M_c_locale_ctype); }
939+
940+ const wchar_t*
941+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
942+ {
943+ while (__lo < __hi)
944+ {
945+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
946+ ++__lo;
947+ }
948+ return __hi;
949+ }
950+
951+ wchar_t
952+ ctype<wchar_t>::do_tolower(wchar_t __c) const
953+ { return __towlower_l(__c, _M_c_locale_ctype); }
954+
955+ const wchar_t*
956+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
957+ {
958+ while (__lo < __hi)
959+ {
960+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
961+ ++__lo;
962+ }
963+ return __hi;
964+ }
965+
966+ bool
967+ ctype<wchar_t>::
968+ do_is(mask __m, wchar_t __c) const
969+ {
970+ // Highest bitmask in ctype_base == 10, but extra in "C"
971+ // library for blank.
972+ bool __ret = false;
973+ const size_t __bitmasksize = 11;
974+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
975+ if (__m & _M_bit[__bitcur]
976+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
977+ {
978+ __ret = true;
979+ break;
980+ }
981+ return __ret;
982+ }
983+
984+ const wchar_t*
985+ ctype<wchar_t>::
986+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
987+ {
988+ for (; __lo < __hi; ++__vec, ++__lo)
989+ {
990+ // Highest bitmask in ctype_base == 10, but extra in "C"
991+ // library for blank.
992+ const size_t __bitmasksize = 11;
993+ mask __m = 0;
994+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
995+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
996+ __m |= _M_bit[__bitcur];
997+ *__vec = __m;
998+ }
999+ return __hi;
1000+ }
1001+
1002+ const wchar_t*
1003+ ctype<wchar_t>::
1004+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
1005+ {
1006+ while (__lo < __hi && !this->do_is(__m, *__lo))
1007+ ++__lo;
1008+ return __lo;
1009+ }
1010+
1011+ const wchar_t*
1012+ ctype<wchar_t>::
1013+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
1014+ {
1015+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
1016+ ++__lo;
1017+ return __lo;
1018+ }
1019+
1020+ wchar_t
1021+ ctype<wchar_t>::
1022+ do_widen(char __c) const
1023+ { return _M_widen[static_cast<unsigned char>(__c)]; }
1024+
1025+ const char*
1026+ ctype<wchar_t>::
1027+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
1028+ {
1029+ while (__lo < __hi)
1030+ {
1031+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
1032+ ++__lo;
1033+ ++__dest;
1034+ }
1035+ return __hi;
1036+ }
1037+
1038+ char
1039+ ctype<wchar_t>::
1040+ do_narrow(wchar_t __wc, char __dfault) const
1041+ {
1042+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
1043+ return _M_narrow[__wc];
1044+#ifdef __UCLIBC_HAS_XLOCALE__
1045+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1046+#endif
1047+ const int __c = wctob(__wc);
1048+#ifdef __UCLIBC_HAS_XLOCALE__
1049+ __uselocale(__old);
1050+#endif
1051+ return (__c == EOF ? __dfault : static_cast<char>(__c));
1052+ }
1053+
1054+ const wchar_t*
1055+ ctype<wchar_t>::
1056+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
1057+ char* __dest) const
1058+ {
1059+#ifdef __UCLIBC_HAS_XLOCALE__
1060+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1061+#endif
1062+ if (_M_narrow_ok)
1063+ while (__lo < __hi)
1064+ {
1065+ if (*__lo >= 0 && *__lo < 128)
1066+ *__dest = _M_narrow[*__lo];
1067+ else
1068+ {
1069+ const int __c = wctob(*__lo);
1070+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1071+ }
1072+ ++__lo;
1073+ ++__dest;
1074+ }
1075+ else
1076+ while (__lo < __hi)
1077+ {
1078+ const int __c = wctob(*__lo);
1079+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
1080+ ++__lo;
1081+ ++__dest;
1082+ }
1083+#ifdef __UCLIBC_HAS_XLOCALE__
1084+ __uselocale(__old);
1085+#endif
1086+ return __hi;
1087+ }
1088+
1089+ void
1090+ ctype<wchar_t>::_M_initialize_ctype()
1091+ {
1092+#ifdef __UCLIBC_HAS_XLOCALE__
1093+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1094+#endif
1095+ wint_t __i;
1096+ for (__i = 0; __i < 128; ++__i)
1097+ {
1098+ const int __c = wctob(__i);
1099+ if (__c == EOF)
1100+ break;
1101+ else
1102+ _M_narrow[__i] = static_cast<char>(__c);
1103+ }
1104+ if (__i == 128)
1105+ _M_narrow_ok = true;
1106+ else
1107+ _M_narrow_ok = false;
1108+ for (size_t __j = 0;
1109+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
1110+ _M_widen[__j] = btowc(__j);
1111+
1112+ for (size_t __k = 0; __k <= 11; ++__k)
1113+ {
1114+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
1115+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
1116+ }
1117+#ifdef __UCLIBC_HAS_XLOCALE__
1118+ __uselocale(__old);
1119+#endif
1120+ }
1121+#endif // _GLIBCXX_USE_WCHAR_T
1122+}
1123Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
1124===================================================================
1125--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1126+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2010-06-25 10:42:34.913881064 -0700
1127@@ -0,0 +1,100 @@
1128+// std::messages implementation details, GNU version -*- C++ -*-
1129+
1130+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1131+//
1132+// This file is part of the GNU ISO C++ Library. This library is free
1133+// software; you can redistribute it and/or modify it under the
1134+// terms of the GNU General Public License as published by the
1135+// Free Software Foundation; either version 2, or (at your option)
1136+// any later version.
1137+
1138+// This library is distributed in the hope that it will be useful,
1139+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1140+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1141+// GNU General Public License for more details.
1142+
1143+// You should have received a copy of the GNU General Public License along
1144+// with this library; see the file COPYING. If not, write to the Free
1145+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1146+// USA.
1147+
1148+// As a special exception, you may use this file as part of a free software
1149+// library without restriction. Specifically, if other files instantiate
1150+// templates or use macros or inline functions from this file, or you compile
1151+// this file and link it with other files to produce an executable, this
1152+// file does not by itself cause the resulting executable to be covered by
1153+// the GNU General Public License. This exception does not however
1154+// invalidate any other reasons why the executable file might be covered by
1155+// the GNU General Public License.
1156+
1157+//
1158+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
1159+//
1160+
1161+// Written by Benjamin Kosnik <bkoz@redhat.com>
1162+
1163+#include <locale>
1164+#include <bits/c++locale_internal.h>
1165+
1166+#ifdef __UCLIBC_MJN3_ONLY__
1167+#warning fix gettext stuff
1168+#endif
1169+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1170+extern "C" char *__dcgettext(const char *domainname,
1171+ const char *msgid, int category);
1172+#undef gettext
1173+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1174+#else
1175+#undef gettext
1176+#define gettext(msgid) (msgid)
1177+#endif
1178+
1179+namespace std
1180+{
1181+ // Specializations.
1182+ template<>
1183+ string
1184+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
1185+ {
1186+#ifdef __UCLIBC_HAS_XLOCALE__
1187+ __c_locale __old = __uselocale(_M_c_locale_messages);
1188+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
1189+ __uselocale(__old);
1190+ return string(__msg);
1191+#elif defined __UCLIBC_HAS_LOCALE__
1192+ char* __old = strdup(setlocale(LC_ALL, NULL));
1193+ setlocale(LC_ALL, _M_name_messages);
1194+ const char* __msg = gettext(__dfault.c_str());
1195+ setlocale(LC_ALL, __old);
1196+ free(__old);
1197+ return string(__msg);
1198+#else
1199+ const char* __msg = gettext(__dfault.c_str());
1200+ return string(__msg);
1201+#endif
1202+ }
1203+
1204+#ifdef _GLIBCXX_USE_WCHAR_T
1205+ template<>
1206+ wstring
1207+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
1208+ {
1209+# ifdef __UCLIBC_HAS_XLOCALE__
1210+ __c_locale __old = __uselocale(_M_c_locale_messages);
1211+ char* __msg = gettext(_M_convert_to_char(__dfault));
1212+ __uselocale(__old);
1213+ return _M_convert_from_char(__msg);
1214+# elif defined __UCLIBC_HAS_LOCALE__
1215+ char* __old = strdup(setlocale(LC_ALL, NULL));
1216+ setlocale(LC_ALL, _M_name_messages);
1217+ char* __msg = gettext(_M_convert_to_char(__dfault));
1218+ setlocale(LC_ALL, __old);
1219+ free(__old);
1220+ return _M_convert_from_char(__msg);
1221+# else
1222+ char* __msg = gettext(_M_convert_to_char(__dfault));
1223+ return _M_convert_from_char(__msg);
1224+# endif
1225+ }
1226+#endif
1227+}
1228Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h
1229===================================================================
1230--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1231+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:42:34.913881064 -0700
1232@@ -0,0 +1,118 @@
1233+// std::messages implementation details, GNU version -*- C++ -*-
1234+
1235+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1236+//
1237+// This file is part of the GNU ISO C++ Library. This library is free
1238+// software; you can redistribute it and/or modify it under the
1239+// terms of the GNU General Public License as published by the
1240+// Free Software Foundation; either version 2, or (at your option)
1241+// any later version.
1242+
1243+// This library is distributed in the hope that it will be useful,
1244+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1245+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1246+// GNU General Public License for more details.
1247+
1248+// You should have received a copy of the GNU General Public License along
1249+// with this library; see the file COPYING. If not, write to the Free
1250+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1251+// USA.
1252+
1253+// As a special exception, you may use this file as part of a free software
1254+// library without restriction. Specifically, if other files instantiate
1255+// templates or use macros or inline functions from this file, or you compile
1256+// this file and link it with other files to produce an executable, this
1257+// file does not by itself cause the resulting executable to be covered by
1258+// the GNU General Public License. This exception does not however
1259+// invalidate any other reasons why the executable file might be covered by
1260+// the GNU General Public License.
1261+
1262+//
1263+// ISO C++ 14882: 22.2.7.1.2 messages functions
1264+//
1265+
1266+// Written by Benjamin Kosnik <bkoz@redhat.com>
1267+
1268+#ifdef __UCLIBC_MJN3_ONLY__
1269+#warning fix prototypes for *textdomain funcs
1270+#endif
1271+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1272+extern "C" char *__textdomain(const char *domainname);
1273+extern "C" char *__bindtextdomain(const char *domainname,
1274+ const char *dirname);
1275+#else
1276+#undef __textdomain
1277+#undef __bindtextdomain
1278+#define __textdomain(D) ((void)0)
1279+#define __bindtextdomain(D,P) ((void)0)
1280+#endif
1281+
1282+ // Non-virtual member functions.
1283+ template<typename _CharT>
1284+ messages<_CharT>::messages(size_t __refs)
1285+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
1286+ _M_name_messages(_S_get_c_name())
1287+ { }
1288+
1289+ template<typename _CharT>
1290+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
1291+ size_t __refs)
1292+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
1293+ _M_name_messages(__s)
1294+ {
1295+ char* __tmp = new char[std::strlen(__s) + 1];
1296+ std::strcpy(__tmp, __s);
1297+ _M_name_messages = __tmp;
1298+ }
1299+
1300+ template<typename _CharT>
1301+ typename messages<_CharT>::catalog
1302+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1303+ const char* __dir) const
1304+ {
1305+ __bindtextdomain(__s.c_str(), __dir);
1306+ return this->do_open(__s, __loc);
1307+ }
1308+
1309+ // Virtual member functions.
1310+ template<typename _CharT>
1311+ messages<_CharT>::~messages()
1312+ {
1313+ if (_M_name_messages != _S_get_c_name())
1314+ delete [] _M_name_messages;
1315+ _S_destroy_c_locale(_M_c_locale_messages);
1316+ }
1317+
1318+ template<typename _CharT>
1319+ typename messages<_CharT>::catalog
1320+ messages<_CharT>::do_open(const basic_string<char>& __s,
1321+ const locale&) const
1322+ {
1323+ // No error checking is done, assume the catalog exists and can
1324+ // be used.
1325+ __textdomain(__s.c_str());
1326+ return 0;
1327+ }
1328+
1329+ template<typename _CharT>
1330+ void
1331+ messages<_CharT>::do_close(catalog) const
1332+ { }
1333+
1334+ // messages_byname
1335+ template<typename _CharT>
1336+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
1337+ : messages<_CharT>(__refs)
1338+ {
1339+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
1340+ delete [] this->_M_name_messages;
1341+ char* __tmp = new char[std::strlen(__s) + 1];
1342+ std::strcpy(__tmp, __s);
1343+ this->_M_name_messages = __tmp;
1344+
1345+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
1346+ {
1347+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
1348+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
1349+ }
1350+ }
1351Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1352===================================================================
1353--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1354+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2010-06-25 10:42:34.913881064 -0700
1355@@ -0,0 +1,692 @@
1356+// std::moneypunct implementation details, GNU version -*- C++ -*-
1357+
1358+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
1359+//
1360+// This file is part of the GNU ISO C++ Library. This library is free
1361+// software; you can redistribute it and/or modify it under the
1362+// terms of the GNU General Public License as published by the
1363+// Free Software Foundation; either version 2, or (at your option)
1364+// any later version.
1365+
1366+// This library is distributed in the hope that it will be useful,
1367+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1368+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1369+// GNU General Public License for more details.
1370+
1371+// You should have received a copy of the GNU General Public License along
1372+// with this library; see the file COPYING. If not, write to the Free
1373+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1374+// USA.
1375+
1376+// As a special exception, you may use this file as part of a free software
1377+// library without restriction. Specifically, if other files instantiate
1378+// templates or use macros or inline functions from this file, or you compile
1379+// this file and link it with other files to produce an executable, this
1380+// file does not by itself cause the resulting executable to be covered by
1381+// the GNU General Public License. This exception does not however
1382+// invalidate any other reasons why the executable file might be covered by
1383+// the GNU General Public License.
1384+
1385+//
1386+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
1387+//
1388+
1389+// Written by Benjamin Kosnik <bkoz@redhat.com>
1390+
1391+#define _LIBC
1392+#include <locale>
1393+#undef _LIBC
1394+#include <bits/c++locale_internal.h>
1395+
1396+#ifdef __UCLIBC_MJN3_ONLY__
1397+#warning optimize this for uclibc
1398+#warning tailor for stub locale support
1399+#endif
1400+
1401+#ifndef __UCLIBC_HAS_XLOCALE__
1402+#define __nl_langinfo_l(N, L) nl_langinfo((N))
1403+#endif
1404+
1405+namespace std
1406+{
1407+ // Construct and return valid pattern consisting of some combination of:
1408+ // space none symbol sign value
1409+ money_base::pattern
1410+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
1411+ {
1412+ pattern __ret;
1413+
1414+ // This insanely complicated routine attempts to construct a valid
1415+ // pattern for use with monyepunct. A couple of invariants:
1416+
1417+ // if (__precedes) symbol -> value
1418+ // else value -> symbol
1419+
1420+ // if (__space) space
1421+ // else none
1422+
1423+ // none == never first
1424+ // space never first or last
1425+
1426+ // Any elegant implementations of this are welcome.
1427+ switch (__posn)
1428+ {
1429+ case 0:
1430+ case 1:
1431+ // 1 The sign precedes the value and symbol.
1432+ __ret.field[0] = sign;
1433+ if (__space)
1434+ {
1435+ // Pattern starts with sign.
1436+ if (__precedes)
1437+ {
1438+ __ret.field[1] = symbol;
1439+ __ret.field[3] = value;
1440+ }
1441+ else
1442+ {
1443+ __ret.field[1] = value;
1444+ __ret.field[3] = symbol;
1445+ }
1446+ __ret.field[2] = space;
1447+ }
1448+ else
1449+ {
1450+ // Pattern starts with sign and ends with none.
1451+ if (__precedes)
1452+ {
1453+ __ret.field[1] = symbol;
1454+ __ret.field[2] = value;
1455+ }
1456+ else
1457+ {
1458+ __ret.field[1] = value;
1459+ __ret.field[2] = symbol;
1460+ }
1461+ __ret.field[3] = none;
1462+ }
1463+ break;
1464+ case 2:
1465+ // 2 The sign follows the value and symbol.
1466+ if (__space)
1467+ {
1468+ // Pattern either ends with sign.
1469+ if (__precedes)
1470+ {
1471+ __ret.field[0] = symbol;
1472+ __ret.field[2] = value;
1473+ }
1474+ else
1475+ {
1476+ __ret.field[0] = value;
1477+ __ret.field[2] = symbol;
1478+ }
1479+ __ret.field[1] = space;
1480+ __ret.field[3] = sign;
1481+ }
1482+ else
1483+ {
1484+ // Pattern ends with sign then none.
1485+ if (__precedes)
1486+ {
1487+ __ret.field[0] = symbol;
1488+ __ret.field[1] = value;
1489+ }
1490+ else
1491+ {
1492+ __ret.field[0] = value;
1493+ __ret.field[1] = symbol;
1494+ }
1495+ __ret.field[2] = sign;
1496+ __ret.field[3] = none;
1497+ }
1498+ break;
1499+ case 3:
1500+ // 3 The sign immediately precedes the symbol.
1501+ if (__precedes)
1502+ {
1503+ __ret.field[0] = sign;
1504+ __ret.field[1] = symbol;
1505+ if (__space)
1506+ {
1507+ __ret.field[2] = space;
1508+ __ret.field[3] = value;
1509+ }
1510+ else
1511+ {
1512+ __ret.field[2] = value;
1513+ __ret.field[3] = none;
1514+ }
1515+ }
1516+ else
1517+ {
1518+ __ret.field[0] = value;
1519+ if (__space)
1520+ {
1521+ __ret.field[1] = space;
1522+ __ret.field[2] = sign;
1523+ __ret.field[3] = symbol;
1524+ }
1525+ else
1526+ {
1527+ __ret.field[1] = sign;
1528+ __ret.field[2] = symbol;
1529+ __ret.field[3] = none;
1530+ }
1531+ }
1532+ break;
1533+ case 4:
1534+ // 4 The sign immediately follows the symbol.
1535+ if (__precedes)
1536+ {
1537+ __ret.field[0] = symbol;
1538+ __ret.field[1] = sign;
1539+ if (__space)
1540+ {
1541+ __ret.field[2] = space;
1542+ __ret.field[3] = value;
1543+ }
1544+ else
1545+ {
1546+ __ret.field[2] = value;
1547+ __ret.field[3] = none;
1548+ }
1549+ }
1550+ else
1551+ {
1552+ __ret.field[0] = value;
1553+ if (__space)
1554+ {
1555+ __ret.field[1] = space;
1556+ __ret.field[2] = symbol;
1557+ __ret.field[3] = sign;
1558+ }
1559+ else
1560+ {
1561+ __ret.field[1] = symbol;
1562+ __ret.field[2] = sign;
1563+ __ret.field[3] = none;
1564+ }
1565+ }
1566+ break;
1567+ default:
1568+ ;
1569+ }
1570+ return __ret;
1571+ }
1572+
1573+ template<>
1574+ void
1575+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
1576+ const char*)
1577+ {
1578+ if (!_M_data)
1579+ _M_data = new __moneypunct_cache<char, true>;
1580+
1581+ if (!__cloc)
1582+ {
1583+ // "C" locale
1584+ _M_data->_M_decimal_point = '.';
1585+ _M_data->_M_thousands_sep = ',';
1586+ _M_data->_M_grouping = "";
1587+ _M_data->_M_grouping_size = 0;
1588+ _M_data->_M_curr_symbol = "";
1589+ _M_data->_M_curr_symbol_size = 0;
1590+ _M_data->_M_positive_sign = "";
1591+ _M_data->_M_positive_sign_size = 0;
1592+ _M_data->_M_negative_sign = "";
1593+ _M_data->_M_negative_sign_size = 0;
1594+ _M_data->_M_frac_digits = 0;
1595+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1596+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1597+
1598+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1599+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1600+ }
1601+ else
1602+ {
1603+ // Named locale.
1604+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1605+ __cloc));
1606+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1607+ __cloc));
1608+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1609+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1610+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1611+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1612+
1613+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1614+ if (!__nposn)
1615+ _M_data->_M_negative_sign = "()";
1616+ else
1617+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1618+ __cloc);
1619+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1620+
1621+ // _Intl == true
1622+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1623+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1624+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1625+ __cloc));
1626+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1627+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1628+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1629+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1630+ __pposn);
1631+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1632+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1633+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1634+ __nposn);
1635+ }
1636+ }
1637+
1638+ template<>
1639+ void
1640+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
1641+ const char*)
1642+ {
1643+ if (!_M_data)
1644+ _M_data = new __moneypunct_cache<char, false>;
1645+
1646+ if (!__cloc)
1647+ {
1648+ // "C" locale
1649+ _M_data->_M_decimal_point = '.';
1650+ _M_data->_M_thousands_sep = ',';
1651+ _M_data->_M_grouping = "";
1652+ _M_data->_M_grouping_size = 0;
1653+ _M_data->_M_curr_symbol = "";
1654+ _M_data->_M_curr_symbol_size = 0;
1655+ _M_data->_M_positive_sign = "";
1656+ _M_data->_M_positive_sign_size = 0;
1657+ _M_data->_M_negative_sign = "";
1658+ _M_data->_M_negative_sign_size = 0;
1659+ _M_data->_M_frac_digits = 0;
1660+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1661+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1662+
1663+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1664+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
1665+ }
1666+ else
1667+ {
1668+ // Named locale.
1669+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
1670+ __cloc));
1671+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
1672+ __cloc));
1673+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1674+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1675+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1676+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
1677+
1678+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1679+ if (!__nposn)
1680+ _M_data->_M_negative_sign = "()";
1681+ else
1682+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
1683+ __cloc);
1684+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
1685+
1686+ // _Intl == false
1687+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1688+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
1689+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1690+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1691+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1692+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1693+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1694+ __pposn);
1695+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1696+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1697+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1698+ __nposn);
1699+ }
1700+ }
1701+
1702+ template<>
1703+ moneypunct<char, true>::~moneypunct()
1704+ { delete _M_data; }
1705+
1706+ template<>
1707+ moneypunct<char, false>::~moneypunct()
1708+ { delete _M_data; }
1709+
1710+#ifdef _GLIBCXX_USE_WCHAR_T
1711+ template<>
1712+ void
1713+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
1714+#ifdef __UCLIBC_HAS_XLOCALE__
1715+ const char*)
1716+#else
1717+ const char* __name)
1718+#endif
1719+ {
1720+ if (!_M_data)
1721+ _M_data = new __moneypunct_cache<wchar_t, true>;
1722+
1723+ if (!__cloc)
1724+ {
1725+ // "C" locale
1726+ _M_data->_M_decimal_point = L'.';
1727+ _M_data->_M_thousands_sep = L',';
1728+ _M_data->_M_grouping = "";
1729+ _M_data->_M_grouping_size = 0;
1730+ _M_data->_M_curr_symbol = L"";
1731+ _M_data->_M_curr_symbol_size = 0;
1732+ _M_data->_M_positive_sign = L"";
1733+ _M_data->_M_positive_sign_size = 0;
1734+ _M_data->_M_negative_sign = L"";
1735+ _M_data->_M_negative_sign_size = 0;
1736+ _M_data->_M_frac_digits = 0;
1737+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1738+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1739+
1740+ // Use ctype::widen code without the facet...
1741+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1742+ _M_data->_M_atoms[__i] =
1743+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
1744+ }
1745+ else
1746+ {
1747+ // Named locale.
1748+#ifdef __UCLIBC_HAS_XLOCALE__
1749+ __c_locale __old = __uselocale(__cloc);
1750+#else
1751+ // Switch to named locale so that mbsrtowcs will work.
1752+ char* __old = strdup(setlocale(LC_ALL, NULL));
1753+ setlocale(LC_ALL, __name);
1754+#endif
1755+
1756+#ifdef __UCLIBC_MJN3_ONLY__
1757+#warning fix this... should be monetary
1758+#endif
1759+#ifdef __UCLIBC__
1760+# ifdef __UCLIBC_HAS_XLOCALE__
1761+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1762+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1763+# else
1764+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1765+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1766+# endif
1767+#else
1768+ union { char *__s; wchar_t __w; } __u;
1769+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1770+ _M_data->_M_decimal_point = __u.__w;
1771+
1772+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1773+ _M_data->_M_thousands_sep = __u.__w;
1774+#endif
1775+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1776+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1777+
1778+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1779+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1780+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1781+
1782+ wchar_t* __wcs_ps = 0;
1783+ wchar_t* __wcs_ns = 0;
1784+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1785+ try
1786+ {
1787+ mbstate_t __state;
1788+ size_t __len = strlen(__cpossign);
1789+ if (__len)
1790+ {
1791+ ++__len;
1792+ memset(&__state, 0, sizeof(mbstate_t));
1793+ __wcs_ps = new wchar_t[__len];
1794+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1795+ _M_data->_M_positive_sign = __wcs_ps;
1796+ }
1797+ else
1798+ _M_data->_M_positive_sign = L"";
1799+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1800+
1801+ __len = strlen(__cnegsign);
1802+ if (!__nposn)
1803+ _M_data->_M_negative_sign = L"()";
1804+ else if (__len)
1805+ {
1806+ ++__len;
1807+ memset(&__state, 0, sizeof(mbstate_t));
1808+ __wcs_ns = new wchar_t[__len];
1809+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1810+ _M_data->_M_negative_sign = __wcs_ns;
1811+ }
1812+ else
1813+ _M_data->_M_negative_sign = L"";
1814+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1815+
1816+ // _Intl == true.
1817+ __len = strlen(__ccurr);
1818+ if (__len)
1819+ {
1820+ ++__len;
1821+ memset(&__state, 0, sizeof(mbstate_t));
1822+ wchar_t* __wcs = new wchar_t[__len];
1823+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1824+ _M_data->_M_curr_symbol = __wcs;
1825+ }
1826+ else
1827+ _M_data->_M_curr_symbol = L"";
1828+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1829+ }
1830+ catch (...)
1831+ {
1832+ delete _M_data;
1833+ _M_data = 0;
1834+ delete __wcs_ps;
1835+ delete __wcs_ns;
1836+#ifdef __UCLIBC_HAS_XLOCALE__
1837+ __uselocale(__old);
1838+#else
1839+ setlocale(LC_ALL, __old);
1840+ free(__old);
1841+#endif
1842+ __throw_exception_again;
1843+ }
1844+
1845+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
1846+ __cloc));
1847+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1848+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1849+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1850+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
1851+ __pposn);
1852+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1853+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1854+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
1855+ __nposn);
1856+
1857+#ifdef __UCLIBC_HAS_XLOCALE__
1858+ __uselocale(__old);
1859+#else
1860+ setlocale(LC_ALL, __old);
1861+ free(__old);
1862+#endif
1863+ }
1864+ }
1865+
1866+ template<>
1867+ void
1868+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
1869+#ifdef __UCLIBC_HAS_XLOCALE__
1870+ const char*)
1871+#else
1872+ const char* __name)
1873+#endif
1874+ {
1875+ if (!_M_data)
1876+ _M_data = new __moneypunct_cache<wchar_t, false>;
1877+
1878+ if (!__cloc)
1879+ {
1880+ // "C" locale
1881+ _M_data->_M_decimal_point = L'.';
1882+ _M_data->_M_thousands_sep = L',';
1883+ _M_data->_M_grouping = "";
1884+ _M_data->_M_grouping_size = 0;
1885+ _M_data->_M_curr_symbol = L"";
1886+ _M_data->_M_curr_symbol_size = 0;
1887+ _M_data->_M_positive_sign = L"";
1888+ _M_data->_M_positive_sign_size = 0;
1889+ _M_data->_M_negative_sign = L"";
1890+ _M_data->_M_negative_sign_size = 0;
1891+ _M_data->_M_frac_digits = 0;
1892+ _M_data->_M_pos_format = money_base::_S_default_pattern;
1893+ _M_data->_M_neg_format = money_base::_S_default_pattern;
1894+
1895+ // Use ctype::widen code without the facet...
1896+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
1897+ _M_data->_M_atoms[__i] =
1898+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
1899+ }
1900+ else
1901+ {
1902+ // Named locale.
1903+#ifdef __UCLIBC_HAS_XLOCALE__
1904+ __c_locale __old = __uselocale(__cloc);
1905+#else
1906+ // Switch to named locale so that mbsrtowcs will work.
1907+ char* __old = strdup(setlocale(LC_ALL, NULL));
1908+ setlocale(LC_ALL, __name);
1909+#endif
1910+
1911+#ifdef __UCLIBC_MJN3_ONLY__
1912+#warning fix this... should be monetary
1913+#endif
1914+#ifdef __UCLIBC__
1915+# ifdef __UCLIBC_HAS_XLOCALE__
1916+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
1917+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
1918+# else
1919+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
1920+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
1921+# endif
1922+#else
1923+ union { char *__s; wchar_t __w; } __u;
1924+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
1925+ _M_data->_M_decimal_point = __u.__w;
1926+
1927+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
1928+ _M_data->_M_thousands_sep = __u.__w;
1929+#endif
1930+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1931+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
1932+
1933+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1934+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1935+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1936+
1937+ wchar_t* __wcs_ps = 0;
1938+ wchar_t* __wcs_ns = 0;
1939+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1940+ try
1941+ {
1942+ mbstate_t __state;
1943+ size_t __len;
1944+ __len = strlen(__cpossign);
1945+ if (__len)
1946+ {
1947+ ++__len;
1948+ memset(&__state, 0, sizeof(mbstate_t));
1949+ __wcs_ps = new wchar_t[__len];
1950+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
1951+ _M_data->_M_positive_sign = __wcs_ps;
1952+ }
1953+ else
1954+ _M_data->_M_positive_sign = L"";
1955+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
1956+
1957+ __len = strlen(__cnegsign);
1958+ if (!__nposn)
1959+ _M_data->_M_negative_sign = L"()";
1960+ else if (__len)
1961+ {
1962+ ++__len;
1963+ memset(&__state, 0, sizeof(mbstate_t));
1964+ __wcs_ns = new wchar_t[__len];
1965+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
1966+ _M_data->_M_negative_sign = __wcs_ns;
1967+ }
1968+ else
1969+ _M_data->_M_negative_sign = L"";
1970+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
1971+
1972+ // _Intl == true.
1973+ __len = strlen(__ccurr);
1974+ if (__len)
1975+ {
1976+ ++__len;
1977+ memset(&__state, 0, sizeof(mbstate_t));
1978+ wchar_t* __wcs = new wchar_t[__len];
1979+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
1980+ _M_data->_M_curr_symbol = __wcs;
1981+ }
1982+ else
1983+ _M_data->_M_curr_symbol = L"";
1984+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
1985+ }
1986+ catch (...)
1987+ {
1988+ delete _M_data;
1989+ _M_data = 0;
1990+ delete __wcs_ps;
1991+ delete __wcs_ns;
1992+#ifdef __UCLIBC_HAS_XLOCALE__
1993+ __uselocale(__old);
1994+#else
1995+ setlocale(LC_ALL, __old);
1996+ free(__old);
1997+#endif
1998+ __throw_exception_again;
1999+ }
2000+
2001+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
2002+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
2003+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
2004+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
2005+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
2006+ __pposn);
2007+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
2008+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
2009+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
2010+ __nposn);
2011+
2012+#ifdef __UCLIBC_HAS_XLOCALE__
2013+ __uselocale(__old);
2014+#else
2015+ setlocale(LC_ALL, __old);
2016+ free(__old);
2017+#endif
2018+ }
2019+ }
2020+
2021+ template<>
2022+ moneypunct<wchar_t, true>::~moneypunct()
2023+ {
2024+ if (_M_data->_M_positive_sign_size)
2025+ delete [] _M_data->_M_positive_sign;
2026+ if (_M_data->_M_negative_sign_size
2027+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2028+ delete [] _M_data->_M_negative_sign;
2029+ if (_M_data->_M_curr_symbol_size)
2030+ delete [] _M_data->_M_curr_symbol;
2031+ delete _M_data;
2032+ }
2033+
2034+ template<>
2035+ moneypunct<wchar_t, false>::~moneypunct()
2036+ {
2037+ if (_M_data->_M_positive_sign_size)
2038+ delete [] _M_data->_M_positive_sign;
2039+ if (_M_data->_M_negative_sign_size
2040+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
2041+ delete [] _M_data->_M_negative_sign;
2042+ if (_M_data->_M_curr_symbol_size)
2043+ delete [] _M_data->_M_curr_symbol;
2044+ delete _M_data;
2045+ }
2046+#endif
2047+}
2048Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
2049===================================================================
2050--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2051+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2010-06-25 10:42:34.913881064 -0700
2052@@ -0,0 +1,160 @@
2053+// std::numpunct implementation details, GNU version -*- C++ -*-
2054+
2055+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2056+//
2057+// This file is part of the GNU ISO C++ Library. This library is free
2058+// software; you can redistribute it and/or modify it under the
2059+// terms of the GNU General Public License as published by the
2060+// Free Software Foundation; either version 2, or (at your option)
2061+// any later version.
2062+
2063+// This library is distributed in the hope that it will be useful,
2064+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2065+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2066+// GNU General Public License for more details.
2067+
2068+// You should have received a copy of the GNU General Public License along
2069+// with this library; see the file COPYING. If not, write to the Free
2070+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2071+// USA.
2072+
2073+// As a special exception, you may use this file as part of a free software
2074+// library without restriction. Specifically, if other files instantiate
2075+// templates or use macros or inline functions from this file, or you compile
2076+// this file and link it with other files to produce an executable, this
2077+// file does not by itself cause the resulting executable to be covered by
2078+// the GNU General Public License. This exception does not however
2079+// invalidate any other reasons why the executable file might be covered by
2080+// the GNU General Public License.
2081+
2082+//
2083+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
2084+//
2085+
2086+// Written by Benjamin Kosnik <bkoz@redhat.com>
2087+
2088+#define _LIBC
2089+#include <locale>
2090+#undef _LIBC
2091+#include <bits/c++locale_internal.h>
2092+
2093+#ifdef __UCLIBC_MJN3_ONLY__
2094+#warning tailor for stub locale support
2095+#endif
2096+#ifndef __UCLIBC_HAS_XLOCALE__
2097+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2098+#endif
2099+
2100+namespace std
2101+{
2102+ template<>
2103+ void
2104+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
2105+ {
2106+ if (!_M_data)
2107+ _M_data = new __numpunct_cache<char>;
2108+
2109+ if (!__cloc)
2110+ {
2111+ // "C" locale
2112+ _M_data->_M_grouping = "";
2113+ _M_data->_M_grouping_size = 0;
2114+ _M_data->_M_use_grouping = false;
2115+
2116+ _M_data->_M_decimal_point = '.';
2117+ _M_data->_M_thousands_sep = ',';
2118+
2119+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2120+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
2121+
2122+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2123+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
2124+ }
2125+ else
2126+ {
2127+ // Named locale.
2128+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
2129+ __cloc));
2130+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
2131+ __cloc));
2132+
2133+ // Check for NULL, which implies no grouping.
2134+ if (_M_data->_M_thousands_sep == '\0')
2135+ _M_data->_M_grouping = "";
2136+ else
2137+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2138+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2139+ }
2140+
2141+ // NB: There is no way to extact this info from posix locales.
2142+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2143+ _M_data->_M_truename = "true";
2144+ _M_data->_M_truename_size = 4;
2145+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2146+ _M_data->_M_falsename = "false";
2147+ _M_data->_M_falsename_size = 5;
2148+ }
2149+
2150+ template<>
2151+ numpunct<char>::~numpunct()
2152+ { delete _M_data; }
2153+
2154+#ifdef _GLIBCXX_USE_WCHAR_T
2155+ template<>
2156+ void
2157+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
2158+ {
2159+ if (!_M_data)
2160+ _M_data = new __numpunct_cache<wchar_t>;
2161+
2162+ if (!__cloc)
2163+ {
2164+ // "C" locale
2165+ _M_data->_M_grouping = "";
2166+ _M_data->_M_grouping_size = 0;
2167+ _M_data->_M_use_grouping = false;
2168+
2169+ _M_data->_M_decimal_point = L'.';
2170+ _M_data->_M_thousands_sep = L',';
2171+
2172+ // Use ctype::widen code without the facet...
2173+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
2174+ _M_data->_M_atoms_out[__i] =
2175+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
2176+
2177+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
2178+ _M_data->_M_atoms_in[__j] =
2179+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
2180+ }
2181+ else
2182+ {
2183+ // Named locale.
2184+ // NB: In the GNU model wchar_t is always 32 bit wide.
2185+ union { char *__s; wchar_t __w; } __u;
2186+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
2187+ _M_data->_M_decimal_point = __u.__w;
2188+
2189+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
2190+ _M_data->_M_thousands_sep = __u.__w;
2191+
2192+ if (_M_data->_M_thousands_sep == L'\0')
2193+ _M_data->_M_grouping = "";
2194+ else
2195+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2196+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
2197+ }
2198+
2199+ // NB: There is no way to extact this info from posix locales.
2200+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2201+ _M_data->_M_truename = L"true";
2202+ _M_data->_M_truename_size = 4;
2203+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2204+ _M_data->_M_falsename = L"false";
2205+ _M_data->_M_falsename_size = 5;
2206+ }
2207+
2208+ template<>
2209+ numpunct<wchar_t>::~numpunct()
2210+ { delete _M_data; }
2211+ #endif
2212+}
2213Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.cc
2214===================================================================
2215--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2216+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2010-06-25 10:42:34.913881064 -0700
2217@@ -0,0 +1,406 @@
2218+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2219+
2220+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2221+//
2222+// This file is part of the GNU ISO C++ Library. This library is free
2223+// software; you can redistribute it and/or modify it under the
2224+// terms of the GNU General Public License as published by the
2225+// Free Software Foundation; either version 2, or (at your option)
2226+// any later version.
2227+
2228+// This library is distributed in the hope that it will be useful,
2229+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2230+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2231+// GNU General Public License for more details.
2232+
2233+// You should have received a copy of the GNU General Public License along
2234+// with this library; see the file COPYING. If not, write to the Free
2235+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2236+// USA.
2237+
2238+// As a special exception, you may use this file as part of a free software
2239+// library without restriction. Specifically, if other files instantiate
2240+// templates or use macros or inline functions from this file, or you compile
2241+// this file and link it with other files to produce an executable, this
2242+// file does not by itself cause the resulting executable to be covered by
2243+// the GNU General Public License. This exception does not however
2244+// invalidate any other reasons why the executable file might be covered by
2245+// the GNU General Public License.
2246+
2247+//
2248+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
2249+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
2250+//
2251+
2252+// Written by Benjamin Kosnik <bkoz@redhat.com>
2253+
2254+#include <locale>
2255+#include <bits/c++locale_internal.h>
2256+
2257+#ifdef __UCLIBC_MJN3_ONLY__
2258+#warning tailor for stub locale support
2259+#endif
2260+#ifndef __UCLIBC_HAS_XLOCALE__
2261+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2262+#endif
2263+
2264+namespace std
2265+{
2266+ template<>
2267+ void
2268+ __timepunct<char>::
2269+ _M_put(char* __s, size_t __maxlen, const char* __format,
2270+ const tm* __tm) const
2271+ {
2272+#ifdef __UCLIBC_HAS_XLOCALE__
2273+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
2274+ _M_c_locale_timepunct);
2275+#else
2276+ char* __old = strdup(setlocale(LC_ALL, NULL));
2277+ setlocale(LC_ALL, _M_name_timepunct);
2278+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
2279+ setlocale(LC_ALL, __old);
2280+ free(__old);
2281+#endif
2282+ // Make sure __s is null terminated.
2283+ if (__len == 0)
2284+ __s[0] = '\0';
2285+ }
2286+
2287+ template<>
2288+ void
2289+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
2290+ {
2291+ if (!_M_data)
2292+ _M_data = new __timepunct_cache<char>;
2293+
2294+ if (!__cloc)
2295+ {
2296+ // "C" locale
2297+ _M_c_locale_timepunct = _S_get_c_locale();
2298+
2299+ _M_data->_M_date_format = "%m/%d/%y";
2300+ _M_data->_M_date_era_format = "%m/%d/%y";
2301+ _M_data->_M_time_format = "%H:%M:%S";
2302+ _M_data->_M_time_era_format = "%H:%M:%S";
2303+ _M_data->_M_date_time_format = "";
2304+ _M_data->_M_date_time_era_format = "";
2305+ _M_data->_M_am = "AM";
2306+ _M_data->_M_pm = "PM";
2307+ _M_data->_M_am_pm_format = "";
2308+
2309+ // Day names, starting with "C"'s Sunday.
2310+ _M_data->_M_day1 = "Sunday";
2311+ _M_data->_M_day2 = "Monday";
2312+ _M_data->_M_day3 = "Tuesday";
2313+ _M_data->_M_day4 = "Wednesday";
2314+ _M_data->_M_day5 = "Thursday";
2315+ _M_data->_M_day6 = "Friday";
2316+ _M_data->_M_day7 = "Saturday";
2317+
2318+ // Abbreviated day names, starting with "C"'s Sun.
2319+ _M_data->_M_aday1 = "Sun";
2320+ _M_data->_M_aday2 = "Mon";
2321+ _M_data->_M_aday3 = "Tue";
2322+ _M_data->_M_aday4 = "Wed";
2323+ _M_data->_M_aday5 = "Thu";
2324+ _M_data->_M_aday6 = "Fri";
2325+ _M_data->_M_aday7 = "Sat";
2326+
2327+ // Month names, starting with "C"'s January.
2328+ _M_data->_M_month01 = "January";
2329+ _M_data->_M_month02 = "February";
2330+ _M_data->_M_month03 = "March";
2331+ _M_data->_M_month04 = "April";
2332+ _M_data->_M_month05 = "May";
2333+ _M_data->_M_month06 = "June";
2334+ _M_data->_M_month07 = "July";
2335+ _M_data->_M_month08 = "August";
2336+ _M_data->_M_month09 = "September";
2337+ _M_data->_M_month10 = "October";
2338+ _M_data->_M_month11 = "November";
2339+ _M_data->_M_month12 = "December";
2340+
2341+ // Abbreviated month names, starting with "C"'s Jan.
2342+ _M_data->_M_amonth01 = "Jan";
2343+ _M_data->_M_amonth02 = "Feb";
2344+ _M_data->_M_amonth03 = "Mar";
2345+ _M_data->_M_amonth04 = "Apr";
2346+ _M_data->_M_amonth05 = "May";
2347+ _M_data->_M_amonth06 = "Jun";
2348+ _M_data->_M_amonth07 = "Jul";
2349+ _M_data->_M_amonth08 = "Aug";
2350+ _M_data->_M_amonth09 = "Sep";
2351+ _M_data->_M_amonth10 = "Oct";
2352+ _M_data->_M_amonth11 = "Nov";
2353+ _M_data->_M_amonth12 = "Dec";
2354+ }
2355+ else
2356+ {
2357+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2358+
2359+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
2360+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
2361+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
2362+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
2363+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
2364+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
2365+ __cloc);
2366+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
2367+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
2368+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
2369+
2370+ // Day names, starting with "C"'s Sunday.
2371+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
2372+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
2373+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
2374+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
2375+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
2376+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
2377+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
2378+
2379+ // Abbreviated day names, starting with "C"'s Sun.
2380+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
2381+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
2382+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
2383+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
2384+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
2385+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
2386+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
2387+
2388+ // Month names, starting with "C"'s January.
2389+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
2390+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
2391+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
2392+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
2393+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
2394+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
2395+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
2396+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
2397+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
2398+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
2399+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
2400+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
2401+
2402+ // Abbreviated month names, starting with "C"'s Jan.
2403+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
2404+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
2405+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
2406+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
2407+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
2408+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
2409+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
2410+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
2411+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
2412+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
2413+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
2414+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
2415+ }
2416+ }
2417+
2418+#ifdef _GLIBCXX_USE_WCHAR_T
2419+ template<>
2420+ void
2421+ __timepunct<wchar_t>::
2422+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
2423+ const tm* __tm) const
2424+ {
2425+#ifdef __UCLIBC_HAS_XLOCALE__
2426+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2427+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
2428+ _M_c_locale_timepunct);
2429+#else
2430+ char* __old = strdup(setlocale(LC_ALL, NULL));
2431+ setlocale(LC_ALL, _M_name_timepunct);
2432+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
2433+ setlocale(LC_ALL, __old);
2434+ free(__old);
2435+#endif
2436+ // Make sure __s is null terminated.
2437+ if (__len == 0)
2438+ __s[0] = L'\0';
2439+ }
2440+
2441+ template<>
2442+ void
2443+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
2444+ {
2445+ if (!_M_data)
2446+ _M_data = new __timepunct_cache<wchar_t>;
2447+
2448+#warning wide time stuff
2449+// if (!__cloc)
2450+ {
2451+ // "C" locale
2452+ _M_c_locale_timepunct = _S_get_c_locale();
2453+
2454+ _M_data->_M_date_format = L"%m/%d/%y";
2455+ _M_data->_M_date_era_format = L"%m/%d/%y";
2456+ _M_data->_M_time_format = L"%H:%M:%S";
2457+ _M_data->_M_time_era_format = L"%H:%M:%S";
2458+ _M_data->_M_date_time_format = L"";
2459+ _M_data->_M_date_time_era_format = L"";
2460+ _M_data->_M_am = L"AM";
2461+ _M_data->_M_pm = L"PM";
2462+ _M_data->_M_am_pm_format = L"";
2463+
2464+ // Day names, starting with "C"'s Sunday.
2465+ _M_data->_M_day1 = L"Sunday";
2466+ _M_data->_M_day2 = L"Monday";
2467+ _M_data->_M_day3 = L"Tuesday";
2468+ _M_data->_M_day4 = L"Wednesday";
2469+ _M_data->_M_day5 = L"Thursday";
2470+ _M_data->_M_day6 = L"Friday";
2471+ _M_data->_M_day7 = L"Saturday";
2472+
2473+ // Abbreviated day names, starting with "C"'s Sun.
2474+ _M_data->_M_aday1 = L"Sun";
2475+ _M_data->_M_aday2 = L"Mon";
2476+ _M_data->_M_aday3 = L"Tue";
2477+ _M_data->_M_aday4 = L"Wed";
2478+ _M_data->_M_aday5 = L"Thu";
2479+ _M_data->_M_aday6 = L"Fri";
2480+ _M_data->_M_aday7 = L"Sat";
2481+
2482+ // Month names, starting with "C"'s January.
2483+ _M_data->_M_month01 = L"January";
2484+ _M_data->_M_month02 = L"February";
2485+ _M_data->_M_month03 = L"March";
2486+ _M_data->_M_month04 = L"April";
2487+ _M_data->_M_month05 = L"May";
2488+ _M_data->_M_month06 = L"June";
2489+ _M_data->_M_month07 = L"July";
2490+ _M_data->_M_month08 = L"August";
2491+ _M_data->_M_month09 = L"September";
2492+ _M_data->_M_month10 = L"October";
2493+ _M_data->_M_month11 = L"November";
2494+ _M_data->_M_month12 = L"December";
2495+
2496+ // Abbreviated month names, starting with "C"'s Jan.
2497+ _M_data->_M_amonth01 = L"Jan";
2498+ _M_data->_M_amonth02 = L"Feb";
2499+ _M_data->_M_amonth03 = L"Mar";
2500+ _M_data->_M_amonth04 = L"Apr";
2501+ _M_data->_M_amonth05 = L"May";
2502+ _M_data->_M_amonth06 = L"Jun";
2503+ _M_data->_M_amonth07 = L"Jul";
2504+ _M_data->_M_amonth08 = L"Aug";
2505+ _M_data->_M_amonth09 = L"Sep";
2506+ _M_data->_M_amonth10 = L"Oct";
2507+ _M_data->_M_amonth11 = L"Nov";
2508+ _M_data->_M_amonth12 = L"Dec";
2509+ }
2510+#if 0
2511+ else
2512+ {
2513+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2514+
2515+ union { char *__s; wchar_t *__w; } __u;
2516+
2517+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
2518+ _M_data->_M_date_format = __u.__w;
2519+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
2520+ _M_data->_M_date_era_format = __u.__w;
2521+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
2522+ _M_data->_M_time_format = __u.__w;
2523+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
2524+ _M_data->_M_time_era_format = __u.__w;
2525+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
2526+ _M_data->_M_date_time_format = __u.__w;
2527+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
2528+ _M_data->_M_date_time_era_format = __u.__w;
2529+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
2530+ _M_data->_M_am = __u.__w;
2531+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
2532+ _M_data->_M_pm = __u.__w;
2533+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
2534+ _M_data->_M_am_pm_format = __u.__w;
2535+
2536+ // Day names, starting with "C"'s Sunday.
2537+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
2538+ _M_data->_M_day1 = __u.__w;
2539+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
2540+ _M_data->_M_day2 = __u.__w;
2541+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
2542+ _M_data->_M_day3 = __u.__w;
2543+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
2544+ _M_data->_M_day4 = __u.__w;
2545+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
2546+ _M_data->_M_day5 = __u.__w;
2547+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
2548+ _M_data->_M_day6 = __u.__w;
2549+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
2550+ _M_data->_M_day7 = __u.__w;
2551+
2552+ // Abbreviated day names, starting with "C"'s Sun.
2553+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
2554+ _M_data->_M_aday1 = __u.__w;
2555+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
2556+ _M_data->_M_aday2 = __u.__w;
2557+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
2558+ _M_data->_M_aday3 = __u.__w;
2559+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
2560+ _M_data->_M_aday4 = __u.__w;
2561+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
2562+ _M_data->_M_aday5 = __u.__w;
2563+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
2564+ _M_data->_M_aday6 = __u.__w;
2565+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
2566+ _M_data->_M_aday7 = __u.__w;
2567+
2568+ // Month names, starting with "C"'s January.
2569+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
2570+ _M_data->_M_month01 = __u.__w;
2571+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
2572+ _M_data->_M_month02 = __u.__w;
2573+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
2574+ _M_data->_M_month03 = __u.__w;
2575+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
2576+ _M_data->_M_month04 = __u.__w;
2577+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
2578+ _M_data->_M_month05 = __u.__w;
2579+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
2580+ _M_data->_M_month06 = __u.__w;
2581+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
2582+ _M_data->_M_month07 = __u.__w;
2583+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
2584+ _M_data->_M_month08 = __u.__w;
2585+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
2586+ _M_data->_M_month09 = __u.__w;
2587+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
2588+ _M_data->_M_month10 = __u.__w;
2589+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
2590+ _M_data->_M_month11 = __u.__w;
2591+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
2592+ _M_data->_M_month12 = __u.__w;
2593+
2594+ // Abbreviated month names, starting with "C"'s Jan.
2595+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
2596+ _M_data->_M_amonth01 = __u.__w;
2597+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
2598+ _M_data->_M_amonth02 = __u.__w;
2599+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
2600+ _M_data->_M_amonth03 = __u.__w;
2601+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
2602+ _M_data->_M_amonth04 = __u.__w;
2603+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
2604+ _M_data->_M_amonth05 = __u.__w;
2605+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
2606+ _M_data->_M_amonth06 = __u.__w;
2607+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
2608+ _M_data->_M_amonth07 = __u.__w;
2609+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
2610+ _M_data->_M_amonth08 = __u.__w;
2611+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
2612+ _M_data->_M_amonth09 = __u.__w;
2613+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
2614+ _M_data->_M_amonth10 = __u.__w;
2615+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
2616+ _M_data->_M_amonth11 = __u.__w;
2617+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
2618+ _M_data->_M_amonth12 = __u.__w;
2619+ }
2620+#endif // 0
2621+ }
2622+#endif
2623+}
2624Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h
2625===================================================================
2626--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2627+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:42:34.913881064 -0700
2628@@ -0,0 +1,68 @@
2629+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2630+
2631+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2632+//
2633+// This file is part of the GNU ISO C++ Library. This library is free
2634+// software; you can redistribute it and/or modify it under the
2635+// terms of the GNU General Public License as published by the
2636+// Free Software Foundation; either version 2, or (at your option)
2637+// any later version.
2638+
2639+// This library is distributed in the hope that it will be useful,
2640+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2641+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2642+// GNU General Public License for more details.
2643+
2644+// You should have received a copy of the GNU General Public License along
2645+// with this library; see the file COPYING. If not, write to the Free
2646+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2647+// USA.
2648+
2649+// As a special exception, you may use this file as part of a free software
2650+// library without restriction. Specifically, if other files instantiate
2651+// templates or use macros or inline functions from this file, or you compile
2652+// this file and link it with other files to produce an executable, this
2653+// file does not by itself cause the resulting executable to be covered by
2654+// the GNU General Public License. This exception does not however
2655+// invalidate any other reasons why the executable file might be covered by
2656+// the GNU General Public License.
2657+
2658+//
2659+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
2660+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
2661+//
2662+
2663+// Written by Benjamin Kosnik <bkoz@redhat.com>
2664+
2665+ template<typename _CharT>
2666+ __timepunct<_CharT>::__timepunct(size_t __refs)
2667+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2668+ _M_name_timepunct(_S_get_c_name())
2669+ { _M_initialize_timepunct(); }
2670+
2671+ template<typename _CharT>
2672+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
2673+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
2674+ _M_name_timepunct(_S_get_c_name())
2675+ { _M_initialize_timepunct(); }
2676+
2677+ template<typename _CharT>
2678+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
2679+ size_t __refs)
2680+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
2681+ _M_name_timepunct(__s)
2682+ {
2683+ char* __tmp = new char[std::strlen(__s) + 1];
2684+ std::strcpy(__tmp, __s);
2685+ _M_name_timepunct = __tmp;
2686+ _M_initialize_timepunct(__cloc);
2687+ }
2688+
2689+ template<typename _CharT>
2690+ __timepunct<_CharT>::~__timepunct()
2691+ {
2692+ if (_M_name_timepunct != _S_get_c_name())
2693+ delete [] _M_name_timepunct;
2694+ delete _M_data;
2695+ _S_destroy_c_locale(_M_c_locale_timepunct);
2696+ }
2697Index: gcc-4.5.0/libstdc++-v3/configure
2698===================================================================
2699--- gcc-4.5.0.orig/libstdc++-v3/configure 2010-04-05 18:27:44.000000000 -0700
2700+++ gcc-4.5.0/libstdc++-v3/configure 2010-06-25 10:48:10.124633072 -0700
2701@@ -15577,7 +15577,7 @@
2702 if test "${enable_clocale+set}" = set; then :
2703 enableval=$enable_clocale;
2704 case "$enableval" in
2705- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
2706+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
2707 *) as_fn_error "Unknown argument to enable/disable clocale" "$LINENO" 5 ;;
2708 esac
2709
2710@@ -15609,6 +15609,9 @@
2711 # Default to "generic".
2712 if test $enable_clocale_flag = auto; then
2713 case ${target_os} in
2714+ *-uclibc*)
2715+ enable_clocale_flag=uclibc
2716+ ;;
2717 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
2718 enable_clocale_flag=gnu
2719 ;;
2720@@ -15885,6 +15888,76 @@
2721 CTIME_CC=config/locale/generic/time_members.cc
2722 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
2723 ;;
2724+ uclibc)
2725+ echo "$as_me:$LINENO: result: uclibc" >&5
2726+echo "${ECHO_T}uclibc" >&6
2727+
2728+ # Declare intention to use gettext, and add support for specific
2729+ # languages.
2730+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
2731+ ALL_LINGUAS="de fr"
2732+
2733+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
2734+ # Extract the first word of "msgfmt", so it can be a program name with args.
2735+set dummy msgfmt; ac_word=$2
2736+echo "$as_me:$LINENO: checking for $ac_word" >&5
2737+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
2739+ echo $ECHO_N "(cached) $ECHO_C" >&6
2740+else
2741+ if test -n "$check_msgfmt"; then
2742+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
2743+else
2744+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2745+for as_dir in $PATH
2746+do
2747+ IFS=$as_save_IFS
2748+ test -z "$as_dir" && as_dir=.
2749+ for ac_exec_ext in '' $ac_executable_extensions; do
2750+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2751+ ac_cv_prog_check_msgfmt="yes"
2752+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2753+ break 2
2754+ fi
2755+done
2756+done
2757+
2758+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
2759+fi
2760+fi
2761+check_msgfmt=$ac_cv_prog_check_msgfmt
2762+if test -n "$check_msgfmt"; then
2763+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
2764+echo "${ECHO_T}$check_msgfmt" >&6
2765+else
2766+ echo "$as_me:$LINENO: result: no" >&5
2767+echo "${ECHO_T}no" >&6
2768+fi
2769+
2770+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
2771+ USE_NLS=yes
2772+ fi
2773+ # Export the build objects.
2774+ for ling in $ALL_LINGUAS; do \
2775+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
2776+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
2777+ done
2778+
2779+
2780+
2781+ CLOCALE_H=config/locale/uclibc/c_locale.h
2782+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
2783+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
2784+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
2785+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
2786+ CMESSAGES_H=config/locale/uclibc/messages_members.h
2787+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
2788+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
2789+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
2790+ CTIME_H=config/locale/uclibc/time_members.h
2791+ CTIME_CC=config/locale/uclibc/time_members.cc
2792+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
2793+ ;;
2794 esac
2795
2796 # This is where the testsuite looks for locale catalogs, using the
2797@@ -16940,6 +17013,7 @@
2798
2799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800 /* end confdefs.h. */
2801+#line 17016 "configure"
2802 #include <wctype.h>
2803 int
2804 main ()
2805@@ -58165,7 +58239,6 @@
2806 fi
2807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808 /* end confdefs.h. */
2809-
2810 int
2811 main ()
2812 {
2813Index: gcc-4.5.0/libstdc++-v3/include/c_compatibility/wchar.h
2814===================================================================
2815--- gcc-4.5.0.orig/libstdc++-v3/include/c_compatibility/wchar.h 2009-04-09 08:00:19.000000000 -0700
2816+++ gcc-4.5.0/libstdc++-v3/include/c_compatibility/wchar.h 2010-06-25 10:42:34.949880937 -0700
2817@@ -101,7 +101,9 @@
2818 using std::wmemcpy;
2819 using std::wmemmove;
2820 using std::wmemset;
2821+#if _GLIBCXX_HAVE_WCSFTIME
2822 using std::wcsftime;
2823+#endif
2824
2825 #if _GLIBCXX_USE_C99
2826 using std::wcstold;
2827Index: gcc-4.5.0/libstdc++-v3/include/c_std/cwchar
2828===================================================================
2829--- gcc-4.5.0.orig/libstdc++-v3/include/c_std/cwchar 2010-02-04 10:20:34.000000000 -0800
2830+++ gcc-4.5.0/libstdc++-v3/include/c_std/cwchar 2010-06-25 10:42:34.949880937 -0700
2831@@ -177,7 +177,9 @@
2832 using ::wcscoll;
2833 using ::wcscpy;
2834 using ::wcscspn;
2835+#if _GLIBCXX_HAVE_WCSFTIME
2836 using ::wcsftime;
2837+#endif
2838 using ::wcslen;
2839 using ::wcsncat;
2840 using ::wcsncmp;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/203-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/203-uclibc-locale-no__x.patch
new file mode 100644
index 0000000000..f39e65220c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/203-uclibc-locale-no__x.patch
@@ -0,0 +1,233 @@
1Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
2===================================================================
3--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700
4+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700
5@@ -60,4 +60,49 @@
6 extern "C" __typeof(wctype_l) __wctype_l;
7 #endif
8
9+# define __nl_langinfo_l nl_langinfo_l
10+# define __strcoll_l strcoll_l
11+# define __strftime_l strftime_l
12+# define __strtod_l strtod_l
13+# define __strtof_l strtof_l
14+# define __strtold_l strtold_l
15+# define __strxfrm_l strxfrm_l
16+# define __newlocale newlocale
17+# define __freelocale freelocale
18+# define __duplocale duplocale
19+# define __uselocale uselocale
20+
21+# ifdef _GLIBCXX_USE_WCHAR_T
22+# define __iswctype_l iswctype_l
23+# define __towlower_l towlower_l
24+# define __towupper_l towupper_l
25+# define __wcscoll_l wcscoll_l
26+# define __wcsftime_l wcsftime_l
27+# define __wcsxfrm_l wcsxfrm_l
28+# define __wctype_l wctype_l
29+# endif
30+
31+#else
32+# define __nl_langinfo_l(N, L) nl_langinfo((N))
33+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
34+# define __strtod_l(S, E, L) strtod((S), (E))
35+# define __strtof_l(S, E, L) strtof((S), (E))
36+# define __strtold_l(S, E, L) strtold((S), (E))
37+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
38+# warning should dummy __newlocale check for C|POSIX ?
39+# define __newlocale(a, b, c) NULL
40+# define __freelocale(a) ((void)0)
41+# define __duplocale(a) __c_locale()
42+//# define __uselocale ?
43+//
44+# ifdef _GLIBCXX_USE_WCHAR_T
45+# define __iswctype_l(C, M, L) iswctype((C), (M))
46+# define __towlower_l(C, L) towlower((C))
47+# define __towupper_l(C, L) towupper((C))
48+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
49+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
50+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
51+# define __wctype_l(S, L) wctype((S))
52+# endif
53+
54 #endif // GLIBC 2.3 and later
55Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
56===================================================================
57--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700
58+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700
59@@ -39,20 +39,6 @@
60 #include <langinfo.h>
61 #include <bits/c++locale_internal.h>
62
63-#ifndef __UCLIBC_HAS_XLOCALE__
64-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
65-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
66-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
67-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
68-#define __strtof_l(S, E, L) strtof((S), (E))
69-#define __strtod_l(S, E, L) strtod((S), (E))
70-#define __strtold_l(S, E, L) strtold((S), (E))
71-#warning should dummy __newlocale check for C|POSIX ?
72-#define __newlocale(a, b, c) NULL
73-#define __freelocale(a) ((void)0)
74-#define __duplocale(a) __c_locale()
75-#endif
76-
77 namespace std
78 {
79 template<>
80Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
81===================================================================
82--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700
83+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700
84@@ -36,13 +36,6 @@
85 #include <locale>
86 #include <bits/c++locale_internal.h>
87
88-#ifndef __UCLIBC_HAS_XLOCALE__
89-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
90-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
91-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
92-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
93-#endif
94-
95 namespace std
96 {
97 // These are basically extensions to char_traits, and perhaps should
98Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
99===================================================================
100--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700
101+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700
102@@ -43,10 +43,6 @@
103 #warning tailor for stub locale support
104 #endif
105
106-#ifndef __UCLIBC_HAS_XLOCALE__
107-#define __nl_langinfo_l(N, L) nl_langinfo((N))
108-#endif
109-
110 namespace std
111 {
112 // Construct and return valid pattern consisting of some combination of:
113Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
114===================================================================
115--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700
116+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700
117@@ -41,9 +41,6 @@
118 #ifdef __UCLIBC_MJN3_ONLY__
119 #warning tailor for stub locale support
120 #endif
121-#ifndef __UCLIBC_HAS_XLOCALE__
122-#define __nl_langinfo_l(N, L) nl_langinfo((N))
123-#endif
124
125 namespace std
126 {
127Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
128===================================================================
129--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700
130+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700
131@@ -40,9 +40,6 @@
132 #ifdef __UCLIBC_MJN3_ONLY__
133 #warning tailor for stub locale support
134 #endif
135-#ifndef __UCLIBC_HAS_XLOCALE__
136-#define __nl_langinfo_l(N, L) nl_langinfo((N))
137-#endif
138
139 namespace std
140 {
141Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
142===================================================================
143--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700
144+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700
145@@ -38,13 +38,6 @@
146 #undef _LIBC
147 #include <bits/c++locale_internal.h>
148
149-#ifndef __UCLIBC_HAS_XLOCALE__
150-#define __wctype_l(S, L) wctype((S))
151-#define __towupper_l(C, L) towupper((C))
152-#define __towlower_l(C, L) towlower((C))
153-#define __iswctype_l(C, M, L) iswctype((C), (M))
154-#endif
155-
156 namespace std
157 {
158 // NB: The other ctype<char> specializations are in src/locale.cc and
159Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
160===================================================================
161--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700
162+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700
163@@ -39,13 +39,10 @@
164 #ifdef __UCLIBC_MJN3_ONLY__
165 #warning fix gettext stuff
166 #endif
167-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
168-extern "C" char *__dcgettext(const char *domainname,
169- const char *msgid, int category);
170 #undef gettext
171-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
172+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
173+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
174 #else
175-#undef gettext
176 #define gettext(msgid) (msgid)
177 #endif
178
179Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
180===================================================================
181--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700
182+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700
183@@ -36,15 +36,11 @@
184 #ifdef __UCLIBC_MJN3_ONLY__
185 #warning fix prototypes for *textdomain funcs
186 #endif
187-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
188-extern "C" char *__textdomain(const char *domainname);
189-extern "C" char *__bindtextdomain(const char *domainname,
190- const char *dirname);
191-#else
192-#undef __textdomain
193-#undef __bindtextdomain
194-#define __textdomain(D) ((void)0)
195-#define __bindtextdomain(D,P) ((void)0)
196+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
197+#undef textdomain
198+#undef bindtextdomain
199+#define textdomain(D) ((void)0)
200+#define bindtextdomain(D,P) ((void)0)
201 #endif
202
203 // Non-virtual member functions.
204@@ -70,7 +66,7 @@
205 messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
206 const char* __dir) const
207 {
208- __bindtextdomain(__s.c_str(), __dir);
209+ bindtextdomain(__s.c_str(), __dir);
210 return this->do_open(__s, __loc);
211 }
212
213@@ -90,7 +86,7 @@
214 {
215 // No error checking is done, assume the catalog exists and can
216 // be used.
217- __textdomain(__s.c_str());
218+ textdomain(__s.c_str());
219 return 0;
220 }
221
222Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
223===================================================================
224--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700
225+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700
226@@ -68,6 +68,7 @@
227 {
228 extern "C" __typeof(uselocale) __uselocale;
229 }
230+#define __uselocale uselocale
231 #endif
232
233 namespace std
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/204-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..160ab35bb3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
1--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
2+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
3@@ -401,7 +401,7 @@
4 # ifdef __UCLIBC_HAS_XLOCALE__
5 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
6 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
7-# else
8+# elif defined __UCLIBC_HAS_LOCALE__
9 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
10 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
11 # endif
12@@ -556,7 +556,7 @@
13 # ifdef __UCLIBC_HAS_XLOCALE__
14 _M_data->_M_decimal_point = __cloc->decimal_point_wc;
15 _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
16-# else
17+# elif defined __UCLIBC_HAS_LOCALE__
18 _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
19 _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
20 # endif
21--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
22+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
23@@ -127,12 +127,25 @@
24 {
25 // Named locale.
26 // NB: In the GNU model wchar_t is always 32 bit wide.
27+#ifdef __UCLIBC_MJN3_ONLY__
28+#warning fix this... should be numeric
29+#endif
30+#ifdef __UCLIBC__
31+# ifdef __UCLIBC_HAS_XLOCALE__
32+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
33+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
34+# elif defined __UCLIBC_HAS_LOCALE__
35+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
36+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
37+# endif
38+#else
39 union { char *__s; wchar_t __w; } __u;
40 __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
41 _M_data->_M_decimal_point = __u.__w;
42
43 __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
44 _M_data->_M_thousands_sep = __u.__w;
45+#endif
46
47 if (_M_data->_M_thousands_sep == L'\0')
48 _M_data->_M_grouping = "";
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/205-uclibc-locale-update.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/205-uclibc-locale-update.patch
new file mode 100644
index 0000000000..48eaa1d442
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/205-uclibc-locale-update.patch
@@ -0,0 +1,519 @@
1Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
2===================================================================
3--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
4+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
5@@ -39,23 +39,20 @@
6 #include <langinfo.h>
7 #include <bits/c++locale_internal.h>
8
9-namespace std
10-{
11+_GLIBCXX_BEGIN_NAMESPACE(std)
12+
13 template<>
14 void
15 __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
16 const __c_locale& __cloc)
17 {
18- if (!(__err & ios_base::failbit))
19- {
20- char* __sanity;
21- errno = 0;
22- float __f = __strtof_l(__s, &__sanity, __cloc);
23- if (__sanity != __s && errno != ERANGE)
24- __v = __f;
25- else
26- __err |= ios_base::failbit;
27- }
28+ char* __sanity;
29+ errno = 0;
30+ float __f = __strtof_l(__s, &__sanity, __cloc);
31+ if (__sanity != __s && errno != ERANGE)
32+ __v = __f;
33+ else
34+ __err |= ios_base::failbit;
35 }
36
37 template<>
38@@ -63,16 +60,13 @@
39 __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
40 const __c_locale& __cloc)
41 {
42- if (!(__err & ios_base::failbit))
43- {
44- char* __sanity;
45- errno = 0;
46- double __d = __strtod_l(__s, &__sanity, __cloc);
47- if (__sanity != __s && errno != ERANGE)
48- __v = __d;
49- else
50- __err |= ios_base::failbit;
51- }
52+ char* __sanity;
53+ errno = 0;
54+ double __d = __strtod_l(__s, &__sanity, __cloc);
55+ if (__sanity != __s && errno != ERANGE)
56+ __v = __d;
57+ else
58+ __err |= ios_base::failbit;
59 }
60
61 template<>
62@@ -80,16 +74,13 @@
63 __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
64 const __c_locale& __cloc)
65 {
66- if (!(__err & ios_base::failbit))
67- {
68- char* __sanity;
69- errno = 0;
70- long double __ld = __strtold_l(__s, &__sanity, __cloc);
71- if (__sanity != __s && errno != ERANGE)
72- __v = __ld;
73- else
74- __err |= ios_base::failbit;
75- }
76+ char* __sanity;
77+ errno = 0;
78+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
79+ if (__sanity != __s && errno != ERANGE)
80+ __v = __ld;
81+ else
82+ __err |= ios_base::failbit;
83 }
84
85 void
86@@ -110,17 +101,18 @@
87 void
88 locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
89 {
90- if (_S_get_c_locale() != __cloc)
91+ if (__cloc && _S_get_c_locale() != __cloc)
92 __freelocale(__cloc);
93 }
94
95 __c_locale
96 locale::facet::_S_clone_c_locale(__c_locale& __cloc)
97 { return __duplocale(__cloc); }
98-} // namespace std
99
100-namespace __gnu_cxx
101-{
102+_GLIBCXX_END_NAMESPACE
103+
104+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
105+
106 const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
107 {
108 "LC_CTYPE",
109@@ -138,9 +130,11 @@
110 "LC_IDENTIFICATION"
111 #endif
112 };
113-}
114
115-namespace std
116-{
117+_GLIBCXX_END_NAMESPACE
118+
119+_GLIBCXX_BEGIN_NAMESPACE(std)
120+
121 const char* const* const locale::_S_categories = __gnu_cxx::category_names;
122-} // namespace std
123+
124+_GLIBCXX_END_NAMESPACE
125Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
126===================================================================
127--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
128+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
129@@ -33,16 +33,20 @@
130
131 // Written by Benjamin Kosnik <bkoz@redhat.com>
132
133+#include <features.h>
134+#ifdef __UCLIBC_HAS_LOCALE__
135 #define _LIBC
136 #include <locale>
137 #undef _LIBC
138+#else
139+#include <locale>
140+#endif
141 #include <bits/c++locale_internal.h>
142
143-namespace std
144-{
145+_GLIBCXX_BEGIN_NAMESPACE(std)
146+
147 // NB: The other ctype<char> specializations are in src/locale.cc and
148 // various /config/os/* files.
149- template<>
150 ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
151 : ctype<char>(0, false, __refs)
152 {
153@@ -57,6 +61,8 @@
154 #endif
155 }
156 }
157+ ctype_byname<char>::~ctype_byname()
158+ { }
159
160 #ifdef _GLIBCXX_USE_WCHAR_T
161 ctype<wchar_t>::__wmask_type
162@@ -138,17 +144,33 @@
163 ctype<wchar_t>::
164 do_is(mask __m, wchar_t __c) const
165 {
166- // Highest bitmask in ctype_base == 10, but extra in "C"
167- // library for blank.
168+ // The case of __m == ctype_base::space is particularly important,
169+ // due to its use in many istream functions. Therefore we deal with
170+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
171+ // is the mask corresponding to ctype_base::space. NB: an encoding
172+ // change would not affect correctness!
173+
174 bool __ret = false;
175- const size_t __bitmasksize = 11;
176- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
177- if (__m & _M_bit[__bitcur]
178- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
179- {
180- __ret = true;
181- break;
182- }
183+ if (__m == _M_bit[5])
184+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
185+ else
186+ {
187+ // Highest bitmask in ctype_base == 10, but extra in "C"
188+ // library for blank.
189+ const size_t __bitmasksize = 11;
190+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
191+ if (__m & _M_bit[__bitcur])
192+ {
193+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
194+ {
195+ __ret = true;
196+ break;
197+ }
198+ else if (__m == _M_bit[__bitcur])
199+ break;
200+ }
201+ }
202+
203 return __ret;
204 }
205
206@@ -290,4 +312,5 @@
207 #endif
208 }
209 #endif // _GLIBCXX_USE_WCHAR_T
210-}
211+
212+_GLIBCXX_END_NAMESPACE
213Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
214===================================================================
215--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
216+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
217@@ -53,12 +53,16 @@
218 template<typename _CharT>
219 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
220 size_t __refs)
221- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
222- _M_name_messages(__s)
223+ : facet(__refs), _M_c_locale_messages(NULL),
224+ _M_name_messages(NULL)
225 {
226- char* __tmp = new char[std::strlen(__s) + 1];
227- std::strcpy(__tmp, __s);
228+ const size_t __len = std::strlen(__s) + 1;
229+ char* __tmp = new char[__len];
230+ std::memcpy(__tmp, __s, __len);
231 _M_name_messages = __tmp;
232+
233+ // Last to avoid leaking memory if new throws.
234+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
235 }
236
237 template<typename _CharT>
238Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
239===================================================================
240--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
241+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
242@@ -33,9 +33,14 @@
243
244 // Written by Benjamin Kosnik <bkoz@redhat.com>
245
246+#include <features.h>
247+#ifdef __UCLIBC_HAS_LOCALE__
248 #define _LIBC
249 #include <locale>
250 #undef _LIBC
251+#else
252+#include <locale>
253+#endif
254 #include <bits/c++locale_internal.h>
255
256 #ifdef __UCLIBC_MJN3_ONLY__
257@@ -206,7 +211,7 @@
258 }
259 break;
260 default:
261- ;
262+ __ret = pattern();
263 }
264 return __ret;
265 }
266@@ -390,7 +395,9 @@
267 __c_locale __old = __uselocale(__cloc);
268 #else
269 // Switch to named locale so that mbsrtowcs will work.
270- char* __old = strdup(setlocale(LC_ALL, NULL));
271+ char* __old = setlocale(LC_ALL, NULL);
272+ const size_t __llen = strlen(__old) + 1;
273+ char* __sav = new char[__llen];
274 setlocale(LC_ALL, __name);
275 #endif
276
277@@ -477,8 +484,8 @@
278 #ifdef __UCLIBC_HAS_XLOCALE__
279 __uselocale(__old);
280 #else
281- setlocale(LC_ALL, __old);
282- free(__old);
283+ setlocale(LC_ALL, __sav);
284+ delete [] __sav;
285 #endif
286 __throw_exception_again;
287 }
288@@ -498,8 +505,8 @@
289 #ifdef __UCLIBC_HAS_XLOCALE__
290 __uselocale(__old);
291 #else
292- setlocale(LC_ALL, __old);
293- free(__old);
294+ setlocale(LC_ALL, __sav);
295+ delete [] __sav;
296 #endif
297 }
298 }
299@@ -545,8 +552,11 @@
300 __c_locale __old = __uselocale(__cloc);
301 #else
302 // Switch to named locale so that mbsrtowcs will work.
303- char* __old = strdup(setlocale(LC_ALL, NULL));
304- setlocale(LC_ALL, __name);
305+ char* __old = setlocale(LC_ALL, NULL);
306+ const size_t __llen = strlen(__old) + 1;
307+ char* __sav = new char[__llen];
308+ memcpy(__sav, __old, __llen);
309+ setlocale(LC_ALL, __name);
310 #endif
311
312 #ifdef __UCLIBC_MJN3_ONLY__
313@@ -633,8 +643,8 @@
314 #ifdef __UCLIBC_HAS_XLOCALE__
315 __uselocale(__old);
316 #else
317- setlocale(LC_ALL, __old);
318- free(__old);
319+ setlocale(LC_ALL, __sav);
320+ delete [] __sav;
321 #endif
322 __throw_exception_again;
323 }
324@@ -653,8 +663,8 @@
325 #ifdef __UCLIBC_HAS_XLOCALE__
326 __uselocale(__old);
327 #else
328- setlocale(LC_ALL, __old);
329- free(__old);
330+ setlocale(LC_ALL, __sav);
331+ delete [] __sav;
332 #endif
333 }
334 }
335Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
336===================================================================
337--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
338+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
339@@ -33,9 +33,14 @@
340
341 // Written by Benjamin Kosnik <bkoz@redhat.com>
342
343+#include <features.h>
344+#ifdef __UCLIBC_HAS_LOCALE__
345 #define _LIBC
346 #include <locale>
347 #undef _LIBC
348+#else
349+#include <locale>
350+#endif
351 #include <bits/c++locale_internal.h>
352
353 #ifdef __UCLIBC_MJN3_ONLY__
354Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
355===================================================================
356--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
357+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
358@@ -50,12 +50,21 @@
359 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
360 size_t __refs)
361 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
362- _M_name_timepunct(__s)
363+ _M_name_timepunct(NULL)
364 {
365- char* __tmp = new char[std::strlen(__s) + 1];
366- std::strcpy(__tmp, __s);
367+ const size_t __len = std::strlen(__s) + 1;
368+ char* __tmp = new char[__len];
369+ std::memcpy(__tmp, __s, __len);
370 _M_name_timepunct = __tmp;
371- _M_initialize_timepunct(__cloc);
372+
373+ try
374+ { _M_initialize_timepunct(__cloc); }
375+ catch(...)
376+ {
377+ delete [] _M_name_timepunct;
378+ __throw_exception_again;
379+ }
380+
381 }
382
383 template<typename _CharT>
384Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
385===================================================================
386--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
387+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
388@@ -39,21 +39,23 @@
389 #pragma GCC system_header
390
391 #include <cstring> // get std::strlen
392-#include <cstdio> // get std::snprintf or std::sprintf
393+#include <cstdio> // get std::vsnprintf or std::vsprintf
394 #include <clocale>
395 #include <langinfo.h> // For codecvt
396 #ifdef __UCLIBC_MJN3_ONLY__
397 #warning fix this
398 #endif
399-#ifdef __UCLIBC_HAS_LOCALE__
400+#ifdef _GLIBCXX_USE_ICONV
401 #include <iconv.h> // For codecvt using iconv, iconv_t
402 #endif
403-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
404-#include <libintl.h> // For messages
405+#ifdef HAVE_LIBINTL_H
406+#include <libintl.h> // For messages
407 #endif
408+#include <cstdarg>
409
410 #ifdef __UCLIBC_MJN3_ONLY__
411 #warning what is _GLIBCXX_C_LOCALE_GNU for
412+// psm: used in os/gnu-linux/ctype_noninline.h
413 #endif
414 #define _GLIBCXX_C_LOCALE_GNU 1
415
416@@ -78,23 +80,25 @@
417 #else
418 typedef int* __c_locale;
419 #endif
420-
421- // Convert numeric value of type _Tv to string and return length of
422- // string. If snprintf is available use it, otherwise fall back to
423- // the unsafe sprintf which, in general, can be dangerous and should
424+ // Convert numeric value of type double to string and return length of
425+ // string. If vsnprintf is available use it, otherwise fall back to
426+ // the unsafe vsprintf which, in general, can be dangerous and should
427 // be avoided.
428- template<typename _Tv>
429- int
430- __convert_from_v(char* __out,
431- const int __size __attribute__ ((__unused__)),
432- const char* __fmt,
433-#ifdef __UCLIBC_HAS_XCLOCALE__
434- _Tv __v, const __c_locale& __cloc, int __prec)
435+ inline int
436+ __convert_from_v(const __c_locale&
437+#ifndef __UCLIBC_HAS_XCLOCALE__
438+ __cloc __attribute__ ((__unused__))
439+#endif
440+ ,
441+ char* __out,
442+ const int __size,
443+ const char* __fmt, ...)
444 {
445+ va_list __args;
446+#ifdef __UCLIBC_HAS_XCLOCALE__
447+
448 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
449 #else
450- _Tv __v, const __c_locale&, int __prec)
451- {
452 # ifdef __UCLIBC_HAS_LOCALE__
453 char* __old = std::setlocale(LC_ALL, NULL);
454 char* __sav = new char[std::strlen(__old) + 1];
455@@ -103,7 +107,9 @@
456 # endif
457 #endif
458
459- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
460+ va_start(__args, __fmt);
461+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
462+ va_end(__args);
463
464 #ifdef __UCLIBC_HAS_XCLOCALE__
465 __gnu_cxx::__uselocale(__old);
466Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
467===================================================================
468--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
469+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
470@@ -53,11 +53,14 @@
471 const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
472 _M_c_locale_timepunct);
473 #else
474- char* __old = strdup(setlocale(LC_ALL, NULL));
475+ char* __old = setlocale(LC_ALL, NULL);
476+ const size_t __llen = strlen(__old) + 1;
477+ char* __sav = new char[__llen];
478+ memcpy(__sav, __old, __llen);
479 setlocale(LC_ALL, _M_name_timepunct);
480 const size_t __len = strftime(__s, __maxlen, __format, __tm);
481- setlocale(LC_ALL, __old);
482- free(__old);
483+ setlocale(LC_ALL, __sav);
484+ delete [] __sav;
485 #endif
486 // Make sure __s is null terminated.
487 if (__len == 0)
488@@ -207,11 +210,14 @@
489 const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
490 _M_c_locale_timepunct);
491 #else
492- char* __old = strdup(setlocale(LC_ALL, NULL));
493+ char* __old = setlocale(LC_ALL, NULL);
494+ const size_t __llen = strlen(__old) + 1;
495+ char* __sav = new char[__llen];
496+ memcpy(__sav, __old, __llen);
497 setlocale(LC_ALL, _M_name_timepunct);
498 const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
499- setlocale(LC_ALL, __old);
500- free(__old);
501+ setlocale(LC_ALL, __sav);
502+ delete [] __sav;
503 #endif
504 // Make sure __s is null terminated.
505 if (__len == 0)
506Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
507===================================================================
508--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
509+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
510@@ -31,6 +31,9 @@
511
512 #include <bits/c++config.h>
513 #include <clocale>
514+#include <cstdlib>
515+#include <cstring>
516+#include <cstddef>
517
518 #ifdef __UCLIBC_MJN3_ONLY__
519 #warning clean this up
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/301-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..aaa5cee8c8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/301-missing-execinfo_h.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.5.0/boehm-gc/include/gc.h
2===================================================================
3--- gcc-4.5.0.orig/boehm-gc/include/gc.h 2007-04-23 14:10:09.000000000 -0700
4+++ gcc-4.5.0/boehm-gc/include/gc.h 2010-06-25 10:49:12.768883509 -0700
5@@ -503,7 +503,7 @@
6 #if defined(__linux__) || defined(__GLIBC__)
7 # include <features.h>
8 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
9- && !defined(__ia64__)
10+ && !defined(__ia64__) && !defined(__UCLIBC__)
11 # ifndef GC_HAVE_BUILTIN_BACKTRACE
12 # define GC_HAVE_BUILTIN_BACKTRACE
13 # endif
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/302-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/302-c99-snprintf.patch
new file mode 100644
index 0000000000..12be2da79c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/302-c99-snprintf.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.5.0/libstdc++-v3/include/c_std/cstdio
2===================================================================
3--- gcc-4.5.0.orig/libstdc++-v3/include/c_std/cstdio 2010-02-04 10:20:34.000000000 -0800
4+++ gcc-4.5.0/libstdc++-v3/include/c_std/cstdio 2010-06-25 10:51:12.712631679 -0700
5@@ -139,7 +139,7 @@
6
7 _GLIBCXX_END_NAMESPACE
8
9-#if _GLIBCXX_USE_C99
10+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
11
12 #undef snprintf
13 #undef vfscanf
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/303-c99-complex-ugly-hack.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/303-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..56aa78cdd2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,14 @@
1Index: gcc-4.5.0/libstdc++-v3/configure
2===================================================================
3--- gcc-4.5.0.orig/libstdc++-v3/configure 2010-06-25 10:48:37.488384191 -0700
4+++ gcc-4.5.0/libstdc++-v3/configure 2010-06-25 10:51:23.804380413 -0700
5@@ -18262,6 +18262,9 @@
6 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7 /* end confdefs.h. */
8 #include <complex.h>
9+#ifdef __UCLIBC__
10+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
11+#endif
12 int
13 main ()
14 {
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/304-index_macro.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/304-index_macro.patch
new file mode 100644
index 0000000000..bbb6563513
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/304-index_macro.patch
@@ -0,0 +1,28 @@
1Index: gcc-4.5.0/libstdc++-v3/include/ext/rope
2===================================================================
3--- gcc-4.5.0.orig/libstdc++-v3/include/ext/rope 2009-04-09 08:00:19.000000000 -0700
4+++ gcc-4.5.0/libstdc++-v3/include/ext/rope 2010-06-25 10:51:33.613383077 -0700
5@@ -54,6 +54,9 @@
6 #include <bits/gthr.h>
7 #include <tr1/functional>
8
9+/* cope w/ index defined as macro, SuSv3 proposal */
10+#undef index
11+
12 # ifdef __GC
13 # define __GC_CONST const
14 # else
15Index: gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h
16===================================================================
17--- gcc-4.5.0.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-09 08:00:19.000000000 -0700
18+++ gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h 2010-06-25 10:51:33.621381669 -0700
19@@ -49,6 +49,9 @@
20 #include <ext/memory> // For uninitialized_copy_n
21 #include <ext/numeric> // For power
22
23+/* cope w/ index defined as macro, SuSv3 proposal */
24+#undef index
25+
26 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
27
28 using std::size_t;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/305-libmudflap-susv3-legacy.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..f890acb813
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
1Index: gcc-4.5.0/libmudflap/mf-hooks2.c
2===================================================================
3--- gcc-4.5.0.orig/libmudflap/mf-hooks2.c 2009-04-09 08:00:19.000000000 -0700
4+++ gcc-4.5.0/libmudflap/mf-hooks2.c 2010-06-25 10:52:13.937636901 -0700
5@@ -421,7 +421,7 @@
6 {
7 TRACE ("%s\n", __PRETTY_FUNCTION__);
8 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
9- bzero (s, n);
10+ memset (s, 0, n);
11 }
12
13
14@@ -431,7 +431,7 @@
15 TRACE ("%s\n", __PRETTY_FUNCTION__);
16 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
17 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
18- bcopy (src, dest, n);
19+ memmove (dest, src, n);
20 }
21
22
23@@ -441,7 +441,7 @@
24 TRACE ("%s\n", __PRETTY_FUNCTION__);
25 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
26 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
27- return bcmp (s1, s2, n);
28+ return n == 0 ? 0 : memcmp (s1, s2, n);
29 }
30
31
32@@ -450,7 +450,7 @@
33 size_t n = strlen (s);
34 TRACE ("%s\n", __PRETTY_FUNCTION__);
35 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
36- return index (s, c);
37+ return strchr (s, c);
38 }
39
40
41@@ -459,7 +459,7 @@
42 size_t n = strlen (s);
43 TRACE ("%s\n", __PRETTY_FUNCTION__);
44 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
45- return rindex (s, c);
46+ return strrchr (s, c);
47 }
48
49 /* XXX: stpcpy, memccpy */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/306-libstdc++-namespace.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/306-libstdc++-namespace.patch
new file mode 100644
index 0000000000..75c7401373
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/306-libstdc++-namespace.patch
@@ -0,0 +1,38 @@
1Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h
2===================================================================
3--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:49:07.024632961 -0700
4+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:52:33.980632645 -0700
5@@ -32,7 +32,8 @@
6 //
7
8 // Written by Benjamin Kosnik <bkoz@redhat.com>
9-
10+namespace std
11+{
12 #ifdef __UCLIBC_MJN3_ONLY__
13 #warning fix prototypes for *textdomain funcs
14 #endif
15@@ -116,3 +117,4 @@
16 this->_S_create_c_locale(this->_M_c_locale_messages, __s);
17 }
18 }
19+}
20Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h
21===================================================================
22--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:49:07.024632961 -0700
23+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:52:33.980632645 -0700
24@@ -33,7 +33,8 @@
25 //
26
27 // Written by Benjamin Kosnik <bkoz@redhat.com>
28-
29+namespace std
30+{
31 template<typename _CharT>
32 __timepunct<_CharT>::__timepunct(size_t __refs)
33 : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
34@@ -75,3 +76,4 @@
35 delete _M_data;
36 _S_destroy_c_locale(_M_c_locale_timepunct);
37 }
38+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/307-locale_facets.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/307-locale_facets.patch
new file mode 100644
index 0000000000..774fcfa2ca
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/307-locale_facets.patch
@@ -0,0 +1,19 @@
1This patch fixes a bug into ostream::operator<<(double) due to the wrong size
2passed into the __convert_from_v method. The wrong size is then passed to
3std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
4
5Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
6
7Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
8===================================================================
9--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
10+++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
11@@ -1004,7 +1004,7 @@
12 const int __cs_size = __fixed ? __max_exp + __prec + 4
13 : __max_digits * 2 + __prec;
14 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
15- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
16+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
17 __prec, __v);
18 #endif
19
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/602-sdk-libstdc++-includes.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/602-sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..23fce7544d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
1--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
2+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
3@@ -21,5 +21,5 @@
4 $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
5
6 # -I/-D flags to pass when compiling.
7-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
8+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
9
10--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
11+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
12@@ -35,7 +35,7 @@
13
14 libmath_la_SOURCES = stubs.c
15
16-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
17+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
18
19 # Only compiling "C" sources in this directory.
20 LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/64bithack.patch
new file mode 100644
index 0000000000..067676ab63
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/64bithack.patch
@@ -0,0 +1,33 @@
1By default gcc places 64 bit libs in a lib64 directory. This makes it use
2"lib" instead.
3
4RP 25/7/10
5
6Index: gcc-4.5.0/gcc/config/i386/t-linux64
7===================================================================
8--- gcc-4.5.0.orig/gcc/config/i386/t-linux64 2010-08-10 15:47:42.000000000 +0100
9+++ gcc-4.5.0/gcc/config/i386/t-linux64 2010-08-10 15:47:47.000000000 +0100
10@@ -24,8 +24,8 @@
11 # MULTILIB_OSDIRNAMES according to what is found on the target.
12
13 MULTILIB_OPTIONS = m64/m32
14-MULTILIB_DIRNAMES = 64 32
15-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
16+MULTILIB_DIRNAMES = . 32
17+MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
18
19 LIBGCC = stmp-multilib
20 INSTALL_LIBGCC = install-multilib
21Index: gcc-4.5.0/gcc/config/i386/linux64.h
22===================================================================
23--- gcc-4.5.0.orig/gcc/config/i386/linux64.h 2010-08-10 15:49:06.000000000 +0100
24+++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-08-10 15:49:16.000000000 +0100
25@@ -59,7 +59,7 @@
26 done. */
27
28 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
29-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
30+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
31
32 #if TARGET_64BIT_DEFAULT
33 #define SPEC_32 "m32"
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/740-sh-pr24836.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/740-sh-pr24836.patch
new file mode 100644
index 0000000000..d84889259d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/740-sh-pr24836.patch
@@ -0,0 +1,29 @@
1http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
2http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
3
4Index: gcc-4.5.0/gcc/configure.ac
5===================================================================
6--- gcc-4.5.0.orig/gcc/configure.ac 2010-03-25 22:40:32.000000000 -0700
7+++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:02:48.489057877 -0700
8@@ -2784,7 +2784,7 @@
9 tls_first_minor=14
10 tls_as_opt="-m64 -Aesame --fatal-warnings"
11 ;;
12- sh-*-* | sh[34]-*-*)
13+ sh-*-* | sh[34]*-*-*)
14 conftest_s='
15 .section ".tdata","awT",@progbits
16 foo: .long 25
17Index: gcc-4.5.0/gcc/configure
18===================================================================
19--- gcc-4.5.0.orig/gcc/configure 2010-03-25 22:40:32.000000000 -0700
20+++ gcc-4.5.0/gcc/configure 2010-06-25 11:02:48.508381845 -0700
21@@ -22156,7 +22156,7 @@
22 tls_first_minor=14
23 tls_as_opt="-m64 -Aesame --fatal-warnings"
24 ;;
25- sh-*-* | sh[34]-*-*)
26+ sh-*-* | sh[34]*-*-*)
27 conftest_s='
28 .section ".tdata","awT",@progbits
29 foo: .long 25
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/800-arm-bigendian.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/800-arm-bigendian.patch
new file mode 100644
index 0000000000..77d02c3abd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/800-arm-bigendian.patch
@@ -0,0 +1,34 @@
1By Lennert Buytenhek <buytenh@wantstofly.org>
2Adds support for arm*b-linux* big-endian ARM targets
3
4See http://gcc.gnu.org/PR16350
5
6Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
7===================================================================
8--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2009-11-05 06:47:45.000000000 -0800
9+++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:03:06.997132728 -0700
10@@ -51,7 +51,7 @@
11
12 #undef MULTILIB_DEFAULTS
13 #define MULTILIB_DEFAULTS \
14- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
15+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
16
17 /* Now we define the strings used to build the spec file. */
18 #undef LIB_SPEC
19Index: gcc-4.5.0/gcc/config.gcc
20===================================================================
21--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:40:33.321880880 -0700
22+++ gcc-4.5.0/gcc/config.gcc 2010-06-25 11:03:07.013133525 -0700
23@@ -734,6 +734,11 @@
24 esac
25 tmake_file="${tmake_file} t-linux arm/t-arm"
26 case ${target} in
27+ arm*b-*)
28+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
29+ ;;
30+ esac
31+ case ${target} in
32 arm*-*-linux-*eabi)
33 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
34 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/904-flatten-switch-stmt-00.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/904-flatten-switch-stmt-00.patch
new file mode 100644
index 0000000000..c4641dc63e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,74 @@
1Hi,
2
3The attached patch makes sure that we create smaller object code for
4simple switch statements. We just make sure to flatten the switch
5statement into an if-else chain, basically.
6
7This fixes a size-regression as compared to gcc-3.4, as can be seen
8below.
9
102007-04-15 Bernhard Fischer <..>
11
12 * stmt.c (expand_case): Do not create a complex binary tree when
13 optimizing for size but rather use the simple ordered list.
14 (emit_case_nodes): do not emit jumps to the default_label when
15 optimizing for size.
16
17Not regtested so far.
18Comments?
19
20Attached is the test switch.c mentioned below.
21
22$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
23gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
24$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
25gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
26
27$ size switch-*.o
28 text data bss dec hex filename
29 169 0 0 169 a9 switch-2.95.o
30 115 0 0 115 73 switch-3.3.o
31 103 0 0 103 67 switch-3.4.o
32 124 0 0 124 7c switch-4.0.o
33 124 0 0 124 7c switch-4.1.o
34 124 0 0 124 7c switch-4.2.orig-HEAD.o
35 95 0 0 95 5f switch-4.3-HEAD.o
36 124 0 0 124 7c switch-4.3.orig-HEAD.o
37 166 0 0 166 a6 switch-CHAIN-2.95.o
38 111 0 0 111 6f switch-CHAIN-3.3.o
39 95 0 0 95 5f switch-CHAIN-3.4.o
40 95 0 0 95 5f switch-CHAIN-4.0.o
41 95 0 0 95 5f switch-CHAIN-4.1.o
42 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
43 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
44 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
45
46
47Content-Type: text/x-diff; charset=us-ascii
48Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
49
50Index: gcc-4.5.0/gcc/stmt.c
51===================================================================
52--- gcc-4.5.0.orig/gcc/stmt.c 2010-02-19 01:53:51.000000000 -0800
53+++ gcc-4.5.0/gcc/stmt.c 2010-06-25 11:05:31.816881094 -0700
54@@ -2440,7 +2440,11 @@
55 default code is emitted. */
56
57 use_cost_table = estimate_case_costs (case_list);
58- balance_case_nodes (&case_list, NULL);
59+ /* When optimizing for size, we want a straight list to avoid
60+ jumps as much as possible. This basically creates an if-else
61+ chain. */
62+ if (!optimize_size)
63+ balance_case_nodes (&case_list, NULL);
64 emit_case_nodes (index, case_list, default_label, index_type);
65 if (default_label)
66 emit_jump (default_label);
67@@ -3008,6 +3012,7 @@
68 {
69 if (!node_has_low_bound (node, index_type))
70 {
71+ if (!optimize_size) /* don't jl to the .default_label. */
72 emit_cmp_and_jump_insns (index,
73 convert_modes
74 (mode, imode,
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/arm-bswapsi2.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-bswapsi2.patch
new file mode 100644
index 0000000000..7ac61a6d63
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-bswapsi2.patch
@@ -0,0 +1,13 @@
1Index: gcc-4.5/gcc/config/arm/arm.md
2===================================================================
3--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-06-17 09:13:07.000000000 -0700
4+++ gcc-4.5/gcc/config/arm/arm.md 2010-06-22 08:08:45.397212002 -0700
5@@ -11267,7 +11267,7 @@
6 (define_expand "bswapsi2"
7 [(set (match_operand:SI 0 "s_register_operand" "=r")
8 (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
9-"TARGET_EITHER"
10+"TARGET_EITHER && (arm_arch6 && !optimize_size)"
11 "
12 if (!arm_arch6)
13 {
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/arm-nolibfloat.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-nolibfloat.patch
new file mode 100644
index 0000000000..99f2b20d50
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
1# Dimitry Andric <dimitry@andric.com>, 2004-05-01
2#
3# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
4# anymore. (The required functions are now in libgcc.)
5#
6# Fixes errors like
7# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
8# collect2: ld returned 1 exit status
9# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
10# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
11
12Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
13===================================================================
14--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2010-06-25 11:04:49.572437901 -0700
15+++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:06:12.273162283 -0700
16@@ -60,7 +60,7 @@
17 %{shared:-lc} \
18 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
19
20-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
21+#define LIBGCC_SPEC "-lgcc"
22
23 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
24
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/arm-softfloat.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-softfloat.patch
new file mode 100644
index 0000000000..181d4fbf5a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-softfloat.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.5.0/gcc/config/arm/t-linux
2===================================================================
3--- gcc-4.5.0.orig/gcc/config/arm/t-linux 2009-04-21 12:03:23.000000000 -0700
4+++ gcc-4.5.0/gcc/config/arm/t-linux 2010-06-25 11:11:06.836381365 -0700
5@@ -23,7 +23,10 @@
6
7 LIB1ASMSRC = arm/lib1funcs.asm
8 LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
9- _arm_addsubdf3 _arm_addsubsf3
10+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
11+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
12+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
13+# _arm_addsubdf3 _arm_addsubsf3
14
15 # MULTILIB_OPTIONS = mhard-float/msoft-float
16 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/arm-unbreak-eabi-armv4t.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-unbreak-eabi-armv4t.dpatch
new file mode 100644
index 0000000000..7bb8887068
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-unbreak-eabi-armv4t.dpatch
@@ -0,0 +1,36 @@
1#! /bin/sh -e
2
3# DP: Fix armv4t build on ARM
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p1 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
27+++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
28@@ -44,7 +44,7 @@
29 The ARM10TDMI core is the default for armv5t, so set
30 SUBTARGET_CPU_DEFAULT to achieve this. */
31 #undef SUBTARGET_CPU_DEFAULT
32-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
33+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
34
35 /* TARGET_BIG_ENDIAN_DEFAULT is set in
36 config.gcc for big endian configurations. */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/cache-amnesia.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/cache-amnesia.patch
new file mode 100644
index 0000000000..b889f9b6ca
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/cache-amnesia.patch
@@ -0,0 +1,31 @@
1---
2 gcc/configure | 2 +-
3 gcc/configure.ac | 2 +-
4 2 files changed, 2 insertions(+), 2 deletions(-)
5
6Index: gcc-4.5+svnr155514/gcc/configure
7===================================================================
8--- gcc-4.5+svnr155514.orig/gcc/configure 2009-12-29 22:00:40.000000000 -0800
9+++ gcc-4.5+svnr155514/gcc/configure 2009-12-29 23:52:43.381592113 -0800
10@@ -10467,7 +10467,7 @@ else
11 saved_CFLAGS="${CFLAGS}"
12 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
13 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
14- ${realsrcdir}/configure \
15+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
16 --enable-languages=${enable_languages-all} \
17 --target=$target_alias --host=$build_alias --build=$build_alias
18 CFLAGS="${saved_CFLAGS}"
19Index: gcc-4.5+svnr155514/gcc/configure.ac
20===================================================================
21--- gcc-4.5+svnr155514.orig/gcc/configure.ac 2009-12-29 22:00:40.000000000 -0800
22+++ gcc-4.5+svnr155514/gcc/configure.ac 2009-12-29 23:51:54.589091778 -0800
23@@ -1458,7 +1458,7 @@ else
24 saved_CFLAGS="${CFLAGS}"
25 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
26 LDFLAGS="${LDFLAGS_FOR_BUILD}" \
27- ${realsrcdir}/configure \
28+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
29 --enable-languages=${enable_languages-all} \
30 --target=$target_alias --host=$build_alias --build=$build_alias
31 CFLAGS="${saved_CFLAGS}"
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-c++-builtin-redecl.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-c++-builtin-redecl.patch
new file mode 100644
index 0000000000..a149eae98e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-c++-builtin-redecl.patch
@@ -0,0 +1,114 @@
12007-10-02 Jakub Jelinek <jakub@redhat.com>
2
3 * decl.c (duplicate_decls): When redeclaring a builtin function,
4 keep the merged decl builtin whenever types match, even if new
5 decl defines a function.
6
7 * gcc.dg/builtins-65.c: New test.
8 * g++.dg/ext/builtin10.C: New test.
9
10Index: gcc/cp/decl.c
11===================================================================
12--- gcc/cp/decl.c.orig 2010-04-01 11:48:46.000000000 -0700
13+++ gcc/cp/decl.c 2010-06-25 10:10:54.749131719 -0700
14@@ -2021,23 +2021,21 @@
15 DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
16 DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
17 }
18+ /* If redeclaring a builtin function, it stays built in. */
19+ if (types_match && DECL_BUILT_IN (olddecl))
20+ {
21+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
22+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
23+ /* If we're keeping the built-in definition, keep the rtl,
24+ regardless of declaration matches. */
25+ COPY_DECL_RTL (olddecl, newdecl);
26+ }
27 if (new_defines_function)
28 /* If defining a function declared with other language
29 linkage, use the previously declared language linkage. */
30 SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
31 else if (types_match)
32 {
33- /* If redeclaring a builtin function, and not a definition,
34- it stays built in. */
35- if (DECL_BUILT_IN (olddecl))
36- {
37- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
38- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
39- /* If we're keeping the built-in definition, keep the rtl,
40- regardless of declaration matches. */
41- COPY_DECL_RTL (olddecl, newdecl);
42- }
43-
44 DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
45 /* Don't clear out the arguments if we're just redeclaring a
46 function. */
47Index: gcc/testsuite/gcc.dg/builtins-65.c
48===================================================================
49--- gcc/testsuite/gcc.dg/builtins-65.c.orig 2009-06-26 02:02:04.000000000 -0700
50+++ gcc/testsuite/gcc.dg/builtins-65.c 2010-06-25 10:10:54.784464429 -0700
51@@ -1,3 +1,28 @@
52+/* { dg-do compile } */
53+/* { dg-options "-O2" } */
54+
55+typedef __SIZE_TYPE__ size_t;
56+extern void __chk_fail (void);
57+extern int snprintf (char *, size_t, const char *, ...);
58+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
59+{
60+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
61+ __chk_fail ();
62+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
63+}
64+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
65+
66+char buf[10];
67+
68+int
69+main (void)
70+{
71+ snprintf (buf, 10, "%d%d\n", 10, 10);
72+ return 0;
73+}
74+
75+/* { dg-final { scan-assembler "mysnprintf" } } */
76+/* { dg-final { scan-assembler-not "__chk_fail" } } */
77 /* { dg-do link } */
78 /* { dg-options "-O2 -ffast-math" } */
79 /* { dg-require-effective-target c99_runtime } */
80Index: gcc/testsuite/g++.dg/ext/builtin10.C
81===================================================================
82--- gcc/testsuite/g++.dg/ext/builtin10.C.orig 2009-02-02 03:27:50.000000000 -0800
83+++ gcc/testsuite/g++.dg/ext/builtin10.C 2010-06-25 10:10:54.816467202 -0700
84@@ -1,3 +1,30 @@
85+// { dg-do compile }
86+// { dg-options "-O2" }
87+
88+typedef __SIZE_TYPE__ size_t;
89+extern "C" {
90+extern void __chk_fail (void);
91+extern int snprintf (char *, size_t, const char *, ...);
92+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
93+{
94+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
95+ __chk_fail ();
96+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
97+}
98+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
99+}
100+
101+char buf[10];
102+
103+int
104+main (void)
105+{
106+ snprintf (buf, 10, "%d%d\n", 10, 10);
107+ return 0;
108+}
109+
110+// { dg-final { scan-assembler "mysnprintf" } }
111+// { dg-final { scan-assembler-not "__chk_fail" } }
112 // { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
113 // { dg-options "-O2 -fdump-tree-optimized" }
114
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-cpp-pragma.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-cpp-pragma.patch
new file mode 100644
index 0000000000..00d37bd7ce
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-cpp-pragma.patch
@@ -0,0 +1,284 @@
12008-02-26 Jakub Jelinek <jakub@redhat.com>
2
3 * c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
4 and CPP_PRAGMA_EOL.
5 * c-pragma.c (pragma_ns_name): New typedef.
6 (registered_pp_pragmas): New variable.
7 (c_pp_lookup_pragma): New function.
8 (c_register_pragma_1): If flag_preprocess_only, do nothing
9 for non-expanded pragmas, for expanded ones push pragma's
10 namespace and name into registered_pp_pragmas vector.
11 (c_invoke_pragma_handler): Register OpenMP pragmas even when
12 flag_preprocess_only, don't register GCC pch_preprocess
13 pragma if flag_preprocess_only.
14 * c-opts.c (c_common_init): Call init_pragma even if
15 flag_preprocess_only.
16 * c-pragma.c (c_pp_lookup_pragma): New prototype.
17 * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
18 cpp_register_pragma if flag_preprocess_only.
19
20 * gcc.dg/gomp/preprocess-1.c: New test.
21
22--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
23+++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
24@@ -1,6 +1,6 @@
25 /* Preprocess only, using cpplib.
26- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
27- Free Software Foundation, Inc.
28+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
29+ 2008 Free Software Foundation, Inc.
30 Written by Per Bothner, 1994-95.
31
32 This program is free software; you can redistribute it and/or modify it
33@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
34 avoid_paste = false;
35 print.source = NULL;
36 print.prev = token;
37- cpp_output_token (token, print.outf);
38+ if (token->type == CPP_PRAGMA)
39+ {
40+ const char *space;
41+ const char *name;
42+
43+ maybe_print_line (token->src_loc);
44+ fputs ("#pragma ", print.outf);
45+ c_pp_lookup_pragma (token->val.pragma, &space, &name);
46+ if (space)
47+ fprintf (print.outf, "%s %s", space, name);
48+ else
49+ fprintf (print.outf, "%s", name);
50+ print.printed = 1;
51+ }
52+ else if (token->type == CPP_PRAGMA_EOL)
53+ maybe_print_line (token->src_loc);
54+ else
55+ cpp_output_token (token, print.outf);
56
57 if (token->type == CPP_COMMENT)
58 account_for_newlines (token->val.str.text, token->val.str.len);
59--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
60+++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
61@@ -1,6 +1,6 @@
62 /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
63 Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
64- 2006, 2007 Free Software Foundation, Inc.
65+ 2006, 2007, 2008 Free Software Foundation, Inc.
66
67 This file is part of GCC.
68
69@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
70
71 static VEC(pragma_handler, heap) *registered_pragmas;
72
73+typedef struct
74+{
75+ const char *space;
76+ const char *name;
77+} pragma_ns_name;
78+
79+DEF_VEC_O (pragma_ns_name);
80+DEF_VEC_ALLOC_O (pragma_ns_name, heap);
81+
82+static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
83+
84+struct omp_pragma_def { const char *name; unsigned int id; };
85+static const struct omp_pragma_def omp_pragmas[] = {
86+ { "atomic", PRAGMA_OMP_ATOMIC },
87+ { "barrier", PRAGMA_OMP_BARRIER },
88+ { "critical", PRAGMA_OMP_CRITICAL },
89+ { "flush", PRAGMA_OMP_FLUSH },
90+ { "for", PRAGMA_OMP_FOR },
91+ { "master", PRAGMA_OMP_MASTER },
92+ { "ordered", PRAGMA_OMP_ORDERED },
93+ { "parallel", PRAGMA_OMP_PARALLEL },
94+ { "section", PRAGMA_OMP_SECTION },
95+ { "sections", PRAGMA_OMP_SECTIONS },
96+ { "single", PRAGMA_OMP_SINGLE },
97+ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
98+};
99+
100+void
101+c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
102+{
103+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
104+ int i;
105+
106+ for (i = 0; i < n_omp_pragmas; ++i)
107+ if (omp_pragmas[i].id == id)
108+ {
109+ *space = "omp";
110+ *name = omp_pragmas[i].name;
111+ return;
112+ }
113+
114+ if (id >= PRAGMA_FIRST_EXTERNAL
115+ && (id < PRAGMA_FIRST_EXTERNAL
116+ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
117+ {
118+ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
119+ id - PRAGMA_FIRST_EXTERNAL)->space;
120+ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
121+ id - PRAGMA_FIRST_EXTERNAL)->name;
122+ return;
123+ }
124+
125+ gcc_unreachable ();
126+}
127+
128 /* Front-end wrappers for pragma registration to avoid dragging
129 cpplib.h in almost everywhere. */
130
131@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
132 {
133 unsigned id;
134
135- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
136- id = VEC_length (pragma_handler, registered_pragmas);
137- id += PRAGMA_FIRST_EXTERNAL - 1;
138-
139- /* The C++ front end allocates 6 bits in cp_token; the C front end
140- allocates 7 bits in c_token. At present this is sufficient. */
141- gcc_assert (id < 64);
142+ if (flag_preprocess_only)
143+ {
144+ pragma_ns_name ns_name;
145+
146+ if (!allow_expansion)
147+ return;
148+
149+ ns_name.space = space;
150+ ns_name.name = name;
151+ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
152+ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
153+ id += PRAGMA_FIRST_EXTERNAL - 1;
154+ }
155+ else
156+ {
157+ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
158+ id = VEC_length (pragma_handler, registered_pragmas);
159+ id += PRAGMA_FIRST_EXTERNAL - 1;
160+
161+ /* The C++ front end allocates 6 bits in cp_token; the C front end
162+ allocates 7 bits in c_token. At present this is sufficient. */
163+ gcc_assert (id < 64);
164+ }
165
166 cpp_register_deferred_pragma (parse_in, space, name, id,
167 allow_expansion, false);
168@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
169 void
170 init_pragma (void)
171 {
172- if (flag_openmp && !flag_preprocess_only)
173+ if (flag_openmp)
174 {
175- struct omp_pragma_def { const char *name; unsigned int id; };
176- static const struct omp_pragma_def omp_pragmas[] = {
177- { "atomic", PRAGMA_OMP_ATOMIC },
178- { "barrier", PRAGMA_OMP_BARRIER },
179- { "critical", PRAGMA_OMP_CRITICAL },
180- { "flush", PRAGMA_OMP_FLUSH },
181- { "for", PRAGMA_OMP_FOR },
182- { "master", PRAGMA_OMP_MASTER },
183- { "ordered", PRAGMA_OMP_ORDERED },
184- { "parallel", PRAGMA_OMP_PARALLEL },
185- { "section", PRAGMA_OMP_SECTION },
186- { "sections", PRAGMA_OMP_SECTIONS },
187- { "single", PRAGMA_OMP_SINGLE },
188- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
189- };
190-
191 const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
192 int i;
193
194@@ -947,8 +1002,9 @@ init_pragma (void)
195 omp_pragmas[i].id, true, true);
196 }
197
198- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
199- PRAGMA_GCC_PCH_PREPROCESS, false, false);
200+ if (!flag_preprocess_only)
201+ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
202+ PRAGMA_GCC_PCH_PREPROCESS, false, false);
203
204 #ifdef HANDLE_PRAGMA_PACK
205 #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
206--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
207+++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
208@@ -1,5 +1,5 @@
209 /* C/ObjC/C++ command line option handling.
210- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
211+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
212 Free Software Foundation, Inc.
213 Contributed by Neil Booth.
214
215@@ -1239,6 +1239,9 @@ c_common_init (void)
216 if (version_flag)
217 c_common_print_pch_checksum (stderr);
218
219+ /* Has to wait until now so that cpplib has its hash table. */
220+ init_pragma ();
221+
222 if (flag_preprocess_only)
223 {
224 finish_options ();
225@@ -1246,9 +1249,6 @@ c_common_init (void)
226 return false;
227 }
228
229- /* Has to wait until now so that cpplib has its hash table. */
230- init_pragma ();
231-
232 return true;
233 }
234
235--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
236+++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
237@@ -1,6 +1,6 @@
238 /* Pragma related interfaces.
239 Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
240- 2007 Free Software Foundation, Inc.
241+ 2007, 2008 Free Software Foundation, Inc.
242
243 This file is part of GCC.
244
245@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
246 extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
247 int);
248
249+extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
250+
251 #endif /* GCC_C_PRAGMA_H */
252--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
253+++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
254@@ -892,8 +892,9 @@ enum machopic_addr_class {
255
256 #define DARWIN_REGISTER_TARGET_PRAGMAS() \
257 do { \
258- cpp_register_pragma (parse_in, NULL, "mark", \
259- darwin_pragma_ignore, false); \
260+ if (!flag_preprocess_only) \
261+ cpp_register_pragma (parse_in, NULL, "mark", \
262+ darwin_pragma_ignore, false); \
263 c_register_pragma (0, "options", darwin_pragma_options); \
264 c_register_pragma (0, "segment", darwin_pragma_ignore); \
265 c_register_pragma (0, "unused", darwin_pragma_unused); \
266--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
267+++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
268@@ -0,0 +1,16 @@
269+/* { dg-do preprocess } */
270+
271+void foo (void)
272+{
273+ int i1, j1, k1;
274+#define p parallel
275+#define P(x) private (x##1)
276+#define S(x) shared (x##1)
277+#define F(x) firstprivate (x##1)
278+#pragma omp p P(i) \
279+ S(j) \
280+ F(k)
281+ ;
282+}
283+
284+/* { dg-final { scan-file preprocess-1.i "(^|\n)#pragma omp parallel private \\(i1\\) shared \\(j1\\) firstprivate \\(k1\\)($|\n)" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-i386-libgomp.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-i386-libgomp.patch
new file mode 100644
index 0000000000..a588db28e8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-i386-libgomp.patch
@@ -0,0 +1,65 @@
1Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
2hardware isn't supported because NPTL doesn't support it anyway.
3
4Index: libgomp/configure.tgt
5===================================================================
6--- libgomp/configure.tgt.orig 2010-01-28 13:47:59.000000000 -0800
7+++ libgomp/configure.tgt 2010-06-25 10:32:26.706135558 -0700
8@@ -48,14 +48,14 @@
9 ;;
10
11 # Note that bare i386 is not included here. We need cmpxchg.
12- i[456]86-*-linux*)
13+ i[3456]86-*-linux*)
14 config_path="linux/x86 linux posix"
15 case " ${CC} ${CFLAGS} " in
16 *" -m64 "*)
17 ;;
18 *)
19 if test -z "$with_arch"; then
20- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
21+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
22 fi
23 esac
24 ;;
25@@ -67,7 +67,7 @@
26 config_path="linux/x86 linux posix"
27 case " ${CC} ${CFLAGS} " in
28 *" -m32 "*)
29- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
30+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
31 ;;
32 esac
33 ;;
34Index: libstdc++-v3/libsupc++/guard.cc
35===================================================================
36--- libstdc++-v3/libsupc++/guard.cc.orig 2009-11-09 14:09:30.000000000 -0800
37+++ libstdc++-v3/libsupc++/guard.cc 2010-06-25 10:32:26.710135964 -0700
38@@ -30,6 +30,27 @@
39 #include <new>
40 #include <ext/atomicity.h>
41 #include <ext/concurrence.h>
42+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
43+# define _GLIBCXX_ATOMIC_BUILTINS 1
44+# define __sync_val_compare_and_swap(a, b, c) \
45+ ({ \
46+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
47+ int sltas; \
48+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
49+ : "=a" (sltas) \
50+ : "r" (a), "0" (b), "r" (c) : "memory"); \
51+ sltas; \
52+ })
53+# define __sync_lock_test_and_set(a, b) \
54+ ({ \
55+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
56+ int sltas; \
57+ __asm __volatile ("xchgl (%1), %0" \
58+ : "=r" (sltas) \
59+ : "r" (a), "0" (b) : "memory"); \
60+ sltas; \
61+ })
62+#endif
63 #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
64 && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
65 # include <climits>
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ia64-libunwind.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ia64-libunwind.patch
new file mode 100644
index 0000000000..cad13d1228
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ia64-libunwind.patch
@@ -0,0 +1,550 @@
12004-11-27 Jakub Jelinek <jakub@redhat.com>
2
3 * config.gcc (ia64*-*-linux*): If native and libelf is installed,
4 use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
5 fragments.
6 * config/ia64/t-glibc-no-libunwind: New file.
7 * config/ia64/change-symver.c: New file.
8 * config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
9 define _Unwind_* to __symverglobal_Unwind_*.
10 (alias): Undefine.
11 (symverglobal): Define. Use it on _Unwind_*.
12 * config/ia64/mkmap-symver-multi.awk: New file.
13 * config/ia64/libgcc-ia64-no-libunwind.ver: New file.
14
15Index: gcc/config.gcc
16===================================================================
17--- gcc/config.gcc.orig 2010-04-07 03:34:00.000000000 -0700
18+++ gcc/config.gcc 2010-06-25 10:15:25.133131055 -0700
19@@ -1457,9 +1457,16 @@
20 ;;
21 ia64*-*-linux*)
22 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
23- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
24- if test x$with_system_libunwind != xyes ; then
25- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
26+ tmake_file="${tmake_file} ia64/t-ia64"
27+ if test x${target} = x${host} && test x${target} = x${build} \
28+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
29+ && test -f /usr/lib/libelf.so; then
30+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
31+ else
32+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
33+ if test x$with_system_libunwind != xyes ; then
34+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
35+ fi
36 fi
37 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
38 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
39Index: gcc/config/ia64/t-glibc-no-libunwind
40===================================================================
41--- /dev/null 1970-01-01 00:00:00.000000000 +0000
42+++ gcc/config/ia64/t-glibc-no-libunwind 2010-06-25 10:14:32.521880765 -0700
43@@ -0,0 +1,30 @@
44+# Don't use system libunwind library on IA-64 GLIBC based system,
45+# but make _Unwind_* symbols unversioned, so that created programs
46+# are usable even when libgcc_s uses libunwind.
47+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
48+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
49+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
50+
51+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
52+ -Wl,--soname=$(SHLIB_SONAME) \
53+ -Wl,--version-script=$(SHLIB_MAP) \
54+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
55+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
56+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
57+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
58+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
59+ else true; fi && \
60+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
61+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
62+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
63+ GCC_3.4.2 _GLOBAL_ \
64+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
65+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
66+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
67+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
68+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
69+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
70+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
71+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
72+
73+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
74Index: gcc/config/ia64/change-symver.c
75===================================================================
76--- /dev/null 1970-01-01 00:00:00.000000000 +0000
77+++ gcc/config/ia64/change-symver.c 2010-06-25 10:14:32.521880765 -0700
78@@ -0,0 +1,211 @@
79+#define _GNU_SOURCE 1
80+#define _FILE_OFFSET_BITS 64
81+#include <endian.h>
82+#include <errno.h>
83+#include <error.h>
84+#include <fcntl.h>
85+#include <fnmatch.h>
86+#include <gelf.h>
87+#include <stdlib.h>
88+#include <string.h>
89+#include <unistd.h>
90+
91+int
92+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
93+{
94+ if (strcmp (name, "_GLOBAL_") == 0)
95+ return 1;
96+
97+ int cnt;
98+ size_t offset = 0;
99+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
100+ {
101+ GElf_Verdef defmem;
102+ GElf_Verdef *def;
103+ GElf_Verdaux auxmem;
104+ GElf_Verdaux *aux;
105+ unsigned int auxoffset;
106+
107+ /* Get the data at the next offset. */
108+ def = gelf_getverdef (verd, offset, &defmem);
109+ if (def == NULL)
110+ break;
111+
112+ auxoffset = offset + def->vd_aux;
113+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
114+ if (aux == NULL)
115+ break;
116+
117+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
118+ aux->vda_name)) == 0)
119+ return def->vd_ndx;
120+
121+ /* Find the next offset. */
122+ offset += def->vd_next;
123+ }
124+
125+ return -1;
126+}
127+
128+int
129+main (int argc, char **argv)
130+{
131+ if (argc < 4)
132+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
133+
134+ const char *fname = argv[1];
135+
136+ /* Open the file. */
137+ int fd;
138+ fd = open (fname, O_RDWR);
139+ if (fd == -1)
140+ error (1, errno, fname);
141+
142+ elf_version (EV_CURRENT);
143+
144+ /* Now get the ELF descriptor. */
145+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
146+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
147+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
148+
149+ size_t shstrndx;
150+ /* Get the section header string table index. */
151+ if (elf_getshstrndx (elf, &shstrndx) < 0)
152+ error (1, 0, "cannot get shstrndx from %s", fname);
153+
154+ GElf_Ehdr ehdr_mem;
155+ GElf_Ehdr *ehdr;
156+
157+ /* We need the ELF header in a few places. */
158+ ehdr = gelf_getehdr (elf, &ehdr_mem);
159+ if (ehdr == NULL)
160+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
161+
162+ Elf_Scn *scn = NULL;
163+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
164+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
165+
166+ while ((scn = elf_nextscn (elf, scn)) != NULL)
167+ {
168+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
169+
170+ if (shdr == NULL)
171+ error (1, 0, "couldn't get shdr from %s", fname);
172+
173+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
174+ {
175+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
176+ Elf_Data **p;
177+
178+ if (strcmp (name, ".gnu.version") == 0)
179+ {
180+ p = &ver;
181+ ver_shdr = *shdr;
182+ }
183+ else if (strcmp (name, ".gnu.version_d") == 0)
184+ {
185+ p = &verd;
186+ verd_shdr = *shdr;
187+ }
188+ else if (strcmp (name, ".dynsym") == 0)
189+ {
190+ p = &dynsym;
191+ dynsym_shdr = *shdr;
192+ }
193+ else
194+ continue;
195+
196+ if (*p != NULL)
197+ error (1, 0, "Two %s sections in %s", name, fname);
198+ *p = elf_getdata (scn, NULL);
199+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
200+ error (1, 0, "No data or non-contiguous data in %s section in %s",
201+ name, fname);
202+ }
203+ }
204+
205+ if (ver == NULL || verd == NULL || dynsym == NULL)
206+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
207+
208+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
209+ if (from_idx == -1)
210+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
211+
212+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
213+ if (to_idx == -1)
214+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
215+
216+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
217+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
218+ || ver_shdr.sh_entsize != 2
219+ || (ver_shdr.sh_size & 1)
220+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
221+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
222+
223+ size_t nentries = ver_shdr.sh_size / 2;
224+ size_t cnt;
225+ GElf_Versym array[nentries];
226+ for (cnt = 0; cnt < nentries; ++cnt)
227+ {
228+ GElf_Versym vsymmem;
229+ GElf_Versym *vsym;
230+
231+ vsym = gelf_getversym (ver, cnt, &vsymmem);
232+ if (vsym == NULL)
233+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
234+
235+ array[cnt] = *vsym;
236+ if (*vsym != from_idx)
237+ continue;
238+
239+ GElf_Sym sym_mem;
240+ GElf_Sym *sym;
241+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
242+ if (sym == NULL)
243+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
244+
245+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
246+
247+ int argn;
248+ for (argn = 4; argn < argc; ++argn)
249+ if (fnmatch (argv[argn], name, 0) == 0)
250+ {
251+ array[cnt] = to_idx;
252+ break;
253+ }
254+ }
255+
256+ if (sizeof (array[0]) != 2)
257+ abort ();
258+
259+#if __BYTE_ORDER == __LITTLE_ENDIAN
260+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
261+ ;
262+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
263+#elif __BYTE_ORDER == __BIG_ENDIAN
264+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
265+ ;
266+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
267+#else
268+# error Unsupported endianity
269+#endif
270+ {
271+ for (cnt = 0; cnt < nentries; ++cnt)
272+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
273+ }
274+ else
275+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
276+
277+ if (elf_end (elf) != 0)
278+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
279+
280+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
281+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
282+ fname);
283+
284+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
285+ error (1, 0, "failed to write .gnu.version section into %s", fname);
286+
287+ close (fd);
288+ return 0;
289+}
290Index: gcc/config/ia64/unwind-ia64.c
291===================================================================
292--- gcc/config/ia64/unwind-ia64.c.orig 2009-09-07 08:41:52.000000000 -0700
293+++ gcc/config/ia64/unwind-ia64.c 2010-06-25 10:14:32.521880765 -0700
294@@ -48,6 +48,51 @@
295 #define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) 1
296 #endif
297
298+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
299+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
300+ (_Unwind_Trace_Fn, void *);
301+extern void __symverglobal_Unwind_DeleteException
302+ (struct _Unwind_Exception *);
303+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
304+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
305+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
306+extern _Unwind_Word __symverglobal_Unwind_GetCFA
307+ (struct _Unwind_Context *);
308+extern _Unwind_Word __symverglobal_Unwind_GetBSP
309+ (struct _Unwind_Context *);
310+extern _Unwind_Word __symverglobal_Unwind_GetGR
311+ (struct _Unwind_Context *, int );
312+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
313+extern void *__symverglobal_Unwind_GetLanguageSpecificData
314+ (struct _Unwind_Context *);
315+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
316+ (struct _Unwind_Context *);
317+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
318+ (struct _Unwind_Exception *);
319+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
320+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
321+ (struct _Unwind_Exception *);
322+extern void __symverglobal_Unwind_SetGR
323+ (struct _Unwind_Context *, int, _Unwind_Word);
324+extern void __symverglobal_Unwind_SetIP
325+ (struct _Unwind_Context *, _Unwind_Ptr);
326+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
327+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
328+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
329+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
330+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
331+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
332+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
333+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
334+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
335+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
336+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
337+#define _Unwind_Resume __symverglobal_Unwind_Resume
338+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
339+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
340+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
341+#endif
342+
343 enum unw_application_register
344 {
345 UNW_AR_BSP,
346@@ -2457,4 +2502,44 @@
347 alias (_Unwind_SetIP);
348 #endif
349
350+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
351+#undef alias
352+#define symverglobal(name, version) \
353+__typeof (__symverglobal##name) __symverlocal##name \
354+ __attribute__ ((alias ("__symverglobal" #name))); \
355+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
356+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
357+
358+#undef _Unwind_Backtrace
359+#undef _Unwind_DeleteException
360+#undef _Unwind_FindEnclosingFunction
361+#undef _Unwind_ForcedUnwind
362+#undef _Unwind_GetBSP
363+#undef _Unwind_GetCFA
364+#undef _Unwind_GetGR
365+#undef _Unwind_GetIP
366+#undef _Unwind_GetLanguageSpecificData
367+#undef _Unwind_GetRegionStart
368+#undef _Unwind_RaiseException
369+#undef _Unwind_Resume
370+#undef _Unwind_Resume_or_Rethrow
371+#undef _Unwind_SetGR
372+#undef _Unwind_SetIP
373+symverglobal (_Unwind_Backtrace, GCC_3.3);
374+symverglobal (_Unwind_DeleteException, GCC_3.0);
375+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
376+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
377+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
378+symverglobal (_Unwind_GetCFA, GCC_3.3);
379+symverglobal (_Unwind_GetGR, GCC_3.0);
380+symverglobal (_Unwind_GetIP, GCC_3.0);
381+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
382+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
383+symverglobal (_Unwind_RaiseException, GCC_3.0);
384+symverglobal (_Unwind_Resume, GCC_3.0);
385+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
386+symverglobal (_Unwind_SetGR, GCC_3.0);
387+symverglobal (_Unwind_SetIP, GCC_3.0);
388+#endif
389+
390 #endif
391Index: gcc/config/ia64/mkmap-symver-multi.awk
392===================================================================
393--- /dev/null 1970-01-01 00:00:00.000000000 +0000
394+++ gcc/config/ia64/mkmap-symver-multi.awk 2010-06-25 10:14:32.521880765 -0700
395@@ -0,0 +1,133 @@
396+# Generate an ELF symbol version map a-la Solaris and GNU ld.
397+# Contributed by Richard Henderson <rth@cygnus.com>
398+#
399+# This file is part of GCC.
400+#
401+# GCC is free software; you can redistribute it and/or modify it under
402+# the terms of the GNU General Public License as published by the Free
403+# Software Foundation; either version 2, or (at your option) any later
404+# version.
405+#
406+# GCC is distributed in the hope that it will be useful, but WITHOUT
407+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
408+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
409+# License for more details.
410+#
411+# You should have received a copy of the GNU General Public License
412+# along with GCC; see the file COPYING. If not, write to the Free
413+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
414+# 02110-1301, USA.
415+
416+BEGIN {
417+ state = "nm";
418+ sawsymbol = 0;
419+}
420+
421+# Remove comment and blank lines.
422+/^ *#/ || /^ *$/ {
423+ next;
424+}
425+
426+# We begin with nm input. Collect the set of symbols that are present
427+# so that we can not emit them into the final version script -- Solaris
428+# complains at us if we do.
429+
430+state == "nm" && /^%%/ {
431+ state = "ver";
432+ next;
433+}
434+
435+state == "nm" && ($1 == "U" || $2 == "U") {
436+ next;
437+}
438+
439+state == "nm" && NF == 3 {
440+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
441+ def[$3] = 1
442+ tl=$3
443+ sub(/^.*@/,"",tl)
444+ ver[$3] = tl
445+ } else {
446+ sub(/@@?GCC_[0-9.]*$/,"",$3)
447+ def[$3] = 1;
448+ }
449+ sawsymbol = 1;
450+ next;
451+}
452+
453+state == "nm" {
454+ next;
455+}
456+
457+# Now we process a simplified variant of the Solaris symbol version
458+# script. We have one symbol per line, no semicolons, simple markers
459+# for beginning and ending each section, and %inherit markers for
460+# describing version inheritence. A symbol may appear in more than
461+# one symbol version, and the last seen takes effect.
462+
463+NF == 3 && $1 == "%inherit" {
464+ inherit[$2] = $3;
465+ next;
466+}
467+
468+NF == 2 && $2 == "{" {
469+ libs[$1] = 1;
470+ thislib = $1;
471+ next;
472+}
473+
474+$1 == "}" {
475+ thislib = "";
476+ next;
477+}
478+
479+{
480+ ver[$1] = thislib;
481+ next;
482+}
483+
484+END {
485+ if (!sawsymbol)
486+ {
487+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
488+ exit 1;
489+ }
490+ for (l in libs)
491+ output(l);
492+}
493+
494+function output(lib) {
495+ if (done[lib])
496+ return;
497+ done[lib] = 1;
498+ if (inherit[lib])
499+ output(inherit[lib]);
500+
501+ empty=1
502+ for (sym in ver)
503+ if ((ver[sym] == lib) && (sym in def))
504+ {
505+ if (empty)
506+ {
507+ printf("%s {\n", lib);
508+ printf(" global:\n");
509+ empty = 0;
510+ }
511+ symp = sym;
512+ sub(/@GCC_[0-9.]*$/,"",symp);
513+ printf("\t%s;\n", symp);
514+ if (dotsyms)
515+ printf("\t.%s;\n", symp);
516+ }
517+
518+ if (empty)
519+ {
520+ for (l in libs)
521+ if (inherit[l] == lib)
522+ inherit[l] = inherit[lib];
523+ }
524+ else if (inherit[lib])
525+ printf("} %s;\n", inherit[lib]);
526+ else
527+ printf ("\n local:\n\t*;\n};\n");
528+}
529Index: gcc/config/ia64/libgcc-ia64-no-libunwind.ver
530===================================================================
531--- /dev/null 1970-01-01 00:00:00.000000000 +0000
532+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2010-06-25 10:14:32.525880902 -0700
533@@ -0,0 +1,17 @@
534+GCC_3.4.2 {
535+ _Unwind_GetGR
536+ _Unwind_RaiseException
537+ _Unwind_GetRegionStart
538+ _Unwind_SetIP
539+ _Unwind_GetIP
540+ _Unwind_GetLanguageSpecificData
541+ _Unwind_Resume
542+ _Unwind_DeleteException
543+ _Unwind_SetGR
544+ _Unwind_ForcedUnwind
545+ _Unwind_Backtrace
546+ _Unwind_FindEnclosingFunction
547+ _Unwind_GetCFA
548+ _Unwind_Resume_or_Rethrow
549+ _Unwind_GetBSP
550+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-debug-iface-type.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-debug-iface-type.patch
new file mode 100644
index 0000000000..de14a50018
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-debug-iface-type.patch
@@ -0,0 +1,19 @@
12008-01-25 Jakub Jelinek <jakub@redhat.com>
2
3 * lang.c (java_classify_record): Revert 2007-12-20 change.
4
5Index: gcc/java/lang.c
6===================================================================
7--- gcc/java/lang.c.orig 2010-01-20 00:17:00.000000000 -0800
8+++ gcc/java/lang.c 2010-06-25 10:28:46.569383189 -0700
9@@ -881,9 +881,7 @@
10 if (! CLASS_P (type))
11 return RECORD_IS_STRUCT;
12
13- /* ??? GDB does not support DW_TAG_interface_type as of December,
14- 2007. Re-enable this at a later time. */
15- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
16+ if (CLASS_INTERFACE (TYPE_NAME (type)))
17 return RECORD_IS_INTERFACE;
18
19 return RECORD_IS_CLASS;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-nomulti.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-nomulti.patch
new file mode 100644
index 0000000000..3cb10f3c23
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-nomulti.patch
@@ -0,0 +1,48 @@
1Index: libjava/configure.ac
2===================================================================
3--- libjava/configure.ac.orig 2010-03-21 12:41:37.000000000 -0700
4+++ libjava/configure.ac 2010-06-25 10:17:47.489886278 -0700
5@@ -139,6 +139,13 @@
6 [allow rebuilding of .class and .h files]))
7 AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
8
9+AC_ARG_ENABLE(libjava-multilib,
10+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
11+if test "$enable_libjava_multilib" = no; then
12+ multilib=no
13+ ac_configure_args="$ac_configure_args --disable-multilib"
14+fi
15+
16 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
17 GCC_NO_EXECUTABLES
18
19Index: libjava/configure
20===================================================================
21--- libjava/configure.orig 2010-04-02 11:18:06.000000000 -0700
22+++ libjava/configure 2010-06-25 10:17:47.516381209 -0700
23@@ -1609,6 +1609,8 @@
24 default=yes
25 --enable-java-maintainer-mode
26 allow rebuilding of .class and .h files
27+ --enable-libjava-multilib
28+ build libjava as multilib
29 --disable-dependency-tracking speeds up one-time build
30 --enable-dependency-tracking do not reject slow dependency extractors
31 --enable-maintainer-mode enable make rules and dependencies not useful
32@@ -3346,6 +3348,16 @@
33 fi
34
35
36+# Check whether --enable-libjava-multilib was given.
37+if test "${enable_libjava_multilib+set}" = set; then
38+ enableval=$enable_libjava_multilib;
39+fi
40+
41+if test "$enable_libjava_multilib" = no; then
42+ multilib=no
43+ ac_configure_args="$ac_configure_args --disable-multilib"
44+fi
45+
46 # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
47
48
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-libgomp-speedup.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-libgomp-speedup.patch
new file mode 100644
index 0000000000..da85e556ec
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-libgomp-speedup.patch
@@ -0,0 +1,2797 @@
12008-03-28 Jakub Jelinek <jakub@redhat.com>
2
3 * config/linux/sparc/futex.h (atomic_write_barrier): Fix membar
4 argument.
5
62008-03-27 Jakub Jelinek <jakub@redhat.com>
7
8 * libgomp.h (struct gomp_team_state): Remove single_count field
9 ifndef HAVE_SYNC_BUILTINS.
10 (struct gomp_team): Likewise. Add work_share_list_free_lock
11 ifndef HAVE_SYNC_BUILTINS.
12 * team.c (gomp_new_team): If HAVE_SYNC_BUILTINS is not defined,
13 don't initialize single_count, but instead initialize
14 work_share_list_free_lock.
15 (free_team): Destroy work_share_list_free_lock ifndef
16 HAVE_SYNC_BUILTINS.
17 (gomp_team_start): Don't initialize ts.single_count ifndef
18 HAVE_SYNC_BUILTINS.
19 * work.c (alloc_work_share, free_work_share): Use
20 work_share_list_free_lock instead of atomic chaining ifndef
21 HAVE_SYNC_BUILTINS.
22
232008-03-26 Jakub Jelinek <jakub@redhat.com>
24
25 * loop.c (gomp_loop_init): Fix GFS_DYNAMIC ws->mode setting.
26 * testsuite/libgomp.c/loop-4.c: New test.
27
28 * libgomp.h (struct gomp_team_state): Add single_count field.
29 (struct gomp_team): Likewise.
30 * team.c (gomp_new_team): Clear single_count.
31 (gomp_team_start): Likewise.
32 * single.c (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.
33
342008-03-25 Jakub Jelinek <jakub@redhat.com>
35
36 * team.c (gomp_thread_start): Don't clear ts.static_trip here.
37 * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
38 ts.static_trip here.
39 * work.c (gomp_work_share_start): Don't clear ts.static_trip here.
40
412008-03-21 Jakub Jelinek <jakub@redhat.com>
42
43 * libgomp.h: Include ptrlock.h.
44 (struct gomp_work_share): Reshuffle fields. Add next_alloc,
45 next_ws, next_free and inline_ordered_team_ids fields, change
46 ordered_team_ids into pointer from flexible array member.
47 (struct gomp_team_state): Add last_work_share field, remove
48 work_share_generation.
49 (struct gomp_team): Remove work_share_lock, generation_mask,
50 oldest_live_gen, num_live_gen and init_work_shares fields, add
51 work work_share_list_alloc, work_share_list_free and work_share_chunk
52 fields. Change work_shares from pointer to pointers into an array.
53 (gomp_new_team): New prototype.
54 (gomp_team_start): Change type of last argument.
55 (gomp_new_work_share): Removed.
56 (gomp_init_work_share, gomp_fini_work_share): New prototypes.
57 (gomp_work_share_init_done): New static inline.
58 * team.c (gomp_thread_start): Clear ts.last_work_share, don't clear
59 ts.work_share_generation.
60 (new_team): Removed.
61 (gomp_new_team): New function.
62 (free_team): Free gomp_work_share blocks chained through next_alloc,
63 instead of freeing work_shares and destroying work_share_lock.
64 (gomp_team_start): Change last argument from ws to team, don't create
65 new team, set ts.work_share to &team->work_shares[0] and clear
66 ts.last_work_share. Don't clear ts.work_share_generation.
67 (gomp_team_end): Call gomp_fini_work_share.
68 * work.c (gomp_new_work_share): Removed.
69 (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
70 functions.
71 (free_work_share): Add team argument. Call gomp_fini_work_share
72 and then either free ws if orphaned, or put it into
73 work_share_list_free list of the current team.
74 (gomp_work_share_start, gomp_work_share_end,
75 gomp_work_share_end_nowait): Rewritten.
76 * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
77 after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
78 gomp_iter_dynamic_next instead of the _locked variant and don't take
79 lock around it, otherwise acquire it before calling
80 gomp_iter_dynamic_next_locked.
81 (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
82 gomp_iter_dynamic_next instead of the _locked variant and don't take
83 lock around it.
84 (GOMP_parallel_sections_start): Call gomp_new_team instead of
85 gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
86 Adjust gomp_team_start caller.
87 * loop.c (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
88 gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
89 (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
90 gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
91 don't unlock ws->lock, otherwise lock it.
92 (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
93 gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
94 (gomp_parallel_loop_start): Call gomp_new_team instead of
95 gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
96 Adjust gomp_team_start caller.
97 * single.c (GOMP_single_start, GOMP_single_copy_start): Call
98 gomp_work_share_init_done if gomp_work_share_start returned true.
99 Don't unlock ws->lock.
100 * parallel.c (GOMP_parallel_start): Call gomp_new_team and pass that
101 as last argument to gomp_team_start.
102 * config/linux/ptrlock.c: New file.
103 * config/linux/ptrlock.h: New file.
104 * config/posix/ptrlock.c: New file.
105 * config/posix/ptrlock.h: New file.
106 * Makefile.am (libgomp_la_SOURCES): Add ptrlock.c.
107 * Makefile.in: Regenerated.
108 * testsuite/Makefile.in: Regenerated.
109
1102008-03-19 Jakub Jelinek <jakub@redhat.com>
111
112 * libgomp.h (gomp_active_wait_policy): Remove decl.
113 (gomp_throttled_spin_count_var, gomp_available_cpus,
114 gomp_managed_threads): New extern decls.
115 * team.c (gomp_team_start, gomp_team_end): If number of threads
116 changed, adjust atomically gomp_managed_threads.
117 * env.c (gomp_active_wait_policy, gomp_block_time_var): Remove.
118 (gomp_throttled_spin_count_var, gomp_available_cpus,
119 gomp_managed_threads): New variables.
120 (parse_millis): Removed.
121 (parse_spincount): New function.
122 (parse_wait_policy): Return -1/0/1 instead of setting
123 gomp_active_wait_policy.
124 (initialize_env): Call gomp_init_num_threads unconditionally.
125 Initialize gomp_available_cpus. Call parse_spincount instead
126 of parse_millis, initialize gomp_{,throttled_}spin_count_var
127 depending on presence and value of OMP_WAIT_POLICY and
128 GOMP_SPINCOUNT env vars.
129 * config/linux/wait.h (do_wait): Use gomp_throttled_spin_count_var
130 instead of gomp_spin_count_var if gomp_managed_threads >
131 gomp_available_cpus.
132
133 * config/linux/wait.h: Include errno.h.
134 (FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Define.
135 (gomp_futex_wake, gomp_futex_wait): New extern decls.
136 * config/linux/mutex.c (gomp_futex_wake, gomp_futex_wait): New
137 variables.
138 * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
139 (sys_futex0): Return error code.
140 (futex_wake, futex_wait): If ENOSYS was returned, clear
141 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
142 * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
143 (futex_wake, futex_wait): If ENOSYS was returned, clear
144 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
145 * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
146 (sys_futex0): Return error code.
147 (futex_wake, futex_wait): If ENOSYS was returned, clear
148 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
149 * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
150 (sys_futex0): Return error code.
151 (futex_wake, futex_wait): If ENOSYS was returned, clear
152 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
153 * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
154 (sys_futex0): Return error code.
155 (futex_wake, futex_wait): If ENOSYS was returned, clear
156 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
157 * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
158 (sys_futex0): Return error code.
159 (futex_wake, futex_wait): If ENOSYS was returned, clear
160 FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
161
1622008-03-18 Jakub Jelinek <jakub@redhat.com>
163
164 * libgomp.h (struct gomp_work_share): Add mode field. Put lock and
165 next into a different cache line from most of the write-once fields.
166 * loop.c: Include limits.h.
167 (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
168 If adding ws->chunk_size nthreads + 1 times after end won't
169 overflow, set ws->mode to 1.
170 * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
171 ws->chunk_size by incr.
172 (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
173 code.
174 * work.c: Include stddef.h.
175 (gomp_new_work_share): Use offsetof rather than sizeof.
176
1772008-03-17 Jakub Jelinek <jakub@redhat.com>
178
179 * libgomp.h (struct gomp_team): Change ordered_release field
180 into gomp_sem_t ** from flexible array member. Add implicit_task
181 and initial_work_shares fields.
182 (gomp_new_task): Removed.
183 (gomp_init_task): New prototype.
184 * team.c (new_team): Allocate implicit_task for each thread
185 and initial work_shares together with gomp_team allocation.
186 (free_team): Only free work_shares if it is not init_work_shares.
187 (gomp_team_start): Use gomp_init_task instead of gomp_new_task,
188 set thr->task to the corresponding implicit_task array entry.
189 * task.c (gomp_new_task): Removed.
190 (gomp_init_task): New function.
191 (gomp_end_task): Don't free the task.
192 (GOMP_task): Allocate struct gomp_task on the stack, call
193 gomp_init_task rather than gomp_new_task.
194 * work.c (gomp_work_share_start): If work_shares ==
195 init_work_shares, gomp_malloc + memcpy rather than gomp_realloc.
196
1972008-03-15 Jakub Jelinek <jakub@redhat.com>
198 Ulrich Drepper <drepper@redhat.com>
199
200 * config/linux/bar.h (gomp_barrier_state_t): Rewritten.
201 (gomp_barrier_state_t): Change to unsigned int.
202 (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
203 gomp_barrier_wait_start, gomp_barrier_last_thread): Rewritten.
204 (gomp_barrier_wait_last): Prototype rather than inline.
205 * config/linux/bar.c (gomp_barrier_wait_end): Rewritten.
206 (gomp_barrier_wait_last): New function.
207
2082008-03-15 Jakub Jelinek <jakub@redhat.com>
209
210 * team.c (gomp_thread_start): Use gomp_barrier_wait_last instead
211 of gomp_barrier_wait.
212 * env.c (gomp_block_time_var, gomp_spin_count_var): New variables.
213 (parse_millis): New function.
214 (initialize_env): Handle GOMP_BLOCKTIME env var.
215 * libgomp.h (struct gomp_team): Move close to the end of the struct.
216 (gomp_spin_count_var): New extern var decl.
217 * work.c (gomp_work_share_end): Use gomp_barrier_state_t bstate
218 var instead of bool last, call gomp_barrier_last_thread to check
219 for last thread, pass bstate to gomp_barrier_wait_end.
220 * config/linux/wait.h: New file.
221 * config/linux/mutex.c: Include wait.h instead of libgomp.h and
222 futex.h.
223 (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
224 * config/linux/bar.c: Include wait.h instead of libgomp.h and
225 futex.h.
226 (gomp_barrier_wait_end): Change second argument to
227 gomp_barrier_state_t. Call do_wait instead of futex_wait.
228 * config/linux/sem.c: Include wait.h instead of libgomp.h and
229 futex.h.
230 (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
231 * config/linux/lock.c: Include wait.h instead of libgomp.h and
232 futex.h.
233 (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
234 * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
235 * config/linux/bar.h (gomp_barrier_state_t): New typedef.
236 (gomp_barrier_wait_end): Change second argument to
237 gomp_barrier_state_t.
238 (gomp_barrier_wait_start): Return gomp_barrier_state_t.
239 (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
240 inlines.
241 * config/linux/powerpc/futex.h (cpu_relax, atomic_write_barrier): New
242 static inlines.
243 * config/linux/alpha/futex.h (cpu_relax, atomic_write_barrier):
244 Likewise.
245 * config/linux/x86/futex.h (cpu_relax, atomic_write_barrier):
246 Likewise.
247 * config/linux/s390/futex.h (cpu_relax, atomic_write_barrier):
248 Likewise.
249 * config/linux/ia64/futex.h (cpu_relax, atomic_write_barrier):
250 Likewise.
251 * config/linux/sparc/futex.h (cpu_relax, atomic_write_barrier):
252 Likewise.
253 * config/posix/bar.c (gomp_barrier_wait_end): Change second argument
254 to gomp_barrier_state_t.
255 * config/posix/bar.h (gomp_barrier_state_t): New typedef.
256 (gomp_barrier_wait_end): Change second argument to
257 gomp_barrier_state_t.
258 (gomp_barrier_wait_start): Return gomp_barrier_state_t.
259 (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
260 inlines.
261
262--- libgomp/parallel.c.jj 2007-12-07 14:41:01.000000000 +0100
263+++ libgomp/parallel.c 2008-03-26 15:32:06.000000000 +0100
264@@ -68,7 +68,7 @@ void
265 GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
266 {
267 num_threads = gomp_resolve_num_threads (num_threads);
268- gomp_team_start (fn, data, num_threads, NULL);
269+ gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
270 }
271
272 void
273--- libgomp/sections.c.jj 2007-12-07 14:41:01.000000000 +0100
274+++ libgomp/sections.c 2008-03-26 15:33:06.000000000 +0100
275@@ -59,14 +59,24 @@ GOMP_sections_start (unsigned count)
276 long s, e, ret;
277
278 if (gomp_work_share_start (false))
279- gomp_sections_init (thr->ts.work_share, count);
280+ {
281+ gomp_sections_init (thr->ts.work_share, count);
282+ gomp_work_share_init_done ();
283+ }
284
285+#ifdef HAVE_SYNC_BUILTINS
286+ if (gomp_iter_dynamic_next (&s, &e))
287+ ret = s;
288+ else
289+ ret = 0;
290+#else
291+ gomp_mutex_lock (&thr->ts.work_share->lock);
292 if (gomp_iter_dynamic_next_locked (&s, &e))
293 ret = s;
294 else
295 ret = 0;
296-
297 gomp_mutex_unlock (&thr->ts.work_share->lock);
298+#endif
299
300 return ret;
301 }
302@@ -83,15 +93,23 @@ GOMP_sections_start (unsigned count)
303 unsigned
304 GOMP_sections_next (void)
305 {
306- struct gomp_thread *thr = gomp_thread ();
307 long s, e, ret;
308
309+#ifdef HAVE_SYNC_BUILTINS
310+ if (gomp_iter_dynamic_next (&s, &e))
311+ ret = s;
312+ else
313+ ret = 0;
314+#else
315+ struct gomp_thread *thr = gomp_thread ();
316+
317 gomp_mutex_lock (&thr->ts.work_share->lock);
318 if (gomp_iter_dynamic_next_locked (&s, &e))
319 ret = s;
320 else
321 ret = 0;
322 gomp_mutex_unlock (&thr->ts.work_share->lock);
323+#endif
324
325 return ret;
326 }
327@@ -103,15 +121,15 @@ void
328 GOMP_parallel_sections_start (void (*fn) (void *), void *data,
329 unsigned num_threads, unsigned count)
330 {
331- struct gomp_work_share *ws;
332+ struct gomp_team *team;
333
334 num_threads = gomp_resolve_num_threads (num_threads);
335 if (gomp_dyn_var && num_threads > count)
336 num_threads = count;
337
338- ws = gomp_new_work_share (false, num_threads);
339- gomp_sections_init (ws, count);
340- gomp_team_start (fn, data, num_threads, ws);
341+ team = gomp_new_team (num_threads);
342+ gomp_sections_init (&team->work_shares[0], count);
343+ gomp_team_start (fn, data, num_threads, team);
344 }
345
346 /* The GOMP_section_end* routines are called after the thread is told
347--- libgomp/env.c.jj 2007-12-07 14:41:01.000000000 +0100
348+++ libgomp/env.c 2008-03-26 16:40:26.000000000 +0100
349@@ -44,6 +44,11 @@ enum gomp_schedule_type gomp_run_sched_v
350 unsigned long gomp_run_sched_chunk = 1;
351 unsigned short *gomp_cpu_affinity;
352 size_t gomp_cpu_affinity_len;
353+#ifndef HAVE_SYNC_BUILTINS
354+gomp_mutex_t gomp_remaining_threads_lock;
355+#endif
356+unsigned long gomp_available_cpus = 1, gomp_managed_threads = 1;
357+unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
358
359 /* Parse the OMP_SCHEDULE environment variable. */
360
361@@ -147,6 +152,79 @@ parse_unsigned_long (const char *name, u
362 return false;
363 }
364
365+/* Parse the GOMP_SPINCOUNT environment varible. Return true if one was
366+ present and it was successfully parsed. */
367+
368+static bool
369+parse_spincount (const char *name, unsigned long long *pvalue)
370+{
371+ char *env, *end;
372+ unsigned long long value, mult = 1;
373+
374+ env = getenv (name);
375+ if (env == NULL)
376+ return false;
377+
378+ while (isspace ((unsigned char) *env))
379+ ++env;
380+ if (*env == '\0')
381+ goto invalid;
382+
383+ if (strncasecmp (env, "infinite", 8) == 0
384+ || strncasecmp (env, "infinity", 8) == 0)
385+ {
386+ value = ~0ULL;
387+ end = env + 8;
388+ goto check_tail;
389+ }
390+
391+ errno = 0;
392+ value = strtoull (env, &end, 10);
393+ if (errno)
394+ goto invalid;
395+
396+ while (isspace ((unsigned char) *end))
397+ ++end;
398+ if (*end != '\0')
399+ {
400+ switch (tolower (*end))
401+ {
402+ case 'k':
403+ mult = 1000LL;
404+ break;
405+ case 'm':
406+ mult = 1000LL * 1000LL;
407+ break;
408+ case 'g':
409+ mult = 1000LL * 1000LL * 1000LL;
410+ break;
411+ case 't':
412+ mult = 1000LL * 1000LL * 1000LL * 1000LL;
413+ break;
414+ default:
415+ goto invalid;
416+ }
417+ ++end;
418+ check_tail:
419+ while (isspace ((unsigned char) *end))
420+ ++end;
421+ if (*end != '\0')
422+ goto invalid;
423+ }
424+
425+ if (value > ~0ULL / mult)
426+ value = ~0ULL;
427+ else
428+ value *= mult;
429+
430+ *pvalue = value;
431+ return true;
432+
433+ invalid:
434+ gomp_error ("Invalid value for environment variable %s", name);
435+ return false;
436+}
437+
438 /* Parse a boolean value for environment variable NAME and store the
439 result in VALUE. */
440
441@@ -281,10 +359,25 @@ initialize_env (void)
442 parse_schedule ();
443 parse_boolean ("OMP_DYNAMIC", &gomp_dyn_var);
444 parse_boolean ("OMP_NESTED", &gomp_nest_var);
445+ gomp_init_num_threads ();
446+ gomp_available_cpus = gomp_nthreads_var;
447 if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
448- gomp_init_num_threads ();
449+ gomp_nthreads_var = gomp_available_cpus;
450 if (parse_affinity ())
451 gomp_init_affinity ();
452+ if (!parse_spincount ("GOMP_SPINCOUNT", &gomp_spin_count_var))
453+ {
454+ /* Using a rough estimation of 100000 spins per msec,
455+ use 200 msec blocking.
456+ Depending on the CPU speed, this can be e.g. 5 times longer
457+ or 5 times shorter. */
458+ gomp_spin_count_var = 20000000LL;
459+ }
460+ /* gomp_throttled_spin_count_var is used when there are more libgomp
461+ managed threads than available CPUs. Use very short spinning. */
462+ gomp_throttled_spin_count_var = 100LL;
463+ if (gomp_throttled_spin_count_var > gomp_spin_count_var)
464+ gomp_throttled_spin_count_var = gomp_spin_count_var;
465
466 /* Not strictly environment related, but ordering constructors is tricky. */
467 pthread_attr_init (&gomp_thread_attr);
468--- libgomp/libgomp.h.jj 2007-12-07 14:41:01.000000000 +0100
469+++ libgomp/libgomp.h 2008-03-27 12:21:51.000000000 +0100
470@@ -50,6 +50,7 @@
471 #include "sem.h"
472 #include "mutex.h"
473 #include "bar.h"
474+#include "ptrlock.h"
475
476
477 /* This structure contains the data to control one work-sharing construct,
478@@ -70,6 +71,8 @@ struct gomp_work_share
479 If this is a SECTIONS construct, this value will always be DYNAMIC. */
480 enum gomp_schedule_type sched;
481
482+ int mode;
483+
484 /* This is the chunk_size argument to the SCHEDULE clause. */
485 long chunk_size;
486
487@@ -81,17 +84,38 @@ struct gomp_work_share
488 is always 1. */
489 long incr;
490
491- /* This lock protects the update of the following members. */
492- gomp_mutex_t lock;
493+ /* This is a circular queue that details which threads will be allowed
494+ into the ordered region and in which order. When a thread allocates
495+ iterations on which it is going to work, it also registers itself at
496+ the end of the array. When a thread reaches the ordered region, it
497+ checks to see if it is the one at the head of the queue. If not, it
498+ blocks on its RELEASE semaphore. */
499+ unsigned *ordered_team_ids;
500
501- union {
502- /* This is the next iteration value to be allocated. In the case of
503- GFS_STATIC loops, this the iteration start point and never changes. */
504- long next;
505+ /* This is the number of threads that have registered themselves in
506+ the circular queue ordered_team_ids. */
507+ unsigned ordered_num_used;
508
509- /* This is the returned data structure for SINGLE COPYPRIVATE. */
510- void *copyprivate;
511- };
512+ /* This is the team_id of the currently acknowledged owner of the ordered
513+ section, or -1u if the ordered section has not been acknowledged by
514+ any thread. This is distinguished from the thread that is *allowed*
515+ to take the section next. */
516+ unsigned ordered_owner;
517+
518+ /* This is the index into the circular queue ordered_team_ids of the
519+ current thread that's allowed into the ordered reason. */
520+ unsigned ordered_cur;
521+
522+ /* This is a chain of allocated gomp_work_share blocks, valid only
523+ in the first gomp_work_share struct in the block. */
524+ struct gomp_work_share *next_alloc;
525+
526+ /* The above fields are written once during workshare initialization,
527+ or related to ordered worksharing. Make sure the following fields
528+ are in a different cache line. */
529+
530+ /* This lock protects the update of the following members. */
531+ gomp_mutex_t lock __attribute__((aligned (64)));
532
533 /* This is the count of the number of threads that have exited the work
534 share construct. If the construct was marked nowait, they have moved on
535@@ -99,27 +123,28 @@ struct gomp_work_share
536 of the team to exit the work share construct must deallocate it. */
537 unsigned threads_completed;
538
539- /* This is the index into the circular queue ordered_team_ids of the
540- current thread that's allowed into the ordered reason. */
541- unsigned ordered_cur;
542+ union {
543+ /* This is the next iteration value to be allocated. In the case of
544+ GFS_STATIC loops, this the iteration start point and never changes. */
545+ long next;
546
547- /* This is the number of threads that have registered themselves in
548- the circular queue ordered_team_ids. */
549- unsigned ordered_num_used;
550+ /* This is the returned data structure for SINGLE COPYPRIVATE. */
551+ void *copyprivate;
552+ };
553
554- /* This is the team_id of the currently acknoledged owner of the ordered
555- section, or -1u if the ordered section has not been acknowledged by
556- any thread. This is distinguished from the thread that is *allowed*
557- to take the section next. */
558- unsigned ordered_owner;
559+ union {
560+ /* Link to gomp_work_share struct for next work sharing construct
561+ encountered after this one. */
562+ gomp_ptrlock_t next_ws;
563+
564+ /* gomp_work_share structs are chained in the free work share cache
565+ through this. */
566+ struct gomp_work_share *next_free;
567+ };
568
569- /* This is a circular queue that details which threads will be allowed
570- into the ordered region and in which order. When a thread allocates
571- iterations on which it is going to work, it also registers itself at
572- the end of the array. When a thread reaches the ordered region, it
573- checks to see if it is the one at the head of the queue. If not, it
574- blocks on its RELEASE semaphore. */
575- unsigned ordered_team_ids[];
576+ /* If only few threads are in the team, ordered_team_ids can point
577+ to this array which fills the padding at the end of this struct. */
578+ unsigned inline_ordered_team_ids[0];
579 };
580
581 /* This structure contains all of the thread-local data associated with
582@@ -133,21 +158,24 @@ struct gomp_team_state
583
584 /* This is the work share construct which this thread is currently
585 processing. Recall that with NOWAIT, not all threads may be
586- processing the same construct. This value is NULL when there
587- is no construct being processed. */
588+ processing the same construct. */
589 struct gomp_work_share *work_share;
590
591+ /* This is the previous work share construct or NULL if there wasn't any.
592+ When all threads are done with the current work sharing construct,
593+ the previous one can be freed. The current one can't, as its
594+ next_ws field is used. */
595+ struct gomp_work_share *last_work_share;
596+
597 /* This is the ID of this thread within the team. This value is
598 guaranteed to be between 0 and N-1, where N is the number of
599 threads in the team. */
600 unsigned team_id;
601
602- /* The work share "generation" is a number that increases by one for
603- each work share construct encountered in the dynamic flow of the
604- program. It is used to find the control data for the work share
605- when encountering it for the first time. This particular number
606- reflects the generation of the work_share member of this struct. */
607- unsigned work_share_generation;
608+#ifdef HAVE_SYNC_BUILTINS
609+ /* Number of single stmts encountered. */
610+ unsigned long single_count;
611+#endif
612
613 /* For GFS_RUNTIME loops that resolved to GFS_STATIC, this is the
614 trip number through the loop. So first time a particular loop
615@@ -163,41 +191,53 @@ struct gomp_team_state
616
617 struct gomp_team
618 {
619- /* This lock protects access to the following work shares data structures. */
620- gomp_mutex_t work_share_lock;
621-
622- /* This is a dynamically sized array containing pointers to the control
623- structs for all "live" work share constructs. Here "live" means that
624- the construct has been encountered by at least one thread, and not
625- completed by all threads. */
626- struct gomp_work_share **work_shares;
627-
628- /* The work_shares array is indexed by "generation & generation_mask".
629- The mask will be 2**N - 1, where 2**N is the size of the array. */
630- unsigned generation_mask;
631-
632- /* These two values define the bounds of the elements of the work_shares
633- array that are currently in use. */
634- unsigned oldest_live_gen;
635- unsigned num_live_gen;
636-
637 /* This is the number of threads in the current team. */
638 unsigned nthreads;
639
640+ /* This is number of gomp_work_share structs that have been allocated
641+ as a block last time. */
642+ unsigned work_share_chunk;
643+
644 /* This is the saved team state that applied to a master thread before
645 the current thread was created. */
646 struct gomp_team_state prev_ts;
647
648- /* This barrier is used for most synchronization of the team. */
649- gomp_barrier_t barrier;
650-
651 /* This semaphore should be used by the master thread instead of its
652 "native" semaphore in the thread structure. Required for nested
653 parallels, as the master is a member of two teams. */
654 gomp_sem_t master_release;
655
656- /* This array contains pointers to the release semaphore of the threads
657- in the team. */
658+ /* List of gomp_work_share structs chained through next_free fields.
659+ This is populated and taken off only by the first thread in the
660+ team encountering a new work sharing construct, in a critical
661+ section. */
662+ struct gomp_work_share *work_share_list_alloc;
663+
664+ /* List of gomp_work_share structs freed by free_work_share. New
665+ entries are atomically added to the start of the list, and
666+ alloc_work_share can safely only move all but the first entry
667+ to work_share_list alloc, as free_work_share can happen concurrently
668+ with alloc_work_share. */
669+ struct gomp_work_share *work_share_list_free;
670+
671+#ifdef HAVE_SYNC_BUILTINS
672+ /* Number of simple single regions encountered by threads in this
673+ team. */
674+ unsigned long single_count;
675+#else
676+ /* Mutex protecting addition of workshares to work_share_list_free. */
677+ gomp_mutex_t work_share_list_free_lock;
678+#endif
679+
680+ /* This barrier is used for most synchronization of the team. */
681+ gomp_barrier_t barrier;
682+
683+ /* Initial work shares, to avoid allocating any gomp_work_share
684+ structs in the common case. */
685+ struct gomp_work_share work_shares[8];
686+
687+ /* This is an array with pointers to the release semaphore
688+ of the threads in the team. */
689 gomp_sem_t *ordered_release[];
690 };
691
692@@ -242,6 +282,11 @@ extern bool gomp_dyn_var;
693 extern bool gomp_nest_var;
694 extern enum gomp_schedule_type gomp_run_sched_var;
695 extern unsigned long gomp_run_sched_chunk;
696+#ifndef HAVE_SYNC_BUILTINS
697+extern gomp_mutex_t gomp_remaining_threads_lock;
698+#endif
699+extern unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
700+extern unsigned long gomp_available_cpus, gomp_managed_threads;
701
702 /* The attributes to be used during thread creation. */
703 extern pthread_attr_t gomp_thread_attr;
704@@ -306,17 +351,27 @@ extern unsigned gomp_dynamic_max_threads
705
706 /* team.c */
707
708+extern struct gomp_team *gomp_new_team (unsigned);
709 extern void gomp_team_start (void (*) (void *), void *, unsigned,
710- struct gomp_work_share *);
711+ struct gomp_team *);
712 extern void gomp_team_end (void);
713
714 /* work.c */
715
716-extern struct gomp_work_share * gomp_new_work_share (bool, unsigned);
717+extern void gomp_init_work_share (struct gomp_work_share *, bool, unsigned);
718+extern void gomp_fini_work_share (struct gomp_work_share *);
719 extern bool gomp_work_share_start (bool);
720 extern void gomp_work_share_end (void);
721 extern void gomp_work_share_end_nowait (void);
722
723+static inline void
724+gomp_work_share_init_done (void)
725+{
726+ struct gomp_thread *thr = gomp_thread ();
727+ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
728+ gomp_ptrlock_set (&thr->ts.last_work_share->next_ws, thr->ts.work_share);
729+}
730+
731 #ifdef HAVE_ATTRIBUTE_VISIBILITY
732 # pragma GCC visibility pop
733 #endif
734--- libgomp/iter.c.jj 2008-03-26 14:48:34.000000000 +0100
735+++ libgomp/iter.c 2008-03-26 15:11:23.000000000 +0100
736@@ -1,4 +1,4 @@
737-/* Copyright (C) 2005 Free Software Foundation, Inc.
738+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
739 Contributed by Richard Henderson <rth@redhat.com>.
740
741 This file is part of the GNU OpenMP Library (libgomp).
742@@ -154,7 +154,7 @@ gomp_iter_dynamic_next_locked (long *pst
743 if (start == ws->end)
744 return false;
745
746- chunk = ws->chunk_size * ws->incr;
747+ chunk = ws->chunk_size;
748 left = ws->end - start;
749 if (ws->incr < 0)
750 {
751@@ -186,11 +186,38 @@ gomp_iter_dynamic_next (long *pstart, lo
752 struct gomp_work_share *ws = thr->ts.work_share;
753 long start, end, nend, chunk, incr;
754
755- start = ws->next;
756 end = ws->end;
757 incr = ws->incr;
758- chunk = ws->chunk_size * incr;
759+ chunk = ws->chunk_size;
760+
761+ if (__builtin_expect (ws->mode, 1))
762+ {
763+ long tmp = __sync_fetch_and_add (&ws->next, chunk);
764+ if (incr > 0)
765+ {
766+ if (tmp >= end)
767+ return false;
768+ nend = tmp + chunk;
769+ if (nend > end)
770+ nend = end;
771+ *pstart = tmp;
772+ *pend = nend;
773+ return true;
774+ }
775+ else
776+ {
777+ if (tmp <= end)
778+ return false;
779+ nend = tmp + chunk;
780+ if (nend < end)
781+ nend = end;
782+ *pstart = tmp;
783+ *pend = nend;
784+ return true;
785+ }
786+ }
787
788+ start = ws->next;
789 while (1)
790 {
791 long left = end - start;
792--- libgomp/work.c.jj 2007-12-07 14:41:01.000000000 +0100
793+++ libgomp/work.c 2008-03-27 12:21:51.000000000 +0100
794@@ -1,4 +1,4 @@
795-/* Copyright (C) 2005 Free Software Foundation, Inc.
796+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
797 Contributed by Richard Henderson <rth@redhat.com>.
798
799 This file is part of the GNU OpenMP Library (libgomp).
800@@ -29,39 +29,138 @@
801 of threads. */
802
803 #include "libgomp.h"
804+#include <stddef.h>
805 #include <stdlib.h>
806 #include <string.h>
807
808
809-/* Create a new work share structure. */
810+/* Allocate a new work share structure, preferably from current team's
811+ free gomp_work_share cache. */
812
813-struct gomp_work_share *
814-gomp_new_work_share (bool ordered, unsigned nthreads)
815+static struct gomp_work_share *
816+alloc_work_share (struct gomp_team *team)
817 {
818 struct gomp_work_share *ws;
819- size_t size;
820+ unsigned int i;
821
822- size = sizeof (*ws);
823- if (ordered)
824- size += nthreads * sizeof (ws->ordered_team_ids[0]);
825+ /* This is called in a critical section. */
826+ if (team->work_share_list_alloc != NULL)
827+ {
828+ ws = team->work_share_list_alloc;
829+ team->work_share_list_alloc = ws->next_free;
830+ return ws;
831+ }
832
833- ws = gomp_malloc_cleared (size);
834- gomp_mutex_init (&ws->lock);
835- ws->ordered_owner = -1;
836+#ifdef HAVE_SYNC_BUILTINS
837+ ws = team->work_share_list_free;
838+ /* We need atomic read from work_share_list_free,
839+ as free_work_share can be called concurrently. */
840+ __asm ("" : "+r" (ws));
841+
842+ if (ws && ws->next_free)
843+ {
844+ struct gomp_work_share *next = ws->next_free;
845+ ws->next_free = NULL;
846+ team->work_share_list_alloc = next->next_free;
847+ return next;
848+ }
849+#else
850+ gomp_mutex_lock (&team->work_share_list_free_lock);
851+ ws = team->work_share_list_free;
852+ if (ws)
853+ {
854+ team->work_share_list_alloc = ws->next_free;
855+ team->work_share_list_free = NULL;
856+ gomp_mutex_unlock (&team->work_share_list_free_lock);
857+ return ws;
858+ }
859+ gomp_mutex_unlock (&team->work_share_list_free_lock);
860+#endif
861
862+ team->work_share_chunk *= 2;
863+ ws = gomp_malloc (team->work_share_chunk * sizeof (struct gomp_work_share));
864+ ws->next_alloc = team->work_shares[0].next_alloc;
865+ team->work_shares[0].next_alloc = ws;
866+ team->work_share_list_alloc = &ws[1];
867+ for (i = 1; i < team->work_share_chunk - 1; i++)
868+ ws[i].next_free = &ws[i + 1];
869+ ws[i].next_free = NULL;
870 return ws;
871 }
872
873+/* Initialize an already allocated struct gomp_work_share.
874+ This shouldn't touch the next_alloc field. */
875+
876+void
877+gomp_init_work_share (struct gomp_work_share *ws, bool ordered,
878+ unsigned nthreads)
879+{
880+ gomp_mutex_init (&ws->lock);
881+ if (__builtin_expect (ordered, 0))
882+ {
883+#define INLINE_ORDERED_TEAM_IDS_CNT \
884+ ((sizeof (struct gomp_work_share) \
885+ - offsetof (struct gomp_work_share, inline_ordered_team_ids)) \
886+ / sizeof (((struct gomp_work_share *) 0)->inline_ordered_team_ids[0]))
887+
888+ if (nthreads > INLINE_ORDERED_TEAM_IDS_CNT)
889+ ws->ordered_team_ids
890+ = gomp_malloc (nthreads * sizeof (*ws->ordered_team_ids));
891+ else
892+ ws->ordered_team_ids = ws->inline_ordered_team_ids;
893+ memset (ws->ordered_team_ids, '\0',
894+ nthreads * sizeof (*ws->ordered_team_ids));
895+ ws->ordered_num_used = 0;
896+ ws->ordered_owner = -1;
897+ ws->ordered_cur = 0;
898+ }
899+ else
900+ ws->ordered_team_ids = NULL;
901+ gomp_ptrlock_init (&ws->next_ws, NULL);
902+ ws->threads_completed = 0;
903+}
904
905-/* Free a work share structure. */
906+/* Do any needed destruction of gomp_work_share fields before it
907+ is put back into free gomp_work_share cache or freed. */
908
909-static void
910-free_work_share (struct gomp_work_share *ws)
911+void
912+gomp_fini_work_share (struct gomp_work_share *ws)
913 {
914 gomp_mutex_destroy (&ws->lock);
915- free (ws);
916+ if (ws->ordered_team_ids != ws->inline_ordered_team_ids)
917+ free (ws->ordered_team_ids);
918+ gomp_ptrlock_destroy (&ws->next_ws);
919 }
920
921+/* Free a work share struct, if not orphaned, put it into current
922+ team's free gomp_work_share cache. */
923+
924+static inline void
925+free_work_share (struct gomp_team *team, struct gomp_work_share *ws)
926+{
927+ gomp_fini_work_share (ws);
928+ if (__builtin_expect (team == NULL, 0))
929+ free (ws);
930+ else
931+ {
932+ struct gomp_work_share *next_ws;
933+#ifdef HAVE_SYNC_BUILTINS
934+ do
935+ {
936+ next_ws = team->work_share_list_free;
937+ ws->next_free = next_ws;
938+ }
939+ while (!__sync_bool_compare_and_swap (&team->work_share_list_free,
940+ next_ws, ws));
941+#else
942+ gomp_mutex_lock (&team->work_share_list_free_lock);
943+ next_ws = team->work_share_list_free;
944+ ws->next_free = next_ws;
945+ team->work_share_list_free = ws;
946+ gomp_mutex_unlock (&team->work_share_list_free_lock);
947+#endif
948+ }
949+}
950
951 /* The current thread is ready to begin the next work sharing construct.
952 In all cases, thr->ts.work_share is updated to point to the new
953@@ -74,71 +173,34 @@ gomp_work_share_start (bool ordered)
954 struct gomp_thread *thr = gomp_thread ();
955 struct gomp_team *team = thr->ts.team;
956 struct gomp_work_share *ws;
957- unsigned ws_index, ws_gen;
958
959 /* Work sharing constructs can be orphaned. */
960 if (team == NULL)
961 {
962- ws = gomp_new_work_share (ordered, 1);
963+ ws = gomp_malloc (sizeof (*ws));
964+ gomp_init_work_share (ws, ordered, 1);
965 thr->ts.work_share = ws;
966- thr->ts.static_trip = 0;
967- gomp_mutex_lock (&ws->lock);
968- return true;
969+ return ws;
970 }
971
972- gomp_mutex_lock (&team->work_share_lock);
973-
974- /* This thread is beginning its next generation. */
975- ws_gen = ++thr->ts.work_share_generation;
976-
977- /* If this next generation is not newer than any other generation in
978- the team, then simply reference the existing construct. */
979- if (ws_gen - team->oldest_live_gen < team->num_live_gen)
980+ ws = thr->ts.work_share;
981+ thr->ts.last_work_share = ws;
982+ ws = gomp_ptrlock_get (&ws->next_ws);
983+ if (ws == NULL)
984 {
985- ws_index = ws_gen & team->generation_mask;
986- ws = team->work_shares[ws_index];
987+ /* This thread encountered a new ws first. */
988+ struct gomp_work_share *ws = alloc_work_share (team);
989+ gomp_init_work_share (ws, ordered, team->nthreads);
990 thr->ts.work_share = ws;
991- thr->ts.static_trip = 0;
992-
993- gomp_mutex_lock (&ws->lock);
994- gomp_mutex_unlock (&team->work_share_lock);
995-
996- return false;
997+ return true;
998 }
999-
1000- /* Resize the work shares queue if we've run out of space. */
1001- if (team->num_live_gen++ == team->generation_mask)
1002+ else
1003 {
1004- team->work_shares = gomp_realloc (team->work_shares,
1005- 2 * team->num_live_gen
1006- * sizeof (*team->work_shares));
1007-
1008- /* Unless oldest_live_gen is zero, the sequence of live elements
1009- wraps around the end of the array. If we do nothing, we break
1010- lookup of the existing elements. Fix that by unwrapping the
1011- data from the front to the end. */
1012- if (team->oldest_live_gen > 0)
1013- memcpy (team->work_shares + team->num_live_gen,
1014- team->work_shares,
1015- (team->oldest_live_gen & team->generation_mask)
1016- * sizeof (*team->work_shares));
1017-
1018- team->generation_mask = team->generation_mask * 2 + 1;
1019- }
1020-
1021- ws_index = ws_gen & team->generation_mask;
1022- ws = gomp_new_work_share (ordered, team->nthreads);
1023- thr->ts.work_share = ws;
1024- thr->ts.static_trip = 0;
1025- team->work_shares[ws_index] = ws;
1026-
1027- gomp_mutex_lock (&ws->lock);
1028- gomp_mutex_unlock (&team->work_share_lock);
1029-
1030- return true;
1031+ thr->ts.work_share = ws;
1032+ return false;
1033+ }
1034 }
1035
1036-
1037 /* The current thread is done with its current work sharing construct.
1038 This version does imply a barrier at the end of the work-share. */
1039
1040@@ -147,36 +209,28 @@ gomp_work_share_end (void)
1041 {
1042 struct gomp_thread *thr = gomp_thread ();
1043 struct gomp_team *team = thr->ts.team;
1044- struct gomp_work_share *ws = thr->ts.work_share;
1045- bool last;
1046-
1047- thr->ts.work_share = NULL;
1048+ gomp_barrier_state_t bstate;
1049
1050 /* Work sharing constructs can be orphaned. */
1051 if (team == NULL)
1052 {
1053- free_work_share (ws);
1054+ free_work_share (NULL, thr->ts.work_share);
1055+ thr->ts.work_share = NULL;
1056 return;
1057 }
1058
1059- last = gomp_barrier_wait_start (&team->barrier);
1060+ bstate = gomp_barrier_wait_start (&team->barrier);
1061
1062- if (last)
1063+ if (gomp_barrier_last_thread (bstate))
1064 {
1065- unsigned ws_index;
1066-
1067- ws_index = thr->ts.work_share_generation & team->generation_mask;
1068- team->work_shares[ws_index] = NULL;
1069- team->oldest_live_gen++;
1070- team->num_live_gen = 0;
1071-
1072- free_work_share (ws);
1073+ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
1074+ free_work_share (team, thr->ts.last_work_share);
1075 }
1076
1077- gomp_barrier_wait_end (&team->barrier, last);
1078+ gomp_barrier_wait_end (&team->barrier, bstate);
1079+ thr->ts.last_work_share = NULL;
1080 }
1081
1082-
1083 /* The current thread is done with its current work sharing construct.
1084 This version does NOT imply a barrier at the end of the work-share. */
1085
1086@@ -188,15 +242,17 @@ gomp_work_share_end_nowait (void)
1087 struct gomp_work_share *ws = thr->ts.work_share;
1088 unsigned completed;
1089
1090- thr->ts.work_share = NULL;
1091-
1092 /* Work sharing constructs can be orphaned. */
1093 if (team == NULL)
1094 {
1095- free_work_share (ws);
1096+ free_work_share (NULL, ws);
1097+ thr->ts.work_share = NULL;
1098 return;
1099 }
1100
1101+ if (__builtin_expect (thr->ts.last_work_share == NULL, 0))
1102+ return;
1103+
1104 #ifdef HAVE_SYNC_BUILTINS
1105 completed = __sync_add_and_fetch (&ws->threads_completed, 1);
1106 #else
1107@@ -206,18 +262,6 @@ gomp_work_share_end_nowait (void)
1108 #endif
1109
1110 if (completed == team->nthreads)
1111- {
1112- unsigned ws_index;
1113-
1114- gomp_mutex_lock (&team->work_share_lock);
1115-
1116- ws_index = thr->ts.work_share_generation & team->generation_mask;
1117- team->work_shares[ws_index] = NULL;
1118- team->oldest_live_gen++;
1119- team->num_live_gen--;
1120-
1121- gomp_mutex_unlock (&team->work_share_lock);
1122-
1123- free_work_share (ws);
1124- }
1125+ free_work_share (team, thr->ts.last_work_share);
1126+ thr->ts.last_work_share = NULL;
1127 }
1128--- libgomp/single.c.jj 2007-12-07 14:41:01.000000000 +0100
1129+++ libgomp/single.c 2008-03-26 15:11:32.000000000 +0100
1130@@ -1,4 +1,4 @@
1131-/* Copyright (C) 2005 Free Software Foundation, Inc.
1132+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1133 Contributed by Richard Henderson <rth@redhat.com>.
1134
1135 This file is part of the GNU OpenMP Library (libgomp).
1136@@ -37,10 +37,24 @@
1137 bool
1138 GOMP_single_start (void)
1139 {
1140+#ifdef HAVE_SYNC_BUILTINS
1141+ struct gomp_thread *thr = gomp_thread ();
1142+ struct gomp_team *team = thr->ts.team;
1143+ unsigned long single_count;
1144+
1145+ if (__builtin_expect (team == NULL, 0))
1146+ return true;
1147+
1148+ single_count = thr->ts.single_count++;
1149+ return __sync_bool_compare_and_swap (&team->single_count, single_count,
1150+ single_count + 1L);
1151+#else
1152 bool ret = gomp_work_share_start (false);
1153- gomp_mutex_unlock (&gomp_thread ()->ts.work_share->lock);
1154+ if (ret)
1155+ gomp_work_share_init_done ();
1156 gomp_work_share_end_nowait ();
1157 return ret;
1158+#endif
1159 }
1160
1161 /* This routine is called when first encountering a SINGLE construct that
1162@@ -57,10 +71,12 @@ GOMP_single_copy_start (void)
1163 void *ret;
1164
1165 first = gomp_work_share_start (false);
1166- gomp_mutex_unlock (&thr->ts.work_share->lock);
1167
1168 if (first)
1169- ret = NULL;
1170+ {
1171+ gomp_work_share_init_done ();
1172+ ret = NULL;
1173+ }
1174 else
1175 {
1176 gomp_barrier_wait (&thr->ts.team->barrier);
1177--- libgomp/loop.c.jj 2007-12-07 14:41:01.000000000 +0100
1178+++ libgomp/loop.c 2008-03-26 18:47:04.000000000 +0100
1179@@ -27,8 +27,9 @@
1180
1181 /* This file handles the LOOP (FOR/DO) construct. */
1182
1183-#include "libgomp.h"
1184+#include <limits.h>
1185 #include <stdlib.h>
1186+#include "libgomp.h"
1187
1188
1189 /* Initialize the given work share construct from the given arguments. */
1190@@ -44,6 +45,39 @@ gomp_loop_init (struct gomp_work_share *
1191 ? start : end;
1192 ws->incr = incr;
1193 ws->next = start;
1194+ if (sched == GFS_DYNAMIC)
1195+ {
1196+ ws->chunk_size *= incr;
1197+
1198+#ifdef HAVE_SYNC_BUILTINS
1199+ {
1200+ /* For dynamic scheduling prepare things to make each iteration
1201+ faster. */
1202+ struct gomp_thread *thr = gomp_thread ();
1203+ struct gomp_team *team = thr->ts.team;
1204+ long nthreads = team ? team->nthreads : 1;
1205+
1206+ if (__builtin_expect (incr > 0, 1))
1207+ {
1208+ /* Cheap overflow protection. */
1209+ if (__builtin_expect ((nthreads | ws->chunk_size)
1210+ >= 1UL << (sizeof (long)
1211+ * __CHAR_BIT__ / 2 - 1), 0))
1212+ ws->mode = 0;
1213+ else
1214+ ws->mode = ws->end < (LONG_MAX
1215+ - (nthreads + 1) * ws->chunk_size);
1216+ }
1217+ /* Cheap overflow protection. */
1218+ else if (__builtin_expect ((nthreads | -ws->chunk_size)
1219+ >= 1UL << (sizeof (long)
1220+ * __CHAR_BIT__ / 2 - 1), 0))
1221+ ws->mode = 0;
1222+ else
1223+ ws->mode = ws->end > (nthreads + 1) * -ws->chunk_size - LONG_MAX;
1224+ }
1225+#endif
1226+ }
1227 }
1228
1229 /* The *_start routines are called when first encountering a loop construct
1230@@ -68,10 +102,13 @@ gomp_loop_static_start (long start, long
1231 {
1232 struct gomp_thread *thr = gomp_thread ();
1233
1234+ thr->ts.static_trip = 0;
1235 if (gomp_work_share_start (false))
1236- gomp_loop_init (thr->ts.work_share, start, end, incr,
1237- GFS_STATIC, chunk_size);
1238- gomp_mutex_unlock (&thr->ts.work_share->lock);
1239+ {
1240+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1241+ GFS_STATIC, chunk_size);
1242+ gomp_work_share_init_done ();
1243+ }
1244
1245 return !gomp_iter_static_next (istart, iend);
1246 }
1247@@ -84,13 +121,16 @@ gomp_loop_dynamic_start (long start, lon
1248 bool ret;
1249
1250 if (gomp_work_share_start (false))
1251- gomp_loop_init (thr->ts.work_share, start, end, incr,
1252- GFS_DYNAMIC, chunk_size);
1253+ {
1254+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1255+ GFS_DYNAMIC, chunk_size);
1256+ gomp_work_share_init_done ();
1257+ }
1258
1259 #ifdef HAVE_SYNC_BUILTINS
1260- gomp_mutex_unlock (&thr->ts.work_share->lock);
1261 ret = gomp_iter_dynamic_next (istart, iend);
1262 #else
1263+ gomp_mutex_lock (&thr->ts.work_share->lock);
1264 ret = gomp_iter_dynamic_next_locked (istart, iend);
1265 gomp_mutex_unlock (&thr->ts.work_share->lock);
1266 #endif
1267@@ -106,13 +146,16 @@ gomp_loop_guided_start (long start, long
1268 bool ret;
1269
1270 if (gomp_work_share_start (false))
1271- gomp_loop_init (thr->ts.work_share, start, end, incr,
1272- GFS_GUIDED, chunk_size);
1273+ {
1274+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1275+ GFS_GUIDED, chunk_size);
1276+ gomp_work_share_init_done ();
1277+ }
1278
1279 #ifdef HAVE_SYNC_BUILTINS
1280- gomp_mutex_unlock (&thr->ts.work_share->lock);
1281 ret = gomp_iter_guided_next (istart, iend);
1282 #else
1283+ gomp_mutex_lock (&thr->ts.work_share->lock);
1284 ret = gomp_iter_guided_next_locked (istart, iend);
1285 gomp_mutex_unlock (&thr->ts.work_share->lock);
1286 #endif
1287@@ -149,13 +192,14 @@ gomp_loop_ordered_static_start (long sta
1288 {
1289 struct gomp_thread *thr = gomp_thread ();
1290
1291+ thr->ts.static_trip = 0;
1292 if (gomp_work_share_start (true))
1293 {
1294 gomp_loop_init (thr->ts.work_share, start, end, incr,
1295 GFS_STATIC, chunk_size);
1296 gomp_ordered_static_init ();
1297+ gomp_work_share_init_done ();
1298 }
1299- gomp_mutex_unlock (&thr->ts.work_share->lock);
1300
1301 return !gomp_iter_static_next (istart, iend);
1302 }
1303@@ -168,8 +212,14 @@ gomp_loop_ordered_dynamic_start (long st
1304 bool ret;
1305
1306 if (gomp_work_share_start (true))
1307- gomp_loop_init (thr->ts.work_share, start, end, incr,
1308- GFS_DYNAMIC, chunk_size);
1309+ {
1310+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1311+ GFS_DYNAMIC, chunk_size);
1312+ gomp_mutex_lock (&thr->ts.work_share->lock);
1313+ gomp_work_share_init_done ();
1314+ }
1315+ else
1316+ gomp_mutex_lock (&thr->ts.work_share->lock);
1317
1318 ret = gomp_iter_dynamic_next_locked (istart, iend);
1319 if (ret)
1320@@ -187,8 +237,14 @@ gomp_loop_ordered_guided_start (long sta
1321 bool ret;
1322
1323 if (gomp_work_share_start (true))
1324- gomp_loop_init (thr->ts.work_share, start, end, incr,
1325- GFS_GUIDED, chunk_size);
1326+ {
1327+ gomp_loop_init (thr->ts.work_share, start, end, incr,
1328+ GFS_GUIDED, chunk_size);
1329+ gomp_mutex_lock (&thr->ts.work_share->lock);
1330+ gomp_work_share_init_done ();
1331+ }
1332+ else
1333+ gomp_mutex_lock (&thr->ts.work_share->lock);
1334
1335 ret = gomp_iter_guided_next_locked (istart, iend);
1336 if (ret)
1337@@ -375,12 +431,12 @@ gomp_parallel_loop_start (void (*fn) (vo
1338 long incr, enum gomp_schedule_type sched,
1339 long chunk_size)
1340 {
1341- struct gomp_work_share *ws;
1342+ struct gomp_team *team;
1343
1344 num_threads = gomp_resolve_num_threads (num_threads);
1345- ws = gomp_new_work_share (false, num_threads);
1346- gomp_loop_init (ws, start, end, incr, sched, chunk_size);
1347- gomp_team_start (fn, data, num_threads, ws);
1348+ team = gomp_new_team (num_threads);
1349+ gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
1350+ gomp_team_start (fn, data, num_threads, team);
1351 }
1352
1353 void
1354--- libgomp/Makefile.in.jj 2008-01-10 20:53:47.000000000 +0100
1355+++ libgomp/Makefile.in 2008-03-26 18:51:01.000000000 +0100
1356@@ -83,7 +83,7 @@ libgomp_la_LIBADD =
1357 am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
1358 error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
1359 single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
1360- bar.lo time.lo fortran.lo affinity.lo
1361+ bar.lo ptrlock.lo time.lo fortran.lo affinity.lo
1362 libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
1363 DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
1364 depcomp = $(SHELL) $(top_srcdir)/../depcomp
1365@@ -292,7 +292,7 @@ libgomp_version_info = -version-info $(l
1366 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
1367 libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
1368 loop.c ordered.c parallel.c sections.c single.c team.c work.c \
1369- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
1370+ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
1371
1372 nodist_noinst_HEADERS = libgomp_f.h
1373 nodist_libsubinclude_HEADERS = omp.h
1374@@ -434,6 +434,7 @@ distclean-compile:
1375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordered.Plo@am__quote@
1376 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@
1377 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc.Plo@am__quote@
1378+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrlock.Plo@am__quote@
1379 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sections.Plo@am__quote@
1380 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem.Plo@am__quote@
1381 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@
1382--- libgomp/testsuite/libgomp.c/loop-4.c.jj 2008-03-26 18:47:04.000000000 +0100
1383+++ libgomp/testsuite/libgomp.c/loop-4.c 2008-03-26 18:47:04.000000000 +0100
1384@@ -0,0 +1,28 @@
1385+/* { dg-do run } */
1386+
1387+extern void abort (void);
1388+
1389+int
1390+main (void)
1391+{
1392+ int e = 0;
1393+#pragma omp parallel num_threads (4) reduction(+:e)
1394+ {
1395+ long i;
1396+ #pragma omp for schedule(dynamic,1)
1397+ for (i = __LONG_MAX__ - 30001; i <= __LONG_MAX__ - 10001; i += 10000)
1398+ if (i != __LONG_MAX__ - 30001
1399+ && i != __LONG_MAX__ - 20001
1400+ && i != __LONG_MAX__ - 10001)
1401+ e = 1;
1402+ #pragma omp for schedule(dynamic,1)
1403+ for (i = -__LONG_MAX__ + 30000; i >= -__LONG_MAX__ + 10000; i -= 10000)
1404+ if (i != -__LONG_MAX__ + 30000
1405+ && i != -__LONG_MAX__ + 20000
1406+ && i != -__LONG_MAX__ + 10000)
1407+ e = 1;
1408+ }
1409+ if (e)
1410+ abort ();
1411+ return 0;
1412+}
1413--- libgomp/Makefile.am.jj 2007-12-07 14:41:01.000000000 +0100
1414+++ libgomp/Makefile.am 2008-03-26 15:15:19.000000000 +0100
1415@@ -31,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i
1416
1417 libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
1418 loop.c ordered.c parallel.c sections.c single.c team.c work.c \
1419- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
1420+ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
1421
1422 nodist_noinst_HEADERS = libgomp_f.h
1423 nodist_libsubinclude_HEADERS = omp.h
1424--- libgomp/team.c.jj 2007-12-07 14:41:01.000000000 +0100
1425+++ libgomp/team.c 2008-03-27 12:22:26.000000000 +0100
1426@@ -94,7 +94,7 @@ gomp_thread_start (void *xdata)
1427 {
1428 gomp_barrier_wait (&thr->ts.team->barrier);
1429 local_fn (local_data);
1430- gomp_barrier_wait (&thr->ts.team->barrier);
1431+ gomp_barrier_wait_last (&thr->ts.team->barrier);
1432 }
1433 else
1434 {
1435@@ -114,11 +114,10 @@ gomp_thread_start (void *xdata)
1436 thr->data = NULL;
1437 thr->ts.team = NULL;
1438 thr->ts.work_share = NULL;
1439+ thr->ts.last_work_share = NULL;
1440 thr->ts.team_id = 0;
1441- thr->ts.work_share_generation = 0;
1442- thr->ts.static_trip = 0;
1443
1444- gomp_barrier_wait (&team->barrier);
1445+ gomp_barrier_wait_last (&team->barrier);
1446 gomp_barrier_wait (&gomp_threads_dock);
1447
1448 local_fn = thr->fn;
1449@@ -133,21 +132,29 @@ gomp_thread_start (void *xdata)
1450
1451 /* Create a new team data structure. */
1452
1453-static struct gomp_team *
1454-new_team (unsigned nthreads, struct gomp_work_share *work_share)
1455+struct gomp_team *
1456+gomp_new_team (unsigned nthreads)
1457 {
1458 struct gomp_team *team;
1459 size_t size;
1460+ int i;
1461
1462 size = sizeof (*team) + nthreads * sizeof (team->ordered_release[0]);
1463 team = gomp_malloc (size);
1464- gomp_mutex_init (&team->work_share_lock);
1465
1466- team->work_shares = gomp_malloc (4 * sizeof (struct gomp_work_share *));
1467- team->generation_mask = 3;
1468- team->oldest_live_gen = work_share == NULL;
1469- team->num_live_gen = work_share != NULL;
1470- team->work_shares[0] = work_share;
1471+ team->work_share_chunk = 8;
1472+#ifdef HAVE_SYNC_BUILTINS
1473+ team->single_count = 0;
1474+#else
1475+ gomp_mutex_init (&team->work_share_list_free_lock);
1476+#endif
1477+ gomp_init_work_share (&team->work_shares[0], false, nthreads);
1478+ team->work_shares[0].next_alloc = NULL;
1479+ team->work_share_list_free = NULL;
1480+ team->work_share_list_alloc = &team->work_shares[1];
1481+ for (i = 1; i < 7; i++)
1482+ team->work_shares[i].next_free = &team->work_shares[i + 1];
1483+ team->work_shares[i].next_free = NULL;
1484
1485 team->nthreads = nthreads;
1486 gomp_barrier_init (&team->barrier, nthreads);
1487@@ -164,10 +171,22 @@ new_team (unsigned nthreads, struct gomp
1488 static void
1489 free_team (struct gomp_team *team)
1490 {
1491- free (team->work_shares);
1492- gomp_mutex_destroy (&team->work_share_lock);
1493+ if (__builtin_expect (team->work_shares[0].next_alloc != NULL, 0))
1494+ {
1495+ struct gomp_work_share *ws = team->work_shares[0].next_alloc;
1496+ do
1497+ {
1498+ struct gomp_work_share *next_ws = ws->next_alloc;
1499+ free (ws);
1500+ ws = next_ws;
1501+ }
1502+ while (ws != NULL);
1503+ }
1504 gomp_barrier_destroy (&team->barrier);
1505 gomp_sem_destroy (&team->master_release);
1506+#ifndef HAVE_SYNC_BUILTINS
1507+ gomp_mutex_destroy (&team->work_share_list_free_lock);
1508+#endif
1509 free (team);
1510 }
1511
1512@@ -176,11 +195,10 @@ free_team (struct gomp_team *team)
1513
1514 void
1515 gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
1516- struct gomp_work_share *work_share)
1517+ struct gomp_team *team)
1518 {
1519 struct gomp_thread_start_data *start_data;
1520 struct gomp_thread *thr, *nthr;
1521- struct gomp_team *team;
1522 bool nested;
1523 unsigned i, n, old_threads_used = 0;
1524 pthread_attr_t thread_attr, *attr;
1525@@ -188,17 +206,18 @@ gomp_team_start (void (*fn) (void *), vo
1526 thr = gomp_thread ();
1527 nested = thr->ts.team != NULL;
1528
1529- team = new_team (nthreads, work_share);
1530-
1531 /* Always save the previous state, even if this isn't a nested team.
1532 In particular, we should save any work share state from an outer
1533 orphaned work share construct. */
1534 team->prev_ts = thr->ts;
1535
1536 thr->ts.team = team;
1537- thr->ts.work_share = work_share;
1538 thr->ts.team_id = 0;
1539- thr->ts.work_share_generation = 0;
1540+ thr->ts.work_share = &team->work_shares[0];
1541+ thr->ts.last_work_share = NULL;
1542+#ifdef HAVE_SYNC_BUILTINS
1543+ thr->ts.single_count = 0;
1544+#endif
1545 thr->ts.static_trip = 0;
1546
1547 if (nthreads == 1)
1548@@ -241,9 +260,12 @@ gomp_team_start (void (*fn) (void *), vo
1549 {
1550 nthr = gomp_threads[i];
1551 nthr->ts.team = team;
1552- nthr->ts.work_share = work_share;
1553+ nthr->ts.work_share = &team->work_shares[0];
1554+ nthr->ts.last_work_share = NULL;
1555 nthr->ts.team_id = i;
1556- nthr->ts.work_share_generation = 0;
1557+#ifdef HAVE_SYNC_BUILTINS
1558+ nthr->ts.single_count = 0;
1559+#endif
1560 nthr->ts.static_trip = 0;
1561 nthr->fn = fn;
1562 nthr->data = data;
1563@@ -266,8 +288,24 @@ gomp_team_start (void (*fn) (void *), vo
1564 }
1565 }
1566
1567+ if (__builtin_expect (nthreads > old_threads_used, 0))
1568+ {
1569+ long diff = (long) nthreads - (long) old_threads_used;
1570+
1571+ if (old_threads_used == 0)
1572+ --diff;
1573+
1574+#ifdef HAVE_SYNC_BUILTINS
1575+ __sync_fetch_and_add (&gomp_managed_threads, diff);
1576+#else
1577+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1578+ gomp_managed_threads += diff;
1579+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1580+#endif
1581+ }
1582+
1583 attr = &gomp_thread_attr;
1584- if (gomp_cpu_affinity != NULL)
1585+ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
1586 {
1587 size_t stacksize;
1588 pthread_attr_init (&thread_attr);
1589@@ -287,9 +325,12 @@ gomp_team_start (void (*fn) (void *), vo
1590 int err;
1591
1592 start_data->ts.team = team;
1593- start_data->ts.work_share = work_share;
1594+ start_data->ts.work_share = &team->work_shares[0];
1595+ start_data->ts.last_work_share = NULL;
1596 start_data->ts.team_id = i;
1597- start_data->ts.work_share_generation = 0;
1598+#ifdef HAVE_SYNC_BUILTINS
1599+ start_data->ts.single_count = 0;
1600+#endif
1601 start_data->ts.static_trip = 0;
1602 start_data->fn = fn;
1603 start_data->fn_data = data;
1604@@ -303,7 +344,7 @@ gomp_team_start (void (*fn) (void *), vo
1605 gomp_fatal ("Thread creation failed: %s", strerror (err));
1606 }
1607
1608- if (gomp_cpu_affinity != NULL)
1609+ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
1610 pthread_attr_destroy (&thread_attr);
1611
1612 do_release:
1613@@ -313,8 +354,20 @@ gomp_team_start (void (*fn) (void *), vo
1614 that should arrive back at the end of this team. The extra
1615 threads should be exiting. Note that we arrange for this test
1616 to never be true for nested teams. */
1617- if (nthreads < old_threads_used)
1618- gomp_barrier_reinit (&gomp_threads_dock, nthreads);
1619+ if (__builtin_expect (nthreads < old_threads_used, 0))
1620+ {
1621+ long diff = (long) nthreads - (long) old_threads_used;
1622+
1623+ gomp_barrier_reinit (&gomp_threads_dock, nthreads);
1624+
1625+#ifdef HAVE_SYNC_BUILTINS
1626+ __sync_fetch_and_add (&gomp_managed_threads, diff);
1627+#else
1628+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1629+ gomp_managed_threads += diff;
1630+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1631+#endif
1632+ }
1633 }
1634
1635
1636@@ -329,8 +382,21 @@ gomp_team_end (void)
1637
1638 gomp_barrier_wait (&team->barrier);
1639
1640+ gomp_fini_work_share (thr->ts.work_share);
1641+
1642 thr->ts = team->prev_ts;
1643
1644+ if (__builtin_expect (thr->ts.team != NULL, 0))
1645+ {
1646+#ifdef HAVE_SYNC_BUILTINS
1647+ __sync_fetch_and_add (&gomp_managed_threads, 1L - team->nthreads);
1648+#else
1649+ gomp_mutex_lock (&gomp_remaining_threads_lock);
1650+ gomp_managed_threads -= team->nthreads - 1L;
1651+ gomp_mutex_unlock (&gomp_remaining_threads_lock);
1652+#endif
1653+ }
1654+
1655 free_team (team);
1656 }
1657
1658--- libgomp/config/posix/bar.h.jj 2007-12-07 14:41:01.000000000 +0100
1659+++ libgomp/config/posix/bar.h 2008-03-26 15:11:32.000000000 +0100
1660@@ -1,4 +1,4 @@
1661-/* Copyright (C) 2005 Free Software Foundation, Inc.
1662+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1663 Contributed by Richard Henderson <rth@redhat.com>.
1664
1665 This file is part of the GNU OpenMP Library (libgomp).
1666@@ -46,18 +46,32 @@ typedef struct
1667 unsigned total;
1668 unsigned arrived;
1669 } gomp_barrier_t;
1670+typedef bool gomp_barrier_state_t;
1671
1672 extern void gomp_barrier_init (gomp_barrier_t *, unsigned);
1673 extern void gomp_barrier_reinit (gomp_barrier_t *, unsigned);
1674 extern void gomp_barrier_destroy (gomp_barrier_t *);
1675
1676 extern void gomp_barrier_wait (gomp_barrier_t *);
1677-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
1678+extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
1679
1680-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
1681+static inline gomp_barrier_state_t
1682+gomp_barrier_wait_start (gomp_barrier_t *bar)
1683 {
1684 gomp_mutex_lock (&bar->mutex1);
1685 return ++bar->arrived == bar->total;
1686 }
1687
1688+static inline bool
1689+gomp_barrier_last_thread (gomp_barrier_state_t state)
1690+{
1691+ return state;
1692+}
1693+
1694+static inline void
1695+gomp_barrier_wait_last (gomp_barrier_t *bar)
1696+{
1697+ gomp_barrier_wait (bar);
1698+}
1699+
1700 #endif /* GOMP_BARRIER_H */
1701--- libgomp/config/posix/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
1702+++ libgomp/config/posix/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
1703@@ -0,0 +1,69 @@
1704+/* Copyright (C) 2008 Free Software Foundation, Inc.
1705+ Contributed by Jakub Jelinek <jakub@redhat.com>.
1706+
1707+ This file is part of the GNU OpenMP Library (libgomp).
1708+
1709+ Libgomp is free software; you can redistribute it and/or modify it
1710+ under the terms of the GNU Lesser General Public License as published by
1711+ the Free Software Foundation; either version 2.1 of the License, or
1712+ (at your option) any later version.
1713+
1714+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
1715+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1716+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
1717+ more details.
1718+
1719+ You should have received a copy of the GNU Lesser General Public License
1720+ along with libgomp; see the file COPYING.LIB. If not, write to the
1721+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1722+ MA 02110-1301, USA. */
1723+
1724+/* As a special exception, if you link this library with other files, some
1725+ of which are compiled with GCC, to produce an executable, this library
1726+ does not by itself cause the resulting executable to be covered by the
1727+ GNU General Public License. This exception does not however invalidate
1728+ any other reasons why the executable file might be covered by the GNU
1729+ General Public License. */
1730+
1731+/* This is a Linux specific implementation of a mutex synchronization
1732+ mechanism for libgomp. This type is private to the library. This
1733+ implementation uses atomic instructions and the futex syscall. */
1734+
1735+#ifndef GOMP_PTRLOCK_H
1736+#define GOMP_PTRLOCK_H 1
1737+
1738+typedef struct { void *ptr; gomp_mutex_t lock; } gomp_ptrlock_t;
1739+
1740+static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
1741+{
1742+ ptrlock->ptr = ptr;
1743+ gomp_mutex_init (&ptrlock->lock);
1744+}
1745+
1746+static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
1747+{
1748+ if (ptrlock->ptr != NULL)
1749+ return ptrlock->ptr;
1750+
1751+ gomp_mutex_lock (&ptrlock->lock);
1752+ if (ptrlock->ptr != NULL)
1753+ {
1754+ gomp_mutex_unlock (&ptrlock->lock);
1755+ return ptrlock->ptr;
1756+ }
1757+
1758+ return NULL;
1759+}
1760+
1761+static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
1762+{
1763+ ptrlock->ptr = ptr;
1764+ gomp_mutex_unlock (&ptrlock->lock);
1765+}
1766+
1767+static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
1768+{
1769+ gomp_mutex_destroy (&ptrlock->lock);
1770+}
1771+
1772+#endif /* GOMP_PTRLOCK_H */
1773--- libgomp/config/posix/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
1774+++ libgomp/config/posix/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
1775@@ -0,0 +1 @@
1776+/* Everything is in the header. */
1777--- libgomp/config/posix/bar.c.jj 2007-12-07 14:41:01.000000000 +0100
1778+++ libgomp/config/posix/bar.c 2008-03-26 15:11:32.000000000 +0100
1779@@ -1,4 +1,4 @@
1780-/* Copyright (C) 2005 Free Software Foundation, Inc.
1781+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1782 Contributed by Richard Henderson <rth@redhat.com>.
1783
1784 This file is part of the GNU OpenMP Library (libgomp).
1785@@ -70,7 +70,7 @@ gomp_barrier_reinit (gomp_barrier_t *bar
1786 }
1787
1788 void
1789-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
1790+gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t last)
1791 {
1792 unsigned int n;
1793
1794--- libgomp/config/linux/alpha/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
1795+++ libgomp/config/linux/alpha/futex.h 2008-03-26 15:11:32.000000000 +0100
1796@@ -1,4 +1,4 @@
1797-/* Copyright (C) 2005 Free Software Foundation, Inc.
1798+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1799 Contributed by Richard Henderson <rth@redhat.com>.
1800
1801 This file is part of the GNU OpenMP Library (libgomp).
1802@@ -30,8 +30,6 @@
1803 #ifndef SYS_futex
1804 #define SYS_futex 394
1805 #endif
1806-#define FUTEX_WAIT 0
1807-#define FUTEX_WAKE 1
1808
1809
1810 static inline void
1811@@ -45,7 +43,7 @@ futex_wait (int *addr, int val)
1812
1813 sc_0 = SYS_futex;
1814 sc_16 = (long) addr;
1815- sc_17 = FUTEX_WAIT;
1816+ sc_17 = gomp_futex_wait;
1817 sc_18 = val;
1818 sc_19 = 0;
1819 __asm volatile ("callsys"
1820@@ -53,6 +51,20 @@ futex_wait (int *addr, int val)
1821 : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18), "1"(sc_19)
1822 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1823 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1824+ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
1825+ {
1826+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
1827+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
1828+ sc_0 = SYS_futex;
1829+ sc_17 &= ~FUTEX_PRIVATE_FLAG;
1830+ sc_19 = 0;
1831+ __asm volatile ("callsys"
1832+ : "=r" (sc_0), "=r"(sc_19)
1833+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18),
1834+ "1"(sc_19)
1835+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1836+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1837+ }
1838 }
1839
1840 static inline void
1841@@ -66,11 +78,35 @@ futex_wake (int *addr, int count)
1842
1843 sc_0 = SYS_futex;
1844 sc_16 = (long) addr;
1845- sc_17 = FUTEX_WAKE;
1846+ sc_17 = gomp_futex_wake;
1847 sc_18 = count;
1848 __asm volatile ("callsys"
1849 : "=r" (sc_0), "=r"(sc_19)
1850 : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
1851 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1852 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1853+ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
1854+ {
1855+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
1856+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
1857+ sc_0 = SYS_futex;
1858+ sc_17 &= ~FUTEX_PRIVATE_FLAG;
1859+ __asm volatile ("callsys"
1860+ : "=r" (sc_0), "=r"(sc_19)
1861+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
1862+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
1863+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
1864+ }
1865+}
1866+
1867+static inline void
1868+cpu_relax (void)
1869+{
1870+ __asm volatile ("" : : : "memory");
1871+}
1872+
1873+static inline void
1874+atomic_write_barrier (void)
1875+{
1876+ __asm volatile ("wmb" : : : "memory");
1877 }
1878--- libgomp/config/linux/affinity.c.jj 2007-12-07 14:41:00.000000000 +0100
1879+++ libgomp/config/linux/affinity.c 2008-03-26 15:11:32.000000000 +0100
1880@@ -1,4 +1,4 @@
1881-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
1882+/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
1883 Contributed by Jakub Jelinek <jakub@redhat.com>.
1884
1885 This file is part of the GNU OpenMP Library (libgomp).
1886@@ -38,9 +38,6 @@
1887 #ifdef HAVE_PTHREAD_AFFINITY_NP
1888
1889 static unsigned int affinity_counter;
1890-#ifndef HAVE_SYNC_BUILTINS
1891-static gomp_mutex_t affinity_lock;
1892-#endif
1893
1894 void
1895 gomp_init_affinity (void)
1896@@ -76,9 +73,6 @@ gomp_init_affinity (void)
1897 CPU_SET (gomp_cpu_affinity[0], &cpuset);
1898 pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
1899 affinity_counter = 1;
1900-#ifndef HAVE_SYNC_BUILTINS
1901- gomp_mutex_init (&affinity_lock);
1902-#endif
1903 }
1904
1905 void
1906@@ -87,13 +81,7 @@ gomp_init_thread_affinity (pthread_attr_
1907 unsigned int cpu;
1908 cpu_set_t cpuset;
1909
1910-#ifdef HAVE_SYNC_BUILTINS
1911 cpu = __sync_fetch_and_add (&affinity_counter, 1);
1912-#else
1913- gomp_mutex_lock (&affinity_lock);
1914- cpu = affinity_counter++;
1915- gomp_mutex_unlock (&affinity_lock);
1916-#endif
1917 cpu %= gomp_cpu_affinity_len;
1918 CPU_ZERO (&cpuset);
1919 CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
1920--- libgomp/config/linux/bar.h.jj 2007-12-07 14:41:00.000000000 +0100
1921+++ libgomp/config/linux/bar.h 2008-03-26 15:11:32.000000000 +0100
1922@@ -1,4 +1,4 @@
1923-/* Copyright (C) 2005 Free Software Foundation, Inc.
1924+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
1925 Contributed by Richard Henderson <rth@redhat.com>.
1926
1927 This file is part of the GNU OpenMP Library (libgomp).
1928@@ -36,40 +36,49 @@
1929
1930 typedef struct
1931 {
1932- gomp_mutex_t mutex;
1933- unsigned total;
1934- unsigned arrived;
1935- int generation;
1936+ /* Make sure total/generation is in a mostly read cacheline, while
1937+ awaited in a separate cacheline. */
1938+ unsigned total __attribute__((aligned (64)));
1939+ unsigned generation;
1940+ unsigned awaited __attribute__((aligned (64)));
1941 } gomp_barrier_t;
1942+typedef unsigned int gomp_barrier_state_t;
1943
1944 static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
1945 {
1946- gomp_mutex_init (&bar->mutex);
1947 bar->total = count;
1948- bar->arrived = 0;
1949+ bar->awaited = count;
1950 bar->generation = 0;
1951 }
1952
1953 static inline void gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count)
1954 {
1955- gomp_mutex_lock (&bar->mutex);
1956+ __sync_fetch_and_add (&bar->awaited, count - bar->total);
1957 bar->total = count;
1958- gomp_mutex_unlock (&bar->mutex);
1959 }
1960
1961 static inline void gomp_barrier_destroy (gomp_barrier_t *bar)
1962 {
1963- /* Before destroying, make sure all threads have left the barrier. */
1964- gomp_mutex_lock (&bar->mutex);
1965 }
1966
1967 extern void gomp_barrier_wait (gomp_barrier_t *);
1968-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
1969+extern void gomp_barrier_wait_last (gomp_barrier_t *);
1970+extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
1971
1972-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
1973+static inline gomp_barrier_state_t
1974+gomp_barrier_wait_start (gomp_barrier_t *bar)
1975 {
1976- gomp_mutex_lock (&bar->mutex);
1977- return ++bar->arrived == bar->total;
1978+ unsigned int ret = bar->generation;
1979+ /* Do we need any barrier here or is __sync_add_and_fetch acting
1980+ as the needed LoadLoad barrier already? */
1981+ ret += __sync_add_and_fetch (&bar->awaited, -1) == 0;
1982+ return ret;
1983+}
1984+
1985+static inline bool
1986+gomp_barrier_last_thread (gomp_barrier_state_t state)
1987+{
1988+ return state & 1;
1989 }
1990
1991 #endif /* GOMP_BARRIER_H */
1992--- libgomp/config/linux/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
1993+++ libgomp/config/linux/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
1994@@ -0,0 +1,65 @@
1995+/* Copyright (C) 2008 Free Software Foundation, Inc.
1996+ Contributed by Jakub Jelinek <jakub@redhat.com>.
1997+
1998+ This file is part of the GNU OpenMP Library (libgomp).
1999+
2000+ Libgomp is free software; you can redistribute it and/or modify it
2001+ under the terms of the GNU Lesser General Public License as published by
2002+ the Free Software Foundation; either version 2.1 of the License, or
2003+ (at your option) any later version.
2004+
2005+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2006+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2007+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2008+ more details.
2009+
2010+ You should have received a copy of the GNU Lesser General Public License
2011+ along with libgomp; see the file COPYING.LIB. If not, write to the
2012+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2013+ MA 02110-1301, USA. */
2014+
2015+/* As a special exception, if you link this library with other files, some
2016+ of which are compiled with GCC, to produce an executable, this library
2017+ does not by itself cause the resulting executable to be covered by the
2018+ GNU General Public License. This exception does not however invalidate
2019+ any other reasons why the executable file might be covered by the GNU
2020+ General Public License. */
2021+
2022+/* This is a Linux specific implementation of a mutex synchronization
2023+ mechanism for libgomp. This type is private to the library. This
2024+ implementation uses atomic instructions and the futex syscall. */
2025+
2026+#ifndef GOMP_PTRLOCK_H
2027+#define GOMP_PTRLOCK_H 1
2028+
2029+typedef void *gomp_ptrlock_t;
2030+
2031+static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
2032+{
2033+ *ptrlock = ptr;
2034+}
2035+
2036+extern void *gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock);
2037+static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
2038+{
2039+ if ((uintptr_t) *ptrlock > 2)
2040+ return *ptrlock;
2041+
2042+ if (__sync_bool_compare_and_swap (ptrlock, NULL, (uintptr_t) 1))
2043+ return NULL;
2044+
2045+ return gomp_ptrlock_get_slow (ptrlock);
2046+}
2047+
2048+extern void gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr);
2049+static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
2050+{
2051+ if (!__sync_bool_compare_and_swap (ptrlock, (uintptr_t) 1, ptr))
2052+ gomp_ptrlock_set_slow (ptrlock, ptr);
2053+}
2054+
2055+static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
2056+{
2057+}
2058+
2059+#endif /* GOMP_PTRLOCK_H */
2060--- libgomp/config/linux/lock.c.jj 2007-12-07 14:41:00.000000000 +0100
2061+++ libgomp/config/linux/lock.c 2008-03-26 15:11:32.000000000 +0100
2062@@ -29,11 +29,10 @@
2063 primitives. This implementation uses atomic instructions and the futex
2064 syscall. */
2065
2066-#include "libgomp.h"
2067 #include <string.h>
2068 #include <unistd.h>
2069 #include <sys/syscall.h>
2070-#include "futex.h"
2071+#include "wait.h"
2072
2073
2074 /* The internal gomp_mutex_t and the external non-recursive omp_lock_t
2075@@ -137,7 +136,7 @@ omp_set_nest_lock (omp_nest_lock_t *lock
2076 return;
2077 }
2078
2079- futex_wait (&lock->owner, otid);
2080+ do_wait (&lock->owner, otid);
2081 }
2082 }
2083
2084--- libgomp/config/linux/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
2085+++ libgomp/config/linux/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
2086@@ -0,0 +1,70 @@
2087+/* Copyright (C) 2008 Free Software Foundation, Inc.
2088+ Contributed by Jakub Jelinek <jakub@redhat.com>.
2089+
2090+ This file is part of the GNU OpenMP Library (libgomp).
2091+
2092+ Libgomp is free software; you can redistribute it and/or modify it
2093+ under the terms of the GNU Lesser General Public License as published by
2094+ the Free Software Foundation; either version 2.1 of the License, or
2095+ (at your option) any later version.
2096+
2097+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2098+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2099+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2100+ more details.
2101+
2102+ You should have received a copy of the GNU Lesser General Public License
2103+ along with libgomp; see the file COPYING.LIB. If not, write to the
2104+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2105+ MA 02110-1301, USA. */
2106+
2107+/* As a special exception, if you link this library with other files, some
2108+ of which are compiled with GCC, to produce an executable, this library
2109+ does not by itself cause the resulting executable to be covered by the
2110+ GNU General Public License. This exception does not however invalidate
2111+ any other reasons why the executable file might be covered by the GNU
2112+ General Public License. */
2113+
2114+/* This is a Linux specific implementation of a mutex synchronization
2115+ mechanism for libgomp. This type is private to the library. This
2116+ implementation uses atomic instructions and the futex syscall. */
2117+
2118+#include <endian.h>
2119+#include <limits.h>
2120+#include "wait.h"
2121+
2122+void *
2123+gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock)
2124+{
2125+ int *intptr;
2126+ __sync_bool_compare_and_swap (ptrlock, 1, 2);
2127+
2128+ /* futex works on ints, not pointers.
2129+ But a valid work share pointer will be at least
2130+ 8 byte aligned, so it is safe to assume the low
2131+ 32-bits of the pointer won't contain values 1 or 2. */
2132+ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
2133+#if __BYTE_ORDER == __BIG_ENDIAN
2134+ if (sizeof (*ptrlock) > sizeof (int))
2135+ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
2136+#endif
2137+ do
2138+ do_wait (intptr, 2);
2139+ while (*intptr == 2);
2140+ __asm volatile ("" : : : "memory");
2141+ return *ptrlock;
2142+}
2143+
2144+void
2145+gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr)
2146+{
2147+ int *intptr;
2148+
2149+ *ptrlock = ptr;
2150+ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
2151+#if __BYTE_ORDER == __BIG_ENDIAN
2152+ if (sizeof (*ptrlock) > sizeof (int))
2153+ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
2154+#endif
2155+ futex_wake (intptr, INT_MAX);
2156+}
2157--- libgomp/config/linux/x86/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2158+++ libgomp/config/linux/x86/futex.h 2008-03-26 15:11:32.000000000 +0100
2159@@ -1,4 +1,4 @@
2160-/* Copyright (C) 2005 Free Software Foundation, Inc.
2161+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2162 Contributed by Richard Henderson <rth@redhat.com>.
2163
2164 This file is part of the GNU OpenMP Library (libgomp).
2165@@ -27,9 +27,6 @@
2166
2167 /* Provide target-specific access to the futex system call. */
2168
2169-#define FUTEX_WAIT 0
2170-#define FUTEX_WAKE 1
2171-
2172 #ifdef __LP64__
2173 # ifndef SYS_futex
2174 # define SYS_futex 202
2175@@ -38,14 +35,26 @@
2176 static inline void
2177 futex_wait (int *addr, int val)
2178 {
2179- register long r10 __asm__("%r10") = 0;
2180+ register long r10 __asm__("%r10");
2181 long res;
2182
2183+ r10 = 0;
2184 __asm volatile ("syscall"
2185 : "=a" (res)
2186- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAIT),
2187- "d"(val), "r"(r10)
2188+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
2189+ "d" (val), "r" (r10)
2190 : "r11", "rcx", "memory");
2191+ if (__builtin_expect (res == -ENOSYS, 0))
2192+ {
2193+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2194+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2195+ r10 = 0;
2196+ __asm volatile ("syscall"
2197+ : "=a" (res)
2198+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
2199+ "d" (val), "r" (r10)
2200+ : "r11", "rcx", "memory");
2201+ }
2202 }
2203
2204 static inline void
2205@@ -55,8 +64,19 @@ futex_wake (int *addr, int count)
2206
2207 __asm volatile ("syscall"
2208 : "=a" (res)
2209- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAKE), "d"(count)
2210+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
2211+ "d" (count)
2212 : "r11", "rcx", "memory");
2213+ if (__builtin_expect (res == -ENOSYS, 0))
2214+ {
2215+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2216+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2217+ __asm volatile ("syscall"
2218+ : "=a" (res)
2219+ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
2220+ "d" (count)
2221+ : "r11", "rcx", "memory");
2222+ }
2223 }
2224 #else
2225 # ifndef SYS_futex
2226@@ -65,7 +85,7 @@ futex_wake (int *addr, int count)
2227
2228 # ifdef __PIC__
2229
2230-static inline void
2231+static inline long
2232 sys_futex0 (int *addr, int op, int val)
2233 {
2234 long res;
2235@@ -77,11 +97,12 @@ sys_futex0 (int *addr, int op, int val)
2236 : "0"(SYS_futex), "r" (addr), "c"(op),
2237 "d"(val), "S"(0)
2238 : "memory");
2239+ return res;
2240 }
2241
2242 # else
2243
2244-static inline void
2245+static inline long
2246 sys_futex0 (int *addr, int op, int val)
2247 {
2248 long res;
2249@@ -91,6 +112,7 @@ sys_futex0 (int *addr, int op, int val)
2250 : "0"(SYS_futex), "b" (addr), "c"(op),
2251 "d"(val), "S"(0)
2252 : "memory");
2253+ return res;
2254 }
2255
2256 # endif /* __PIC__ */
2257@@ -98,13 +120,37 @@ sys_futex0 (int *addr, int op, int val)
2258 static inline void
2259 futex_wait (int *addr, int val)
2260 {
2261- sys_futex0 (addr, FUTEX_WAIT, val);
2262+ long res = sys_futex0 (addr, gomp_futex_wait, val);
2263+ if (__builtin_expect (res == -ENOSYS, 0))
2264+ {
2265+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2266+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2267+ sys_futex0 (addr, gomp_futex_wait, val);
2268+ }
2269 }
2270
2271 static inline void
2272 futex_wake (int *addr, int count)
2273 {
2274- sys_futex0 (addr, FUTEX_WAKE, count);
2275+ long res = sys_futex0 (addr, gomp_futex_wake, count);
2276+ if (__builtin_expect (res == -ENOSYS, 0))
2277+ {
2278+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2279+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2280+ sys_futex0 (addr, gomp_futex_wake, count);
2281+ }
2282 }
2283
2284 #endif /* __LP64__ */
2285+
2286+static inline void
2287+cpu_relax (void)
2288+{
2289+ __asm volatile ("rep; nop" : : : "memory");
2290+}
2291+
2292+static inline void
2293+atomic_write_barrier (void)
2294+{
2295+ __sync_synchronize ();
2296+}
2297--- libgomp/config/linux/wait.h.jj 2008-03-26 15:11:32.000000000 +0100
2298+++ libgomp/config/linux/wait.h 2008-03-26 15:11:32.000000000 +0100
2299@@ -0,0 +1,68 @@
2300+/* Copyright (C) 2008 Free Software Foundation, Inc.
2301+ Contributed by Jakub Jelinek <jakub@redhat.com>.
2302+
2303+ This file is part of the GNU OpenMP Library (libgomp).
2304+
2305+ Libgomp is free software; you can redistribute it and/or modify it
2306+ under the terms of the GNU Lesser General Public License as published by
2307+ the Free Software Foundation; either version 2.1 of the License, or
2308+ (at your option) any later version.
2309+
2310+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
2311+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2312+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
2313+ more details.
2314+
2315+ You should have received a copy of the GNU Lesser General Public License
2316+ along with libgomp; see the file COPYING.LIB. If not, write to the
2317+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2318+ MA 02110-1301, USA. */
2319+
2320+/* As a special exception, if you link this library with other files, some
2321+ of which are compiled with GCC, to produce an executable, this library
2322+ does not by itself cause the resulting executable to be covered by the
2323+ GNU General Public License. This exception does not however invalidate
2324+ any other reasons why the executable file might be covered by the GNU
2325+ General Public License. */
2326+
2327+/* This is a Linux specific implementation of a mutex synchronization
2328+ mechanism for libgomp. This type is private to the library. This
2329+ implementation uses atomic instructions and the futex syscall. */
2330+
2331+#ifndef GOMP_WAIT_H
2332+#define GOMP_WAIT_H 1
2333+
2334+#include "libgomp.h"
2335+#include <errno.h>
2336+
2337+#define FUTEX_WAIT 0
2338+#define FUTEX_WAKE 1
2339+#define FUTEX_PRIVATE_FLAG 128L
2340+
2341+#ifdef HAVE_ATTRIBUTE_VISIBILITY
2342+# pragma GCC visibility push(hidden)
2343+#endif
2344+
2345+extern long int gomp_futex_wait, gomp_futex_wake;
2346+
2347+#include "futex.h"
2348+
2349+static inline void do_wait (int *addr, int val)
2350+{
2351+ unsigned long long i, count = gomp_spin_count_var;
2352+
2353+ if (__builtin_expect (gomp_managed_threads > gomp_available_cpus, 0))
2354+ count = gomp_throttled_spin_count_var;
2355+ for (i = 0; i < count; i++)
2356+ if (__builtin_expect (*addr != val, 0))
2357+ return;
2358+ else
2359+ cpu_relax ();
2360+ futex_wait (addr, val);
2361+}
2362+
2363+#ifdef HAVE_ATTRIBUTE_VISIBILITY
2364+# pragma GCC visibility pop
2365+#endif
2366+
2367+#endif /* GOMP_WAIT_H */
2368--- libgomp/config/linux/sparc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2369+++ libgomp/config/linux/sparc/futex.h 2008-03-26 15:11:32.000000000 +0100
2370@@ -1,4 +1,4 @@
2371-/* Copyright (C) 2005 Free Software Foundation, Inc.
2372+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2373 Contributed by Jakub Jelinek <jakub@redhat.com>.
2374
2375 This file is part of the GNU OpenMP Library (libgomp).
2376@@ -28,10 +28,8 @@
2377 /* Provide target-specific access to the futex system call. */
2378
2379 #include <sys/syscall.h>
2380-#define FUTEX_WAIT 0
2381-#define FUTEX_WAKE 1
2382
2383-static inline void
2384+static inline long
2385 sys_futex0 (int *addr, int op, int val)
2386 {
2387 register long int g1 __asm__ ("g1");
2388@@ -47,9 +45,9 @@ sys_futex0 (int *addr, int op, int val)
2389 o3 = 0;
2390
2391 #ifdef __arch64__
2392-# define SYSCALL_STRING "ta\t0x6d"
2393+# define SYSCALL_STRING "ta\t0x6d; bcs,a,pt %%xcc, 1f; sub %%g0, %%o0, %%o0; 1:"
2394 #else
2395-# define SYSCALL_STRING "ta\t0x10"
2396+# define SYSCALL_STRING "ta\t0x10; bcs,a 1f; sub %%g0, %%o0, %%o0; 1:"
2397 #endif
2398
2399 __asm volatile (SYSCALL_STRING
2400@@ -65,16 +63,49 @@ sys_futex0 (int *addr, int op, int val)
2401 "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",
2402 #endif
2403 "cc", "memory");
2404+ return o0;
2405 }
2406
2407 static inline void
2408 futex_wait (int *addr, int val)
2409 {
2410- sys_futex0 (addr, FUTEX_WAIT, val);
2411+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2412+ if (__builtin_expect (err == ENOSYS, 0))
2413+ {
2414+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2415+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2416+ sys_futex0 (addr, gomp_futex_wait, val);
2417+ }
2418 }
2419
2420 static inline void
2421 futex_wake (int *addr, int count)
2422 {
2423- sys_futex0 (addr, FUTEX_WAKE, count);
2424+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2425+ if (__builtin_expect (err == ENOSYS, 0))
2426+ {
2427+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2428+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2429+ sys_futex0 (addr, gomp_futex_wake, count);
2430+ }
2431+}
2432+
2433+static inline void
2434+cpu_relax (void)
2435+{
2436+#if defined __arch64__ || defined __sparc_v9__
2437+ __asm volatile ("membar #LoadLoad" : : : "memory");
2438+#else
2439+ __asm volatile ("" : : : "memory");
2440+#endif
2441+}
2442+
2443+static inline void
2444+atomic_write_barrier (void)
2445+{
2446+#if defined __arch64__ || defined __sparc_v9__
2447+ __asm volatile ("membar #StoreStore" : : : "memory");
2448+#else
2449+ __sync_synchronize ();
2450+#endif
2451 }
2452--- libgomp/config/linux/ia64/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2453+++ libgomp/config/linux/ia64/futex.h 2008-03-26 15:11:32.000000000 +0100
2454@@ -1,4 +1,4 @@
2455-/* Copyright (C) 2005 Free Software Foundation, Inc.
2456+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2457 Contributed by Richard Henderson <rth@redhat.com>.
2458
2459 This file is part of the GNU OpenMP Library (libgomp).
2460@@ -29,23 +29,24 @@
2461
2462 #include <sys/syscall.h>
2463
2464-#define FUTEX_WAIT 0
2465-#define FUTEX_WAKE 1
2466
2467
2468-static inline void
2469-sys_futex0(int *addr, int op, int val)
2470+static inline long
2471+sys_futex0(int *addr, long op, int val)
2472 {
2473 register long out0 asm ("out0") = (long) addr;
2474 register long out1 asm ("out1") = op;
2475 register long out2 asm ("out2") = val;
2476 register long out3 asm ("out3") = 0;
2477+ register long r8 asm ("r8");
2478+ register long r10 asm ("r10");
2479 register long r15 asm ("r15") = SYS_futex;
2480
2481 __asm __volatile ("break 0x100000"
2482- : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3)
2483+ : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3),
2484+ "=r"(r8), "=r"(r10)
2485 : "r"(r15), "r"(out0), "r"(out1), "r"(out2), "r"(out3)
2486- : "memory", "r8", "r10", "out4", "out5", "out6", "out7",
2487+ : "memory", "out4", "out5", "out6", "out7",
2488 /* Non-stacked integer registers, minus r8, r10, r15. */
2489 "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18",
2490 "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27",
2491@@ -56,16 +57,41 @@ sys_futex0(int *addr, int op, int val)
2492 "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
2493 /* Branch registers. */
2494 "b6");
2495+ return r8 & r10;
2496 }
2497
2498 static inline void
2499 futex_wait (int *addr, int val)
2500 {
2501- sys_futex0 (addr, FUTEX_WAIT, val);
2502+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2503+ if (__builtin_expect (err == ENOSYS, 0))
2504+ {
2505+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2506+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2507+ sys_futex0 (addr, gomp_futex_wait, val);
2508+ }
2509 }
2510
2511 static inline void
2512 futex_wake (int *addr, int count)
2513 {
2514- sys_futex0 (addr, FUTEX_WAKE, count);
2515+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2516+ if (__builtin_expect (err == ENOSYS, 0))
2517+ {
2518+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2519+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2520+ sys_futex0 (addr, gomp_futex_wake, count);
2521+ }
2522+}
2523+
2524+static inline void
2525+cpu_relax (void)
2526+{
2527+ __asm volatile ("hint @pause" : : : "memory");
2528+}
2529+
2530+static inline void
2531+atomic_write_barrier (void)
2532+{
2533+ __sync_synchronize ();
2534 }
2535--- libgomp/config/linux/s390/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2536+++ libgomp/config/linux/s390/futex.h 2008-03-26 15:11:32.000000000 +0100
2537@@ -1,4 +1,4 @@
2538-/* Copyright (C) 2005 Free Software Foundation, Inc.
2539+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2540 Contributed by Jakub Jelinek <jakub@redhat.com>.
2541
2542 This file is part of the GNU OpenMP Library (libgomp).
2543@@ -28,10 +28,8 @@
2544 /* Provide target-specific access to the futex system call. */
2545
2546 #include <sys/syscall.h>
2547-#define FUTEX_WAIT 0
2548-#define FUTEX_WAKE 1
2549
2550-static inline void
2551+static inline long
2552 sys_futex0 (int *addr, int op, int val)
2553 {
2554 register long int gpr2 __asm__ ("2");
2555@@ -49,16 +47,41 @@ sys_futex0 (int *addr, int op, int val)
2556 : "i" (SYS_futex),
2557 "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
2558 : "memory");
2559+ return gpr2;
2560 }
2561
2562 static inline void
2563 futex_wait (int *addr, int val)
2564 {
2565- sys_futex0 (addr, FUTEX_WAIT, val);
2566+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2567+ if (__builtin_expect (err == -ENOSYS, 0))
2568+ {
2569+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2570+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2571+ sys_futex0 (addr, gomp_futex_wait, val);
2572+ }
2573 }
2574
2575 static inline void
2576 futex_wake (int *addr, int count)
2577 {
2578- sys_futex0 (addr, FUTEX_WAKE, count);
2579+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2580+ if (__builtin_expect (err == -ENOSYS, 0))
2581+ {
2582+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2583+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2584+ sys_futex0 (addr, gomp_futex_wake, count);
2585+ }
2586+}
2587+
2588+static inline void
2589+cpu_relax (void)
2590+{
2591+ __asm volatile ("" : : : "memory");
2592+}
2593+
2594+static inline void
2595+atomic_write_barrier (void)
2596+{
2597+ __sync_synchronize ();
2598 }
2599--- libgomp/config/linux/mutex.c.jj 2007-12-07 14:41:00.000000000 +0100
2600+++ libgomp/config/linux/mutex.c 2008-03-26 15:11:32.000000000 +0100
2601@@ -1,4 +1,4 @@
2602-/* Copyright (C) 2005 Free Software Foundation, Inc.
2603+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2604 Contributed by Richard Henderson <rth@redhat.com>.
2605
2606 This file is part of the GNU OpenMP Library (libgomp).
2607@@ -29,9 +29,10 @@
2608 mechanism for libgomp. This type is private to the library. This
2609 implementation uses atomic instructions and the futex syscall. */
2610
2611-#include "libgomp.h"
2612-#include "futex.h"
2613+#include "wait.h"
2614
2615+long int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
2616+long int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
2617
2618 void
2619 gomp_mutex_lock_slow (gomp_mutex_t *mutex)
2620@@ -40,7 +41,7 @@ gomp_mutex_lock_slow (gomp_mutex_t *mute
2621 {
2622 int oldval = __sync_val_compare_and_swap (mutex, 1, 2);
2623 if (oldval != 0)
2624- futex_wait (mutex, 2);
2625+ do_wait (mutex, 2);
2626 }
2627 while (!__sync_bool_compare_and_swap (mutex, 0, 2));
2628 }
2629--- libgomp/config/linux/sem.c.jj 2007-12-07 14:41:00.000000000 +0100
2630+++ libgomp/config/linux/sem.c 2008-03-26 15:11:32.000000000 +0100
2631@@ -1,4 +1,4 @@
2632-/* Copyright (C) 2005 Free Software Foundation, Inc.
2633+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2634 Contributed by Richard Henderson <rth@redhat.com>.
2635
2636 This file is part of the GNU OpenMP Library (libgomp).
2637@@ -29,8 +29,7 @@
2638 mechanism for libgomp. This type is private to the library. This
2639 implementation uses atomic instructions and the futex syscall. */
2640
2641-#include "libgomp.h"
2642-#include "futex.h"
2643+#include "wait.h"
2644
2645
2646 void
2647@@ -44,7 +43,7 @@ gomp_sem_wait_slow (gomp_sem_t *sem)
2648 if (__sync_bool_compare_and_swap (sem, val, val - 1))
2649 return;
2650 }
2651- futex_wait (sem, -1);
2652+ do_wait (sem, -1);
2653 }
2654 }
2655
2656--- libgomp/config/linux/powerpc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
2657+++ libgomp/config/linux/powerpc/futex.h 2008-03-26 15:11:32.000000000 +0100
2658@@ -1,4 +1,4 @@
2659-/* Copyright (C) 2005 Free Software Foundation, Inc.
2660+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2661 Contributed by Richard Henderson <rth@redhat.com>.
2662
2663 This file is part of the GNU OpenMP Library (libgomp).
2664@@ -28,10 +28,8 @@
2665 /* Provide target-specific access to the futex system call. */
2666
2667 #include <sys/syscall.h>
2668-#define FUTEX_WAIT 0
2669-#define FUTEX_WAKE 1
2670
2671-static inline void
2672+static inline long
2673 sys_futex0 (int *addr, int op, int val)
2674 {
2675 register long int r0 __asm__ ("r0");
2676@@ -50,21 +48,48 @@ sys_futex0 (int *addr, int op, int val)
2677 doesn't. It doesn't much matter for us. In the interest of unity,
2678 go ahead and clobber it always. */
2679
2680- __asm volatile ("sc"
2681+ __asm volatile ("sc; mfcr %0"
2682 : "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6)
2683 : "r"(r0), "r"(r3), "r"(r4), "r"(r5), "r"(r6)
2684 : "r7", "r8", "r9", "r10", "r11", "r12",
2685 "cr0", "ctr", "memory");
2686+ if (__builtin_expect (r0 & (1 << 28), 0))
2687+ return r3;
2688+ return 0;
2689 }
2690
2691 static inline void
2692 futex_wait (int *addr, int val)
2693 {
2694- sys_futex0 (addr, FUTEX_WAIT, val);
2695+ long err = sys_futex0 (addr, gomp_futex_wait, val);
2696+ if (__builtin_expect (err == ENOSYS, 0))
2697+ {
2698+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2699+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2700+ sys_futex0 (addr, gomp_futex_wait, val);
2701+ }
2702 }
2703
2704 static inline void
2705 futex_wake (int *addr, int count)
2706 {
2707- sys_futex0 (addr, FUTEX_WAKE, count);
2708+ long err = sys_futex0 (addr, gomp_futex_wake, count);
2709+ if (__builtin_expect (err == ENOSYS, 0))
2710+ {
2711+ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
2712+ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
2713+ sys_futex0 (addr, gomp_futex_wake, count);
2714+ }
2715+}
2716+
2717+static inline void
2718+cpu_relax (void)
2719+{
2720+ __asm volatile ("" : : : "memory");
2721+}
2722+
2723+static inline void
2724+atomic_write_barrier (void)
2725+{
2726+ __asm volatile ("eieio" : : : "memory");
2727 }
2728--- libgomp/config/linux/bar.c.jj 2007-12-07 14:41:00.000000000 +0100
2729+++ libgomp/config/linux/bar.c 2008-03-26 15:11:32.000000000 +0100
2730@@ -1,4 +1,4 @@
2731-/* Copyright (C) 2005 Free Software Foundation, Inc.
2732+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
2733 Contributed by Richard Henderson <rth@redhat.com>.
2734
2735 This file is part of the GNU OpenMP Library (libgomp).
2736@@ -29,32 +29,29 @@
2737 mechanism for libgomp. This type is private to the library. This
2738 implementation uses atomic instructions and the futex syscall. */
2739
2740-#include "libgomp.h"
2741-#include "futex.h"
2742 #include <limits.h>
2743+#include "wait.h"
2744
2745
2746 void
2747-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
2748+gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t state)
2749 {
2750- if (last)
2751+ if (__builtin_expect ((state & 1) != 0, 0))
2752 {
2753- bar->generation++;
2754- futex_wake (&bar->generation, INT_MAX);
2755+ /* Next time we'll be awaiting TOTAL threads again. */
2756+ bar->awaited = bar->total;
2757+ atomic_write_barrier ();
2758+ bar->generation += 2;
2759+ futex_wake ((int *) &bar->generation, INT_MAX);
2760 }
2761 else
2762 {
2763- unsigned int generation = bar->generation;
2764-
2765- gomp_mutex_unlock (&bar->mutex);
2766+ unsigned int generation = state;
2767
2768 do
2769- futex_wait (&bar->generation, generation);
2770+ do_wait ((int *) &bar->generation, generation);
2771 while (bar->generation == generation);
2772 }
2773-
2774- if (__sync_add_and_fetch (&bar->arrived, -1) == 0)
2775- gomp_mutex_unlock (&bar->mutex);
2776 }
2777
2778 void
2779@@ -62,3 +59,18 @@ gomp_barrier_wait (gomp_barrier_t *barri
2780 {
2781 gomp_barrier_wait_end (barrier, gomp_barrier_wait_start (barrier));
2782 }
2783+
2784+/* Like gomp_barrier_wait, except that if the encountering thread
2785+ is not the last one to hit the barrier, it returns immediately.
2786+ The intended usage is that a thread which intends to gomp_barrier_destroy
2787+ this barrier calls gomp_barrier_wait, while all other threads
2788+ call gomp_barrier_wait_last. When gomp_barrier_wait returns,
2789+ the barrier can be safely destroyed. */
2790+
2791+void
2792+gomp_barrier_wait_last (gomp_barrier_t *barrier)
2793+{
2794+ gomp_barrier_state_t state = gomp_barrier_wait_start (barrier);
2795+ if (state & 1)
2796+ gomp_barrier_wait_end (barrier, state);
2797+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ppc32-retaddr.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ppc32-retaddr.patch
new file mode 100644
index 0000000000..3de4158eb0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ppc32-retaddr.patch
@@ -0,0 +1,90 @@
12005-11-28 Jakub Jelinek <jakub@redhat.com>
2
3 * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
4 read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
5 instead of doing an extran indirection from frame_pointer_rtx.
6
7 * gcc.dg/20051128-1.c: New test.
8
9Index: gcc/config/rs6000/rs6000.c
10===================================================================
11--- gcc/config/rs6000/rs6000.c.orig 2010-03-27 03:27:39.000000000 -0700
12+++ gcc/config/rs6000/rs6000.c 2010-06-25 10:18:04.053381930 -0700
13@@ -17646,17 +17646,22 @@
14 don't try to be too clever here. */
15 if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
16 {
17+ rtx x;
18 cfun->machine->ra_needs_full_frame = 1;
19
20- return
21- gen_rtx_MEM
22- (Pmode,
23- memory_address
24- (Pmode,
25- plus_constant (copy_to_reg
26- (gen_rtx_MEM (Pmode,
27- memory_address (Pmode, frame))),
28- RETURN_ADDRESS_OFFSET)));
29+ if (count == 0)
30+ {
31+ gcc_assert (frame == frame_pointer_rtx);
32+ x = arg_pointer_rtx;
33+ }
34+ else
35+ {
36+ x = memory_address (Pmode, frame);
37+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
38+ }
39+
40+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
41+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
42 }
43
44 cfun->machine->ra_need_lr = 1;
45Index: gcc/testsuite/gcc.dg/20051128-1.c
46===================================================================
47--- /dev/null 1970-01-01 00:00:00.000000000 +0000
48+++ gcc/testsuite/gcc.dg/20051128-1.c 2010-06-25 10:18:04.061382856 -0700
49@@ -0,0 +1,41 @@
50+/* { dg-do run } */
51+/* { dg-options "-O2 -fpic" } */
52+
53+extern void exit (int);
54+extern void abort (void);
55+
56+int b;
57+
58+struct A
59+{
60+ void *pad[147];
61+ void *ra, *h;
62+ long o;
63+};
64+
65+void
66+__attribute__((noinline))
67+foo (struct A *a, void *x)
68+{
69+ __builtin_memset (a, 0, sizeof (a));
70+ if (!b)
71+ exit (0);
72+}
73+
74+void
75+__attribute__((noinline))
76+bar (void)
77+{
78+ struct A a;
79+
80+ __builtin_unwind_init ();
81+ foo (&a, __builtin_return_address (0));
82+}
83+
84+int
85+main (void)
86+{
87+ bar ();
88+ abort ();
89+ return 0;
90+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr27898.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr27898.patch
new file mode 100644
index 0000000000..172bb81171
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr27898.patch
@@ -0,0 +1,16 @@
12006-08-18 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/27898
4 * gcc.dg/pr27898.c: New test.
5
6--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
7+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
8@@ -0,0 +1,8 @@
9+/* PR c/27898 */
10+/* { dg-do compile } */
11+/* { dg-options "--combine" } */
12+/* { dg-additional-sources "pr27898.c" } */
13+
14+union u { struct { int i; }; };
15+
16+extern int foo (union u *);
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr32139.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr32139.patch
new file mode 100644
index 0000000000..f35696703d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr32139.patch
@@ -0,0 +1,19 @@
12007-06-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/32139
4 * gcc.c-torture/compile/20070531-1.c: New test.
5
6--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
7+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
8@@ -0,0 +1,11 @@
9+/* PR tree-optimization/32139 */
10+int foo (void);
11+int bar (void) __attribute__ ((const));
12+
13+int
14+test (int x)
15+{
16+ int a = (x == 10000 ? foo : bar) ();
17+ int b = (x == 10000 ? foo : bar) ();
18+ return a + b;
19+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr33763.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr33763.patch
new file mode 100644
index 0000000000..68c30650ff
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr33763.patch
@@ -0,0 +1,159 @@
12007-11-06 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/33763
4 * gcc.dg/pr33763.c: New test.
5 * g++.dg/opt/inline13.C: New test.
6
72007-11-06 Jan Hubicka <jh@suse.cz>
8
9 PR tree-optimization/33763
10 * tree-inline.c (expand_call_inline): Silently ignore always_inline
11 attribute for redefined extern inline functions.
12
13Index: gcc/tree-inline.c
14===================================================================
15--- gcc/tree-inline.c.orig 2010-03-18 13:07:13.000000000 -0700
16+++ gcc/tree-inline.c 2010-06-25 10:18:51.230139825 -0700
17@@ -3545,6 +3545,12 @@
18 goto egress;
19
20 if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
21+ /* For extern inline functions that get redefined we always
22+ silently ignored alway_inline flag. Better behaviour would
23+ be to be able to keep both bodies and use extern inline body
24+ for inlining, but we can't do that because frontends overwrite
25+ the body. */
26+ && !cg_edge->callee->local.redefined_extern_inline
27 /* Avoid warnings during early inline pass. */
28 && cgraph_global_info_ready)
29 {
30Index: gcc/testsuite/gcc.dg/pr33763.c
31===================================================================
32--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33+++ gcc/testsuite/gcc.dg/pr33763.c 2010-06-25 10:18:51.234141302 -0700
34@@ -0,0 +1,60 @@
35+/* PR tree-optimization/33763 */
36+/* { dg-do compile } */
37+/* { dg-options "-O2" } */
38+
39+typedef struct
40+{
41+ void *a;
42+ void *b;
43+} T;
44+extern void *foo (const char *, const char *);
45+extern void *bar (void *, const char *, T);
46+extern int baz (const char *, int);
47+
48+extern inline __attribute__ ((always_inline, gnu_inline)) int
49+baz (const char *x, int y)
50+{
51+ return 2;
52+}
53+
54+int
55+baz (const char *x, int y)
56+{
57+ return 1;
58+}
59+
60+int xa, xb;
61+
62+static void *
63+inl (const char *x, const char *y)
64+{
65+ T t = { &xa, &xb };
66+ int *f = (int *) __builtin_malloc (sizeof (int));
67+ const char *z;
68+ int o = 0;
69+ void *r = 0;
70+
71+ for (z = y; *z; z++)
72+ {
73+ if (*z == 'r')
74+ o |= 1;
75+ if (*z == 'w')
76+ o |= 2;
77+ }
78+ if (o == 1)
79+ *f = baz (x, 0);
80+ if (o == 2)
81+ *f = baz (x, 1);
82+ if (o == 3)
83+ *f = baz (x, 2);
84+
85+ if (o && *f > 0)
86+ r = bar (f, "w", t);
87+ return r;
88+}
89+
90+void *
91+foo (const char *x, const char *y)
92+{
93+ return inl (x, y);
94+}
95Index: gcc/testsuite/g++.dg/opt/inline13.C
96===================================================================
97--- /dev/null 1970-01-01 00:00:00.000000000 +0000
98+++ gcc/testsuite/g++.dg/opt/inline13.C 2010-06-25 10:18:51.261052137 -0700
99@@ -0,0 +1,60 @@
100+// PR tree-optimization/33763
101+// { dg-do compile }
102+// { dg-options "-O2" }
103+
104+typedef struct
105+{
106+ void *a;
107+ void *b;
108+} T;
109+extern void *foo (const char *, const char *);
110+extern void *bar (void *, const char *, T);
111+extern int baz (const char *, int);
112+
113+extern inline __attribute__ ((always_inline, gnu_inline)) int
114+baz (const char *x, int y)
115+{
116+ return 2;
117+}
118+
119+int
120+baz (const char *x, int y)
121+{
122+ return 1;
123+}
124+
125+int xa, xb;
126+
127+static void *
128+inl (const char *x, const char *y)
129+{
130+ T t = { &xa, &xb };
131+ int *f = (int *) __builtin_malloc (sizeof (int));
132+ const char *z;
133+ int o = 0;
134+ void *r = 0;
135+
136+ for (z = y; *z; z++)
137+ {
138+ if (*z == 'r')
139+ o |= 1;
140+ if (*z == 'w')
141+ o |= 2;
142+ }
143+ if (o == 1)
144+ *f = baz (x, 0);
145+ if (o == 2)
146+ *f = baz (x, 1);
147+ if (o == 3)
148+ *f = baz (x, 2);
149+
150+ if (o && *f > 0)
151+ r = bar (f, "w", t);
152+ return r;
153+}
154+
155+void *
156+foo (const char *x, const char *y)
157+{
158+ return inl (x, y);
159+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh251682.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh251682.patch
new file mode 100644
index 0000000000..e96ae6f134
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh251682.patch
@@ -0,0 +1,89 @@
12008-04-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR pch/13675
4 * files.c (struct _cpp_file): Remove pch field.
5 (pch_open_file): Don't set file->pch, just file->pchname.
6 (should_stack_file): After pfile->cb.read_pch call
7 free pchname and clear pchname, don't close file->fd.
8 Test file->pchname instead of file->pch. Don't close fd after cb.
9 (_cpp_stack_include): Test file->pchname instead of file->pch.
10
11 * c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
12
13--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
14+++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
15@@ -106,9 +106,6 @@ struct _cpp_file
16
17 /* If BUFFER above contains the true contents of the file. */
18 bool buffer_valid;
19-
20- /* File is a PCH (on return from find_include_file). */
21- bool pch;
22 };
23
24 /* A singly-linked list for all searches for a given file name, with
25@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
26 }
27 closedir (pchdir);
28 }
29- if (valid)
30- file->pch = true;
31- else
32+ if (!valid)
33 *invalid_pch = true;
34 }
35
36@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
37 return false;
38
39 /* Handle PCH files immediately; don't stack them. */
40- if (file->pch)
41+ if (file->pchname)
42 {
43 pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
44- close (file->fd);
45 file->fd = -1;
46+ free ((void *) file->pchname);
47+ file->pchname = NULL;
48 return false;
49 }
50
51@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
52 complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
53 found a PCH file (in which case linemap_add is not called) or we
54 were included from the command-line. */
55- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
56+ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
57 pfile->line_table->highest_location--;
58
59 return _cpp_stack_file (pfile, file, type == IT_IMPORT);
60--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
61+++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
62@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
63 if (f == NULL)
64 {
65 cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
66+ close (fd);
67 return;
68 }
69
70@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
71 if (fread (&h, sizeof (h), 1, f) != 1)
72 {
73 cpp_errno (pfile, CPP_DL_ERROR, "reading");
74+ fclose (f);
75 return;
76 }
77
78@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
79 gt_pch_restore (f);
80
81 if (cpp_read_state (pfile, name, f, smd) != 0)
82- return;
83+ {
84+ fclose (f);
85+ return;
86+ }
87
88 fclose (f);
89
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh330771.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh330771.patch
new file mode 100644
index 0000000000..4888ac47dd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh330771.patch
@@ -0,0 +1,31 @@
12007-10-16 Jakub Jelinek <jakub@redhat.com>
2
3 * Makefile.am (libgcj_tools_la_LIBADD): Add.
4 * Makefile.in: Regenerated.
5
6Index: libjava/Makefile.am
7===================================================================
8--- libjava/Makefile.am.orig 2010-03-21 12:41:37.000000000 -0700
9+++ libjava/Makefile.am 2010-06-25 10:22:11.394130458 -0700
10@@ -507,6 +507,8 @@
11 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
12 -fno-bootstrap-classes -fno-indirect-classes \
13 -fsource-filename=$(here)/classpath/tools/all-classes.lst
14+## See jv_convert_LDADD.
15+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
16 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
17 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
18 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
19Index: libjava/Makefile.in
20===================================================================
21--- libjava/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
22+++ libjava/Makefile.in 2010-06-25 10:27:41.841708512 -0700
23@@ -1190,7 +1190,7 @@
24 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
25 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
26
27-libgcj_tools_la_LIBADD = libgcj.la -lm
28+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la -lm
29 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec $(am__append_22)
30 libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS)
31 libjvm_la_SOURCES = jni-libjvm.cc
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh341221.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh341221.patch
new file mode 100644
index 0000000000..7e2801b99b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh341221.patch
@@ -0,0 +1,32 @@
12007-10-21 Jakub Jelinek <jakub@redhat.com>
2
3 * doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
4 timestamp rather than from current date.
5 * doc/Makefile.in: Regenerated.
6
7Index: libjava/classpath/doc/Makefile.am
8===================================================================
9--- libjava/classpath/doc/Makefile.am.orig 2008-10-21 10:55:01.000000000 -0700
10+++ libjava/classpath/doc/Makefile.am 2010-06-25 10:28:30.237631599 -0700
11@@ -31,7 +31,7 @@
12 gtnameserv.1 \
13 gjdoc.1
14
15-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
16+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
17 TEXI2POD = perl $(srcdir)/texi2pod.pl
18 STAMP = echo timestamp >
19
20Index: libjava/classpath/doc/Makefile.in
21===================================================================
22--- libjava/classpath/doc/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
23+++ libjava/classpath/doc/Makefile.in 2010-06-25 10:28:30.245635728 -0700
24@@ -376,7 +376,7 @@
25 gtnameserv.1 \
26 gjdoc.1
27
28-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
29+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
30 TEXI2POD = perl $(srcdir)/texi2pod.pl
31 STAMP = echo timestamp >
32 @GENINSRC_FALSE@STAMP_GENINSRC =
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..348c77006f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
1* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
2 used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
3 directory.
4
5Index: gcc-4.5+svnr155514/libgfortran/configure
6===================================================================
7--- gcc-4.5+svnr155514.orig/libgfortran/configure 2009-12-29 22:02:01.000000000 -0800
8+++ gcc-4.5+svnr155514/libgfortran/configure 2009-12-30 08:12:40.889091657 -0800
9@@ -11655,7 +11655,7 @@ CC="$lt_save_CC"
10
11 # We need gfortran to compile parts of the library
12 #AC_PROG_FC(gfortran)
13-FC="$GFORTRAN"
14+#FC="$GFORTRAN"
15 ac_ext=${ac_fc_srcext-f}
16 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
17 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
18Index: gcc-4.5+svnr155514/libgfortran/configure.ac
19===================================================================
20--- gcc-4.5+svnr155514.orig/libgfortran/configure.ac 2009-12-29 22:02:01.000000000 -0800
21+++ gcc-4.5+svnr155514/libgfortran/configure.ac 2009-12-30 08:12:13.453094218 -0800
22@@ -187,7 +187,7 @@ AC_SUBST(enable_static)
23
24 # We need gfortran to compile parts of the library
25 #AC_PROG_FC(gfortran)
26-FC="$GFORTRAN"
27+#FC="$GFORTRAN"
28 AC_PROG_FC(gfortran)
29
30 # extra LD Flags which are required for targets
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.0.2-e300c2c3.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.0.2-e300c2c3.patch
new file mode 100644
index 0000000000..d1df8b2716
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,319 @@
1Adds support for Freescale Power architecture e300c2 and e300c3 cores.
2http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
3
4Leon Woestenberg <leonw@mailcan.com>
5
6---
7 gcc/config.gcc | 2
8 gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
9 gcc/config/rs6000/rs6000.c | 24 +++++
10 gcc/config/rs6000/rs6000.h | 4
11 gcc/config/rs6000/rs6000.md | 3
12 5 files changed, 220 insertions(+), 2 deletions(-)
13
14Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
18@@ -0,0 +1,189 @@
19+;; Pipeline description for Motorola PowerPC e300c3 core.
20+;; Copyright (C) 2003 Free Software Foundation, Inc.
21+;;
22+;; This file is part of GCC.
23+
24+;; GCC is free software; you can redistribute it and/or modify it
25+;; under the terms of the GNU General Public License as published
26+;; by the Free Software Foundation; either version 2, or (at your
27+;; option) any later version.
28+
29+;; GCC is distributed in the hope that it will be useful, but WITHOUT
30+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
31+;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
32+;; License for more details.
33+
34+;; You should have received a copy of the GNU General Public License
35+;; along with GCC; see the file COPYING. If not, write to the
36+;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
37+;; MA 02111-1307, USA.
38+
39+(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
40+(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
41+
42+;; We don't simulate general issue queue (GIC). If we have SU insn
43+;; and then SU1 insn, they can not be issued on the same cycle
44+;; (although SU1 insn and then SU insn can be issued) because the SU
45+;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
46+;; multipass insn scheduling will find the situation and issue the SU1
47+;; insn and then the SU insn.
48+(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
49+
50+;; We could describe completion buffers slots in combination with the
51+;; retirement units and the order of completion but the result
52+;; automaton would behave in the same way because we can not describe
53+;; real latency time with taking in order completion into account.
54+;; Actually we could define the real latency time by querying reserved
55+;; automaton units but the current scheduler uses latency time before
56+;; issuing insns and making any reservations.
57+;;
58+;; So our description is aimed to achieve a insn schedule in which the
59+;; insns would not wait in the completion buffer.
60+(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
61+
62+;; Branch unit:
63+(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
64+
65+;; IU:
66+(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
67+
68+;; IU: This used to describe non-pipelined division.
69+(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
70+
71+;; SRU:
72+(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
73+
74+;; Here we simplified LSU unit description not describing the stages.
75+(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
76+
77+;; FPU:
78+(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
79+
80+;; The following units are used to make automata deterministic
81+(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
82+(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
83+(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
84+(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
85+
86+;; The following sets to make automata deterministic when option ndfa is used.
87+(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
88+(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
89+(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
90+(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
91+
92+;; Some useful abbreviations.
93+(define_reservation "ppce300c3_decode"
94+ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
95+(define_reservation "ppce300c3_issue"
96+ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
97+(define_reservation "ppce300c3_retire"
98+ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
99+(define_reservation "ppce300c3_iu_stage0"
100+ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
101+
102+;; Compares can be executed either one of the IU or SRU
103+(define_insn_reservation "ppce300c3_cmp" 1
104+ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
105+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
106+ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
107+ +ppce300c3_retire")
108+
109+;; Other one cycle IU insns
110+(define_insn_reservation "ppce300c3_iu" 1
111+ (and (eq_attr "type" "integer,insert_word")
112+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
113+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
114+
115+;; Branch. Actually this latency time is not used by the scheduler.
116+(define_insn_reservation "ppce300c3_branch" 1
117+ (and (eq_attr "type" "jmpreg,branch")
118+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
119+ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
120+
121+;; Multiply is non-pipelined but can be executed in any IU
122+(define_insn_reservation "ppce300c3_multiply" 2
123+ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
124+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
125+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
126+ ppce300c3_iu_stage0+ppce300c3_retire")
127+
128+;; Divide. We use the average latency time here. We omit reserving a
129+;; retire unit because of the result automata will be huge.
130+(define_insn_reservation "ppce300c3_divide" 20
131+ (and (eq_attr "type" "idiv")
132+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
133+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
134+ ppce300c3_mu_div*19")
135+
136+;; CR logical
137+(define_insn_reservation "ppce300c3_cr_logical" 1
138+ (and (eq_attr "type" "cr_logical,delayed_cr")
139+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
140+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
141+
142+;; Mfcr
143+(define_insn_reservation "ppce300c3_mfcr" 1
144+ (and (eq_attr "type" "mfcr")
145+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
146+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
147+
148+;; Mtcrf
149+(define_insn_reservation "ppce300c3_mtcrf" 1
150+ (and (eq_attr "type" "mtcr")
151+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
152+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
153+
154+;; Mtjmpr
155+(define_insn_reservation "ppce300c3_mtjmpr" 1
156+ (and (eq_attr "type" "mtjmpr,mfjmpr")
157+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
158+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
159+
160+;; Float point instructions
161+(define_insn_reservation "ppce300c3_fpcompare" 3
162+ (and (eq_attr "type" "fpcompare")
163+ (eq_attr "cpu" "ppce300c3"))
164+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
165+
166+(define_insn_reservation "ppce300c3_fp" 3
167+ (and (eq_attr "type" "fp")
168+ (eq_attr "cpu" "ppce300c3"))
169+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
170+
171+(define_insn_reservation "ppce300c3_dmul" 4
172+ (and (eq_attr "type" "dmul")
173+ (eq_attr "cpu" "ppce300c3"))
174+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
175+
176+; Divides are not pipelined
177+(define_insn_reservation "ppce300c3_sdiv" 18
178+ (and (eq_attr "type" "sdiv")
179+ (eq_attr "cpu" "ppce300c3"))
180+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
181+
182+(define_insn_reservation "ppce300c3_ddiv" 33
183+ (and (eq_attr "type" "ddiv")
184+ (eq_attr "cpu" "ppce300c3"))
185+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
186+
187+;; Loads
188+(define_insn_reservation "ppce300c3_load" 2
189+ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
190+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
191+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
192+
193+(define_insn_reservation "ppce300c3_fpload" 2
194+ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
195+ (eq_attr "cpu" "ppce300c3"))
196+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
197+
198+;; Stores.
199+(define_insn_reservation "ppce300c3_store" 2
200+ (and (eq_attr "type" "store,store_ux,store_u")
201+ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
202+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
203+
204+(define_insn_reservation "ppce300c3_fpstore" 2
205+ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
206+ (eq_attr "cpu" "ppce300c3"))
207+ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
208Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
209===================================================================
210--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
211+++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
212@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
213 1, /* prefetch streams /*/
214 };
215
216+/* Instruction costs on E300C2 and E300C3 cores. */
217+static const
218+struct processor_costs ppce300c2c3_cost = {
219+ COSTS_N_INSNS (4), /* mulsi */
220+ COSTS_N_INSNS (4), /* mulsi_const */
221+ COSTS_N_INSNS (4), /* mulsi_const9 */
222+ COSTS_N_INSNS (4), /* muldi */
223+ COSTS_N_INSNS (19), /* divsi */
224+ COSTS_N_INSNS (19), /* divdi */
225+ COSTS_N_INSNS (3), /* fp */
226+ COSTS_N_INSNS (4), /* dmul */
227+ COSTS_N_INSNS (18), /* sdiv */
228+ COSTS_N_INSNS (33), /* ddiv */
229+};
230+
231 /* Instruction costs on POWER4 and POWER5 processors. */
232 static const
233 struct processor_costs power4_cost = {
234@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
235 {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
236 /* 8548 has a dummy entry for now. */
237 {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
238+ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
239+ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
240 {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
241 {"970", PROCESSOR_POWER4,
242 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
243@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
244 rs6000_cost = &ppc8540_cost;
245 break;
246
247+ case PROCESSOR_PPCE300C2:
248+ case PROCESSOR_PPCE300C3:
249+ rs6000_cost = &ppce300c2c3_cost;
250+ break;
251+
252 case PROCESSOR_POWER4:
253 case PROCESSOR_POWER5:
254 rs6000_cost = &power4_cost;
255@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
256 case CPU_PPC7400:
257 case CPU_PPC8540:
258 case CPU_CELL:
259+ case CPU_PPCE300C2:
260+ case CPU_PPCE300C3:
261 return 2;
262 case CPU_RIOS2:
263 case CPU_PPC604:
264Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
265===================================================================
266--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
267+++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
268@@ -117,6 +117,8 @@
269 %{mcpu=G5: -mpower4 -maltivec} \
270 %{mcpu=8540: -me500} \
271 %{mcpu=8548: -me500} \
272+%{mcpu=e300c2: -mppc} \
273+%{mcpu=e300c3: -mppc -mpmr} \
274 %{maltivec: -maltivec} \
275 -many"
276
277@@ -262,6 +264,8 @@ enum processor_type
278 PROCESSOR_PPC7400,
279 PROCESSOR_PPC7450,
280 PROCESSOR_PPC8540,
281+ PROCESSOR_PPCE300C2,
282+ PROCESSOR_PPCE300C3,
283 PROCESSOR_POWER4,
284 PROCESSOR_POWER5,
285 PROCESSOR_POWER6,
286Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
287===================================================================
288--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
289+++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
290@@ -133,7 +133,7 @@
291 ;; Processor type -- this attribute must exactly match the processor_type
292 ;; enumeration in rs6000.h.
293
294-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
295+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell,ppce300c2,ppce300c3"
296 (const (symbol_ref "rs6000_cpu_attr")))
297
298
299@@ -166,6 +166,7 @@
300 (include "7xx.md")
301 (include "7450.md")
302 (include "8540.md")
303+(include "e300c2c3.md")
304 (include "power4.md")
305 (include "power5.md")
306 (include "power6.md")
307Index: gcc-4.3.1/gcc/config.gcc
308===================================================================
309--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
310+++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
311@@ -3144,7 +3144,7 @@ case "${target}" in
312 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
313 | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
314 | 601 | 602 | 603 | 603e | ec603e | 604 \
315- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
316+ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
317 | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
318 # OK
319 ;;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..f33e6c1ea6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,31 @@
1---
2 configure | 2 +-
3 configure.ac | 2 +-
4 2 files changed, 2 insertions(+), 2 deletions(-)
5
6Index: gcc-4.3.1/configure.ac
7===================================================================
8--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700
9+++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700
10@@ -2352,7 +2352,7 @@ fi
11 # for target_alias and gcc doesn't manage it consistently.
12 target_configargs="--cache-file=./config.cache ${target_configargs}"
13
14-FLAGS_FOR_TARGET=
15+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
16 case " $target_configdirs " in
17 *" newlib "*)
18 case " $target_configargs " in
19Index: gcc-4.3.1/configure
20===================================================================
21--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700
22+++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700
23@@ -5841,7 +5841,7 @@ fi
24 # for target_alias and gcc doesn't manage it consistently.
25 target_configargs="--cache-file=./config.cache ${target_configargs}"
26
27-FLAGS_FOR_TARGET=
28+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
29 case " $target_configdirs " in
30 *" newlib "*)
31 case " $target_configargs " in
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000000..af0b81ba4c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,114 @@
1Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
2
3This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
4
5Other changes I had to do include:
6
7- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
8
9- passing the right CFLAGS to configure scripts as exported environment variables
10
11I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
12
13Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
14
15Paolo
16
172008-02-19 Paolo Bonzini <bonzini@gnu.org>
18
19 PR bootstrap/32009
20 PR bootstrap/32161
21
22 * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
23 * configure: Regenerate.
24
25 * Makefile.def: Define stage_libcflags for all bootstrap stages.
26 * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
27 STAGE4_LIBCFLAGS): New.
28 (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
29 $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
30 (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
31 (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
32 (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
33 for target modules. Don't export LIBCFLAGS.
34 (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
35 $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
36 the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
37 (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
38 $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
39 * Makefile.in: Regenerate.
40
41config:
422008-02-19 Paolo Bonzini <bonzini@gnu.org>
43
44 PR bootstrap/32009
45 * mh-ppc-darwin (BOOT_CFLAGS): Reenable.
46
47gcc:
482008-02-19 Paolo Bonzini <bonzini@gnu.org>
49
50 PR bootstrap/32009
51 * doc/install.texi: Correct references to CFLAGS, replacing them
52 with BOOT_CFLAGS. Document flags used during bootstrap for
53 target libraries.
54
55
56---
57 Makefile.def | 25
58 Makefile.in | 1845 ++++++++++++++++++++++++++++++-------------------
59 Makefile.tpl | 91 +-
60 config/mh-ppc-darwin | 3
61 configure | 36
62 configure.ac | 32
63 gcc/Makefile.in | 2
64 gcc/configure | 6
65 gcc/configure.ac | 3
66 gcc/doc/install.texi | 56 -
67 libiberty/Makefile.in | 162 ++--
68 libiberty/configure | 46 -
69 libiberty/configure.ac | 43 -
70 13 files changed, 1454 insertions(+), 896 deletions(-)
71
72Index: gcc-4.5.0/configure
73===================================================================
74--- gcc-4.5.0.orig/configure 2010-06-25 14:51:59.409382073 -0700
75+++ gcc-4.5.0/configure 2010-06-25 14:52:35.157132702 -0700
76@@ -7130,6 +7130,38 @@
77 fi
78
79
80+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
81+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
82+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
83+# We want to ensure that TARGET libraries (which we know are built with
84+# gcc) are built with "-O2 -g", so include those options when setting
85+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
86+if test "x$CFLAGS_FOR_TARGET" = x; then
87+ CFLAGS_FOR_TARGET=$CFLAGS
88+ case " $CFLAGS " in
89+ *" -O2 "*) ;;
90+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
91+ esac
92+ case " $CFLAGS " in
93+ *" -g "* | *" -g3 "*) ;;
94+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
95+ esac
96+fi
97+
98+
99+if test "x$CXXFLAGS_FOR_TARGET" = x; then
100+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
101+ case " $CXXFLAGS " in
102+ *" -O2 "*) ;;
103+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
104+ esac
105+ case " $CXXFLAGS " in
106+ *" -g "* | *" -g3 "*) ;;
107+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
108+ esac
109+fi
110+
111+
112 # Handle --with-headers=XXX. If the value is not "yes", the contents of
113 # the named directory are copied to $(tooldir)/sys-include.
114 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.5.0_to_svn_162697.patch.bz2 b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.5.0_to_svn_162697.patch.bz2
new file mode 100644
index 0000000000..d37a2c0329
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.5.0_to_svn_162697.patch.bz2
Binary files differ
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-arm-frename-registers.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-arm-frename-registers.patch
new file mode 100644
index 0000000000..280b90358e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-arm-frename-registers.patch
@@ -0,0 +1,25 @@
1http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
2Index: gcc-4.3.0/gcc/regrename.c
3===================================================================
4--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
5+++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
6@@ -782,6 +782,10 @@
7 || (predicated && recog_data.operand_type[i] == OP_OUT))
8 recog_data.operand_type[i] = OP_INOUT;
9 }
10+ /* Unshare dup_loc RTL */
11+ for (i = 0; i < recog_data.n_dups; i++)
12+ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
13+
14
15 /* Step 1: Close chains for which we have overlapping reads. */
16 for (i = 0; i < n_ops; i++)
17@@ -813,7 +817,7 @@
18 OP_IN, 0);
19
20 for (i = 0; i < recog_data.n_dups; i++)
21- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
22+ *recog_data.dup_loc[i] = old_dups[i];
23 for (i = 0; i < n_ops; i++)
24 *recog_data.operand_loc[i] = old_operands[i];
25 if (recog_data.n_dups)
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-flags-for-build.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-flags-for-build.patch
new file mode 100644
index 0000000000..51892855af
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-flags-for-build.patch
@@ -0,0 +1,178 @@
1Index: gcc-4.5/Makefile.def
2===================================================================
3--- gcc-4.5.orig/Makefile.def
4+++ gcc-4.5/Makefile.def
5@@ -240,6 +240,7 @@ flags_to_pass = { flag= AWK ; };
6 flags_to_pass = { flag= BISON ; };
7 flags_to_pass = { flag= CC_FOR_BUILD ; };
8 flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
9+flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
10 flags_to_pass = { flag= CXX_FOR_BUILD ; };
11 flags_to_pass = { flag= EXPECT ; };
12 flags_to_pass = { flag= FLEX ; };
13Index: gcc-4.5/gcc/Makefile.in
14===================================================================
15--- gcc-4.5.orig/gcc/Makefile.in
16+++ gcc-4.5/gcc/Makefile.in
17@@ -766,7 +766,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
18
19 # Native linker and preprocessor flags. For x-fragment overrides.
20 BUILD_LDFLAGS=@BUILD_LDFLAGS@
21-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
22+BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS)
23
24 # Actual name to use when installing a native compiler.
25 GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
26Index: gcc-4.5/gcc/configure.ac
27===================================================================
28--- gcc-4.5.orig/gcc/configure.ac
29+++ gcc-4.5/gcc/configure.ac
30@@ -1798,16 +1798,18 @@ AC_SUBST(inhibit_libc)
31 # Also, we cannot run fixincludes.
32
33 # These are the normal (build=host) settings:
34-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
35-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
36-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
37-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
38+CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
39+BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
40+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
41+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS)
42+STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
43
44 # And these apply if build != host, or we are generating coverage data
45 if test x$build != x$host || test "x$coverage_flags" != x
46 then
47 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
48 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
49+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
50 fi
51
52 # Expand extra_headers to include complete path.
53Index: gcc-4.5/Makefile.in
54===================================================================
55--- gcc-4.5.orig/Makefile.in
56+++ gcc-4.5/Makefile.in
57@@ -333,6 +333,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
58 AS_FOR_BUILD = @AS_FOR_BUILD@
59 CC_FOR_BUILD = @CC_FOR_BUILD@
60 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
61+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
62 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
63 CXX_FOR_BUILD = @CXX_FOR_BUILD@
64 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
65@@ -662,6 +663,7 @@ BASE_FLAGS_TO_PASS = \
66 "BISON=$(BISON)" \
67 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
68 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
69+ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
70 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
71 "EXPECT=$(EXPECT)" \
72 "FLEX=$(FLEX)" \
73Index: gcc-4.5/gcc/configure
74===================================================================
75--- gcc-4.5.orig/gcc/configure
76+++ gcc-4.5/gcc/configure
77@@ -707,6 +707,7 @@ SED
78 LIBTOOL
79 collect2
80 STMP_FIXINC
81+BUILD_CPPFLAGS
82 BUILD_LDFLAGS
83 BUILD_CFLAGS
84 CC_FOR_BUILD
85@@ -10982,6 +10983,7 @@ fi
86 CC_FOR_BUILD='$(CC)'
87 BUILD_CFLAGS='$(ALL_CFLAGS)'
88 BUILD_LDFLAGS='$(LDFLAGS)'
89+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)'
90 STMP_FIXINC=stmp-fixinc
91
92 # And these apply if build != host, or we are generating coverage data
93@@ -10989,6 +10991,7 @@ if test x$build != x$host || test "x$cov
94 then
95 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
96 BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
97+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
98 fi
99
100 # Expand extra_headers to include complete path.
101@@ -17108,7 +17111,7 @@ else
102 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
103 lt_status=$lt_dlunknown
104 cat > conftest.$ac_ext <<_LT_EOF
105-#line 17111 "configure"
106+#line 17114 "configure"
107 #include "confdefs.h"
108
109 #if HAVE_DLFCN_H
110@@ -17214,7 +17217,7 @@ else
111 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
112 lt_status=$lt_dlunknown
113 cat > conftest.$ac_ext <<_LT_EOF
114-#line 17217 "configure"
115+#line 17220 "configure"
116 #include "confdefs.h"
117
118 #if HAVE_DLFCN_H
119Index: gcc-4.5/Makefile.tpl
120===================================================================
121--- gcc-4.5.orig/Makefile.tpl
122+++ gcc-4.5/Makefile.tpl
123@@ -336,6 +336,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
124 AS_FOR_BUILD = @AS_FOR_BUILD@
125 CC_FOR_BUILD = @CC_FOR_BUILD@
126 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
127+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
128 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
129 CXX_FOR_BUILD = @CXX_FOR_BUILD@
130 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
131Index: gcc-4.5/configure
132===================================================================
133--- gcc-4.5.orig/configure
134+++ gcc-4.5/configure
135@@ -651,6 +651,7 @@ GCJ_FOR_BUILD
136 DLLTOOL_FOR_BUILD
137 CXX_FOR_BUILD
138 CXXFLAGS_FOR_BUILD
139+CPPFLAGS_FOR_BUILD
140 CFLAGS_FOR_BUILD
141 CC_FOR_BUILD
142 AS_FOR_BUILD
143@@ -8036,6 +8037,7 @@ esac
144 # our build compiler if desired.
145 if test x"${build}" = x"${host}" ; then
146 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
147+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
148 CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
149 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
150 fi
151@@ -8101,6 +8103,7 @@ done
152
153
154
155+
156
157
158
159Index: gcc-4.5/configure.ac
160===================================================================
161--- gcc-4.5.orig/configure.ac
162+++ gcc-4.5/configure.ac
163@@ -3089,6 +3089,7 @@ esac
164 # our build compiler if desired.
165 if test x"${build}" = x"${host}" ; then
166 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
167+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
168 CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
169 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
170 fi
171@@ -3155,6 +3156,7 @@ AC_SUBST(AR_FOR_BUILD)
172 AC_SUBST(AS_FOR_BUILD)
173 AC_SUBST(CC_FOR_BUILD)
174 AC_SUBST(CFLAGS_FOR_BUILD)
175+AC_SUBST(CPPFLAGS_FOR_BUILD)
176 AC_SUBST(CXXFLAGS_FOR_BUILD)
177 AC_SUBST(CXX_FOR_BUILD)
178 AC_SUBST(DLLTOOL_FOR_BUILD)
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-ice-hack.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-ice-hack.dpatch
new file mode 100644
index 0000000000..84c5ef2ebd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-ice-hack.dpatch
@@ -0,0 +1,331 @@
1#! /bin/sh -e
2
3# DP: Retry the build on an ice, save the calling options and preprocessed
4# DP: source when the ice is reproducible.
5
6dir=
7if [ $# -eq 3 -a "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 ;;
18 -unpatch)
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 ;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1
24esac
25exit 0
26
272004-01-23 Jakub Jelinek <jakub@redhat.com>
28
29 * system.h (ICE_EXIT_CODE): Define.
30 * gcc.c (execute): Don't free first string early, but at the end
31 of the function. Call retry_ice if compiler exited with
32 ICE_EXIT_CODE.
33 (retry_ice): New function.
34 * diagnostic.c (diagnostic_count_diagnostic,
35 diagnostic_action_after_output, error_recursion): Exit with
36 ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
37
38--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
39+++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
40@@ -244,7 +244,7 @@
41 fnotice (stderr, "Please submit a full bug report,\n"
42 "with preprocessed source if appropriate.\n"
43 "See %s for instructions.\n", bug_report_url);
44- exit (ICE_EXIT_CODE);
45+ exit (FATAL_EXIT_CODE);
46
47 case DK_FATAL:
48 if (context->abort_on_error)
49--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
50+++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
51@@ -357,6 +357,9 @@
52 #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
53 static const char *convert_filename (const char *, int, int);
54 #endif
55+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
56+static void retry_ice (const char *prog, const char **argv);
57+#endif
58
59 static const char *getenv_spec_function (int, const char **);
60 static const char *if_exists_spec_function (int, const char **);
61@@ -2999,7 +3002,7 @@
62 }
63 }
64
65- if (string != commands[i].prog)
66+ if (i && string != commands[i].prog)
67 free (CONST_CAST (char *, string));
68 }
69
70@@ -3056,6 +3059,16 @@
71 else if (WIFEXITED (status)
72 && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
73 {
74+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
75+ /* For ICEs in cc1, cc1obj, cc1plus see if it is
76+ reproducible or not. */
77+ char *p;
78+ if (WEXITSTATUS (status) == ICE_EXIT_CODE
79+ && i == 0
80+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
81+ && ! strncmp (p + 1, "cc1", 3))
82+ retry_ice (commands[0].prog, commands[0].argv);
83+#endif
84 if (WEXITSTATUS (status) > greatest_status)
85 greatest_status = WEXITSTATUS (status);
86 ret_code = -1;
87@@ -3076,6 +3089,9 @@
88 }
89 }
90
91+ if (commands[0].argv[0] != commands[0].prog)
92+ free ((PTR) commands[0].argv[0]);
93+
94 return ret_code;
95 }
96 }
97@@ -6016,6 +6032,224 @@
98 switches[switchnum].validated = 1;
99 }
100
101+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
102+#define RETRY_ICE_ATTEMPTS 2
103+
104+static void
105+retry_ice (const char *prog, const char **argv)
106+{
107+ int nargs, out_arg = -1, quiet = 0, attempt;
108+ int pid, retries, sleep_interval;
109+ const char **new_argv;
110+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
111+
112+ if (input_filename == NULL || ! strcmp (input_filename, "-"))
113+ return;
114+
115+ for (nargs = 0; argv[nargs] != NULL; ++nargs)
116+ /* Only retry compiler ICEs, not preprocessor ones. */
117+ if (! strcmp (argv[nargs], "-E"))
118+ return;
119+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
120+ {
121+ if (out_arg == -1)
122+ out_arg = nargs;
123+ else
124+ return;
125+ }
126+ /* If the compiler is going to output any time information,
127+ it might vary between invocations. */
128+ else if (! strcmp (argv[nargs], "-quiet"))
129+ quiet = 1;
130+ else if (! strcmp (argv[nargs], "-ftime-report"))
131+ return;
132+
133+ if (out_arg == -1 || !quiet)
134+ return;
135+
136+ memset (temp_filenames, '\0', sizeof (temp_filenames));
137+ new_argv = alloca ((nargs + 3) * sizeof (const char *));
138+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
139+ new_argv[nargs++] = "-frandom-seed=0";
140+ new_argv[nargs] = NULL;
141+ if (new_argv[out_arg][2] == '\0')
142+ new_argv[out_arg + 1] = "-";
143+ else
144+ new_argv[out_arg] = "-o-";
145+
146+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
147+ {
148+ int fd = -1;
149+ int status;
150+
151+ temp_filenames[attempt * 2] = make_temp_file (".out");
152+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
153+
154+ if (attempt == RETRY_ICE_ATTEMPTS)
155+ {
156+ int i;
157+ int fd1, fd2;
158+ struct stat st1, st2;
159+ size_t n, len;
160+ char *buf;
161+
162+ buf = xmalloc (8192);
163+
164+ for (i = 0; i < 2; ++i)
165+ {
166+ fd1 = open (temp_filenames[i], O_RDONLY);
167+ fd2 = open (temp_filenames[2 + i], O_RDONLY);
168+
169+ if (fd1 < 0 || fd2 < 0)
170+ {
171+ i = -1;
172+ close (fd1);
173+ close (fd2);
174+ break;
175+ }
176+
177+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
178+ {
179+ i = -1;
180+ close (fd1);
181+ close (fd2);
182+ break;
183+ }
184+
185+ if (st1.st_size != st2.st_size)
186+ {
187+ close (fd1);
188+ close (fd2);
189+ break;
190+ }
191+
192+ len = 0;
193+ for (n = st1.st_size; n; n -= len)
194+ {
195+ len = n;
196+ if (len > 4096)
197+ len = 4096;
198+
199+ if (read (fd1, buf, len) != (int) len
200+ || read (fd2, buf + 4096, len) != (int) len)
201+ {
202+ i = -1;
203+ break;
204+ }
205+
206+ if (memcmp (buf, buf + 4096, len) != 0)
207+ break;
208+ }
209+
210+ close (fd1);
211+ close (fd2);
212+
213+ if (n)
214+ break;
215+ }
216+
217+ free (buf);
218+ if (i == -1)
219+ break;
220+
221+ if (i != 2)
222+ {
223+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
224+ break;
225+ }
226+
227+ fd = open (temp_filenames[attempt * 2], O_RDWR);
228+ if (fd < 0)
229+ break;
230+ write (fd, "//", 2);
231+ for (i = 0; i < nargs; i++)
232+ {
233+ write (fd, " ", 1);
234+ write (fd, new_argv[i], strlen (new_argv[i]));
235+ }
236+ write (fd, "\n", 1);
237+ new_argv[nargs] = "-E";
238+ new_argv[nargs + 1] = NULL;
239+ }
240+
241+ /* Fork a subprocess; wait and retry if it fails. */
242+ sleep_interval = 1;
243+ pid = -1;
244+ for (retries = 0; retries < 4; retries++)
245+ {
246+ pid = fork ();
247+ if (pid >= 0)
248+ break;
249+ sleep (sleep_interval);
250+ sleep_interval *= 2;
251+ }
252+
253+ if (pid < 0)
254+ break;
255+ else if (pid == 0)
256+ {
257+ if (attempt != RETRY_ICE_ATTEMPTS)
258+ fd = open (temp_filenames[attempt * 2], O_RDWR);
259+ if (fd < 0)
260+ exit (-1);
261+ if (fd != 1)
262+ {
263+ close (1);
264+ dup (fd);
265+ close (fd);
266+ }
267+
268+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
269+ if (fd < 0)
270+ exit (-1);
271+ if (fd != 2)
272+ {
273+ close (2);
274+ dup (fd);
275+ close (fd);
276+ }
277+
278+ if (prog == new_argv[0])
279+ execvp (prog, (char *const *) new_argv);
280+ else
281+ execv (new_argv[0], (char *const *) new_argv);
282+ exit (-1);
283+ }
284+
285+ if (waitpid (pid, &status, 0) < 0)
286+ break;
287+
288+ if (attempt < RETRY_ICE_ATTEMPTS
289+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
290+ {
291+ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
292+ break;
293+ }
294+ else if (attempt == RETRY_ICE_ATTEMPTS)
295+ {
296+ close (fd);
297+ if (WIFEXITED (status)
298+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
299+ {
300+ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
301+ temp_filenames[attempt * 2]);
302+ /* Make sure it is not deleted. */
303+ free (temp_filenames[attempt * 2]);
304+ temp_filenames[attempt * 2] = NULL;
305+ break;
306+ }
307+ }
308+ }
309+
310+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
311+ if (temp_filenames[attempt])
312+ {
313+ unlink (temp_filenames[attempt]);
314+ free (temp_filenames[attempt]);
315+ }
316+}
317+#endif
318+
319 /* Search for a file named NAME trying various prefixes including the
320 user's -B prefix and some standard ones.
321 Return the absolute file name found. If nothing is found, return NAME. */
322--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
323+++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
324@@ -192,6 +192,7 @@
325 build/gengtype-lex.o-warn = -Wno-error
326 # SYSCALLS.c misses prototypes
327 SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
328+build/gcc.o-warn = -Wno-error
329
330 # All warnings have to be shut off in stage1 if the compiler used then
331 # isn't gcc; configure determines that. WARN_CFLAGS will be either
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
new file mode 100644
index 0000000000..e68a2de2a2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
@@ -0,0 +1,149 @@
1 gcc/
2 2008-07-02 Joseph Myers <joseph@codesourcery.com>
3 * c-incpath.c: Include toplev.h.
4 (merge_include_chains): Use warning instead of cpp_error for
5 system directory poisoning diagnostic.
6 * Makefile.in (c-incpath.o): Depend on toplev.h.
7 * gcc.c (LINK_COMMAND_SPEC): Pass
8 --error-poison-system-directories if
9 -Werror=poison-system-directories.
10
11 2007-06-13 Joseph Myers <joseph@codesourcery.com>
12 * common.opt (--Wno-poison-system-directories): New.
13 * doc/invoke.texi (-Wno-poison-system-directories): Document.
14 * c-incpath.c: Include flags.h.
15 (merge_include_chains): Check flag_poison_system_directories.
16 * gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories
17 to linker if -Wno-poison-system-directories.
18 * Makefile.in (c-incpath.o): Depend on $(FLAGS_H).
19
20 2007-03-20 Daniel Jacobowitz <dan@codesourcery.com>
21 Joseph Myers <joseph@codesourcery.com>
22 * configure.ac (--enable-poison-system-directories): New option.
23 * configure, config.in: Regenerate.
24 * c-incpath.c (merge_include_chains): If
25 ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of
26 /usr/include, /usr/local/include or /usr/X11R6/include.
27
28Index: gcc-4.5.0/gcc/common.opt
29===================================================================
30--- gcc-4.5.0.orig/gcc/common.opt 2010-03-17 20:01:09.000000000 -0700
31+++ gcc-4.5.0/gcc/common.opt 2010-06-25 11:35:39.965383734 -0700
32@@ -152,6 +152,10 @@
33 Common Var(warn_padded) Warning
34 Warn when padding is required to align structure members
35
36+Wpoison-system-directories
37+Common Var(flag_poison_system_directories) Init(1)
38+Warn for -I and -L options using system directories if cross compiling
39+
40 Wshadow
41 Common Var(warn_shadow) Warning
42 Warn when one local variable shadows another
43Index: gcc-4.5.0/gcc/config.in
44===================================================================
45--- gcc-4.5.0.orig/gcc/config.in 2010-04-14 02:30:07.000000000 -0700
46+++ gcc-4.5.0/gcc/config.in 2010-06-25 11:35:39.969383588 -0700
47@@ -132,6 +132,12 @@
48 #endif
49
50
51+/* Define to warn for use of native system header directories */
52+#ifndef USED_FOR_TARGET
53+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
54+#endif
55+
56+
57 /* Define if you want all operations on RTL (the basic data structure of the
58 optimizer and back end) to be checked for dynamic type safety at runtime.
59 This is quite expensive. */
60Index: gcc-4.5.0/gcc/configure.ac
61===================================================================
62--- gcc-4.5.0.orig/gcc/configure.ac 2010-06-25 11:34:01.433382161 -0700
63+++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:35:39.969383588 -0700
64@@ -4276,6 +4276,16 @@
65 fi)
66 AC_SUBST(slibdir)
67
68+AC_ARG_ENABLE([poison-system-directories],
69+ AS_HELP_STRING([--enable-poison-system-directories],
70+ [warn for use of native system header directories]),,
71+ [enable_poison_system_directories=no])
72+if test "x${enable_poison_system_directories}" = "xyes"; then
73+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
74+ [1],
75+ [Define to warn for use of native system header directories])
76+fi
77+
78 # Substitute configuration variables
79 AC_SUBST(subdirs)
80 AC_SUBST(srcdir)
81Index: gcc-4.5.0/gcc/doc/invoke.texi
82===================================================================
83--- gcc-4.5.0.orig/gcc/doc/invoke.texi 2010-04-06 07:02:22.000000000 -0700
84+++ gcc-4.5.0/gcc/doc/invoke.texi 2010-06-25 11:35:39.992666345 -0700
85@@ -252,6 +252,7 @@
86 -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
87 -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
88 -Wpointer-arith -Wno-pointer-to-int-cast @gol
89+-Wno-poison-system-directories @gol
90 -Wredundant-decls @gol
91 -Wreturn-type -Wsequence-point -Wshadow @gol
92 -Wsign-compare -Wsign-conversion -Wstack-protector @gol
93@@ -3603,6 +3604,14 @@
94 option will @emph{not} warn about unknown pragmas in system
95 headers---for that, @option{-Wunknown-pragmas} must also be used.
96
97+@item -Wno-poison-system-directories
98+@opindex Wno-poison-system-directories
99+Do not warn for @option{-I} or @option{-L} options using system
100+directories such as @file{/usr/include} when cross compiling. This
101+option is intended for use in chroot environments when such
102+directories contain the correct headers and libraries for the target
103+system rather than the host.
104+
105 @item -Wfloat-equal
106 @opindex Wfloat-equal
107 @opindex Wno-float-equal
108Index: gcc-4.5.0/gcc/gcc.c
109===================================================================
110--- gcc-4.5.0.orig/gcc/gcc.c 2010-02-11 04:23:08.000000000 -0800
111+++ gcc-4.5.0/gcc/gcc.c 2010-06-25 11:35:40.009381858 -0700
112@@ -792,6 +792,8 @@
113 %{flto} %{fwhopr} %l " LINK_PIE_SPEC \
114 "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
115 %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
116+ %{Wno-poison-system-directories:--no-poison-system-directories}\
117+ %{Werror=poison-system-directories:--error-poison-system-directories}\
118 %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
119 %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
120 %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
121Index: gcc-4.5.0/gcc/incpath.c
122===================================================================
123--- gcc-4.5.0.orig/gcc/incpath.c 2009-11-25 02:55:54.000000000 -0800
124+++ gcc-4.5.0/gcc/incpath.c 2010-06-25 11:35:40.017209818 -0700
125@@ -353,6 +353,24 @@
126 }
127 fprintf (stderr, _("End of search list.\n"));
128 }
129+
130+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
131+ if (flag_poison_system_directories)
132+ {
133+ struct cpp_dir *p;
134+
135+ for (p = heads[QUOTE]; p; p = p->next)
136+ {
137+ if ((!strncmp (p->name, "/usr/include", 12))
138+ || (!strncmp (p->name, "/usr/local/include", 18))
139+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
140+ warning (OPT_Wpoison_system_directories,
141+ "include location \"%s\" is unsafe for "
142+ "cross-compilation",
143+ p->name);
144+ }
145+ }
146+#endif
147 }
148
149 /* Use given -I paths for #include "..." but not #include <...>, and
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-pr43698-arm-rev-instr.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-pr43698-arm-rev-instr.patch
new file mode 100644
index 0000000000..61c883e1ff
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-pr43698-arm-rev-instr.patch
@@ -0,0 +1,117 @@
1backport http://gcc.gnu.org/viewcvs?view=revision&revision=162404
2from trunk
3
4Which fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43698
5
62010-07-22 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7
8 PR target/43698
9 * config/arm/arm.md: Split arm_rev into *arm_rev
10 and *thumb1_rev. Set *arm_rev to be predicable.
11
122010-07-22 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13
14 PR target/43698
15 * gcc.target/arm/pr43698.c: New test.
16
17
18/scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
19Usage: date [OPTION]... [+FORMAT]
20Display the current time in the given FORMAT.
21
22 -d, --date=STRING display time described by STRING, not `now'
23 -f, --file=DATEFILE like --date once for each line of DATEFILE
24 -R, --rfc-822 output RFC-822 compliant date string
25 -u, --utc, --universal print or set Coordinated Universal Time
26 --help display this help and exit
27date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
28date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
29date is /bin/date
30date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
31date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
32date is /bin/date
33date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
34date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
35date is /bin/date
36date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
37date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
38date is /bin/date
39date
40Khem
41Index: gcc-4.5/gcc/config/arm/arm.md
42===================================================================
43--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-07-20 20:31:25.000000000 -0700
44+++ gcc-4.5/gcc/config/arm/arm.md 2010-07-22 14:55:54.303169081 -0700
45@@ -11197,15 +11197,21 @@
46 (set_attr "length" "4")]
47 )
48
49-(define_insn "arm_rev"
50+(define_insn "*arm_rev"
51 [(set (match_operand:SI 0 "s_register_operand" "=r")
52 (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
53- "TARGET_EITHER && arm_arch6"
54- "rev\t%0, %1"
55- [(set (attr "length")
56- (if_then_else (eq_attr "is_thumb" "yes")
57- (const_int 2)
58- (const_int 4)))]
59+ "TARGET_32BIT && arm_arch6"
60+ "rev%?\t%0, %1"
61+ [(set_attr "predicable" "yes")
62+ (set_attr "length" "4")]
63+)
64+
65+(define_insn "*thumb1_rev"
66+ [(set (match_operand:SI 0 "s_register_operand" "=l")
67+ (bswap:SI (match_operand:SI 1 "s_register_operand" "l")))]
68+ "TARGET_THUMB1 && arm_arch6"
69+ "rev\t%0, %1"
70+ [(set_attr "length" "2")]
71 )
72
73 (define_expand "arm_legacy_rev"
74Index: gcc-4.5/gcc/testsuite/gcc.target/arm/pr43698.c
75===================================================================
76--- /dev/null 1970-01-01 00:00:00.000000000 +0000
77+++ gcc-4.5/gcc/testsuite/gcc.target/arm/pr43698.c 2010-07-22 14:56:35.406670213 -0700
78@@ -0,0 +1,39 @@
79+/* { dg-do run } */
80+/* { dg-options "-Os -march=armv7-a" } */
81+#include <stdint.h>
82+#include <stdlib.h>
83+
84+
85+char do_reverse_endian = 0;
86+
87+# define bswap_32(x) \
88+ ((((x) & 0xff000000) >> 24) | \
89+ (((x) & 0x00ff0000) >> 8) | \
90+ (((x) & 0x0000ff00) << 8) | \
91+ (((x) & 0x000000ff) << 24))
92+
93+#define EGET(X) \
94+ (__extension__ ({ \
95+ uint64_t __res; \
96+ if (!do_reverse_endian) { __res = (X); \
97+ } else if (sizeof(X) == 4) { __res = bswap_32((X)); \
98+ } \
99+ __res; \
100+ }))
101+
102+void __attribute__((noinline)) X(char **phdr, char **data, int *phoff)
103+{
104+ *phdr = *data + EGET(*phoff);
105+}
106+
107+int main()
108+{
109+ char *phdr;
110+ char *data = (char *)0x40164000;
111+ int phoff = 0x34;
112+ X(&phdr, &data, &phoff);
113+ if (phdr != (char *)0x40164034)
114+ abort ();
115+ exit (0);
116+}
117+
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch
new file mode 100644
index 0000000000..4f94fc9d66
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,67 @@
1Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h
2===================================================================
3--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:30:53.993316002 -0700
4+++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:31:26.043316001 -0700
5@@ -41,12 +41,17 @@
6
7 #include <clocale>
8 #include <cstddef>
9+#include <features.h>
10+#include <ctype.h>
11
12 #define _GLIBCXX_NUM_CATEGORIES 0
13
14 _GLIBCXX_BEGIN_NAMESPACE(std)
15-
16- typedef int* __c_locale;
17+#ifdef __UCLIBC__
18+ typedef __ctype_touplow_t* __c_locale;
19+#else
20+ typedef int* __c_locale;
21+#endif
22
23 // Convert numeric value of type double and long double to string and
24 // return length of string. If vsnprintf is available use it, otherwise
25Index: gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h
26===================================================================
27--- gcc-4.5.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:30:54.013316002 -0700
28+++ gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:31:26.053316001 -0700
29@@ -33,14 +33,21 @@
30 */
31
32 // Information as gleaned from /usr/include/ctype.h
33-
34+
35+#include <features.h>
36+#include <ctype.h>
37+
38 _GLIBCXX_BEGIN_NAMESPACE(std)
39
40 /// @brief Base class for ctype.
41 struct ctype_base
42 {
43 // Non-standard typedefs.
44- typedef const int* __to_type;
45+#ifdef __UCLIBC__
46+ typedef const __ctype_touplow_t* __to_type;
47+#else
48+ typedef const int* __to_type;
49+#endif
50
51 // NB: Offsets into ctype<char>::_M_table force a particular size
52 // on the mask type. Because of this, we don't use an enum.
53Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc
54===================================================================
55--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-28 12:12:42.000000000 -0700
56+++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-30 22:31:26.063316001 -0700
57@@ -256,5 +256,10 @@ _GLIBCXX_END_NAMESPACE
58 #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
59 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
60 extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
61+#ifdef __UCLIBC__
62+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
63+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
64+#else
65 _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
66+#endif
67 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/gcc_revert_base_version_to_4.5.0.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc_revert_base_version_to_4.5.0.patch
new file mode 100644
index 0000000000..5f134ef338
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc_revert_base_version_to_4.5.0.patch
@@ -0,0 +1,9 @@
1the svn patch changed the BASE-VER to 4.5.1, bring it back to 4.5.0
2- Nitin A Kamble nitin.a.kamble@intel.com
3- 2010/07/20
4
5--- gcc-4.5.0/gcc/BASE-VER 2010-07-20 00:57:37.000000000 -0700
6+++ gcc-4.5.0.new/gcc/BASE-VER 2010-07-20 01:06:17.000000000 -0700
7@@ -1 +1 @@
8-4.5.1
9+4.5.0
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-emit-__cxa_end_cleanup-in-text.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-emit-__cxa_end_cleanup-in-text.patch
new file mode 100644
index 0000000000..ada36a5914
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-emit-__cxa_end_cleanup-in-text.patch
@@ -0,0 +1,40 @@
12010-06-07 Khem Raj <raj.khem@gmail.com>
2
3 * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection
4 to emit inline assembly into .text section.
5
6Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc
7===================================================================
8--- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-04 23:20:18.000000000 -0700
9+++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-08 11:27:34.247541722 -0700
10@@ -157,22 +157,26 @@ __gnu_end_cleanup(void)
11 // Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
12 // Also push r4 to preserve stack alignment.
13 #ifdef __thumb__
14-asm (".global __cxa_end_cleanup\n"
15+asm (" .pushsection .text.__cxa_end_cleanup\n"
16+" .global __cxa_end_cleanup\n"
17 " .type __cxa_end_cleanup, \"function\"\n"
18 " .thumb_func\n"
19 "__cxa_end_cleanup:\n"
20 " push\t{r1, r2, r3, r4}\n"
21 " bl\t__gnu_end_cleanup\n"
22 " pop\t{r1, r2, r3, r4}\n"
23-" bl\t_Unwind_Resume @ Never returns\n");
24+" bl\t_Unwind_Resume @ Never returns\n"
25+" .popsection\n");
26 #else
27-asm (".global __cxa_end_cleanup\n"
28+asm (" .pushsection .text.__cxa_end_cleanup\n"
29+" .global __cxa_end_cleanup\n"
30 " .type __cxa_end_cleanup, \"function\"\n"
31 "__cxa_end_cleanup:\n"
32 " stmfd\tsp!, {r1, r2, r3, r4}\n"
33 " bl\t__gnu_end_cleanup\n"
34 " ldmfd\tsp!, {r1, r2, r3, r4}\n"
35-" bl\t_Unwind_Resume @ Never returns\n");
36+" bl\t_Unwind_Resume @ Never returns\n"
37+" .popsection\n");
38 #endif
39
40 #endif
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-pic.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-pic.dpatch
new file mode 100644
index 0000000000..70c9e81542
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-pic.dpatch
@@ -0,0 +1,71 @@
1#! /bin/sh -e
2
3# DP: Build and install libstdc++_pic.a library.
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
27--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
28+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
29@@ -210,6 +210,10 @@
30 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
31
32
33+install-exec-local:
34+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
35+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
36+
37 # Added bits to build debug library.
38 if GLIBCXX_BUILD_DEBUG
39 all-local: build_debug
40diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
41--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
42+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
43@@ -611,7 +611,7 @@
44
45 install-data-am: install-data-local
46
47-install-exec-am: install-toolexeclibLTLIBRARIES
48+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
49
50 install-info: install-info-am
51
52@@ -644,6 +644,7 @@
53 distclean-libtool distclean-tags distdir dvi dvi-am html \
54 html-am info info-am install install-am install-data \
55 install-data-am install-data-local install-exec \
56+ install-exec-local \
57 install-exec-am install-info install-info-am install-man \
58 install-strip install-toolexeclibLTLIBRARIES installcheck \
59 installcheck-am installdirs maintainer-clean \
60@@ -729,6 +730,11 @@
61 install_debug:
62 (cd ${debugdir} && $(MAKE) \
63 toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
64+
65+install-exec-local:
66+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
67+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
68+
69 # Tell versions [3.59,3.63) of GNU make to not export all variables.
70 # Otherwise a system limit (for SysV at least) may be exceeded.
71 .NOEXPORT:
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/optional_libstdc.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/optional_libstdc.patch
new file mode 100644
index 0000000000..0f74353a1f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/optional_libstdc.patch
@@ -0,0 +1,23 @@
1gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
2will not run correctly since my default the linker will try and link against libstdc++
3which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
4option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch
5adds such an option which only disables the -lstdc++ linkage.
6
7A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
8do this officially, the likely answer is don't build libstdc++ separately.
9
10RP 29/6/10
11
12Index: gcc-4.3.3/gcc/cp/g++spec.c
13===================================================================
14--- gcc-4.3.3.orig/gcc/cp/g++spec.c 2010-06-29 00:06:03.901695025 +0100
15+++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
16@@ -131,6 +131,7 @@
17 if (argv[i][0] == '-')
18 {
19 if (strcmp (argv[i], "-nostdlib") == 0
20+ || strcmp (argv[i], "-nostdlib++") == 0
21 || strcmp (argv[i], "-nodefaultlibs") == 0)
22 {
23 library = -1;
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/pr30961.dpatch b/meta/recipes-devtools/gcc/gcc-4.5.0/pr30961.dpatch
new file mode 100644
index 0000000000..b20fdf5bf5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/pr30961.dpatch
@@ -0,0 +1,179 @@
1#! /bin/sh -e
2
3# DP: <your description>
4
5dir=
6if [ $# -eq 3 -a "$2" = '-d' ]; then
7 pdir="-d $3"
8 dir="$3/"
9elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11 exit 1
12fi
13case "$1" in
14 -patch)
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 ;;
17 -unpatch)
18 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19 ;;
20 *)
21 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22 exit 1
23esac
24exit 0
25
26From: "H.J. Lu" <hjl@lucon.org>
27Sender: gcc-patches-owner@gcc.gnu.org
28To: gcc-patches@gcc.gnu.org
29Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
30Date: Mon, 27 Aug 2007 11:34:12 -0700
31
32We start with
33
34(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
35
36(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
37 (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
38 (nil)))
39
40(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
41 (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
42 (nil)))
43
44(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
45
46we are trying to allocate registers for insn 6 and we allocate
47xmm0 for the return value. Reload doesn't check if xmm0 can be used for
48DF 59, it allocates xmm1 for DF 59 and generates:
49
50Reloads for insn # 6
51Reload 0: reload_in (DF) = (reg:DF 5 di)
52 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
53 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
54 reload_reg_rtx: (reg:DF 22 xmm1)
55...
56
57(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
58
59(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
60
61(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
62 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
63 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
64
65(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
66 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
67 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
68
69(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
70 (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
71
72(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
73
74This patch tries to use the destination register when reloading for input. It
75generates
76
77Reloads for insn # 6
78Reload 0: reload_in (DF) = (reg:DF 5 di)
79 SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
80 reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
81 reload_reg_rtx: (reg:DF 21 xmm0)
82...
83(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
84
85(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
86
87(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
88 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
89 (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
90
91(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
92 (mem/c:DF (plus:DI (reg/f:DI 7 sp)
93 (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
94
95(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
96 (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
97
98(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
99 (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
100
101(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
102
103
104H.J.
105----
106gcc/
107
1082007-08-27 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR target/30961
111 * reload1.c (find_reg): Favor the hard register in destination
112 if it is usable and a memory location is needed for reload
113 input.
114
115gcc/testsuite/
116
1172007-08-27 H.J. Lu <hongjiu.lu@intel.com>
118
119 PR target/30961
120 * gcc.target/i386/pr30961-1.c: New.
121
122--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
123+++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
124@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
125 HARD_REG_SET not_usable;
126 HARD_REG_SET used_by_other_reload;
127 reg_set_iterator rsi;
128+#ifdef SECONDARY_MEMORY_NEEDED
129+ rtx body = PATTERN (chain->insn);
130+ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
131+
132+ if (GET_CODE (body) == SET)
133+ {
134+ rtx dest = SET_DEST (body);
135+
136+ if ((REG_P (dest)
137+ || (GET_CODE (dest) == SUBREG
138+ && REG_P (SUBREG_REG (dest)))))
139+ dest_reg = reg_or_subregno (dest);
140+ }
141+#endif
142
143 COPY_HARD_REG_SET (not_usable, bad_spill_regs);
144 IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
145@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
146 this_cost--;
147 if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
148 this_cost--;
149+#ifdef SECONDARY_MEMORY_NEEDED
150+ /* If a memory location is needed for rl->in and dest_reg
151+ is usable, we will favor it. */
152+ else if (dest_reg == regno
153+ && rl->in
154+ && REG_P (rl->in)
155+ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
156+ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
157+ rl->class,
158+ rl->mode))
159+ this_cost = 0;
160+#endif
161 if (this_cost < best_cost
162 /* Among registers with equal cost, prefer caller-saved ones, or
163 use REG_ALLOC_ORDER if it is defined. */
164--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
165+++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
166@@ -0,0 +1,13 @@
167+/* { dg-do compile } */
168+/* { dg-require-effective-target lp64 } */
169+/* { dg-options "-O2" } */
170+
171+double
172+convert (long long in)
173+{
174+ double f;
175+ __builtin_memcpy( &f, &in, sizeof( in ) );
176+ return f;
177+}
178+
179+/* { dg-final { scan-assembler-not "movapd" } } */
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/pr35942.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/pr35942.patch
new file mode 100644
index 0000000000..da610f5189
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/pr35942.patch
@@ -0,0 +1,38 @@
1Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
2
3libstdc++-v3/ChangeLog:
42010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5
6 PR libstdc++/35942
7 * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
8 * configure: Regenerate.
9
10
11Index: gcc-4.3.3/libstdc++-v3/configure
12===================================================================
13--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
14+++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
15@@ -13759,6 +13759,9 @@
16
17
18
19+# Eliminate -lstdc++ addition to postdeps for cross compiles.
20+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
21+
22 # Possibly disable most of the library.
23 ## TODO: Consider skipping unncessary tests altogether in this case, rather
24 ## than just ignoring the results. Faster /and/ more correct, win win.
25Index: gcc-4.3.3/libstdc++-v3/configure.ac
26===================================================================
27--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
28+++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
29@@ -89,6 +89,9 @@
30 AC_SUBST(enable_shared)
31 AC_SUBST(enable_static)
32
33+# Eliminate -lstdc++ addition to postdeps for cross compiles.
34+postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
35+
36 # Possibly disable most of the library.
37 ## TODO: Consider skipping unncessary tests altogether in this case, rather
38 ## than just ignoring the results. Faster /and/ more correct, win win.
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-no-host-includes.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..4ccf35f627
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
1Index: gcc-4.4+svnr145550/gcc/incpath.c
2===================================================================
3--- gcc-4.4+svnr145550.orig/gcc/incpath.c 2009-04-04 13:48:31.000000000 -0700
4+++ gcc-4.4+svnr145550/gcc/incpath.c 2009-04-04 14:49:29.000000000 -0700
5@@ -417,6 +417,26 @@
6 p->construct = 0;
7 p->user_supplied_p = user_supplied_p;
8
9+#ifdef CROSS_COMPILE
10+ /* A common error when cross compiling is including
11+ host headers. This code below will try to fail fast
12+ for cross compiling. Currently we consider /usr/include,
13+ /opt/include and /sw/include as harmful. */
14+ {
15+ /* printf("Adding Path: %s\n", p->name ); */
16+ if( strstr(p->name, "/usr/include" ) == p->name ) {
17+ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
18+ abort();
19+ } else if( strstr(p->name, "/sw/include") == p->name ) {
20+ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
21+ abort();
22+ } else if( strstr(p->name, "/opt/include") == p->name ) {
23+ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
24+ abort();
25+ }
26+ }
27+#endif
28+
29 add_cpp_dir_path (p, chain);
30 }
31
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..4b827d6397
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch
@@ -0,0 +1,28 @@
1upstream: n/a
2comment: Use the preprocessor we have just compiled instead the one of
3the system. There might be incompabilities between us and them.
4
5Index: gcc-4.5.0/Makefile.in
6===================================================================
7--- gcc-4.5.0.orig/Makefile.in 2010-02-17 03:01:44.000000000 -0800
8+++ gcc-4.5.0/Makefile.in 2010-06-25 11:22:08.421381364 -0700
9@@ -266,6 +266,7 @@
10 AR="$(AR_FOR_TARGET)"; export AR; \
11 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
12 CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
13+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
14 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
15 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
16 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
17Index: gcc-4.5.0/Makefile.tpl
18===================================================================
19--- gcc-4.5.0.orig/Makefile.tpl 2010-02-17 03:01:44.000000000 -0800
20+++ gcc-4.5.0/Makefile.tpl 2010-06-25 11:22:16.945631990 -0700
21@@ -269,6 +269,7 @@
22 AR="$(AR_FOR_TARGET)"; export AR; \
23 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
24 CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
25+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
26 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
27 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
28 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
new file mode 100644
index 0000000000..1e9c65e662
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -0,0 +1,46 @@
1DESCRIPTION = "The GNU cc and gcc C compilers."
2HOMEPAGE = "http://www.gnu.org/software/gcc/"
3SECTION = "devel"
4LICENSE = "GPL"
5
6NATIVEDEPS = ""
7
8inherit autotools gettext
9
10FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
11
12def get_gcc_fpu_setting(bb, d):
13 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
14 return "--with-float=soft"
15 return ""
16
17def get_gcc_mips_plt_setting(bb, d):
18 if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
19 return "--with-mips-plt"
20 return ""
21
22# We really need HOST_SYS here for some packages and TARGET_SYS for others.
23# For now, libgcc is most important so we fix for that - RP.
24SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
25
26DEBIANNAME_libgcc = "libgcc1"
27
28MIRRORS_prepend () {
29${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
30${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
31${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
32${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
33}
34
35#
36# Set some default values
37#
38gcclibdir = "${libdir}/gcc"
39BINV = "${PV}"
40S = "${WORKDIR}/gcc-${PV}"
41B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
42
43target_includedir ?= "${includedir}"
44target_libdir ?= "${libdir}"
45target_base_libdir ?= "${base_libdir}"
46target_prefix ?= "${prefix}"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
new file mode 100644
index 0000000000..5a55025ac5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -0,0 +1,107 @@
1#
2# Build the list of lanaguages to build.
3#
4# These can be overridden by the version specific .inc file.
5
6# Java (gcj doesn't work on all architectures)
7JAVA ?= ",java"
8JAVA_arm ?= ""
9JAVA_armeb ?= ""
10JAVA_mipsel ?= ""
11JAVA_sh3 ?= ""
12# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
13FORTRAN ?= ",f77"
14LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
15# disable --enable-target-optspace for powerpc SPE
16# at -Os libgcc.so.1 creates references into
17# hidden symbols in libgcc.a which linker complains
18# when linking shared libraries further in the build like (gnutls)
19
20OPTSPACE = "${@base_contains('TARGET_ARCH', ['powerpc', 'arm'], '', '--enable-target-optspace',d)}"
21
22EXTRA_OECONF_BASE ?= ""
23EXTRA_OECONF_PATHS ?= ""
24EXTRA_OECONF_INITIAL ?= ""
25EXTRA_OECONF_INTERMEDIATE ?= ""
26
27GCCMULTILIB = "--disable-multilib"
28
29EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
30 --with-gnu-ld \
31 --enable-shared \
32 --enable-languages=${LANGUAGES} \
33 --enable-threads=posix \
34 ${GCCMULTILIB} \
35 --enable-c99 \
36 --enable-long-long \
37 --enable-symvers=gnu \
38 --enable-libstdcxx-pch \
39 --program-prefix=${TARGET_PREFIX} \
40 ${OPTSPACE} \
41 ${EXTRA_OECONF_BASE} \
42 ${EXTRA_OECONF_FPU} \
43 ${EXTRA_OECONF_PATHS} \
44 ${@get_gcc_mips_plt_setting(bb, d)}"
45
46# Build uclibc compilers without cxa_atexit support
47EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
48EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit"
49EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit"
50EXTRA_OECONF_append_linux-uclibcgnueabi = " --disable-__cxa_atexit"
51EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
52CPPFLAGS = ""
53
54# Used by configure to define additional values for FLAGS_FOR_TARGET -
55# passed to all the compilers.
56ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}"
57EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
58
59SYSTEMHEADERS = "${target_includedir}"
60SYSTEMLIBS = "${target_base_libdir}/"
61SYSTEMLIBS1 = "${target_libdir}/"
62
63do_configure () {
64 # Setup these vars for cross building only
65 # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
66 # gcc build stuff when the build is producing a cross compiler - i.e.
67 # when the 'current' target is the 'host' system, and the host is not
68 # the target (because the build is actually making a cross compiler!)
69 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
70 export CC_FOR_TARGET="${CC}"
71 export GCC_FOR_TARGET="${CC}"
72 export CXX_FOR_TARGET="${CXX}"
73 export AS_FOR_TARGET="${HOST_PREFIX}as"
74 export LD_FOR_TARGET="${HOST_PREFIX}ld"
75 export NM_FOR_TARGET="${HOST_PREFIX}nm"
76 export AR_FOR_TARGET="${HOST_PREFIX}ar"
77 export GFORTRAN_FOR_TARGET="gfortran"
78 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
79 fi
80 export CC_FOR_BUILD="${BUILD_CC}"
81 export CXX_FOR_BUILD="${BUILD_CXX}"
82 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
83 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
84 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
85 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
86 export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
87 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
88
89 # splice our idea of where the headers live into gcc's world
90 echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${T}/t-oe
91 sed 's%^tmake_file=.*$%& ${T}/t-oe%' < ${S}/gcc/Makefile.in >${S}/gcc/Makefile.in.new
92 mv ${S}/gcc/Makefile.in.new ${S}/gcc/Makefile.in
93 cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${S}/gcc/defaults.h.new
94 echo "#ifndef STANDARD_INCLUDE_DIR" >> ${S}/gcc/defaults.h.new
95 echo "#define STANDARD_INCLUDE_DIR \"${SYSTEMHEADERS}\"" >> ${S}/gcc/defaults.h.new
96 echo "#endif" >> ${S}/gcc/defaults.h.new
97 echo "#ifndef STANDARD_STARTFILE_PREFIX_1" >> ${S}/gcc/defaults.h.new
98 echo "#define STANDARD_STARTFILE_PREFIX_1 \"${SYSTEMLIBS}\"" >> ${S}/gcc/defaults.h.new
99 echo "#endif" >> ${S}/gcc/defaults.h.new
100 echo "#ifndef STANDARD_STARTFILE_PREFIX_2" >> ${S}/gcc/defaults.h.new
101 echo "#define STANDARD_STARTFILE_PREFIX_2 \"${SYSTEMLIBS1}\"" >> ${S}/gcc/defaults.h.new
102 echo "#endif" >> ${S}/gcc/defaults.h.new
103 echo "#endif /* ! GCC_DEFAULTS_H */" >> ${S}/gcc/defaults.h.new
104 mv ${S}/gcc/defaults.h.new ${S}/gcc/defaults.h
105 oe_runconf
106}
107
diff --git a/meta/recipes-devtools/gcc/gcc-configure-cross.inc b/meta/recipes-devtools/gcc/gcc-configure-cross.inc
new file mode 100644
index 0000000000..6051a7678e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-cross.inc
@@ -0,0 +1,22 @@
1require gcc-configure-common.inc
2
3USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
4
5EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_exec_prefix} \
6 --with-gxx-include-dir=${STAGING_DIR_TARGET}/${target_includedir}/c++ \
7 --with-sysroot=${STAGING_DIR_TARGET} \
8 --with-build-sysroot=${STAGING_DIR_TARGET}"
9
10do_compile_prepend () {
11 export CC="${BUILD_CC}"
12 export AR_FOR_TARGET="${TARGET_SYS}-ar"
13 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
14 export LD_FOR_TARGET="${TARGET_SYS}-ld"
15 export NM_FOR_TARGET="${TARGET_SYS}-nm"
16 export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
17}
18
19LIBGCCS_VAR = "-lgcc_s"
20LIBGCCS_VAR_avr32 = ""
21
22do_package_write_ipk[depends] += "virtual/libc:do_package"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
new file mode 100644
index 0000000000..f9ad61d129
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -0,0 +1,59 @@
1require gcc-configure-common.inc
2
3EXTRA_OECONF_PATHS = " \
4 --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
5 --with-gxx-include-dir=${includedir}/c++/ \
6 --with-sysroot=${STAGING_DIR_TARGET} \
7 --with-build-sysroot=${STAGING_DIR_TARGET}"
8
9RUNTIMETARGET = "libssp libstdc++-v3"
10# ?
11# libiberty
12# libmudflap
13# libgfortran
14
15do_configure () {
16 export CXX="${CXX} -nostdinc++ -nostdlib++"
17 for d in ${RUNTIMETARGET}; do
18 echo "Configuring $d"
19 mkdir -p ${B}/$d/
20 cd ${B}/$d/
21 chmod a+x ${S}/$d/configure
22 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
23 done
24}
25
26do_compile () {
27 for d in ${RUNTIMETARGET}; do
28 cd ${B}/$d/
29 oe_runmake
30 done
31}
32
33do_install () {
34 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
35
36 # Install libgcc from our gcc-cross saved data
37 install -d ${D}${base_libdir} ${D}${libdir}
38 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
39
40 for d in ${RUNTIMETARGET}; do
41 cd ${B}/$d/
42 oe_runmake 'DESTDIR=${D}' install
43 done
44
45 # Move libgcc_s into /lib
46 mkdir -p ${D}${base_libdir}
47 if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
48 mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
49 else
50 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
51 fi
52}
53
54INHIBIT_DEFAULT_DEPS = "1"
55DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
56PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
57
58BBCLASSEXTEND = "nativesdk"
59
diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
new file mode 100644
index 0000000000..0eb33adda8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
@@ -0,0 +1,48 @@
1require gcc-configure-common.inc
2
3# The two lines below conflict, this needs fixing - RP
4USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
5USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
6
7EXTRA_OECONF_PATHS = "--with-local-prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
8 --with-gxx-include-dir=${SDKPATH}/sysroots/${TARGET_SYS}${target_includedir}/c++ \
9 --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
10 --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
11 --with-build-sysroot=${STAGING_DIR_TARGET}"
12
13#
14# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
15# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
16#
17export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
18export AS_FOR_TARGET = "${TARGET_PREFIX}as"
19export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
20export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
21export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
22export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
23export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
24export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
25export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
26export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
27export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
28export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
29
30#
31# We need to override this and make sure the compiler can find staging
32#
33export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
34
35do_configure () {
36 export CC_FOR_BUILD="${BUILD_CC}"
37 export CXX_FOR_BUILD="${BUILD_CXX}"
38 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
39 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
40 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
41 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
42 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
43 oe_runconf
44}
45
46do_compile () {
47 oe_runmake all-host all-target-libgcc
48}
diff --git a/meta/recipes-devtools/gcc/gcc-configure-target.inc b/meta/recipes-devtools/gcc/gcc-configure-target.inc
new file mode 100644
index 0000000000..2fd3114911
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-target.inc
@@ -0,0 +1,5 @@
1require gcc-configure-common.inc
2
3EXTRA_OECONF_PATHS = " \
4 --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
5 --with-gxx-include-dir=${includedir}/c++/${BINV}/"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
new file mode 100644
index 0000000000..a3b15c3dc6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -0,0 +1,4 @@
1inherit cross-canadian
2
3DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc gettext-nativesdk"
4
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
new file mode 100644
index 0000000000..981452b7a7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
@@ -0,0 +1,24 @@
1inherit cross-canadian
2
3require gcc-${PV}.inc
4require gcc-cross-canadian.inc
5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc
7
8PR = "r17"
9
10DEPENDS += "gmp-nativesdk mpfr-nativesdk"
11RDEPENDS_${PN} += "mpfr-nativesdk"
12
13SYSTEMHEADERS = "/usr/include"
14SYSTEMLIBS = "/lib/"
15SYSTEMLIBS1 = "/usr/lib/"
16
17EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
18 --disable-libgomp --disable-libmudflap \
19 --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix}"
20
21# to find libmpfr
22# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
23
24PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb
new file mode 100644
index 0000000000..dd19412139
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb
@@ -0,0 +1,25 @@
1inherit cross-canadian
2
3require gcc-${PV}.inc
4require gcc-cross-canadian.inc
5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc
7
8PR = "r6"
9
10DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
11RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
12
13SYSTEMHEADERS = "/usr/include"
14SYSTEMLIBS = "/lib/"
15SYSTEMLIBS1 = "/usr/lib/"
16
17EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
18 --disable-libgomp --disable-libmudflap \
19 --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
20 --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
21
22# to find libmpfr
23# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
24
25PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
new file mode 100644
index 0000000000..f582de9843
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -0,0 +1,24 @@
1DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}"
2PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
3PACKAGES = ""
4
5# This is intended to be a -very- basic config
6# sysroot is needed in case we use libc-initial
7EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
8 --with-newlib \
9 --without-headers \
10 --disable-shared \
11 --disable-threads \
12 --disable-multilib \
13 --disable-__cxa_atexit \
14 --enable-languages=c \
15 ${OPTSPACE} \
16 --program-prefix=${TARGET_PREFIX} \
17 --with-sysroot=${STAGING_DIR_TARGET} \
18 --with-build-sysroot=${STAGING_DIR_TARGET} \
19 ${EXTRA_OECONF_INITIAL} \
20 ${@get_gcc_fpu_setting(bb, d)}"
21
22do_compile () {
23 oe_runmake
24}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb
new file mode 100644
index 0000000000..b2c257d9d4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb
@@ -0,0 +1,5 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-initial.inc
3
4PR = "r2"
5
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb
new file mode 100644
index 0000000000..ef52845b01
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb
@@ -0,0 +1,5 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-initial.inc
3
4PR = "r6"
5
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..06211033b8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_csl-arm-2008q1.bb
@@ -0,0 +1,10 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-initial.inc
3
4S = "${WORKDIR}/gcc-4.2"
5
6# Hack till we fix *libc properly
7do_install_append() {
8 ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
9}
10
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
new file mode 100644
index 0000000000..72a42411b1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -0,0 +1,28 @@
1DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}"
2DEPENDS += "virtual/${TARGET_PREFIX}libc-initial gettext-native"
3PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate"
4PACKAGES = ""
5
6# This is intended to be a -very- basic config
7# sysroot is needed in case we use libc-initial
8EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
9 --enable-shared \
10 --disable-multilib \
11 --disable-threads \
12 --enable-languages=c \
13 ${OPTSPACE} \
14 --program-prefix=${TARGET_PREFIX} \
15 --with-sysroot=${STAGING_DIR_TARGET} \
16 --with-build-sysroot=${STAGING_DIR_TARGET} \
17 ${EXTRA_OECONF_INTERMEDIATE} \
18 ${@get_gcc_fpu_setting(bb, d)}"
19
20do_compile () {
21 oe_runmake
22}
23
24do_install () {
25 oe_runmake 'DESTDIR=${D}' install
26 install -d ${D}${target_base_libdir}/
27 mv ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${D}${target_base_libdir}/
28}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb
new file mode 100644
index 0000000000..10681dad4b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb
@@ -0,0 +1,4 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-intermediate.inc
3PR = "r2"
4
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb
new file mode 100644
index 0000000000..deeee37c26
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb
@@ -0,0 +1,4 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-intermediate.inc
3PR = "r6"
4
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..8a8f21a575
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
@@ -0,0 +1,10 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-intermediate.inc
3
4S = "${WORKDIR}/gcc-4.2"
5
6# Hack till we fix *libc properly
7do_install_append() {
8 ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
9}
10
diff --git a/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb b/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
new file mode 100644
index 0000000000..6dbb19cec9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
@@ -0,0 +1,15 @@
1# This kernel compiler is required by the Freecom FSG-3 machine
2# This kernel compiler is required by the Nokia tablets
3# Please talk to Rod Whitby and Richard Purdie before considering removing this file.
4
5require gcc-csl-arm-2005q3.inc
6require gcc-cross.inc
7require gcc-cross-initial.inc
8require gcc-cross-kernel.inc
9
10DEFAULT_PREFERENCE = "-1"
11
12PR = "r1"
13
14SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"
15
diff --git a/meta/recipes-devtools/gcc/gcc-cross-kernel.inc b/meta/recipes-devtools/gcc/gcc-cross-kernel.inc
new file mode 100644
index 0000000000..5347762762
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-kernel.inc
@@ -0,0 +1,10 @@
1# Cut-down gcc for kernel builds
2# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
3
4PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
5
6do_install () {
7 cd gcc
8 oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc
9 install -m 0755 xgcc ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
10}
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
new file mode 100644
index 0000000000..5a796bcde6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -0,0 +1,12 @@
1inherit cross
2
3DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${NATIVEDEPS}"
4PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
5
6require gcc-configure-cross.inc
7require gcc-package-cross.inc
8
9do_compile () {
10 oe_runmake all-host all-target-libgcc
11}
12
diff --git a/meta/recipes-devtools/gcc/gcc-cross4.inc b/meta/recipes-devtools/gcc/gcc-cross4.inc
new file mode 100644
index 0000000000..ea20a24a01
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross4.inc
@@ -0,0 +1 @@
require gcc-cross.inc
diff --git a/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb
new file mode 100644
index 0000000000..36f91d0221
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb
@@ -0,0 +1,10 @@
1PR = "r15"
2
3require gcc-${PV}.inc
4require gcc-cross4.inc
5
6SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
7
8EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
9
10ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb
new file mode 100644
index 0000000000..8d28ab3e59
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb
@@ -0,0 +1,12 @@
1PR = "r6"
2
3require gcc-${PV}.inc
4require gcc-cross4.inc
5
6SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch "
7
8EXTRA_OECONF += "--disable-libunwind-exceptions \
9 --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
10 --with-system-zlib"
11
12ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..11857b2c37
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb
@@ -0,0 +1,26 @@
1PR = "r2"
2
3require gcc-csl-arm-2008q1.inc
4require gcc-cross4.inc
5require gcc-configure-cross.inc
6require gcc-package-cross.inc
7
8SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch "
9
10EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
11
12#We don't want i686 linux ending up in the CFLAGS_FOR_TARGET like this: -isystem/OE/angstrom-tmp/staging/i686-linux/usr/include
13CFLAGS = ""
14CXXFLAGS = ""
15LDFLAGS = ""
16
17# staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
18do_compile_prepend() {
19 ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
20 ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
21 ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
22 sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
23
24}
25
26ARCH_FLAGS_FOR_TARGET += " -L${STAGING_DIR_TARGET}${target_libdir} -isystem${STAGING_DIR_TARGET}${target_includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc b/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
new file mode 100644
index 0000000000..eb8d27397d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
@@ -0,0 +1,8 @@
1inherit crosssdk
2
3SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
4SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
5SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
6
7DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
8PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial-crosssdk"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb
new file mode 100644
index 0000000000..e804b4b016
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb
@@ -0,0 +1,3 @@
1require gcc-cross-initial_${PV}.bb
2require gcc-crosssdk-initial.inc
3PR = "r3"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb
new file mode 100644
index 0000000000..c76e4074dc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb
@@ -0,0 +1,4 @@
1require gcc-cross-initial_${PV}.bb
2require gcc-crosssdk-initial.inc
3
4PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
new file mode 100644
index 0000000000..ed5d5e838d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
@@ -0,0 +1,9 @@
1inherit crosssdk
2
3SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
4SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
5SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
6
7DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
8DEPENDS += "virtual/${TARGET_PREFIX}libc-initial-nativesdk"
9PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate-crosssdk"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb
new file mode 100644
index 0000000000..5f01473add
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb
@@ -0,0 +1,3 @@
1require gcc-cross-intermediate_${PV}.bb
2require gcc-crosssdk-intermediate.inc
3PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb
new file mode 100644
index 0000000000..42c498704a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb
@@ -0,0 +1,4 @@
1require gcc-cross-intermediate_${PV}.bb
2require gcc-crosssdk-intermediate.inc
3
4PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk.inc b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
new file mode 100644
index 0000000000..6e7d5a73f9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
@@ -0,0 +1,16 @@
1inherit crosssdk
2
3SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
4SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
5SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
6
7GCCMULTILIB = "--disable-multilib"
8
9DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc-nativesdk gettext-native"
10PROVIDES = "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/${TARGET_PREFIX}g++-crosssdk"
11
12do_configure_prepend () {
13 # Change the default dynamic linker path to the one in the SDK
14 sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib/#\1${SYSTEMLIBS}#'
15 sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib64/#\1${SYSTEMLIBS}#'
16}
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb
new file mode 100644
index 0000000000..92a3f11388
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb
@@ -0,0 +1,3 @@
1require gcc-cross_${PV}.bb
2require gcc-crosssdk.inc
3PR="r1"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb
new file mode 100644
index 0000000000..9e94c806d1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb
@@ -0,0 +1,4 @@
1require gcc-cross_${PV}.bb
2require gcc-crosssdk.inc
3
4PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm-2005q3.inc b/meta/recipes-devtools/gcc/gcc-csl-arm-2005q3.inc
new file mode 100644
index 0000000000..fd2b3793dc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm-2005q3.inc
@@ -0,0 +1,22 @@
1require gcc-common.inc
2
3BINV = "3.4.4"
4PV = "3.4.4+csl-arm-2005q3-2"
5PV_chinook-compat = "3.4.4cs2005q3.2"
6
7FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
8
9SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2 \
10 file://gcc_optab_arm.patch;patch=1 \
11 file://gcc-3.4.4-eabi-bigendian.patch;patch=1"
12
13S = "${WORKDIR}/gcc-2005q3"
14
15do_unpack2() {
16 cd ${WORKDIR}
17 tar -xvjf ./arm-2005q3-2-arm-none-eabi/gcc-2005q3-2.tar.bz2
18}
19
20addtask unpack2 after do_unpack before do_patch
21
22
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc b/meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc
new file mode 100644
index 0000000000..e84bd835d2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc
@@ -0,0 +1,53 @@
1require gcc-common.inc
2
3BINV = "4.2.3"
4PV = "4.2.3+csl-arm-2008q1-126"
5
6FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
7
8SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
9# file://100-uclibc-conf.patch;patch=1 \
10# file://103-uclibc-conf-noupstream.patch;patch=1 \
11# file://200-uclibc-locale.patch;patch=1 \
12# file://203-uclibc-locale-no__x.patch;patch=1 \
13# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
14# file://205-uclibc-locale-update.patch;patch=1 \
15# file://300-libstdc++-pic.patch;patch=1 \
16# file://302-c99-snprintf.patch;patch=1 \
17# file://303-c99-complex-ugly-hack.patch;patch=1 \
18# file://304-index_macro.patch;patch=1 \
19# file://305-libmudflap-susv3-legacy.patch;patch=1 \
20# file://306-libstdc++-namespace.patch;patch=1 \
21# file://307-locale_facets.patch;patch=1 \
22# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
23# file://602-sdk-libstdc++-includes.patch;patch=1 \
24 file://gcc41-configure.in.patch;patch=1 \
25 file://arm-nolibfloat.patch;patch=1 \
26 file://arm-softfloat.patch;patch=1 \
27 file://zecke-xgcc-cpp.patch;patch=1 \
28# file://gfortran.patch;patch=1 \
29# file://fortran-static-linking.patch;patch=1 \
30# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
31# file://gcc-new-makeinfo.patch;patch=1 \
32"
33
34
35S = "${WORKDIR}/gcc-4.2"
36
37do_unpack2() {
38 cd ${WORKDIR}
39 tar -xvjf ./arm-2008q1-126-arm-none-eabi/gcc-2008q1-126.tar.bz2
40}
41
42# Language Overrides
43FORTRAN = ""
44#FORTRAN_linux-gnueabi = ",fortran"
45#JAVA = ",java"
46
47EXTRA_OECONF_BASE = "--enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
48EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --disable-bootstrap"
49EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp --disable-bootstrap"
50
51ARM_INSTRUCTION_SET = "arm"
52
53addtask unpack2 after do_unpack before do_patch
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch
new file mode 100644
index 0000000000..d0f3e72d47
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch
@@ -0,0 +1,22 @@
1--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000
2+++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000
3@@ -671,7 +671,8 @@
4
5 case SET:
6 scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
7- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
8+ scan_rtx (insn, &SET_DEST (x), class, action,
9+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
10 return;
11
12 case STRICT_LOW_PART:
13@@ -696,7 +697,8 @@
14 abort ();
15
16 case CLOBBER:
17- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
18+ scan_rtx (insn, &SET_DEST (x), class, action,
19+ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
20 return;
21
22 case EXPR_LIST:
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
1# Dimitry Andric <dimitry@andric.com>, 2004-05-01
2#
3# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
4# anymore. (The required functions are now in libgcc.)
5#
6# Fixes errors like
7# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
8# collect2: ld returned 1 exit status
9# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
10# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
11
12Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
13===================================================================
14--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
15+++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
16@@ -56,7 +56,7 @@
17 %{shared:-lc} \
18 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
19
20-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
21+#define LIBGCC_SPEC "-lgcc"
22
23 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
24 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
new file mode 100644
index 0000000000..5e1edd9208
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.0.2/gcc/config/arm/t-linux
2===================================================================
3--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
4+++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
5@@ -4,7 +4,10 @@
6 LIBGCC2_DEBUG_CFLAGS = -g0
7
8 LIB1ASMSRC = arm/lib1funcs.asm
9-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
10+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
11+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
12+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
13+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
14
15 # MULTILIB_OPTIONS = mhard-float/msoft-float
16 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch
new file mode 100644
index 0000000000..ef7cd111c5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch
@@ -0,0 +1,13 @@
1diff --git a/gcc/configure b/gcc/configure
2index 44620ab..6e1830c 100755
3--- a/gcc/configure
4+++ b/gcc/configure
5@@ -12272,7 +12272,7 @@ else
6 esac
7 saved_CFLAGS="${CFLAGS}"
8 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
9- ${realsrcdir}/configure \
10+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
11 --enable-languages=${enable_languages-all} \
12 --target=$target_alias --host=$build_alias --build=$build_alias
13 CFLAGS="${saved_CFLAGS}"
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch
@@ -0,0 +1,48 @@
1f951 (fortran) links to MPFR and GMP of our staging area but when executing
2the command the libs can not be found. Use rpath like all the other apps in
3our staging bin/ directory.
4
5Patch the configure to avoid the regeneration...
6
7Index: gcc-4.2.2/configure
8===================================================================
9--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
10+++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
11@@ -2278,14 +2278,14 @@
12
13
14 if test "x$with_mpfr" != x; then
15- gmplibs="-L$with_mpfr/lib $gmplibs"
16+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
17 gmpinc="-I$with_mpfr/include"
18 fi
19 if test "x$with_mpfr_include" != x; then
20 gmpinc="-I$with_mpfr_include"
21 fi
22 if test "x$with_mpfr_lib" != x; then
23- gmplibs="-L$with_mpfr_lib $gmplibs"
24+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
25 fi
26
27 # Specify a location for gmp
28Index: gcc-4.2.2/configure.in
29===================================================================
30--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
31+++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
32@@ -1066,14 +1066,14 @@
33 AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
34
35 if test "x$with_mpfr" != x; then
36- gmplibs="-L$with_mpfr/lib $gmplibs"
37+ gmplibs="-static -L$with_mpfr/lib $gmplibs"
38 gmpinc="-I$with_mpfr/include"
39 fi
40 if test "x$with_mpfr_include" != x; then
41 gmpinc="-I$with_mpfr_include"
42 fi
43 if test "x$with_mpfr_lib" != x; then
44- gmplibs="-L$with_mpfr_lib $gmplibs"
45+ gmplibs="-static -L$with_mpfr_lib $gmplibs"
46 fi
47
48 # Specify a location for gmp
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
new file mode 100644
index 0000000000..cf17da6a02
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
@@ -0,0 +1,24 @@
1# Fixes errors like the following when building glibc (or any other executable
2# or shared library) when using gcc 3.4.0 for ARM with softfloat:
3#
4# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
5# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
6# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
7# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
8# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
9
10diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
11--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
12+++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
13@@ -4,7 +4,10 @@
14 LIBGCC2_DEBUG_CFLAGS = -g0
15
16 LIB1ASMSRC = arm/lib1funcs.asm
17-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
18+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
19+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
20+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
21+ _fixsfsi _fixunssfsi _floatdidf _floatdisf
22
23 # MULTILIB_OPTIONS = mhard-float/msoft-float
24 # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
new file mode 100644
index 0000000000..e6cc42bb65
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
@@ -0,0 +1,12 @@
1--- gcc-2005q3/gcc/config/arm/linux-eabi.h~ 2007-07-10 09:19:47.000000000 +0930
2+++ gcc-2005q3/gcc/config/arm/linux-eabi.h 2007-07-10 10:42:37.000000000 +0930
3@@ -48,7 +48,8 @@
4 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
5
6 #undef SUBTARGET_EXTRA_LINK_SPEC
7-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
8+#define SUBTARGET_EXTRA_LINK_SPEC \
9+ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
10
11 /* Use ld-linux.so.3 so that it will be possible to run "classic"
12 GNU/Linux binaries on an EABI system. */
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
new file mode 100644
index 0000000000..74c1f26833
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
@@ -0,0 +1,29 @@
1--- gcc-3.4.4/gcc/Makefile.in.orig 2005-07-25 21:00:37 +0200
2+++ gcc-3.4.4/gcc/Makefile.in 2005-07-25 21:01:19 +0200
3@@ -304,7 +304,7 @@
4 if [ "$(host)" = "$(target)" ] ; then \
5 echo ar; \
6 else \
7- t='$(program_transform_name)'; echo ar | sed -e $$t ; \
8+ t='$(program_transform_name)'; echo ar | sed -e "$$t" ; \
9 fi; \
10 fi`
11 AR_FLAGS_FOR_TARGET =
12@@ -317,7 +317,7 @@
13 if [ "$(host)" = "$(target)" ] ; then \
14 echo $(RANLIB); \
15 else \
16- t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
17+ t='$(program_transform_name)'; echo ranlib | sed -e "$$t" ; \
18 fi; \
19 fi`
20 NM_FOR_TARGET = ` \
21@@ -329,7 +329,7 @@
22 if [ "$(host)" = "$(target)" ] ; then \
23 echo nm; \
24 else \
25- t='$(program_transform_name)'; echo nm | sed -e $$t ; \
26+ t='$(program_transform_name)'; echo nm | sed -e "$$t" ; \
27 fi; \
28 fi`
29
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
new file mode 100644
index 0000000000..c845503303
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
@@ -0,0 +1,1075 @@
1--- tmp/configure.in.orig 2006-09-05 17:50:48.000000000 +0100
2+++ tmp/configure.in 2006-09-05 17:50:48.000000000 +0100
3@@ -157,7 +157,6 @@
4 target-libstdc++-v3 \
5 target-libmudflap \
6 target-libssp \
7- target-libgfortran \
8 ${libgcj} \
9 target-libobjc \
10 target-libada"
11@@ -1084,77 +1083,6 @@
12 AC_SUBST(docdir)
13 AC_SUBST(htmldir)
14
15-# Check for GMP and MPFR
16-gmplibs=
17-gmpinc=
18-have_gmp=yes
19-# Specify a location for mpfr
20-# check for this first so it ends up on the link line before gmp.
21-AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH Specify source directory for MPFR library])
22-
23-if test "x$with_mpfr_dir" != x; then
24- gmpinc="-I$with_mpfr_dir"
25- gmplibs="$with_mpfr_dir/libmpfr.a"
26-else
27- gmplibs="-lmpfr"
28-fi
29-
30-AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify directory for installed MPFR library])
31-
32-if test "x$with_mpfr" != x; then
33- gmplibs="-L$with_mpfr/lib $gmplibs"
34- gmpinc="-I$with_mpfr/include"
35-fi
36-
37-# Specify a location for gmp
38-AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library])
39-
40-if test "x$with_gmp_dir" != x; then
41- gmpinc="$gmpinc -I$with_gmp_dir"
42- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
43- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
44- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
45- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
46- fi
47- # One of the later tests will catch the error if neither library is present.
48-else
49- gmplibs="$gmplibs -lgmp"
50-fi
51-
52-AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library])
53-
54-if test "x$with_gmp" != x; then
55- gmplibs="-L$with_gmp/lib $gmplibs"
56- gmpinc="-I$with_gmp/include $gmpinc"
57-fi
58-
59-saved_CFLAGS="$CFLAGS"
60-CFLAGS="$CFLAGS $gmpinc"
61-# Check GMP actually works
62-AC_MSG_CHECKING([for correct version of gmp.h])
63-AC_TRY_COMPILE([#include "gmp.h"],[
64-#if __GNU_MP_VERSION < 3
65-choke me
66-#endif
67-], [AC_MSG_RESULT([yes])],
68- [AC_MSG_RESULT([no]); have_gmp=no])
69-
70-if test x"$have_gmp" = xyes; then
71- AC_MSG_CHECKING([for MPFR])
72-
73- saved_LIBS="$LIBS"
74- LIBS="$LIBS $gmplibs"
75- AC_TRY_LINK([#include <gmp.h>
76-#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
77- [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
78- LIBS="$saved_LIBS"
79- CFLAGS="$saved_CFLAGS"
80-fi
81-
82-# Flags needed for both GMP and/or MPFR
83-AC_SUBST(gmplibs)
84-AC_SUBST(gmpinc)
85-
86 # By default, C is the only stage 1 language.
87 stage1_languages=c
88 AC_SUBST(stage1_languages)
89@@ -1182,15 +1110,6 @@
90 fi
91 enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
92
93- # 'f95' is the old name for the 'fortran' language. We issue a warning
94- # and make the substitution.
95- case ,${enable_languages}, in
96- *,f95,*)
97- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
98- enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
99- ;;
100- esac
101-
102 # First scan to see if an enabled language requires some other language.
103 # We assume that a given config-lang.in will list all the language
104 # front ends it requires, even if some are required indirectly.
105@@ -2213,7 +2132,6 @@
106 NCN_STRICT_CHECK_TARGET_TOOLS(DLLTOOL_FOR_TARGET, dlltool)
107 NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
108 NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
109-NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
110 NCN_STRICT_CHECK_TARGET_TOOLS(LD_FOR_TARGET, ld)
111 NCN_STRICT_CHECK_TARGET_TOOLS(LIPO_FOR_TARGET, lipo)
112 NCN_STRICT_CHECK_TARGET_TOOLS(NM_FOR_TARGET, nm)
113@@ -2237,9 +2155,7 @@
114 GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
115 GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ,
116 [gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java)
117-GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
118- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
119 GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
120 GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
121 GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
122
123--- tmp/Makefile.in.orig 2006-09-06 08:33:46.000000000 +0100
124+++ tmp/Makefile.in 2006-09-06 08:33:46.000000000 +0100
125@@ -119,7 +119,6 @@
126 CXX="$(CXX_FOR_BUILD)"; export CXX; \
127 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
128 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
129- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
130 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
131 LD="$(LD_FOR_BUILD)"; export LD; \
132 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
133@@ -201,7 +200,6 @@
134 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
135 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
136 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
137- GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
138 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
139 LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
140 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
141@@ -313,7 +311,6 @@
142 CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
143 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
144 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
145-GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
146 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
147 LD_FOR_TARGET=@LD_FOR_TARGET@
148
149@@ -452,7 +449,6 @@
150 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
151 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
152 "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
153- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
154 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
155 "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
156 "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
157@@ -618,7 +614,6 @@
158 maybe-configure-target-libmudflap \
159 maybe-configure-target-libssp \
160 maybe-configure-target-newlib \
161- maybe-configure-target-libgfortran \
162 maybe-configure-target-libobjc \
163 maybe-configure-target-libtermcap \
164 maybe-configure-target-winsup \
165@@ -737,7 +732,6 @@
166 maybe-all-target-libmudflap \
167 maybe-all-target-libssp \
168 maybe-all-target-newlib \
169- maybe-all-target-libgfortran \
170 maybe-all-target-libobjc \
171 maybe-all-target-libtermcap \
172 maybe-all-target-winsup \
173@@ -844,7 +838,6 @@
174 maybe-info-target-libmudflap \
175 maybe-info-target-libssp \
176 maybe-info-target-newlib \
177- maybe-info-target-libgfortran \
178 maybe-info-target-libobjc \
179 maybe-info-target-libtermcap \
180 maybe-info-target-winsup \
181@@ -946,7 +939,6 @@
182 maybe-dvi-target-libmudflap \
183 maybe-dvi-target-libssp \
184 maybe-dvi-target-newlib \
185- maybe-dvi-target-libgfortran \
186 maybe-dvi-target-libobjc \
187 maybe-dvi-target-libtermcap \
188 maybe-dvi-target-winsup \
189@@ -1048,7 +1040,6 @@
190 maybe-html-target-libmudflap \
191 maybe-html-target-libssp \
192 maybe-html-target-newlib \
193- maybe-html-target-libgfortran \
194 maybe-html-target-libobjc \
195 maybe-html-target-libtermcap \
196 maybe-html-target-winsup \
197@@ -1150,7 +1141,6 @@
198 maybe-TAGS-target-libmudflap \
199 maybe-TAGS-target-libssp \
200 maybe-TAGS-target-newlib \
201- maybe-TAGS-target-libgfortran \
202 maybe-TAGS-target-libobjc \
203 maybe-TAGS-target-libtermcap \
204 maybe-TAGS-target-winsup \
205@@ -1252,7 +1242,6 @@
206 maybe-install-info-target-libmudflap \
207 maybe-install-info-target-libssp \
208 maybe-install-info-target-newlib \
209- maybe-install-info-target-libgfortran \
210 maybe-install-info-target-libobjc \
211 maybe-install-info-target-libtermcap \
212 maybe-install-info-target-winsup \
213@@ -1354,7 +1343,6 @@
214 maybe-install-html-target-libmudflap \
215 maybe-install-html-target-libssp \
216 maybe-install-html-target-newlib \
217- maybe-install-html-target-libgfortran \
218 maybe-install-html-target-libobjc \
219 maybe-install-html-target-libtermcap \
220 maybe-install-html-target-winsup \
221@@ -1456,7 +1444,6 @@
222 maybe-installcheck-target-libmudflap \
223 maybe-installcheck-target-libssp \
224 maybe-installcheck-target-newlib \
225- maybe-installcheck-target-libgfortran \
226 maybe-installcheck-target-libobjc \
227 maybe-installcheck-target-libtermcap \
228 maybe-installcheck-target-winsup \
229@@ -1558,7 +1545,6 @@
230 maybe-mostlyclean-target-libmudflap \
231 maybe-mostlyclean-target-libssp \
232 maybe-mostlyclean-target-newlib \
233- maybe-mostlyclean-target-libgfortran \
234 maybe-mostlyclean-target-libobjc \
235 maybe-mostlyclean-target-libtermcap \
236 maybe-mostlyclean-target-winsup \
237@@ -1660,7 +1646,6 @@
238 maybe-clean-target-libmudflap \
239 maybe-clean-target-libssp \
240 maybe-clean-target-newlib \
241- maybe-clean-target-libgfortran \
242 maybe-clean-target-libobjc \
243 maybe-clean-target-libtermcap \
244 maybe-clean-target-winsup \
245@@ -1762,7 +1747,6 @@
246 maybe-distclean-target-libmudflap \
247 maybe-distclean-target-libssp \
248 maybe-distclean-target-newlib \
249- maybe-distclean-target-libgfortran \
250 maybe-distclean-target-libobjc \
251 maybe-distclean-target-libtermcap \
252 maybe-distclean-target-winsup \
253@@ -1864,7 +1848,6 @@
254 maybe-maintainer-clean-target-libmudflap \
255 maybe-maintainer-clean-target-libssp \
256 maybe-maintainer-clean-target-newlib \
257- maybe-maintainer-clean-target-libgfortran \
258 maybe-maintainer-clean-target-libobjc \
259 maybe-maintainer-clean-target-libtermcap \
260 maybe-maintainer-clean-target-winsup \
261@@ -2024,7 +2007,6 @@
262 maybe-check-target-libmudflap \
263 maybe-check-target-libssp \
264 maybe-check-target-newlib \
265- maybe-check-target-libgfortran \
266 maybe-check-target-libobjc \
267 maybe-check-target-libtermcap \
268 maybe-check-target-winsup \
269@@ -2223,7 +2205,6 @@
270 maybe-install-target-libmudflap \
271 maybe-install-target-libssp \
272 maybe-install-target-newlib \
273- maybe-install-target-libgfortran \
274 maybe-install-target-libobjc \
275 maybe-install-target-libtermcap \
276 maybe-install-target-winsup \
277@@ -31606,382 +31587,6 @@
278
279
280 # There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
281-@if target-libgfortran
282-$(TARGET_SUBDIR)/libgfortran/multilib.out: multilib.out
283- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
284- rm -f $(TARGET_SUBDIR)/libgfortran/Makefile || : ; \
285- cp multilib.out $(TARGET_SUBDIR)/libgfortran/multilib.out
286-@endif target-libgfortran
287-
288-
289-
290-.PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
291-maybe-configure-target-libgfortran:
292-@if target-libgfortran
293-maybe-configure-target-libgfortran: configure-target-libgfortran
294-configure-target-libgfortran: $(TARGET_SUBDIR)/libgfortran/multilib.out
295- @$(unstage)
296- @test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \
297- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
298- r=`${PWD_COMMAND}`; export r; \
299- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
300- $(NORMAL_TARGET_EXPORTS) \
301- echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
302- cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
303- case $(srcdir) in \
304- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
305- *) topdir=`echo $(TARGET_SUBDIR)/libgfortran/ | \
306- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
307- esac; \
308- srcdiroption="--srcdir=$${topdir}/libgfortran"; \
309- libsrcdir="$$s/libgfortran"; \
310- rm -f no-such-file || : ; \
311- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
312- $(TARGET_CONFIGARGS) $${srcdiroption} \
313- || exit 1
314-@endif target-libgfortran
315-
316-
317-
318-
319-
320-.PHONY: all-target-libgfortran maybe-all-target-libgfortran
321-maybe-all-target-libgfortran:
322-@if target-libgfortran
323-TARGET-target-libgfortran=all
324-maybe-all-target-libgfortran: all-target-libgfortran
325-all-target-libgfortran: configure-target-libgfortran
326- @$(unstage)
327- @r=`${PWD_COMMAND}`; export r; \
328- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
329- $(NORMAL_TARGET_EXPORTS) \
330- (cd $(TARGET_SUBDIR)/libgfortran && \
331- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
332-@endif target-libgfortran
333-
334-
335-
336-
337-
338-.PHONY: check-target-libgfortran maybe-check-target-libgfortran
339-maybe-check-target-libgfortran:
340-@if target-libgfortran
341-maybe-check-target-libgfortran: check-target-libgfortran
342-
343-check-target-libgfortran:
344- @: $(MAKE); $(unstage)
345- @r=`${PWD_COMMAND}`; export r; \
346- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
347- $(NORMAL_TARGET_EXPORTS) \
348- (cd $(TARGET_SUBDIR)/libgfortran && \
349- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
350-
351-@endif target-libgfortran
352-
353-.PHONY: install-target-libgfortran maybe-install-target-libgfortran
354-maybe-install-target-libgfortran:
355-@if target-libgfortran
356-maybe-install-target-libgfortran: install-target-libgfortran
357-
358-install-target-libgfortran: installdirs
359- @: $(MAKE); $(unstage)
360- @r=`${PWD_COMMAND}`; export r; \
361- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
362- $(NORMAL_TARGET_EXPORTS) \
363- (cd $(TARGET_SUBDIR)/libgfortran && \
364- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
365-
366-@endif target-libgfortran
367-
368-# Other targets (info, dvi, etc.)
369-
370-.PHONY: maybe-info-target-libgfortran info-target-libgfortran
371-maybe-info-target-libgfortran:
372-@if target-libgfortran
373-maybe-info-target-libgfortran: info-target-libgfortran
374-
375-info-target-libgfortran: \
376- configure-target-libgfortran
377- @: $(MAKE); $(unstage)
378- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
379- r=`${PWD_COMMAND}`; export r; \
380- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
381- $(NORMAL_TARGET_EXPORTS) \
382- echo "Doing info in $(TARGET_SUBDIR)/libgfortran" ; \
383- for flag in $(EXTRA_TARGET_FLAGS); do \
384- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
385- done; \
386- (cd $(TARGET_SUBDIR)/libgfortran && \
387- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
388- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
389- "RANLIB=$${RANLIB}" \
390- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
391- info) \
392- || exit 1
393-
394-@endif target-libgfortran
395-
396-.PHONY: maybe-dvi-target-libgfortran dvi-target-libgfortran
397-maybe-dvi-target-libgfortran:
398-@if target-libgfortran
399-maybe-dvi-target-libgfortran: dvi-target-libgfortran
400-
401-dvi-target-libgfortran: \
402- configure-target-libgfortran
403- @: $(MAKE); $(unstage)
404- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
405- r=`${PWD_COMMAND}`; export r; \
406- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
407- $(NORMAL_TARGET_EXPORTS) \
408- echo "Doing dvi in $(TARGET_SUBDIR)/libgfortran" ; \
409- for flag in $(EXTRA_TARGET_FLAGS); do \
410- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
411- done; \
412- (cd $(TARGET_SUBDIR)/libgfortran && \
413- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
414- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
415- "RANLIB=$${RANLIB}" \
416- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
417- dvi) \
418- || exit 1
419-
420-@endif target-libgfortran
421-
422-.PHONY: maybe-html-target-libgfortran html-target-libgfortran
423-maybe-html-target-libgfortran:
424-@if target-libgfortran
425-maybe-html-target-libgfortran: html-target-libgfortran
426-
427-html-target-libgfortran: \
428- configure-target-libgfortran
429- @: $(MAKE); $(unstage)
430- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
431- r=`${PWD_COMMAND}`; export r; \
432- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
433- $(NORMAL_TARGET_EXPORTS) \
434- echo "Doing html in $(TARGET_SUBDIR)/libgfortran" ; \
435- for flag in $(EXTRA_TARGET_FLAGS); do \
436- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
437- done; \
438- (cd $(TARGET_SUBDIR)/libgfortran && \
439- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
440- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
441- "RANLIB=$${RANLIB}" \
442- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
443- html) \
444- || exit 1
445-
446-@endif target-libgfortran
447-
448-.PHONY: maybe-TAGS-target-libgfortran TAGS-target-libgfortran
449-maybe-TAGS-target-libgfortran:
450-@if target-libgfortran
451-maybe-TAGS-target-libgfortran: TAGS-target-libgfortran
452-
453-TAGS-target-libgfortran: \
454- configure-target-libgfortran
455- @: $(MAKE); $(unstage)
456- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
457- r=`${PWD_COMMAND}`; export r; \
458- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
459- $(NORMAL_TARGET_EXPORTS) \
460- echo "Doing TAGS in $(TARGET_SUBDIR)/libgfortran" ; \
461- for flag in $(EXTRA_TARGET_FLAGS); do \
462- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
463- done; \
464- (cd $(TARGET_SUBDIR)/libgfortran && \
465- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
466- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
467- "RANLIB=$${RANLIB}" \
468- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
469- TAGS) \
470- || exit 1
471-
472-@endif target-libgfortran
473-
474-.PHONY: maybe-install-info-target-libgfortran install-info-target-libgfortran
475-maybe-install-info-target-libgfortran:
476-@if target-libgfortran
477-maybe-install-info-target-libgfortran: install-info-target-libgfortran
478-
479-install-info-target-libgfortran: \
480- configure-target-libgfortran \
481- info-target-libgfortran
482- @: $(MAKE); $(unstage)
483- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
484- r=`${PWD_COMMAND}`; export r; \
485- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
486- $(NORMAL_TARGET_EXPORTS) \
487- echo "Doing install-info in $(TARGET_SUBDIR)/libgfortran" ; \
488- for flag in $(EXTRA_TARGET_FLAGS); do \
489- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
490- done; \
491- (cd $(TARGET_SUBDIR)/libgfortran && \
492- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
493- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
494- "RANLIB=$${RANLIB}" \
495- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
496- install-info) \
497- || exit 1
498-
499-@endif target-libgfortran
500-
501-.PHONY: maybe-install-html-target-libgfortran install-html-target-libgfortran
502-maybe-install-html-target-libgfortran:
503-@if target-libgfortran
504-maybe-install-html-target-libgfortran: install-html-target-libgfortran
505-
506-install-html-target-libgfortran: \
507- configure-target-libgfortran \
508- html-target-libgfortran
509- @: $(MAKE); $(unstage)
510- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
511- r=`${PWD_COMMAND}`; export r; \
512- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
513- $(NORMAL_TARGET_EXPORTS) \
514- echo "Doing install-html in $(TARGET_SUBDIR)/libgfortran" ; \
515- for flag in $(EXTRA_TARGET_FLAGS); do \
516- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
517- done; \
518- (cd $(TARGET_SUBDIR)/libgfortran && \
519- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
520- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
521- "RANLIB=$${RANLIB}" \
522- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
523- install-html) \
524- || exit 1
525-
526-@endif target-libgfortran
527-
528-.PHONY: maybe-installcheck-target-libgfortran installcheck-target-libgfortran
529-maybe-installcheck-target-libgfortran:
530-@if target-libgfortran
531-maybe-installcheck-target-libgfortran: installcheck-target-libgfortran
532-
533-installcheck-target-libgfortran: \
534- configure-target-libgfortran
535- @: $(MAKE); $(unstage)
536- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
537- r=`${PWD_COMMAND}`; export r; \
538- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
539- $(NORMAL_TARGET_EXPORTS) \
540- echo "Doing installcheck in $(TARGET_SUBDIR)/libgfortran" ; \
541- for flag in $(EXTRA_TARGET_FLAGS); do \
542- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
543- done; \
544- (cd $(TARGET_SUBDIR)/libgfortran && \
545- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
546- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
547- "RANLIB=$${RANLIB}" \
548- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
549- installcheck) \
550- || exit 1
551-
552-@endif target-libgfortran
553-
554-.PHONY: maybe-mostlyclean-target-libgfortran mostlyclean-target-libgfortran
555-maybe-mostlyclean-target-libgfortran:
556-@if target-libgfortran
557-maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran
558-
559-mostlyclean-target-libgfortran:
560- @: $(MAKE); $(unstage)
561- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
562- r=`${PWD_COMMAND}`; export r; \
563- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
564- $(NORMAL_TARGET_EXPORTS) \
565- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgfortran" ; \
566- for flag in $(EXTRA_TARGET_FLAGS); do \
567- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
568- done; \
569- (cd $(TARGET_SUBDIR)/libgfortran && \
570- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
571- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
572- "RANLIB=$${RANLIB}" \
573- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
574- mostlyclean) \
575- || exit 1
576-
577-@endif target-libgfortran
578-
579-.PHONY: maybe-clean-target-libgfortran clean-target-libgfortran
580-maybe-clean-target-libgfortran:
581-@if target-libgfortran
582-maybe-clean-target-libgfortran: clean-target-libgfortran
583-
584-clean-target-libgfortran:
585- @: $(MAKE); $(unstage)
586- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
587- r=`${PWD_COMMAND}`; export r; \
588- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
589- $(NORMAL_TARGET_EXPORTS) \
590- echo "Doing clean in $(TARGET_SUBDIR)/libgfortran" ; \
591- for flag in $(EXTRA_TARGET_FLAGS); do \
592- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
593- done; \
594- (cd $(TARGET_SUBDIR)/libgfortran && \
595- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
596- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
597- "RANLIB=$${RANLIB}" \
598- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
599- clean) \
600- || exit 1
601-
602-@endif target-libgfortran
603-
604-.PHONY: maybe-distclean-target-libgfortran distclean-target-libgfortran
605-maybe-distclean-target-libgfortran:
606-@if target-libgfortran
607-maybe-distclean-target-libgfortran: distclean-target-libgfortran
608-
609-distclean-target-libgfortran:
610- @: $(MAKE); $(unstage)
611- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
612- r=`${PWD_COMMAND}`; export r; \
613- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
614- $(NORMAL_TARGET_EXPORTS) \
615- echo "Doing distclean in $(TARGET_SUBDIR)/libgfortran" ; \
616- for flag in $(EXTRA_TARGET_FLAGS); do \
617- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
618- done; \
619- (cd $(TARGET_SUBDIR)/libgfortran && \
620- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
621- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
622- "RANLIB=$${RANLIB}" \
623- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
624- distclean) \
625- || exit 1
626-
627-@endif target-libgfortran
628-
629-.PHONY: maybe-maintainer-clean-target-libgfortran maintainer-clean-target-libgfortran
630-maybe-maintainer-clean-target-libgfortran:
631-@if target-libgfortran
632-maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran
633-
634-maintainer-clean-target-libgfortran:
635- @: $(MAKE); $(unstage)
636- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
637- r=`${PWD_COMMAND}`; export r; \
638- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
639- $(NORMAL_TARGET_EXPORTS) \
640- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgfortran" ; \
641- for flag in $(EXTRA_TARGET_FLAGS); do \
642- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
643- done; \
644- (cd $(TARGET_SUBDIR)/libgfortran && \
645- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
646- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
647- "RANLIB=$${RANLIB}" \
648- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
649- maintainer-clean) \
650- || exit 1
651-
652-@endif target-libgfortran
653-
654-
655-
656-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
657 @if target-libobjc
658 $(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
659 $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
660@@ -38574,8 +38179,6 @@
661
662 configure-target-newlib: maybe-all-gcc
663
664-configure-target-libgfortran: maybe-all-gcc
665-
666 configure-target-libobjc: maybe-all-gcc
667
668 configure-target-libtermcap: maybe-all-gcc
669@@ -38613,9 +38216,7 @@
670
671 configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
672
673-configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
674-
675 configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
676
677 configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
678
679--- tmp/Makefile.tpl.orig 2006-09-06 08:36:52.000000000 +0100
680+++ tmp/Makefile.tpl 2006-09-06 08:36:52.000000000 +0100
681@@ -122,7 +122,6 @@
682 CXX="$(CXX_FOR_BUILD)"; export CXX; \
683 CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
684 GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
685- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
686 DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
687 LD="$(LD_FOR_BUILD)"; export LD; \
688 LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
689@@ -204,7 +203,6 @@
690 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
691 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
692 GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
693- GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
694 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
695 LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
696 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
697@@ -316,7 +314,6 @@
698 CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
699 RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
700 GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
701-GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
702 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
703 LD_FOR_TARGET=@LD_FOR_TARGET@
704
705--- tmp/Makefile.def.orig 2006-09-06 08:38:50.000000000 +0100
706+++ tmp/Makefile.def 2006-09-06 08:38:50.000000000 +0100
707@@ -117,7 +117,6 @@
708 target_modules = { module= libmudflap; lib_path=.libs; };
709 target_modules = { module= libssp; lib_path=.libs; };
710 target_modules = { module= newlib; };
711-target_modules = { module= libgfortran; };
712 target_modules = { module= libobjc; };
713 target_modules = { module= libtermcap; no_check=true;
714 missing=mostlyclean;
715@@ -227,7 +226,6 @@
716 flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
717 flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
718 flags_to_pass = { flag= GCJ_FOR_TARGET ; };
719-flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
720 flags_to_pass = { flag= LD_FOR_TARGET ; };
721 flags_to_pass = { flag= LIPO_FOR_TARGET ; };
722 flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
723@@ -415,7 +413,6 @@
724 lang_env_dependencies = { module=boehm-gc; };
725 lang_env_dependencies = { module=gperf; cxx=true; };
726 lang_env_dependencies = { module=libada; };
727-lang_env_dependencies = { module=libgfortran; };
728 lang_env_dependencies = { module=libffi; };
729 lang_env_dependencies = { module=libjava; cxx=true; };
730 lang_env_dependencies = { module=libmudflap; };
731
732--- tmp/configure.orgig 2006-09-06 10:01:52.000000000 +0100
733+++ tmp/configure 2006-09-06 10:01:52.000000000 +0100
734@@ -921,7 +921,6 @@
735 target-libstdc++-v3 \
736 target-libmudflap \
737 target-libssp \
738- target-libgfortran \
739 ${libgcj} \
740 target-libobjc \
741 target-libada"
742@@ -2246,135 +2245,6 @@
743 fi
744
745
746-
747-
748-
749-
750-# Check for GMP and MPFR
751-gmplibs=
752-gmpinc=
753-have_gmp=yes
754-# Specify a location for mpfr
755-# check for this first so it ends up on the link line before gmp.
756-# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
757-if test "${with_mpfr_dir+set}" = set; then
758- withval="$with_mpfr_dir"
759- :
760-fi
761-
762-
763-if test "x$with_mpfr_dir" != x; then
764- gmpinc="-I$with_mpfr_dir"
765- gmplibs="$with_mpfr_dir/libmpfr.a"
766-else
767- gmplibs="-lmpfr"
768-fi
769-
770-# Check whether --with-mpfr or --without-mpfr was given.
771-if test "${with_mpfr+set}" = set; then
772- withval="$with_mpfr"
773- :
774-fi
775-
776-
777-if test "x$with_mpfr" != x; then
778- gmplibs="-L$with_mpfr/lib $gmplibs"
779- gmpinc="-I$with_mpfr/include"
780-fi
781-
782-# Specify a location for gmp
783-# Check whether --with-gmp-dir or --without-gmp-dir was given.
784-if test "${with_gmp_dir+set}" = set; then
785- withval="$with_gmp_dir"
786- :
787-fi
788-
789-
790-if test "x$with_gmp_dir" != x; then
791- gmpinc="$gmpinc -I$with_gmp_dir"
792- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
793- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
794- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
795- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
796- fi
797- # One of the later tests will catch the error if neither library is present.
798-else
799- gmplibs="$gmplibs -lgmp"
800-fi
801-
802-# Check whether --with-gmp or --without-gmp was given.
803-if test "${with_gmp+set}" = set; then
804- withval="$with_gmp"
805- :
806-fi
807-
808-
809-if test "x$with_gmp" != x; then
810- gmplibs="-L$with_gmp/lib $gmplibs"
811- gmpinc="-I$with_gmp/include $gmpinc"
812-fi
813-
814-saved_CFLAGS="$CFLAGS"
815-CFLAGS="$CFLAGS $gmpinc"
816-# Check GMP actually works
817-echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
818-echo "configure:2322: checking for correct version of gmp.h" >&5
819-cat > conftest.$ac_ext <<EOF
820-#line 2324 "configure"
821-#include "confdefs.h"
822-#include "gmp.h"
823-int main() {
824-
825-#if __GNU_MP_VERSION < 3
826-choke me
827-#endif
828-
829-; return 0; }
830-EOF
831-if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
832- rm -rf conftest*
833- echo "$ac_t""yes" 1>&6
834-else
835- echo "configure: failed program was:" >&5
836- cat conftest.$ac_ext >&5
837- rm -rf conftest*
838- echo "$ac_t""no" 1>&6; have_gmp=no
839-fi
840-rm -f conftest*
841-
842-if test x"$have_gmp" = xyes; then
843- echo $ac_n "checking for MPFR""... $ac_c" 1>&6
844-echo "configure:2348: checking for MPFR" >&5
845-
846- saved_LIBS="$LIBS"
847- LIBS="$LIBS $gmplibs"
848- cat > conftest.$ac_ext <<EOF
849-#line 2353 "configure"
850-#include "confdefs.h"
851-#include <gmp.h>
852-#include <mpfr.h>
853-int main() {
854-mpfr_t n; mpfr_init(n);
855-; return 0; }
856-EOF
857-if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
858- rm -rf conftest*
859- echo "$ac_t""yes" 1>&6
860-else
861- echo "configure: failed program was:" >&5
862- cat conftest.$ac_ext >&5
863- rm -rf conftest*
864- echo "$ac_t""no" 1>&6; have_gmp=no
865-fi
866-rm -f conftest*
867- LIBS="$saved_LIBS"
868- CFLAGS="$saved_CFLAGS"
869-fi
870-
871-# Flags needed for both GMP and/or MPFR
872-
873-
874-
875 # By default, C is the only stage 1 language.
876 stage1_languages=c
877
878@@ -2402,15 +2272,6 @@
879 fi
880 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
881
882- # 'f95' is the old name for the 'fortran' language. We issue a warning
883- # and make the substitution.
884- case ,${enable_languages}, in
885- *,f95,*)
886- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
887- enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
888- ;;
889- esac
890-
891 # First scan to see if an enabled language requires some other language.
892 # We assume that a given config-lang.in will list all the language
893 # front ends it requires, even if some are required indirectly.
894@@ -5036,81 +4897,6 @@
895 fi
896 fi
897
898- for ncn_progname in gfortran; do
899- if test -n "$ncn_target_tool_prefix"; then
900- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
901-set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
902-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
903-echo "configure:5045: checking for $ac_word" >&5
904-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
905- echo $ac_n "(cached) $ac_c" 1>&6
906-else
907- if test -n "$GFORTRAN_FOR_TARGET"; then
908- ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
909-else
910- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
911- ac_dummy="$PATH"
912- for ac_dir in $ac_dummy; do
913- test -z "$ac_dir" && ac_dir=.
914- if test -f $ac_dir/$ac_word; then
915- ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
916- break
917- fi
918- done
919- IFS="$ac_save_ifs"
920-fi
921-fi
922-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
923-if test -n "$GFORTRAN_FOR_TARGET"; then
924- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
925-else
926- echo "$ac_t""no" 1>&6
927-fi
928-
929- fi
930- if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
931- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
932-set dummy ${ncn_progname}; ac_word=$2
933-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
934-echo "configure:5076: checking for $ac_word" >&5
935-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
936- echo $ac_n "(cached) $ac_c" 1>&6
937-else
938- if test -n "$GFORTRAN_FOR_TARGET"; then
939- ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
940-else
941- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
942- ac_dummy="$PATH"
943- for ac_dir in $ac_dummy; do
944- test -z "$ac_dir" && ac_dir=.
945- if test -f $ac_dir/$ac_word; then
946- ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
947- break
948- fi
949- done
950- IFS="$ac_save_ifs"
951-fi
952-fi
953-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
954-if test -n "$GFORTRAN_FOR_TARGET"; then
955- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
956-else
957- echo "$ac_t""no" 1>&6
958-fi
959-
960- fi
961- test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
962-done
963-
964-if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
965- set dummy gfortran
966- if test $build = $target ; then
967- GFORTRAN_FOR_TARGET="$2"
968- else
969- GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
970- fi
971-fi
972-
973 for ncn_progname in ld; do
974 if test -n "$ncn_target_tool_prefix"; then
975 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
976@@ -5843,34 +5629,6 @@
977 echo "$ac_t""pre-installed" 1>&6
978 fi
979 fi
980-echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
981-echo "configure:5848: checking where to find the target gfortran" >&5
982-if test "x${build}" != "x${host}" ; then
983- # Canadian cross, just use what we found
984- echo "$ac_t""pre-installed" 1>&6
985-else
986- ok=yes
987- case " ${configdirs} " in
988- *" gcc "*) ;;
989- *) ok=no ;;
990- esac
991- case ,${enable_languages}, in
992- *,fortran,*) ;;
993- *) ok=no ;;
994- esac
995- if test $ok = yes; then
996- # An in-tree tool is available and we can use it
997- GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
998- echo "$ac_t""just compiled" 1>&6
999- elif test "x$target" = "x$host"; then
1000- # We can use an host tool
1001- GFORTRAN_FOR_TARGET='$(GFORTRAN)'
1002- echo "$ac_t""host tool" 1>&6
1003- else
1004- # We need a cross tool
1005- echo "$ac_t""pre-installed" 1>&6
1006- fi
1007-fi
1008 echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
1009 echo "configure:5876: checking where to find the target ld" >&5
1010 if test "x${build}" != "x${host}" ; then
1011@@ -6413,7 +6171,6 @@
1012 s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
1013 s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
1014 s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
1015-s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
1016 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
1017 s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
1018 s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
1019
1020--- tmp/config-ml.in.orig 2006-09-06 10:27:49.000000000 +0100
1021+++ tmp/config-ml.in 2006-09-06 10:27:49.000000000 +0100
1022@@ -785,14 +785,12 @@
1023 break
1024 fi
1025 done
1026- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
1027+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
1028
1029 if [ "${with_target_subdir}" = "." ]; then
1030 CC_=$CC' '
1031 CXX_=$CXX' '
1032- F77_=$F77' '
1033 GCJ_=$GCJ' '
1034- GFORTRAN_=$GFORTRAN' '
1035 else
1036 # Create a regular expression that matches any string as long
1037 # as ML_POPDIR.
1038@@ -821,18 +819,6 @@
1039 esac
1040 done
1041
1042- F77_=
1043- for arg in ${F77}; do
1044- case $arg in
1045- -[BIL]"${ML_POPDIR}"/*)
1046- F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
1047- "${ML_POPDIR}"/*)
1048- F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
1049- *)
1050- F77_="${F77_}${arg} " ;;
1051- esac
1052- done
1053-
1054 GCJ_=
1055 for arg in ${GCJ}; do
1056 case $arg in
1057@@ -845,18 +831,6 @@
1058 esac
1059 done
1060
1061- GFORTRAN_=
1062- for arg in ${GFORTRAN}; do
1063- case $arg in
1064- -[BIL]"${ML_POPDIR}"/*)
1065- GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
1066- "${ML_POPDIR}"/*)
1067- GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
1068- *)
1069- GFORTRAN_="${GFORTRAN_}${arg} " ;;
1070- esac
1071- done
1072-
1073 if test "x${LD_LIBRARY_PATH+set}" = xset; then
1074 LD_LIBRARY_PATH_=
1075 for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
new file mode 100644
index 0000000000..b984605af7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
@@ -0,0 +1,35 @@
1---
2 configure | 2 +-
3 configure.in | 2 +-
4 2 files changed, 2 insertions(+), 2 deletions(-)
5
6--- gcc-2006q1.orig/configure
7+++ gcc-2006q1/configure
8@@ -3453,11 +3453,11 @@ case " $build_configdirs " in
9 *)
10
11 # For an installed makeinfo, we require it to be from texinfo 4.2 or
12 # higher, else we use the "missing" dummy.
13 if ${MAKEINFO} --version \
14- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
15+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
16 :
17 else
18 MAKEINFO="$MISSING makeinfo"
19 fi
20 ;;
21--- gcc-2006q1.orig/configure.in
22+++ gcc-2006q1/configure.in
23@@ -2078,11 +2078,11 @@ case " $build_configdirs " in
24 *)
25 changequote(,)
26 # For an installed makeinfo, we require it to be from texinfo 4.2 or
27 # higher, else we use the "missing" dummy.
28 if ${MAKEINFO} --version \
29- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
30+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
31 :
32 else
33 MAKEINFO="$MISSING makeinfo"
34 fi
35 ;;
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch
new file mode 100644
index 0000000000..cdb20bef9b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch
@@ -0,0 +1,9 @@
1--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500
2+++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400
3@@ -126,3 +126,6 @@
4
5 #define LINK_GCC_C_SEQUENCE_SPEC \
6 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
7+
8+/* Tune for XScale. */
9+#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
1--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
2+++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
3@@ -1907,7 +1907,7 @@
4 *) gxx_include_dir=${with_gxx_include_dir} ;;
5 esac
6
7-FLAGS_FOR_TARGET=
8+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
9 case " $target_configdirs " in
10 *" newlib "*)
11 case " $target_configargs " in
12--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
13+++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
14@@ -2669,7 +2669,7 @@
15 *) gxx_include_dir=${with_gxx_include_dir} ;;
16 esac
17
18-FLAGS_FOR_TARGET=
19+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
20 case " $target_configdirs " in
21 *" newlib "*)
22 case " $target_configargs " in
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
new file mode 100644
index 0000000000..fa21b26554
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
@@ -0,0 +1,95 @@
1ARM is the only architecture that has a helper function that returns
2an unbiased result. This fix is trivial enough that we can show it
3doesn't effect any of the other arches. Can we consider this a
4regression fix since it used to work until the helper was added :}
5
6Tested with no regressions on x86_64-pc-linux-gnu and arm-none-eabi.
7
8Cheers,
9Carlos.
10--
11Carlos O'Donell
12CodeSourcery
13carlos@codesourcery.com
14(650) 331-3385 x716
15
16gcc/
17
182006-01-27 Carlos O'Donell <carlos@codesourcery.com>
19
20 * optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias
21 the comparison routine return.
22
23gcc/testsuite/
24
252006-01-27 Carlos O'Donell <carlos@codesourcery.com>
26
27 * gcc.dg/unsigned-long-compare.c: New test.
28
29Index: gcc/optabs.c
30===================================================================
31--- 1/gcc/optabs.c (revision 110300)
32+++ 2/gcc/optabs.c (working copy)
33@@ -3711,18 +3711,24 @@
34 result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK,
35 word_mode, 2, x, mode, y, mode);
36
37+ /* There are two kinds of comparison routines. Biased routines
38+ return 0/1/2, and unbiased routines return -1/0/1. Other parts
39+ of gcc expect that the comparison operation is equivalent
40+ to the modified comparison. For signed comparisons compare the
41+ result against 1 in the unbiased case, and zero in the biased
42+ case. For unsigned comparisons always compare against 1 after
43+ biasing the unbased result by adding 1. This gives us a way to
44+ represent LTU. */
45 *px = result;
46 *pmode = word_mode;
47- if (TARGET_LIB_INT_CMP_BIASED)
48- /* Integer comparison returns a result that must be compared
49- against 1, so that even if we do an unsigned compare
50- afterward, there is still a value that can represent the
51- result "less than". */
52- *py = const1_rtx;
53- else
54+ *py = const1_rtx;
55+
56+ if (!TARGET_LIB_INT_CMP_BIASED)
57 {
58- *py = const0_rtx;
59- *punsignedp = 1;
60+ if (*punsignedp)
61+ *px = plus_constant (result, 1);
62+ else
63+ *py = const0_rtx;
64 }
65 return;
66 }
67Index: gcc/testsuite/gcc.dg/unsigned-long-compare.c
68===================================================================
69--- 1/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
70+++ 2/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
71@@ -0,0 +1,24 @@
72+/* Copyright (C) 2006 Free Software Foundation, Inc. */
73+/* Contributed by Carlos O'Donell on 2006-01-27 */
74+
75+/* Test a division corner case where the expression simplifies
76+ to a comparison, and the optab expansion is wrong. The optab
77+ expansion emits a function whose return is unbiased and needs
78+ adjustment. */
79+/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
80+/* { dg-do run { target arm-*-*eabi* } } */
81+/* { dg-options "" } */
82+#include <stdlib.h>
83+
84+#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
85+
86+int main (void)
87+{
88+ unsigned long long OneULL = 1ULL;
89+ unsigned long long result;
90+
91+ result = OneULL / BIG_CONSTANT;
92+ if (result)
93+ abort ();
94+ exit (0);
95+}
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch
new file mode 100644
index 0000000000..e5d12cfb4f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch
@@ -0,0 +1,11 @@
1--- gcc/gcc/config/arm/linux-elf.h.old 2005-04-20 00:46:28.923375320 +0100
2+++ gcc/gcc/config/arm/linux-elf.h 2005-04-20 00:46:34.181575952 +0100
3@@ -56,7 +56,7 @@
4 %{shared:-lc} \
5 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
6
7-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
8+#define LIBGCC_SPEC "-lgcc"
9
10 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
11 the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch
new file mode 100644
index 0000000000..9a49794da4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch
@@ -0,0 +1,303 @@
1Index: gcc/config/arm/arm-protos.h
2===================================================================
3RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm-protos.h,v
4retrieving revision 1.60.4.20
5diff -u -r1.60.4.20 arm-protos.h
6--- gcc/config/arm/arm-protos.h 29 Mar 2005 03:00:11 -0000 1.60.4.20
7+++ gcc/config/arm/arm-protos.h 23 Apr 2005 04:41:06 -0000
8@@ -64,6 +64,7 @@
9 extern enum reg_class vfp_secondary_reload_class (enum machine_mode, rtx);
10 extern int tls_symbolic_operand (rtx, enum machine_mode);
11 extern bool arm_tls_operand_p (rtx x);
12+extern bool arm_pc_pic_operand_p (rtx x);
13
14 /* Predicates. */
15 extern int s_register_operand (rtx, enum machine_mode);
16Index: gcc/config/arm/arm.c
17===================================================================
18RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
19retrieving revision 1.303.2.79
20diff -u -r1.303.2.79 arm.c
21--- gcc/config/arm/arm.c 12 Apr 2005 06:17:07 -0000 1.303.2.79
22+++ gcc/config/arm/arm.c 23 Apr 2005 04:41:09 -0000
23@@ -1003,7 +1003,7 @@
24
25 /* If stack checking is disabled, we can use r10 as the PIC register,
26 which keeps r9 available. */
27- if (flag_pic)
28+ if (0 && flag_pic)
29 arm_pic_register = TARGET_APCS_STACK ? 9 : 10;
30
31 if (TARGET_APCS_FLOAT)
32@@ -3120,6 +3120,10 @@
33 rtx
34 legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
35 {
36+ if (GET_CODE (orig) == UNSPEC
37+ && XINT (orig, 1) == UNSPEC_GOTSLOTPC)
38+ abort ();
39+
40 if (GET_CODE (orig) == SYMBOL_REF
41 || GET_CODE (orig) == LABEL_REF)
42 {
43@@ -3149,27 +3153,80 @@
44 else
45 address = reg;
46
47- if (TARGET_ARM)
48- emit_insn (gen_pic_load_addr_arm (address, orig));
49- else
50- emit_insn (gen_pic_load_addr_thumb (address, orig));
51+ if (arm_pic_register != INVALID_REGNUM)
52+ {
53+ /* Using GP-based PIC addressing. */
54+ if (TARGET_ARM)
55+ emit_insn (gen_pic_load_addr_arm (address, orig));
56+ else
57+ emit_insn (gen_pic_load_addr_thumb (address, orig));
58+
59+ if ((GET_CODE (orig) == LABEL_REF
60+ || (GET_CODE (orig) == SYMBOL_REF &&
61+ SYMBOL_REF_LOCAL_P (orig)))
62+ && NEED_GOT_RELOC)
63+ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
64+ else
65+ {
66+ pic_ref = gen_rtx_MEM (Pmode,
67+ gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
68+ address));
69+ RTX_UNCHANGING_P (pic_ref) = 1;
70+ }
71
72- if ((GET_CODE (orig) == LABEL_REF
73- || (GET_CODE (orig) == SYMBOL_REF &&
74- SYMBOL_REF_LOCAL_P (orig)))
75- && NEED_GOT_RELOC)
76- pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
77+ current_function_uses_pic_offset_table = 1;
78+ }
79 else
80 {
81- pic_ref = gen_rtx_MEM (Pmode,
82- gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
83- address));
84- RTX_UNCHANGING_P (pic_ref) = 1;
85+ /* Using PC-based PIC addressing. */
86+ rtx label, tmp;
87+ int offset;
88+
89+ label = gen_label_rtx ();
90+ offset = TARGET_ARM ? 8 : 4;
91+
92+ if (GET_CODE (orig) == LABEL_REF
93+ || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
94+ {
95+ /* This symbol is defined locally. We don't need a GOT entry. */
96+ tmp = gen_rtx_MINUS (Pmode, gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_PIC_SYM), gen_rtx_PLUS (Pmode,
97+ gen_rtx_LABEL_REF (Pmode, label),
98+ GEN_INT (offset)));
99+
100+ load_tls_operand (tmp, address);
101+
102+ if (TARGET_ARM)
103+ emit_insn (gen_pic_add_dot_plus_eight (address, label));
104+ else
105+ emit_insn (gen_pic_add_dot_plus_four (address, label));
106+ }
107+ else
108+ {
109+ rtx x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_GOTSLOTPC);
110+ rtx dummy_label;
111+
112+ dummy_label = gen_label_rtx ();
113+ LABEL_PRESERVE_P (dummy_label) = 1;
114+ LABEL_NUSES (dummy_label) = 1;
115+
116+ tmp = gen_rtx_MINUS (Pmode, x, gen_rtx_PLUS (Pmode,
117+ gen_rtx_LABEL_REF (Pmode, label),
118+ GEN_INT (offset)));
119+
120+ load_tls_operand (tmp, address);
121+
122+ if (TARGET_ARM)
123+ emit_insn (gen_tls_load_dot_plus_eight (address, address, label, dummy_label));
124+ else
125+ emit_insn (gen_tls_load_dot_plus_four (address, address, label, dummy_label));
126+ }
127+
128+ pic_ref = address;
129 }
130
131 insn = emit_move_insn (reg, pic_ref);
132 #endif
133- current_function_uses_pic_offset_table = 1;
134+
135 /* Put a REG_EQUAL note on this insn, so that it can be optimized
136 by loop. */
137 REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
138@@ -3179,11 +3236,17 @@
139 else if (GET_CODE (orig) == CONST)
140 {
141 rtx base, offset;
142+ bool minus = FALSE;
143
144 if (GET_CODE (XEXP (orig, 0)) == PLUS
145 && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
146 return orig;
147
148+ if (GET_CODE (XEXP (orig, 0)) == MINUS
149+ && GET_CODE (XEXP (XEXP (orig, 0), 0)) == UNSPEC
150+ && XINT (XEXP (XEXP (orig, 0), 0), 1) == UNSPEC_GOTSLOTPC)
151+ return orig;
152+
153 if (GET_CODE (XEXP (orig, 0)) == UNSPEC)
154 return orig;
155
156@@ -3201,6 +3264,13 @@
157 offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
158 base == reg ? 0 : reg);
159 }
160+ else if (GET_CODE (XEXP (orig, 0)) == MINUS)
161+ {
162+ minus = TRUE;
163+ base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
164+ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
165+ base == reg ? 0 : reg);
166+ }
167 else
168 abort ();
169
170@@ -3228,7 +3298,7 @@
171 return reg;
172 }
173
174- return gen_rtx_PLUS (Pmode, base, offset);
175+ return minus ? gen_rtx_MINUS (Pmode, base, offset) : gen_rtx_PLUS (Pmode, base, offset);
176 }
177
178 return orig;
179@@ -3267,7 +3337,7 @@
180 rtx l1, pic_tmp, pic_tmp2, pic_rtx;
181 rtx global_offset_table;
182
183- if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
184+ if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE || arm_pic_register == INVALID_REGNUM)
185 return;
186
187 if (!flag_pic)
188@@ -3341,8 +3411,11 @@
189 static int
190 pcrel_constant_p (rtx x)
191 {
192+ if (GET_CODE (x) == CONST)
193+ return pcrel_constant_p (XEXP (x, 0));
194+
195 if (GET_CODE (x) == MINUS)
196- return symbol_mentioned_p (XEXP (x, 0)) && label_mentioned_p (XEXP (x, 1));
197+ return (((GET_CODE (XEXP (x, 0)) == UNSPEC && XINT (XEXP (x, 0), 1) == UNSPEC_PIC_SYM)) || symbol_mentioned_p (XEXP (x, 0))) && label_mentioned_p (XEXP (x, 1));
198
199 if (GET_CODE (x) == UNSPEC
200 && XINT (x, 1) == UNSPEC_TLS
201@@ -3946,12 +4019,32 @@
202 return SYMBOL_REF_TLS_MODEL (op);
203 }
204
205+bool
206+arm_pc_pic_operand_p (rtx op)
207+{
208+ if (GET_CODE (op) == CONST
209+ && GET_CODE (XEXP (op, 0)) == MINUS
210+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
211+ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTSLOTPC)
212+ return 1;
213+
214+ if (GET_CODE (op) == CONST
215+ && GET_CODE (XEXP (op, 0)) == MINUS
216+ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
217+ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_PIC_SYM)
218+ return 1;
219+
220+ return 0;
221+}
222+
223 /* Valid input to a move instruction. */
224 int
225 move_input_operand (rtx op, enum machine_mode mode)
226 {
227 if (tls_symbolic_operand (op, mode))
228 return 0;
229+ if (pcrel_constant_p (op))
230+ return 1;
231 return general_operand (op, mode);
232 }
233
234@@ -15634,11 +15727,34 @@
235 return TRUE;
236 }
237
238+static bool
239+arm_emit_got_decoration (FILE *fp, rtx x)
240+{
241+ rtx val;
242+
243+ val = XVECEXP (x, 0, 0);
244+
245+ fputs ("_gotslotpc_(", fp);
246+
247+ output_addr_const (fp, val);
248+
249+ fputc (')', fp);
250+
251+ return TRUE;
252+}
253+
254 bool
255 arm_output_addr_const_extra (FILE *fp, rtx x)
256 {
257 if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
258 return arm_emit_tls_decoration (fp, x);
259+ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSLOTPC)
260+ return arm_emit_got_decoration (fp, x);
261+ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM)
262+ {
263+ output_addr_const (fp, XVECEXP (x, 0, 0));
264+ return TRUE;
265+ }
266 else if (GET_CODE (x) == CONST_VECTOR)
267 return arm_emit_vector_const (fp, x);
268
269Index: gcc/config/arm/arm.md
270===================================================================
271RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.md,v
272retrieving revision 1.145.2.31
273diff -u -r1.145.2.31 arm.md
274--- gcc/config/arm/arm.md 28 Mar 2005 19:04:37 -0000 1.145.2.31
275+++ gcc/config/arm/arm.md 23 Apr 2005 04:41:11 -0000
276@@ -88,6 +88,7 @@
277 (UNSPEC_WMADDS 18) ; Used by the intrinsic form of the iWMMXt WMADDS instruction.
278 (UNSPEC_WMADDU 19) ; Used by the intrinsic form of the iWMMXt WMADDU instruction.
279 (UNSPEC_TLS 20) ; A symbol that has been treated properly for TLS usage.
280+ (UNSPEC_GOTSLOTPC 21)
281 ]
282 )
283
284@@ -4179,7 +4180,8 @@
285 && (CONSTANT_P (operands[1])
286 || symbol_mentioned_p (operands[1])
287 || label_mentioned_p (operands[1]))
288- && ! tls_mentioned_p (operands[1]))
289+ && ! tls_mentioned_p (operands[1])
290+ && ! arm_pc_pic_operand_p (operands[1]))
291 operands[1] = legitimize_pic_address (operands[1], SImode,
292 (no_new_pseudos ? operands[0] : 0));
293 }
294@@ -4412,7 +4414,8 @@
295 (mem:SI (unspec:SI [(plus:SI (match_dup 0)
296 (const (plus:SI (pc) (const_int 8))))]
297 UNSPEC_PIC_BASE)))
298- (use (label_ref (match_operand 1 "" "")))])]
299+ (use (label_ref (match_operand 1 "" "")))
300+ (use (label_ref (match_operand 1 "" "")))])]
301 ""
302 )
303
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch
@@ -0,0 +1,16 @@
1Index: gcc-4.1.2/gcc/fold-const.c
2===================================================================
3--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
4+++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
5@@ -5339,7 +5339,10 @@
6 }
7 break;
8 }
9- /* FALLTHROUGH */
10+ /* If the constant is negative, we cannot simplify this. */
11+ if (tree_int_cst_sgn (c) == -1)
12+ break;
13+ /* FALLTHROUGH */
14 case NEGATE_EXPR:
15 if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
16 return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..8b05cb73a9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
1Index: gcc-4.0.2/gcc/c-incpath.c
2===================================================================
3--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
4+++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
5@@ -350,6 +350,26 @@
6 p->construct = 0;
7 p->user_supplied_p = user_supplied_p;
8
9+#ifdef CROSS_COMPILE
10+ /* A common error when cross compiling is including
11+ host headers. This code below will try to fail fast
12+ for cross compiling. Currently we consider /usr/include,
13+ /opt/include and /sw/include as harmful. */
14+ {
15+ /* printf("Adding Path: %s\n", p->name ); */
16+ if( strstr(p->name, "/usr/include" ) == p->name ) {
17+ fprintf(stderr, _("BUILD ISOLATION FAILURE: /usr/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name);
18+ abort();
19+ } else if( strstr(p->name, "/sw/include") == p->name ) {
20+ fprintf(stderr, _("BUILD ISOLATION FAILURE: /sw/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name);
21+ abort();
22+ } else if( strstr(p->name, "/opt/include") == p->name ) {
23+ fprintf(stderr, _("BUILD ISOLATION FAILURE: /opt/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name);
24+ abort();
25+ }
26+ }
27+#endif
28+
29 add_cpp_dir_path (p, chain);
30 }
31
diff --git a/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..921cab6e18
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
1upstream: n/a
2comment: Use the preprocessor we have just compiled instead the one of
3the system. There might be incompabilities between us and them.
4
5Index: gcc-4.1.1/Makefile.in
6===================================================================
7--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
8+++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
9@@ -194,6 +194,7 @@
10 AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
11 CC="$(CC_FOR_TARGET)"; export CC; \
12 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
13+ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
14 CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
15 CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
16 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
new file mode 100644
index 0000000000..4f902fa149
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -0,0 +1,47 @@
1INHIBIT_PACKAGE_STRIP = "1"
2
3# Compute how to get from libexecdir to bindir in python (easier than shell)
4BINRELPATH = "${@oe.path.relative(bb.data.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}", d), bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}", d))}"
5
6do_install () {
7 oe_runmake 'DESTDIR=${D}' install-host
8
9 install -d ${D}${target_base_libdir}
10 install -d ${D}${target_libdir}
11
12 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
13 # gfortran is fully backwards compatible. This is a safe and practical solution.
14 ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
15
16
17 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
18 # found. These need to be relative paths so they work in different locations.
19 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
20 install -d $dest
21 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
22 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
23 done
24
25 # Remove things we don't need but keep share/java
26 for d in info man share/doc share/locale share/man share/info; do
27 rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
28 done
29
30 # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
31 if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
32 dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
33 oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
34
35 # Ideally here we'd override the libgcc Makefile's idea of slibdir but
36 # for now, we just move the files to the correct location
37
38 install -d $dest${target_base_libdir}
39 mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
40 rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
41
42 # Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
43
44 mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
45 rmdir $dest${target_libdir}/gcc
46 fi
47}
diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
new file mode 100644
index 0000000000..40a9ed0d70
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
@@ -0,0 +1,58 @@
1PACKAGES = "\
2 libgcc \
3 libgcc-dev \
4 libstdc++ \
5 libstdc++-precompile-dev \
6 libstdc++-dev \
7 libg2c \
8 libg2c-dev \
9 libssp \
10 libssp-dev \
11 libgfortran \
12 libgfortran-dev \
13 libmudflap \
14 libmudflap-dev \
15"
16
17FILES_libgcc = "${base_libdir}/libgcc*.so.*"
18FILES_libgcc-dev = " \
19 ${base_libdir}/libgcc*.so \
20 ${libdir}/${TARGET_SYS}/${BINV}/crt* \
21 ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
22
23FILES_libg2c = "${target_libdir}/libg2c.so.*"
24FILES_libg2c-dev = "\
25 ${libdir}/libg2c.so \
26 ${libdir}/libg2c.a \
27 ${libdir}/libfrtbegin.a"
28
29FILES_libstdc++ = "${libdir}/libstdc++.so.*"
30FILES_libstdc++-dev = "\
31 ${includedir}/c++/ \
32 ${libdir}/libstdc++.so \
33 ${libdir}/libstdc++.la \
34 ${libdir}/libstdc++.a \
35 ${libdir}/libsupc++.la \
36 ${libdir}/libsupc++.a"
37
38FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
39
40FILES_libssp = "${libdir}/libssp.so.*"
41FILES_libssp-dev = " \
42 ${libdir}/libssp*.so \
43 ${libdir}/libssp*.a \
44 ${libdir}/libssp*.la \
45 ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
46
47FILES_libgfortran = "${libdir}/libgfortran.so.*"
48FILES_libgfortran-dev = " \
49 ${libdir}/libgfortran.a \
50 ${libdir}/libgfortran.so \
51 ${libdir}/libgfortranbegin.a"
52
53FILES_libmudflap = "${libdir}/libmudflap*.so.*"
54FILES_libmudflap-dev = "\
55 ${libdir}/libmudflap*.so \
56 ${libdir}/libmudflap*.a \
57 ${libdir}/libmudflap*.la"
58
diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
new file mode 100644
index 0000000000..23b9a48eb3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
@@ -0,0 +1,52 @@
1INHIBIT_PACKAGE_STRIP = "1"
2
3# Having anything auto depending on gcc-cross-sdk is a really bad idea...
4EXCLUDE_FROM_SHLIBS = "1"
5
6PACKAGES = "${PN} ${PN}-doc"
7
8FILES_${PN} = "\
9 ${bindir}/* \
10 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
11 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
12 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
13 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
14 ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
15 ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
16 ${includedir}/c++/${BINV} \
17 ${prefix}/${TARGET_SYS}/bin/* \
18 ${prefix}/${TARGET_SYS}/lib/* \
19 ${prefix}/${TARGET_SYS}/usr/include/* \
20 "
21FILES_${PN}-doc = "\
22 ${infodir} \
23 ${mandir} \
24 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
25 "
26
27do_install () {
28 oe_runmake 'DESTDIR=${D}' install-host
29
30 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
31 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
32 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
33
34 # We care about g++ not c++
35 rm -f ${D}${bindir}/*c++
36
37 # We don't care about the gcc-<version> copies
38 rm -f ${D}${bindir}/*gcc-?.?*
39
40 # We use libiberty from binutils
41 rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
42 rm -f ${D}${libdir}/libiberty.a
43
44 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
45 # found.
46 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
47 install -d $dest
48 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
49 ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
50 done
51}
52
diff --git a/meta/recipes-devtools/gcc/gcc-package-target.inc b/meta/recipes-devtools/gcc/gcc-package-target.inc
new file mode 100644
index 0000000000..3286da6a95
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
@@ -0,0 +1,99 @@
1PACKAGES = "\
2 ${PN} ${PN}-symlinks \
3 g++ g++-symlinks \
4 cpp cpp-symlinks \
5 g77 g77-symlinks \
6 gfortran gfortran-symlinks \
7 gcov gcov-symlinks \
8 ${PN}-doc \
9"
10
11FILES_${PN} = "\
12 ${bindir}/${TARGET_PREFIX}gcc \
13 ${bindir}/${TARGET_PREFIX}gccbug \
14 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
15 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
16 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
17 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
18 ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
19 ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
20"
21FILES_${PN}-symlinks = "\
22 ${bindir}/cc \
23 ${bindir}/gcc \
24 ${bindir}/gccbug \
25"
26
27FILES_g77 = "\
28 ${bindir}/${TARGET_PREFIX}g77 \
29 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
30"
31FILES_g77-symlinks = "\
32 ${bindir}/g77 \
33 ${bindir}/f77 \
34"
35FILES_gfortran = "\
36 ${bindir}/${TARGET_PREFIX}gfortran \
37 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
38"
39FILES_gfortran-symlinks = "\
40 ${bindir}/gfortran \
41 ${bindir}/f95"
42
43FILES_cpp = "\
44 ${bindir}/${TARGET_PREFIX}cpp \
45 ${base_libdir}/cpp \
46 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
47FILES_cpp-symlinks = "${bindir}/cpp"
48
49FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
50FILES_gcov-symlinks = "${bindir}/gcov"
51
52FILES_g++ = "\
53 ${bindir}/${TARGET_PREFIX}g++ \
54 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
55"
56FILES_g++-symlinks = "\
57 ${bindir}/c++ \
58 ${bindir}/g++ \
59"
60
61
62FILES_${PN}-doc = "\
63 ${infodir} \
64 ${mandir} \
65 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
66"
67
68do_install () {
69 oe_runmake 'DESTDIR=${D}' install-host
70
71 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
72 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
73 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
74
75 # Hack around specs file assumptions
76 test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
77
78 # Cleanup manpages..
79 rm -rf ${D}${mandir}/man7
80
81 cd ${D}${bindir}
82
83 # We care about g++ not c++
84 rm -f *c++
85
86 # We don't care about the gcc-<version> ones for this
87 rm -f *gcc-?.?*
88
89 # Symlinks so we can use these trivially on the target
90 ln -sf ${TARGET_SYS}-g77 g77 || true
91 ln -sf ${TARGET_SYS}-gfortran gfortran || true
92 ln -sf ${TARGET_SYS}-g++ g++
93 ln -sf ${TARGET_SYS}-gcc gcc
94 ln -sf g77 f77 || true
95 ln -sf gfortran f95 || true
96 ln -sf g++ c++
97 ln -sf gcc cc
98 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
99}
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb
new file mode 100644
index 0000000000..543bf24b77
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb
@@ -0,0 +1,11 @@
1PR = "r15"
2
3require gcc-${PV}.inc
4require gcc-configure-runtime.inc
5require gcc-package-runtime.inc
6
7SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
8
9ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
10
11EXTRA_OECONF += "--disable-libunwind-exceptions"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb
new file mode 100644
index 0000000000..28bae50197
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb
@@ -0,0 +1,11 @@
1PR = "r6"
2
3require gcc-${PV}.inc
4require gcc-configure-runtime.inc
5require gcc-package-runtime.inc
6
7SRC_URI_append = "file://fortran-cross-compile-hack.patch"
8
9ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
10
11EXTRA_OECONF += "--disable-libunwind-exceptions"
diff --git a/meta/recipes-devtools/gcc/gcc_4.3.3.bb b/meta/recipes-devtools/gcc/gcc_4.3.3.bb
new file mode 100644
index 0000000000..a2ae0c0e92
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_4.3.3.bb
@@ -0,0 +1,10 @@
1PR = "r8"
2
3require gcc-${PV}.inc
4require gcc-configure-target.inc
5require gcc-package-target.inc
6
7SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
8
9ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
10
diff --git a/meta/recipes-devtools/gcc/gcc_4.5.0.bb b/meta/recipes-devtools/gcc/gcc_4.5.0.bb
new file mode 100644
index 0000000000..e133c5bac7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_4.5.0.bb
@@ -0,0 +1,10 @@
1PR = "r6"
2
3require gcc-${PV}.inc
4require gcc-configure-target.inc
5require gcc-package-target.inc
6
7SRC_URI_append = "file://fortran-cross-compile-hack.patch"
8
9ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
10
diff --git a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
new file mode 100644
index 0000000000..832167ca4e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
@@ -0,0 +1,5 @@
1PR = "r1"
2
3require gcc-${PV}.inc
4require gcc-configure-target.inc
5require gcc-package-target.inc
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
new file mode 100644
index 0000000000..16b653e46e
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -0,0 +1,48 @@
1DESCRIPTION = "gdb - GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
3LICENSE="GPLv3+"
4SECTION = "devel"
5PRIORITY = "optional"
6DEPENDS = "ncurses readline elfutils"
7
8inherit autotools
9
10SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
11 file://no-werror.patch"
12
13export CC_FOR_BUILD = "${BUILD_CC}"
14export CXX_FOR_BUILD = "${BUILD_CXX}"
15export CPP_FOR_BUILD = "${BUILD_CPP}"
16export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
17export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
18export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
19
20B = "${WORKDIR}/build-${TARGET_SYS}"
21
22EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
23
24EXPAT = "--without-expat"
25
26EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
27 --with-curses --disable-multilib --with-system-readline --disable-sim \
28 ${GDBPROPREFIX} --with-libelf=${STAGING_DIR_TARGET} ${EXPAT}"
29GDBPROPREFIX = "--program-prefix=''"
30
31do_configure () {
32 # override this function to avoid the autoconf/automake/aclocal/autoheader
33 # calls for now
34 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
35 oe_runconf
36}
37
38# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
39# right bits installed by binutils.
40do_install_append() {
41 rm -rf ${D}${libdir}
42 rm -rf ${D}${includedir}
43 rm -rf ${D}${datadir}/locale
44}
45
46RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
47RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
48
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.1.bb
new file mode 100644
index 0000000000..3adcdcc284
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.1.bb
@@ -0,0 +1,10 @@
1require gdb-common.inc
2
3DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk"
4
5inherit cross-canadian
6
7PR = "r1"
8
9GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
10EXPAT = "--with-expat"
diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
new file mode 100644
index 0000000000..20db86b563
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -0,0 +1,10 @@
1require gdb-common.inc
2
3DEPENDS = "ncurses-native"
4
5#EXTRA_OEMAKE += "LDFLAGS='${BUILD_LDFLAGS}'"
6
7GDBPROPREFIX = ""
8
9inherit cross
10inherit gettext
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.1.bb b/meta/recipes-devtools/gdb/gdb-cross_7.1.bb
new file mode 100644
index 0000000000..3e4ce6f68b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.1.bb
@@ -0,0 +1,5 @@
1require gdb-cross.inc
2
3SRC_URI += "file://sim-install-6.6.patch;patch=1"
4
5PR = "r1"
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
new file mode 100644
index 0000000000..0ddd90b191
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -0,0 +1,12 @@
1require gdb-common.inc
2
3inherit gettext
4
5SRC_URI += "file://kill_arm_map_symbols.patch \
6 file://gdbserver-cflags-last.diff;striplevel=0 "
7#LDFLAGS_append = " -s"
8#export CFLAGS_append=" -L${STAGING_LIBDIR}"
9
10# cross-canadian must not see this
11PACKAGES =+ "gdbserver"
12FILES_gdbserver = "${bindir}/gdbserver"
diff --git a/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff b/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff
new file mode 100644
index 0000000000..41395f936e
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff
@@ -0,0 +1,15 @@
1Index: gdb/gdbserver/Makefile.in
2===================================================================
3--- gdb/gdbserver/Makefile.in.orig
4+++ gdb/gdbserver/Makefile.in
5@@ -89,8 +89,8 @@ WARN_CFLAGS = -Wall
6 CFLAGS = @CFLAGS@
7
8 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
9-INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
10- ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS}
11+INTERNAL_CFLAGS = $(WARN_CFLAGS) ${GLOBAL_CFLAGS} \
12+ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CFLAGS}
13
14 # LDFLAGS is specifically reserved for setting from the command line
15 # when running make.
diff --git a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
new file mode 100644
index 0000000000..177142192d
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
@@ -0,0 +1,24 @@
1Index: gdb-6.3/gdb/arm-tdep.c
2===================================================================
3--- gdb-6.3.orig/gdb/arm-tdep.c 2004-08-03 02:02:20.000000000 +0000
4+++ gdb-6.3/gdb/arm-tdep.c 2005-11-09 15:13:29.000000000 +0000
5@@ -2491,6 +2491,19 @@
6 static void
7 arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
8 {
9+
10+ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
11+ displaying disassembly so we use this horrible hack here to
12+ artifically set their address to the highest possible value.
13+ This is wrong of course, and it prevents the symbols from being
14+ used for their intended purpose - to distinguish between ARM
15+ and THUMB code. So we ought to find a better way to do this. */
16+ if (bfd_asymbol_name (sym)
17+ && bfd_asymbol_name (sym)[0] == '$'
18+ && bfd_asymbol_name (sym)[1] != 0
19+ && bfd_asymbol_name (sym)[2] == 0)
20+ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
21+
22 /* Thumb symbols are of type STT_LOPROC, (synonymous with
23 STT_ARM_TFUNC). */
24 if (ELF_ST_TYPE (((elf_symbol_type *)sym)->internal_elf_sym.st_info)
diff --git a/meta/recipes-devtools/gdb/gdb/libiberty-cross.patch b/meta/recipes-devtools/gdb/gdb/libiberty-cross.patch
new file mode 100644
index 0000000000..0d1897f9e0
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/libiberty-cross.patch
@@ -0,0 +1,630 @@
1--- libiberty/configure.in.old 2004-03-31 21:25:25.000000000 +0100
2+++ libiberty/configure.in 2004-03-31 21:18:02.000000000 +0100
3@@ -100,6 +100,7 @@
4 AC_CHECK_TOOL(RANLIB, ranlib, :)
5
6 LIB_AC_PROG_CC
7+AC_PROG_CC_WORKS
8
9 AC_PROG_CC_C_O
10 # autoconf is lame and doesn't give us any substitution variable for this.
11@@ -402,7 +403,6 @@
12
13 # We haven't set the list of objects yet. Use the standard autoconf
14 # tests. This will only work if the compiler works.
15- AC_PROG_CC_WORKS
16 AC_REPLACE_FUNCS($funcs)
17 libiberty_AC_FUNC_C_ALLOCA
18 AC_FUNC_VFORK
19
20--- libiberty/configure.old 2003-06-19 21:05:35.000000000 +0100
21+++ libiberty/configure 2004-03-31 21:35:12.000000000 +0100
22@@ -1000,13 +1000,60 @@
23 fi
24
25
26+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
27+echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
28+
29+ac_ext=c
30+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
31+ac_cpp='$CPP $CPPFLAGS'
32+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
33+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
34+cross_compiling=$ac_cv_prog_cc_cross
35+
36+cat > conftest.$ac_ext << EOF
37+
38+#line 1016 "configure"
39+#include "confdefs.h"
40+
41+main(){return(0);}
42+EOF
43+if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
44+ ac_cv_prog_cc_works=yes
45+ # If we can't run a trivial program, we are probably using a cross compiler.
46+ if (./conftest; exit) 2>/dev/null; then
47+ ac_cv_prog_cc_cross=no
48+ else
49+ ac_cv_prog_cc_cross=yes
50+ fi
51+else
52+ echo "configure: failed program was:" >&5
53+ cat conftest.$ac_ext >&5
54+ ac_cv_prog_cc_works=no
55+fi
56+rm -fr conftest*
57+ac_ext=c
58+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
59+ac_cpp='$CPP $CPPFLAGS'
60+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
61+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
62+cross_compiling=$ac_cv_prog_cc_cross
63+
64+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
65+if test $ac_cv_prog_cc_works = no; then
66+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
67+fi
68+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
69+echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
70+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
71+cross_compiling=$ac_cv_prog_cc_cross
72+
73
74 if test "x$CC" != xcc; then
75 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
76-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
77+echo "configure:1054: checking whether $CC and cc understand -c and -o together" >&5
78 else
79 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
80-echo "configure:1010: checking whether cc understands -c and -o together" >&5
81+echo "configure:1057: checking whether cc understands -c and -o together" >&5
82 fi
83 set dummy $CC; ac_cc="`echo $2 |
84 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
85@@ -1018,16 +1065,16 @@
86 # We do the test twice because some compilers refuse to overwrite an
87 # existing .o file with -o, though they will create one.
88 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
89-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
90- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
91+if { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
92+ test -f conftest.o && { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
93 then
94 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
95 if test "x$CC" != xcc; then
96 # Test first that cc exists at all.
97- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
98+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
99 ac_try='cc -c conftest.c -o conftest.o 1>&5'
100- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
101- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
102+ if { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
103+ test -f conftest.o && { (eval echo configure:1078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
104 then
105 # cc works too.
106 :
107@@ -1063,7 +1110,7 @@
108
109
110 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
111-echo "configure:1067: checking for POSIXized ISC" >&5
112+echo "configure:1114: checking for POSIXized ISC" >&5
113 if test -d /etc/conf/kconfig.d &&
114 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
115 then
116@@ -1084,12 +1131,12 @@
117 fi
118
119 echo $ac_n "checking for working const""... $ac_c" 1>&6
120-echo "configure:1088: checking for working const" >&5
121+echo "configure:1135: checking for working const" >&5
122 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
123 echo $ac_n "(cached) $ac_c" 1>&6
124 else
125 cat > conftest.$ac_ext <<EOF
126-#line 1093 "configure"
127+#line 1140 "configure"
128 #include "confdefs.h"
129
130 int main() {
131@@ -1138,7 +1185,7 @@
132
133 ; return 0; }
134 EOF
135-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
136+if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
137 rm -rf conftest*
138 ac_cv_c_const=yes
139 else
140@@ -1159,21 +1206,21 @@
141 fi
142
143 echo $ac_n "checking for inline""... $ac_c" 1>&6
144-echo "configure:1163: checking for inline" >&5
145+echo "configure:1210: checking for inline" >&5
146 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
147 echo $ac_n "(cached) $ac_c" 1>&6
148 else
149 ac_cv_c_inline=no
150 for ac_kw in inline __inline__ __inline; do
151 cat > conftest.$ac_ext <<EOF
152-#line 1170 "configure"
153+#line 1217 "configure"
154 #include "confdefs.h"
155
156 int main() {
157 } $ac_kw foo() {
158 ; return 0; }
159 EOF
160-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
161+if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
162 rm -rf conftest*
163 ac_cv_c_inline=$ac_kw; break
164 else
165@@ -1199,14 +1246,14 @@
166 esac
167
168 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
169-echo "configure:1203: checking whether byte ordering is bigendian" >&5
170+echo "configure:1250: checking whether byte ordering is bigendian" >&5
171 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
172 echo $ac_n "(cached) $ac_c" 1>&6
173 else
174 ac_cv_c_bigendian=unknown
175 # See if sys/param.h defines the BYTE_ORDER macro.
176 cat > conftest.$ac_ext <<EOF
177-#line 1210 "configure"
178+#line 1257 "configure"
179 #include "confdefs.h"
180 #include <sys/types.h>
181 #include <sys/param.h>
182@@ -1217,11 +1264,11 @@
183 #endif
184 ; return 0; }
185 EOF
186-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
187+if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
188 rm -rf conftest*
189 # It does; now see whether it defined to BIG_ENDIAN or not.
190 cat > conftest.$ac_ext <<EOF
191-#line 1225 "configure"
192+#line 1272 "configure"
193 #include "confdefs.h"
194 #include <sys/types.h>
195 #include <sys/param.h>
196@@ -1232,7 +1279,7 @@
197 #endif
198 ; return 0; }
199 EOF
200-if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
201+if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
202 rm -rf conftest*
203 ac_cv_c_bigendian=yes
204 else
205@@ -1252,7 +1299,7 @@
206 echo $ac_n "cross-compiling... " 2>&6
207 else
208 cat > conftest.$ac_ext <<EOF
209-#line 1256 "configure"
210+#line 1303 "configure"
211 #include "confdefs.h"
212 main () {
213 /* Are we little or big endian? From Harbison&Steele. */
214@@ -1265,7 +1312,7 @@
215 exit (u.c[sizeof (long) - 1] == 1);
216 }
217 EOF
218-if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
219+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
220 then
221 ac_cv_c_bigendian=no
222 else
223@@ -1283,7 +1330,7 @@
224 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
225 if test $ac_cv_c_bigendian = unknown; then
226 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
227-echo "configure:1287: checking to probe for byte ordering" >&5
228+echo "configure:1334: checking to probe for byte ordering" >&5
229
230 cat >conftest.c <<EOF
231 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
232@@ -1352,7 +1399,7 @@
233 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
234 # ./install, which can be erroneously created by make from ./install.sh.
235 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
236-echo "configure:1356: checking for a BSD compatible install" >&5
237+echo "configure:1403: checking for a BSD compatible install" >&5
238 if test -z "$INSTALL"; then
239 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
240 echo $ac_n "(cached) $ac_c" 1>&6
241@@ -1413,7 +1460,7 @@
242 # able to link anything, it had better be able to at least compile
243 # something.
244 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
245-echo "configure:1417: checking how to run the C preprocessor" >&5
246+echo "configure:1464: checking how to run the C preprocessor" >&5
247 # On Suns, sometimes $CPP names a directory.
248 if test -n "$CPP" && test -d "$CPP"; then
249 CPP=
250@@ -1428,13 +1475,13 @@
251 # On the NeXT, cc -E runs the code through the compiler's parser,
252 # not just through cpp.
253 cat > conftest.$ac_ext <<EOF
254-#line 1432 "configure"
255+#line 1479 "configure"
256 #include "confdefs.h"
257 #include <assert.h>
258 Syntax Error
259 EOF
260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
261-{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
262+{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
264 if test -z "$ac_err"; then
265 :
266@@ -1445,13 +1492,13 @@
267 rm -rf conftest*
268 CPP="${CC-cc} -E -traditional-cpp"
269 cat > conftest.$ac_ext <<EOF
270-#line 1449 "configure"
271+#line 1496 "configure"
272 #include "confdefs.h"
273 #include <assert.h>
274 Syntax Error
275 EOF
276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
277-{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
278+{ (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
280 if test -z "$ac_err"; then
281 :
282@@ -1462,13 +1509,13 @@
283 rm -rf conftest*
284 CPP="${CC-cc} -nologo -E"
285 cat > conftest.$ac_ext <<EOF
286-#line 1466 "configure"
287+#line 1513 "configure"
288 #include "confdefs.h"
289 #include <assert.h>
290 Syntax Error
291 EOF
292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
293-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
294+{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
296 if test -z "$ac_err"; then
297 :
298@@ -1496,17 +1543,17 @@
299 do
300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
302-echo "configure:1500: checking for $ac_hdr" >&5
303+echo "configure:1547: checking for $ac_hdr" >&5
304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
305 echo $ac_n "(cached) $ac_c" 1>&6
306 else
307 cat > conftest.$ac_ext <<EOF
308-#line 1505 "configure"
309+#line 1552 "configure"
310 #include "confdefs.h"
311 #include <$ac_hdr>
312 EOF
313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
314-{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
315+{ (eval echo configure:1557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
317 if test -z "$ac_err"; then
318 rm -rf conftest*
319@@ -1533,12 +1580,12 @@
320 done
321
322 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
323-echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5
324+echo "configure:1584: checking for sys/wait.h that is POSIX.1 compatible" >&5
325 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
326 echo $ac_n "(cached) $ac_c" 1>&6
327 else
328 cat > conftest.$ac_ext <<EOF
329-#line 1542 "configure"
330+#line 1589 "configure"
331 #include "confdefs.h"
332 #include <sys/types.h>
333 #include <sys/wait.h>
334@@ -1554,7 +1601,7 @@
335 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
336 ; return 0; }
337 EOF
338-if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
339+if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
340 rm -rf conftest*
341 ac_cv_header_sys_wait_h=yes
342 else
343@@ -1575,12 +1622,12 @@
344 fi
345
346 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
347-echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5
348+echo "configure:1626: checking whether time.h and sys/time.h may both be included" >&5
349 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
350 echo $ac_n "(cached) $ac_c" 1>&6
351 else
352 cat > conftest.$ac_ext <<EOF
353-#line 1584 "configure"
354+#line 1631 "configure"
355 #include "confdefs.h"
356 #include <sys/types.h>
357 #include <sys/time.h>
358@@ -1589,7 +1636,7 @@
359 struct tm *tp;
360 ; return 0; }
361 EOF
362-if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
363+if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
364 rm -rf conftest*
365 ac_cv_header_time=yes
366 else
367@@ -1611,19 +1658,19 @@
368
369
370 echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
371-echo "configure:1615: checking whether errno must be declared" >&5
372+echo "configure:1662: checking whether errno must be declared" >&5
373 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
374 echo $ac_n "(cached) $ac_c" 1>&6
375 else
376 cat > conftest.$ac_ext <<EOF
377-#line 1620 "configure"
378+#line 1667 "configure"
379 #include "confdefs.h"
380 #include <errno.h>
381 int main() {
382 int x = errno;
383 ; return 0; }
384 EOF
385-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
386+if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
387 rm -rf conftest*
388 libiberty_cv_declare_errno=no
389 else
390@@ -1645,12 +1692,12 @@
391
392
393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
394-echo "configure:1649: checking for ANSI C header files" >&5
395+echo "configure:1696: checking for ANSI C header files" >&5
396 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
397 echo $ac_n "(cached) $ac_c" 1>&6
398 else
399 cat > conftest.$ac_ext <<EOF
400-#line 1654 "configure"
401+#line 1701 "configure"
402 #include "confdefs.h"
403 #include <stdlib.h>
404 #include <stdarg.h>
405@@ -1658,7 +1705,7 @@
406 #include <float.h>
407 EOF
408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
409-{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
410+{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
412 if test -z "$ac_err"; then
413 rm -rf conftest*
414@@ -1675,7 +1722,7 @@
415 if test $ac_cv_header_stdc = yes; then
416 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
417 cat > conftest.$ac_ext <<EOF
418-#line 1679 "configure"
419+#line 1726 "configure"
420 #include "confdefs.h"
421 #include <string.h>
422 EOF
423@@ -1693,7 +1740,7 @@
424 if test $ac_cv_header_stdc = yes; then
425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
426 cat > conftest.$ac_ext <<EOF
427-#line 1697 "configure"
428+#line 1744 "configure"
429 #include "confdefs.h"
430 #include <stdlib.h>
431 EOF
432@@ -1714,7 +1761,7 @@
433 :
434 else
435 cat > conftest.$ac_ext <<EOF
436-#line 1718 "configure"
437+#line 1765 "configure"
438 #include "confdefs.h"
439 #include <ctype.h>
440 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
441@@ -1725,7 +1772,7 @@
442 exit (0); }
443
444 EOF
445-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
446+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
447 then
448 :
449 else
450@@ -1749,12 +1796,12 @@
451 fi
452
453 echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
454-echo "configure:1753: checking for uintptr_t" >&5
455+echo "configure:1800: checking for uintptr_t" >&5
456 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
457 echo $ac_n "(cached) $ac_c" 1>&6
458 else
459 cat > conftest.$ac_ext <<EOF
460-#line 1758 "configure"
461+#line 1805 "configure"
462 #include "confdefs.h"
463 #include <sys/types.h>
464 #if STDC_HEADERS
465@@ -1790,12 +1837,12 @@
466
467
468 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
469-echo "configure:1794: checking for pid_t" >&5
470+echo "configure:1841: checking for pid_t" >&5
471 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
472 echo $ac_n "(cached) $ac_c" 1>&6
473 else
474 cat > conftest.$ac_ext <<EOF
475-#line 1799 "configure"
476+#line 1846 "configure"
477 #include "confdefs.h"
478 #include <sys/types.h>
479 #if STDC_HEADERS
480@@ -1895,12 +1942,12 @@
481 realpath canonicalize_file_name
482 do
483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
484-echo "configure:1899: checking for $ac_func" >&5
485+echo "configure:1946: checking for $ac_func" >&5
486 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
487 echo $ac_n "(cached) $ac_c" 1>&6
488 else
489 cat > conftest.$ac_ext <<EOF
490-#line 1904 "configure"
491+#line 1951 "configure"
492 #include "confdefs.h"
493 /* System header to define __stub macros and hopefully few prototypes,
494 which can conflict with char $ac_func(); below. */
495@@ -1923,7 +1970,7 @@
496
497 ; return 0; }
498 EOF
499-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
500+if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
501 rm -rf conftest*
502 eval "ac_cv_func_$ac_func=yes"
503 else
504@@ -2152,53 +2199,6 @@
505
506 # We haven't set the list of objects yet. Use the standard autoconf
507 # tests. This will only work if the compiler works.
508- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
509-echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
510-
511-ac_ext=c
512-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
513-ac_cpp='$CPP $CPPFLAGS'
514-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
515-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
516-cross_compiling=$ac_cv_prog_cc_cross
517-
518-cat > conftest.$ac_ext << EOF
519-
520-#line 2168 "configure"
521-#include "confdefs.h"
522-
523-main(){return(0);}
524-EOF
525-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
526- ac_cv_prog_cc_works=yes
527- # If we can't run a trivial program, we are probably using a cross compiler.
528- if (./conftest; exit) 2>/dev/null; then
529- ac_cv_prog_cc_cross=no
530- else
531- ac_cv_prog_cc_cross=yes
532- fi
533-else
534- echo "configure: failed program was:" >&5
535- cat conftest.$ac_ext >&5
536- ac_cv_prog_cc_works=no
537-fi
538-rm -fr conftest*
539-ac_ext=c
540-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
541-ac_cpp='$CPP $CPPFLAGS'
542-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
543-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
544-cross_compiling=$ac_cv_prog_cc_cross
545-
546-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
547-if test $ac_cv_prog_cc_works = no; then
548- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
549-fi
550-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
551-echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
552-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
553-cross_compiling=$ac_cv_prog_cc_cross
554-
555 for ac_func in $funcs
556 do
557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
558@@ -2900,7 +2900,7 @@
559 esac
560
561
562-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
563+for ac_hdr in unistd.h
564 do
565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
567@@ -3032,24 +3032,11 @@
568 #include <fcntl.h>
569 #include <sys/mman.h>
570
571-#if HAVE_SYS_TYPES_H
572-# include <sys/types.h>
573-#endif
574-
575-#if HAVE_STDLIB_H
576-# include <stdlib.h>
577-#endif
578-
579-#if HAVE_SYS_STAT_H
580-# include <sys/stat.h>
581-#endif
582-
583-#if HAVE_UNISTD_H
584-# include <unistd.h>
585-#endif
586-
587 /* This mess was copied from the GNU getpagesize.h. */
588 #ifndef HAVE_GETPAGESIZE
589+# ifdef HAVE_UNISTD_H
590+# include <unistd.h>
591+# endif
592
593 /* Assume that all systems that can run configure have sys/param.h. */
594 # ifndef HAVE_SYS_PARAM_H
595@@ -3157,7 +3144,7 @@
596 }
597
598 EOF
599-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
600+if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
601 then
602 ac_cv_func_mmap_fixed_mapped=yes
603 else
604@@ -3181,7 +3168,7 @@
605
606
607 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
608-echo "configure:3185: checking for working strncmp" >&5
609+echo "configure:3172: checking for working strncmp" >&5
610 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
611 echo $ac_n "(cached) $ac_c" 1>&6
612 else
613@@ -3189,7 +3176,7 @@
614 ac_cv_func_strncmp_works=no
615 else
616 cat > conftest.$ac_ext <<EOF
617-#line 3193 "configure"
618+#line 3180 "configure"
619 #include "confdefs.h"
620
621 /* Test by Jim Wilson and Kaveh Ghazi.
622@@ -3253,7 +3240,7 @@
623 }
624
625 EOF
626-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
627+if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
628 then
629 ac_cv_func_strncmp_works=yes
630 else
diff --git a/meta/recipes-devtools/gdb/gdb/no-werror.patch b/meta/recipes-devtools/gdb/gdb/no-werror.patch
new file mode 100644
index 0000000000..0926073721
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/no-werror.patch
@@ -0,0 +1,78 @@
1---
2 bfd/warning.m4 | 2 +-
3 configure.ac | 2 +-
4 gdb/Makefile.in | 4 ++--
5 gdb/configure.ac | 8 ++------
6 4 files changed, 6 insertions(+), 10 deletions(-)
7
8Index: gdb-7.1/bfd/warning.m4
9===================================================================
10--- gdb-7.1.orig/bfd/warning.m4
11+++ gdb-7.1/bfd/warning.m4
12@@ -23,7 +23,7 @@ esac
13
14 # Enable -Werror by default when using gcc
15 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
16- ERROR_ON_WARNING=yes
17+ ERROR_ON_WARNING=no
18 fi
19
20 NO_WERROR=
21Index: gdb-7.1/configure.ac
22===================================================================
23--- gdb-7.1.orig/configure.ac
24+++ gdb-7.1/configure.ac
25@@ -3371,7 +3371,7 @@ AC_SUBST(stage1_checking)
26 AC_ARG_ENABLE(werror,
27 [ --enable-werror enable -Werror in bootstrap stage2 and later], [],
28 [if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
29- enable_werror=yes
30+ enable_werror=no
31 else
32 enable_werror=no
33 fi])
34Index: gdb-7.1/gdb/Makefile.in
35===================================================================
36--- gdb-7.1.orig/gdb/Makefile.in
37+++ gdb-7.1/gdb/Makefile.in
38@@ -151,9 +151,9 @@ READLINE_CFLAGS = @READLINE_CFLAGS@
39 LIBEXPAT = @LIBEXPAT@
40
41 WARN_CFLAGS = @WARN_CFLAGS@
42-WERROR_CFLAGS = @WERROR_CFLAGS@
43+WERROR_CFLAGS =
44 GDB_WARN_CFLAGS = $(WARN_CFLAGS)
45-GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
46+GDB_WERROR_CFLAGS =
47
48 GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " | sed "s/ -Wformat-nonliteral / /g"`
49
50Index: gdb-7.1/gdb/configure.ac
51===================================================================
52--- gdb-7.1.orig/gdb/configure.ac
53+++ gdb-7.1/gdb/configure.ac
54@@ -1525,15 +1525,12 @@ GDB_AC_WITH_DIR(SYSTEM_GDBINIT, system-g
55 AC_ARG_ENABLE(werror,
56 AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
57 [case "${enableval}" in
58- yes | y) ERROR_ON_WARNING="yes" ;;
59+ yes | y) ERROR_ON_WARNING="no" ;;
60 no | n) ERROR_ON_WARNING="no" ;;
61 *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
62 esac])
63
64 WERROR_CFLAGS=""
65-if test "${ERROR_ON_WARNING}" = yes ; then
66- WERROR_CFLAGS="-Werror"
67-fi
68
69 # The entries after -Wno-pointer-sign are disabled warnings which may
70 # be enabled in the future, which can not currently be used to build
71@@ -1587,7 +1584,6 @@ then
72 # compiled with it enabled.
73 for w in ${build_warnings}; do
74 case $w in
75- -Werr*) WERROR_CFLAGS=-Werror ;;
76 *) # Check that GCC accepts it
77 saved_CFLAGS="$CFLAGS"
78 CFLAGS="$CFLAGS $w"
diff --git a/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch b/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
new file mode 100644
index 0000000000..a39ceab01f
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
@@ -0,0 +1,12 @@
1--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
2+++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
3@@ -34,7 +34,7 @@
4
5 datadir = @datadir@
6 mandir = @mandir@
7-man1dir = $(mandir)/man1
8+man1dir = $(DESTDIR)$(mandir)/man1
9 infodir = @infodir@
10 includedir = @includedir@
11
12
diff --git a/meta/recipes-devtools/gdb/gdb/sim-install.patch b/meta/recipes-devtools/gdb/gdb/sim-install.patch
new file mode 100644
index 0000000000..3c88c4c059
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/sim-install.patch
@@ -0,0 +1,34 @@
1--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
2+++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
3@@ -34,7 +34,7 @@
4
5 datadir = @datadir@
6 mandir = @mandir@
7-man1dir = $(mandir)/man1
8+man1dir = $(DESTDIR)$(mandir)/man1
9 infodir = @infodir@
10 includedir = @includedir@
11
12
13--- gdb-6.1/sim/common/Make-common.in~sim-install.patch 2003-09-08 18:24:59.000000000 +0100
14+++ gdb-6.1/sim/common/Make-common.in 2004-07-22 17:56:18.947423032 +0100
15@@ -581,14 +581,14 @@
16
17 install-common: installdirs
18 n=`echo run | sed '$(program_transform_name)'`; \
19- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
20+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
21 n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
22- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
23- ( cd $(libdir) ; $(RANLIB) $$n )
24+ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
25+ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
26
27 installdirs:
28- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
29- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
30+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
31+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
32
33 check:
34 cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
diff --git a/meta/recipes-devtools/gdb/gdb/uclibc.patch b/meta/recipes-devtools/gdb/gdb/uclibc.patch
new file mode 100644
index 0000000000..3d6b7ba187
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/uclibc.patch
@@ -0,0 +1,194 @@
1--- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
2+++ binutils-2.15.91.0.1/bfd/config.bfd
3@@ -128,7 +128,7 @@
4 targ_defvec=ecoffalpha_little_vec
5 targ_selvecs=bfd_elf64_alpha_vec
6 ;;
7- alpha*-*-linux-gnu* | alpha*-*-elf*)
8+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
9 targ_defvec=bfd_elf64_alpha_vec
10 targ_selvecs=ecoffalpha_little_vec
11 ;;
12@@ -138,7 +138,7 @@
13 alpha*-*-*)
14 targ_defvec=ecoffalpha_little_vec
15 ;;
16- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
17+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
18 targ_defvec=bfd_elf64_ia64_little_vec
19 targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
20 ;;
21@@ -215,7 +215,7 @@
22 targ_defvec=bfd_elf32_littlearm_vec
23 targ_selvecs=bfd_elf32_bigarm_vec
24 ;;
25- armeb-*-elf | arm*b-*-linux-gnu*)
26+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
27 targ_defvec=bfd_elf32_bigarm_vec
28 targ_selvecs=bfd_elf32_littlearm_vec
29 ;;
30@@ -223,8 +223,8 @@
31 targ_defvec=bfd_elf32_littlearm_vec
32 targ_selvecs=bfd_elf32_bigarm_vec
33 ;;
34- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
35- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
36+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
37+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
38 targ_defvec=bfd_elf32_littlearm_vec
39 targ_selvecs=bfd_elf32_bigarm_vec
40 ;;
41@@ -367,7 +367,7 @@
42 ;;
43
44 #ifdef BFD64
45- hppa*64*-*-linux-gnu*)
46+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
47 targ_defvec=bfd_elf64_hppa_linux_vec
48 targ_selvecs=bfd_elf64_hppa_vec
49 ;;
50@@ -378,7 +378,7 @@
51 ;;
52 #endif
53
54- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
55+ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
56 targ_defvec=bfd_elf32_hppa_linux_vec
57 targ_selvecs=bfd_elf32_hppa_vec
58 ;;
59@@ -501,7 +501,7 @@
60 targ_selvecs=bfd_elf32_i386_vec
61 targ_underscore=yes
62 ;;
63- i[3-7]86-*-linux-gnu*)
64+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
65 targ_defvec=bfd_elf32_i386_vec
66 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
67 targ64_selvecs=bfd_elf64_x86_64_vec
68@@ -515,7 +515,7 @@
69 targ_defvec=bfd_elf64_x86_64_vec
70 targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
71 ;;
72- x86_64-*-linux-gnu*)
73+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
74 targ_defvec=bfd_elf64_x86_64_vec
75 targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
76 ;;
77@@ -690,7 +690,7 @@
78 targ_selvecs=bfd_elf32_m68k_vec
79 targ_underscore=yes
80 ;;
81- m68*-*-linux-gnu*)
82+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
83 targ_defvec=bfd_elf32_m68k_vec
84 targ_selvecs=m68klinux_vec
85 ;;
86@@ -966,7 +966,8 @@
87 ;;
88 #endif
89 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
90- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
91+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
92+ powerpc-*-rtems* | \
93 powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
94 targ_defvec=bfd_elf32_powerpc_vec
95 targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
96@@ -1003,8 +1004,8 @@
97 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
98 ;;
99 powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
100- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
101- powerpcle-*-rtems*)
102+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
103+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
104 targ_defvec=bfd_elf32_powerpcle_vec
105 targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
106 targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
107@@ -1165,7 +1166,7 @@
108 targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
109 targ_underscore=yes
110 ;;
111- sparc-*-linux-gnu*)
112+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
113 targ_defvec=bfd_elf32_sparc_vec
114 targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
115 ;;
116@@ -1212,7 +1213,7 @@
117 targ_defvec=sunos_big_vec
118 targ_underscore=yes
119 ;;
120- sparc64-*-linux-gnu*)
121+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
122 targ_defvec=bfd_elf64_sparc_vec
123 targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
124 ;;
125--- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
126+++ binutils-2.15.91.0.1/bfd/configure
127@@ -1687,6 +1687,11 @@
128 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
129 ;;
130
131+linux-uclibc*)
132+ lt_cv_deplibs_check_method=pass_all
133+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
134+ ;;
135+
136 netbsd*)
137 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
138 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
139@@ -5266,7 +5271,7 @@
140 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
141 COREFILE=''
142 ;;
143- alpha*-*-linux-gnu*)
144+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
145 COREFILE=trad-core.lo
146 TRAD_HEADER='"hosts/alphalinux.h"'
147 ;;
148@@ -5326,7 +5331,7 @@
149 COREFILE=trad-core.lo
150 TRAD_HEADER='"hosts/i386mach3.h"'
151 ;;
152- i[3-7]86-*-linux-gnu*)
153+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
154 COREFILE=trad-core.lo
155 TRAD_HEADER='"hosts/i386linux.h"'
156 ;;
157@@ -5364,7 +5369,7 @@
158 COREFILE=trad-core.lo
159 TRAD_HEADER='"hosts/hp300bsd.h"'
160 ;;
161- m68*-*-linux-gnu*)
162+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
163 COREFILE=trad-core.lo
164 TRAD_HEADER='"hosts/m68klinux.h"'
165 ;;
166--- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
167+++ binutils-2.15.91.0.1/bfd/configure.in
168@@ -164,7 +164,7 @@
169 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
170 COREFILE=''
171 ;;
172- alpha*-*-linux-gnu*)
173+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
174 COREFILE=trad-core.lo
175 TRAD_HEADER='"hosts/alphalinux.h"'
176 ;;
177@@ -245,7 +245,7 @@
178 TRAD_HEADER='"hosts/i386mach3.h"'
179 ;;
180 changequote(,)dnl
181- i[3-7]86-*-linux-gnu*)
182+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
183 changequote([,])dnl
184 COREFILE=trad-core.lo
185 TRAD_HEADER='"hosts/i386linux.h"'
186@@ -286,7 +286,7 @@
187 COREFILE=trad-core.lo
188 TRAD_HEADER='"hosts/hp300bsd.h"'
189 ;;
190- m68*-*-linux-gnu*)
191+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
192 COREFILE=trad-core.lo
193 TRAD_HEADER='"hosts/m68klinux.h"'
194 ;;
diff --git a/meta/recipes-devtools/gdb/gdb_7.1.bb b/meta/recipes-devtools/gdb/gdb_7.1.bb
new file mode 100644
index 0000000000..be40f3f12b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb_7.1.bb
@@ -0,0 +1,3 @@
1require gdb.inc
2
3PR = "r2"
diff --git a/meta/recipes-devtools/genext2fs/genext2fs.inc b/meta/recipes-devtools/genext2fs/genext2fs.inc
new file mode 100644
index 0000000000..859e49b2eb
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs.inc
@@ -0,0 +1,15 @@
1DESCRIPTION = "A tool to generate an ext2 filesystem \
2as a normal (non-root) user."
3HOMEPAGE = "http://genext2fs.sourceforge.net/"
4SECTION = "console/utils"
5
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8 file://genext2fs.c;beginline=9;endline=17;md5=23ea077d1f7fbfd3a6fa573b415fa001"
9
10SRC_URI = "${DEBIAN_MIRROR}/main/g/genext2fs/genext2fs_${PV}.orig.tar.gz"
11S = "${WORKDIR}/genext2fs-${PV}"
12
13inherit autotools
14
15BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb b/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
new file mode 100644
index 0000000000..3c6f6ba077
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
@@ -0,0 +1,3 @@
1require genext2fs.inc
2
3PR = "r0"
diff --git a/meta/recipes-devtools/git/files/autotools.patch b/meta/recipes-devtools/git/files/autotools.patch
new file mode 100644
index 0000000000..1c69c22817
--- /dev/null
+++ b/meta/recipes-devtools/git/files/autotools.patch
@@ -0,0 +1,14 @@
1Index: git-1.7.2.1/configure.ac
2===================================================================
3--- git-1.7.2.1.orig/configure.ac 2010-07-28 18:03:43.000000000 +0100
4+++ git-1.7.2.1/configure.ac 2010-08-13 14:54:29.181971250 +0100
5@@ -697,7 +697,8 @@
6 else if (strcmp(buf, "12345"))
7 return 2;]])],
8 [ac_cv_c_c99_format=yes],
9- [ac_cv_c_c99_format=no])
10+ [ac_cv_c_c99_format=no],
11+ [ac_cv_c_c99_format=yes])
12 ])
13 if test $ac_cv_c_c99_format = no; then
14 NO_C99_FORMAT=YesPlease
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
new file mode 100644
index 0000000000..5d72df59d1
--- /dev/null
+++ b/meta/recipes-devtools/git/git.inc
@@ -0,0 +1,22 @@
1DESCRIPTION = "The git revision control system used by the Linux kernel developers"
2SECTION = "console/utils"
3LICENSE = "GPL"
4DEPENDS = "perl-native openssl curl zlib expat"
5
6SRC_URI = "http://www.kernel.org/pub/software/scm/git/git-${PV}.tar.bz2 \
7 file://autotools.patch;patch=1"
8S = "${WORKDIR}/git-${PV}"
9
10EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl --without-tcltk"
11
12inherit autotools
13
14do_install () {
15 oe_runmake install prefix=${D} bindir=${D}${bindir} \
16 template_dir=${D}${datadir}/git-core/templates \
17 GIT_PYTHON_DIR=${D}${datadir}/git-core/python
18}
19
20FILES_${PN} += "${datadir}/git-core"
21
22BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/git/git_1.7.2.1.bb b/meta/recipes-devtools/git/git_1.7.2.1.bb
new file mode 100644
index 0000000000..7f822f69b3
--- /dev/null
+++ b/meta/recipes-devtools/git/git_1.7.2.1.bb
@@ -0,0 +1,3 @@
1require git.inc
2
3PR = "r2"
diff --git a/meta/recipes-devtools/gmp/gmp-4.2.1/disable-stdc.patch b/meta/recipes-devtools/gmp/gmp-4.2.1/disable-stdc.patch
new file mode 100644
index 0000000000..83c9eae36a
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp-4.2.1/disable-stdc.patch
@@ -0,0 +1,31 @@
1# "extern inline" in traditional gcc means that the function should be
2# inlined wherever it's seen, while in C99, "extern inline" means that i
3# the function should only be inlined where the inline definition is
4# seen while in other places it's not inlined:
5# http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
6#
7# gmp checks "--std=gnu99" to use C99 convention however it internally
8# defines some "extern inline" functions in gmp.h, which is included
9# by mainly .c files and finally lead a flood of redefinition function
10# errors when linking objects together.
11#
12# So disable C99/ANSI detection to stick to tranditional gcc behavior
13#
14# by Kevin Tian <kevin.tian@intel.com>, 2010-08-13
15#
16# (this patch is licensed under GPLv2+)
17
18diff --git a/configure.in b/configure.in
19index 450cc92..aab0b59 100644
20--- a/configure.in
21+++ b/configure.in
22@@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
23
24 # The C compiler and preprocessor, put into ANSI mode if possible.
25 AC_PROG_CC
26-AC_PROG_CC_STDC
27 AC_PROG_CPP
28-GMP_H_ANSI
29
30
31 # The C compiler on the build system, and associated tests.
diff --git a/meta/recipes-devtools/gmp/gmp.inc b/meta/recipes-devtools/gmp/gmp.inc
new file mode 100644
index 0000000000..6b56f7e7c8
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp.inc
@@ -0,0 +1,16 @@
1SECTION = "devel"
2DESCRIPTION = "GNU multiprecision arithmetic library"
3HOMEPAGE = "http://www.swox.com/gmp/"
4LICENSE = "GPLv3 LGPLv3"
5
6SRC_URI = "ftp://ftp.gnu.org/gnu/gmp/gmp-${PV}.tar.bz2 \
7 file://configure.patch \
8 file://amd64.patch "
9
10inherit autotools
11
12ARM_INSTRUCTION_SET = "arm"
13
14acpaths = ""
15
16BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/gmp/gmp/amd64.patch b/meta/recipes-devtools/gmp/gmp/amd64.patch
new file mode 100644
index 0000000000..67be9dd350
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/amd64.patch
@@ -0,0 +1,14 @@
1--- gmp-4.1.4/longlong.h.orig 2004-04-22 00:34:28.000000000 +0200
2+++ gmp-4.1.4/longlong.h 2005-07-18 01:13:06.000000000 +0200
3@@ -738,8 +738,10 @@
4 count is only an int. */
5 #define count_trailing_zeros(count, x) \
6 do { \
7+ UDItype __cbtmp; \
8 ASSERT ((x) != 0); \
9- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
10+ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
11+ (count) = __cbtmp; \
12 } while (0)
13 #endif /* x86_64 */
14
diff --git a/meta/recipes-devtools/gmp/gmp/configure.patch b/meta/recipes-devtools/gmp/gmp/configure.patch
new file mode 100644
index 0000000000..ed0c02d86c
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/configure.patch
@@ -0,0 +1,195 @@
1 acinclude.m4 | 26 ++++++++++++++------------
2 configure.in | 24 +++++++++---------------
3 2 files changed, 23 insertions(+), 27 deletions(-)
4
5Index: gmp-5.0.1/acinclude.m4
6===================================================================
7--- gmp-5.0.1.orig/acinclude.m4
8+++ gmp-5.0.1/acinclude.m4
9@@ -30,20 +30,20 @@ dnl a_out.exe - OpenVMS DEC C called
10 dnl conftest.exe - various DOS compilers
11
12
13-define(IA64_PATTERN,
14+define([IA64_PATTERN],
15 [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
16
17 dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
18 dnl of which config.sub accepts. (Though none of which are likely to work
19 dnl with GMP.)
20 dnl
21-define(M68K_PATTERN,
22+define([M68K_PATTERN],
23 [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
24
25-define(POWERPC64_PATTERN,
26+define([POWERPC64_PATTERN],
27 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
28
29-define(X86_PATTERN,
30+define([X86_PATTERN],
31 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
32
33 define(X86_64_PATTERN,
34@@ -64,7 +64,7 @@ dnl x86 -> x86
35 dnl x86/k6 -> k6
36 dnl x86/k6/mmx -> k6_mmx
37
38-define(GMP_FAT_SUFFIX,
39+define([GMP_FAT_SUFFIX],
40 [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
41
42
43@@ -73,7 +73,7 @@ dnl ----------------------------------
44 dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
45 dnl shell expression like $foo if desired.
46
47-define(GMP_REMOVE_FROM_LIST,
48+define([GMP_REMOVE_FROM_LIST],
49 [remove_from_list_tmp=
50 for remove_from_list_i in $[][$1]; do
51 if test $remove_from_list_i = [$2]; then :;
52@@ -89,12 +89,12 @@ dnl GMP_STRIP_PATH(subdir)
53 dnl ----------------------
54 dnl Strip entries */subdir from $path and $fat_path.
55
56-define(GMP_STRIP_PATH,
57+define([GMP_STRIP_PATH],
58 [GMP_STRIP_PATH_VAR(path, [$1])
59 GMP_STRIP_PATH_VAR(fat_path, [$1])
60 ])
61
62-define(GMP_STRIP_PATH_VAR,
63+define([GMP_STRIP_PATH_VAR],
64 [tmp_path=
65 for i in $[][$1]; do
66 case $i in
67@@ -115,7 +115,7 @@ dnl
68 dnl Dummy value for GMP_LIMB_BITS is enough
69 dnl for all current configure-time uses of gmp.h.
70
71-define(GMP_INCLUDE_GMP_H,
72+define([GMP_INCLUDE_GMP_H],
73 [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
74 #define GMP_NAIL_BITS $GMP_NAIL_BITS
75 #define GMP_LIMB_BITS 123
76@@ -130,7 +130,7 @@ dnl Expand at autoconf time to the valu
77 dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
78 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
79
80-define(GMP_HEADER_GETVAL,
81+define([GMP_HEADER_GETVAL],
82 [patsubst(patsubst(
83 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
84 [^.*$1[ ]+],[]),
85@@ -144,7 +144,7 @@ dnl The gmp version number, extracted f
86 dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
87 dnl like 3.0.1 if patchlevel > 0.
88
89-define(GMP_VERSION,
90+define([GMP_VERSION],
91 [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
92 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
93 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
94@@ -1506,7 +1506,9 @@ esac
95 echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
96
97 # All CPUs use asm-defs.m4
98-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
99+echo -n ["include("] >>$gmp_tmpconfigm4i
100+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
101+echo [")"] >>$gmp_tmpconfigm4i
102 ])
103
104
105Index: gmp-5.0.1/configure.in
106===================================================================
107--- gmp-5.0.1.orig/configure.in
108+++ gmp-5.0.1/configure.in
109@@ -29,12 +29,6 @@ AC_REVISION($Revision$)
110 AC_PREREQ(2.59)
111 AC_INIT(GNU MP, GMP_VERSION, gmp-bugs@gmplib.org, gmp)
112 AC_CONFIG_SRCDIR(gmp-impl.h)
113-m4_pattern_forbid([^[ \t]*GMP_])
114-m4_pattern_allow(GMP_LDFLAGS)
115-m4_pattern_allow(GMP_LIMB_BITS)
116-m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
117-m4_pattern_allow(GMP_NAIL_BITS)
118-m4_pattern_allow(GMP_NUMB_BITS)
119
120 # If --target is not used then $target_alias is empty, but if say
121 # "./configure athlon-pc-freebsd3.5" is used, then all three of
122@@ -303,7 +297,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
123 # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
124 # called. User selections of CC etc are respected.
125 #
126-# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
127+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
128 # pre-testing, since they of course depend on AC_PROG_CC, and also some of
129 # them cache their results, which is not wanted.
130 #
131@@ -395,7 +389,7 @@ abilist="standard"
132 # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
133 # c89 over cc here. But note that on HP-UX c89 provides a castrated
134 # environment, and would want to be excluded somehow. Maybe
135-# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
136+# already does enough to stick cc into ANSI mode and
137 # we don't need to worry.
138 #
139 cclist="gcc cc"
140@@ -1580,7 +1574,7 @@ esac
141 CFLAGS_or_unset=${CFLAGS-'(unset)'}
142 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
143
144-cat >&AC_FD_CC <<EOF
145+cat >&AS_MESSAGE_LOG_FD() <<EOF
146 User:
147 ABI=$ABI
148 CC=$CC
149@@ -1987,7 +1981,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
150
151 # The C compiler and preprocessor, put into ANSI mode if possible.
152 AC_PROG_CC
153-AC_PROG_CC_STDC
154 AC_PROG_CPP
155 GMP_H_ANSI
156
157@@ -2010,11 +2003,11 @@ AC_SUBST(CCAS)
158
159 # The C++ compiler, if desired.
160 want_cxx=no
161+AC_PROG_CXX
162 if test $enable_cxx != no; then
163 test_CXXFLAGS=${CXXFLAGS+set}
164- AC_PROG_CXX
165
166- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
167+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
168 cxxflags_ac_prog_cxx=$CXXFLAGS
169 cxxflags_list=ac_prog_cxx
170
171@@ -2120,7 +2113,7 @@ case $host in
172 esac
173
174
175-cat >&AC_FD_CC <<EOF
176+cat >&AS_MESSAGE_LOG_FD() <<EOF
177 Decided:
178 ABI=$ABI
179 CC=$CC
180@@ -3376,7 +3369,7 @@ GMP_FINISH
181 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
182 # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
183
184-AC_OUTPUT(Makefile \
185+AC_CONFIG_FILES([Makefile \
186 mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
187 mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
188 tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
189@@ -3385,4 +3378,5 @@ AC_OUTPUT(Makefile \
190 tests/cxx/Makefile \
191 doc/Makefile tune/Makefile \
192 demos/Makefile demos/calc/Makefile demos/expr/Makefile \
193- gmp.h:gmp-h.in mp.h:mp-h.in)
194+ gmp.h:gmp-h.in mp.h:mp-h.in])
195+AC_OUTPUT
diff --git a/meta/recipes-devtools/gmp/gmp/sh4-asmfix.patch b/meta/recipes-devtools/gmp/gmp/sh4-asmfix.patch
new file mode 100644
index 0000000000..1a01f61533
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/sh4-asmfix.patch
@@ -0,0 +1,26 @@
1--- gmp-4.1.4/mpn/sh/add_n.s 2005/11/17 08:44:00 1.1
2+++ gmp-4.1.4/mpn/sh/add_n.s 2005/11/17 08:18:57
3@@ -29,8 +29,8 @@
4
5 .text
6 .align 2
7- .global ___gmpn_add_n
8-___gmpn_add_n:
9+ .global __gmpn_add_n
10+__gmpn_add_n:
11 mov #0,r3 ! clear cy save reg
12
13 Loop: mov.l @r5+,r1
14--- gmp-4.1.4/mpn/sh/sub_n.s 2005/11/17 08:44:04 1.1
15+++ gmp-4.1.4/mpn/sh/sub_n.s 2005/11/17 08:18:59
16@@ -29,8 +29,8 @@
17
18 .text
19 .align 2
20- .global ___gmpn_sub_n
21-___gmpn_sub_n:
22+ .global __gmpn_sub_n
23+__gmpn_sub_n:
24 mov #0,r3 ! clear cy save reg
25
26 Loop: mov.l @r5+,r1
diff --git a/meta/recipes-devtools/gmp/gmp/use-includedir.patch b/meta/recipes-devtools/gmp/gmp/use-includedir.patch
new file mode 100644
index 0000000000..ee3891f807
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/use-includedir.patch
@@ -0,0 +1,13 @@
1Index: gmp-4.2.4/Makefile.am
2===================================================================
3--- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
4+++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
5@@ -106,7 +106,7 @@
6 # but anyone knowledgable enough to be playing with exec_prefix will be able
7 # to address that.
8 #
9-includeexecdir = $(exec_prefix)/include
10+includeexecdir = $(includedir)
11 include_HEADERS = $(GMPXX_HEADERS_OPTION)
12 nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
13 lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
diff --git a/meta/recipes-devtools/gmp/gmp_4.2.1.bb b/meta/recipes-devtools/gmp/gmp_4.2.1.bb
new file mode 100644
index 0000000000..d70dcf2665
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp_4.2.1.bb
@@ -0,0 +1,14 @@
1DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
2HOMEPAGE = "http://gmplib.org/"
3BUGTRACKER = "http://gmplib.org/mailman/listinfo/gmp-bugs"
4# demo is licensed under GPLv2+, which however we don't package at all
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
7 file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
8 file://gmp-h.in;startline=6;endline=21;md5=5e25ffd16996faba8c1cd27b04b16099"
9PR = "r0"
10
11SRC_URI = "ftp://ftp.gnu.org/gnu/gmp/${BP}.tar.bz2 \
12 file://disable-stdc.patch"
13
14inherit autotools
diff --git a/meta/recipes-devtools/gmp/gmp_5.0.1.bb b/meta/recipes-devtools/gmp/gmp_5.0.1.bb
new file mode 100644
index 0000000000..dd908bd7ca
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp_5.0.1.bb
@@ -0,0 +1,7 @@
1require gmp.inc
2
3PR = "r0"
4
5SRC_URI_append += "file://sh4-asmfix.patch \
6 file://use-includedir.patch "
7
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
new file mode 100644
index 0000000000..f820cef1c9
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
@@ -0,0 +1,174 @@
1Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
2
3updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
4updated to 20080123 by Nitin A Kamble (by hand)
5
6Index: config/config.guess
7===================================================================
8--- config.orig/config.guess
9+++ config/config.guess
10@@ -139,6 +139,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
11 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
12 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
13
14+# Detect uclibc systems.
15+
16+LIBC="gnu"
17+if [ -f /usr/include/bits/uClibc_config.h ]
18+then
19+ LIBC=uclibc
20+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
21+ then
22+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
23+ LIBC=$LIBC$UCLIBC_SUBVER
24+ fi
25+fi
26+
27 # Note: order is significant - the case branches are not exclusive.
28
29 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
30@@ -840,13 +853,13 @@ EOF
31 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
32 | grep -q __ARM_EABI__
33 then
34- echo ${UNAME_MACHINE}-unknown-linux-gnu
35+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
36 else
37 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
38 fi
39 exit ;;
40 avr32*:Linux:*:*)
41- echo ${UNAME_MACHINE}-unknown-linux-gnu
42+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
43 exit ;;
44 cris:Linux:*:*)
45 echo cris-axis-linux-gnu
46@@ -855,16 +868,16 @@ EOF
47 echo crisv32-axis-linux-gnu
48 exit ;;
49 frv:Linux:*:*)
50- echo frv-unknown-linux-gnu
51+ echo frv-unknown-linux-${LIBC}
52 exit ;;
53 ia64:Linux:*:*)
54- echo ${UNAME_MACHINE}-unknown-linux-gnu
55+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
56 exit ;;
57 m32r*:Linux:*:*)
58- echo ${UNAME_MACHINE}-unknown-linux-gnu
59+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
60 exit ;;
61 m68*:Linux:*:*)
62- echo ${UNAME_MACHINE}-unknown-linux-gnu
63+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
64 exit ;;
65 mips:Linux:*:*)
66 eval $set_cc_for_build
67@@ -887,7 +900,7 @@ EOF
68 s: ::g
69 p
70 }'`"
71- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
72+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
73 ;;
74 mips64:Linux:*:*)
75 eval $set_cc_for_build
76@@ -910,16 +923,16 @@ EOF
77 s: ::g
78 p
79 }'`"
80- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
81+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
82 ;;
83 or32:Linux:*:*)
84- echo or32-unknown-linux-gnu
85+ echo or32-unknown-linux-${LIBC}
86 exit ;;
87 ppc:Linux:*:*)
88- echo powerpc-unknown-linux-gnu
89+ echo powerpc-unknown-linux-${LIBC}
90 exit ;;
91 ppc64:Linux:*:*)
92- echo powerpc64-unknown-linux-gnu
93+ echo powerpc64-unknown-linux-${LIBC}
94 exit ;;
95 alpha:Linux:*:*)
96 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
97@@ -932,40 +945,40 @@ EOF
98 EV68*) UNAME_MACHINE=alphaev68 ;;
99 esac
100 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
101- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
102- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
103+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
104+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
105 exit ;;
106 parisc:Linux:*:* | hppa:Linux:*:*)
107 # Look for CPU level
108 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
109- PA7*) echo hppa1.1-unknown-linux-gnu ;;
110- PA8*) echo hppa2.0-unknown-linux-gnu ;;
111- *) echo hppa-unknown-linux-gnu ;;
112+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
113+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
114+ *) echo hppa-unknown-linux-${LIBC} ;;
115 esac
116 exit ;;
117 parisc64:Linux:*:* | hppa64:Linux:*:*)
118- echo hppa64-unknown-linux-gnu
119+ echo hppa64-unknown-linux-${LIBC}
120 exit ;;
121 s390:Linux:*:* | s390x:Linux:*:*)
122 echo ${UNAME_MACHINE}-ibm-linux
123 exit ;;
124 sh64*:Linux:*:*)
125- echo ${UNAME_MACHINE}-unknown-linux-gnu
126+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
127 exit ;;
128 sh*:Linux:*:*)
129- echo ${UNAME_MACHINE}-unknown-linux-gnu
130+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
131 exit ;;
132 sparc:Linux:*:* | sparc64:Linux:*:*)
133- echo ${UNAME_MACHINE}-unknown-linux-gnu
134+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
135 exit ;;
136 vax:Linux:*:*)
137 echo ${UNAME_MACHINE}-dec-linux-gnu
138 exit ;;
139 x86_64:Linux:*:*)
140- echo x86_64-unknown-linux-gnu
141+ echo x86_64-unknown-linux-${LIBC}
142 exit ;;
143 xtensa*:Linux:*:*)
144- echo ${UNAME_MACHINE}-unknown-linux-gnu
145+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
146 exit ;;
147 i*86:Linux:*:*)
148 # The BFD linker knows what the default object file format is, so
149@@ -980,20 +993,21 @@ EOF
150 p'`
151 case "$ld_supported_targets" in
152 elf32-i386)
153- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
154+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
155 ;;
156 a.out-i386-linux)
157- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
158+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
159 exit ;;
160 coff-i386)
161- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
162+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
163 exit ;;
164 "")
165 # Either a pre-BFD a.out linker (linux-gnuoldld) or
166 # one that does not give us useful --help.
167- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
168+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
169 exit ;;
170 esac
171+ if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit; fi
172 # Determine whether the default compiler is a.out or elf
173 eval $set_cc_for_build
174 sed 's/^ //' << EOF >$dummy.c
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in b/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
new file mode 100755
index 0000000000..be8580c8e6
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
@@ -0,0 +1,267 @@
1#! /usr/bin/perl -w
2# -*- perl -*-
3
4eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac'
5 if 0;
6
7# gnu-configize - install the GNU config.guess / config.sub in a directory tree
8# Based on autoreconf:
9# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
10# Free Software Foundation, Inc.
11
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2, or (at your option)
15# any later version.
16
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25# 02111-1307, USA.
26
27BEGIN
28{
29 my $datadir = $ENV{'autom4te_perllibdir'} || '@autom4te_perllibdir@';
30# '/home/kergoth/code/build-arm/tmp/staging/share/autoconf';
31 unshift @INC, $datadir;
32
33 # Override SHELL. On DJGPP SHELL may not be set to a shell
34 # that can handle redirection and quote arguments correctly,
35 # e.g.: COMMAND.COM. For DJGPP always use the shell that configure
36 # has detected.
37 $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos');
38}
39
40use Autom4te::ChannelDefs;
41use Autom4te::Channels;
42use Autom4te::Configure_ac;
43use Autom4te::FileUtils;
44use Autom4te::General;
45use Autom4te::XFile;
46# Do not use Cwd::chdir, since it might hang.
47use Cwd 'cwd';
48use strict;
49
50## ----------- ##
51## Variables. ##
52## ----------- ##
53
54# $HELP
55# -----
56$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ...
57
58Install the GNU config.sub and config.guess scripts in the
59DIRECTORIES or the directory trees driven by CONFIGURE-AC
60(defaulting to `.').
61
62Operation modes:
63 -h, --help print this help, then exit
64 -V, --version print version number, then exit
65 -v, --verbose verbosely report processing
66 -f, --force consider all files obsolete
67 -s, --symlink install symbolic links instead of copies
68 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
69
70" . Autom4te::ChannelDefs::usage . "
71
72The environment variable \`WARNINGS\' is honored. Some subtools might
73support other warning types, using \`all' is encouraged.
74";
75
76# $VERSION
77# --------
78$version = "gnu-configize 1.0
79
80Copyright (C) 2004 Chris Larson
81This is free software; see the source for copying conditions. There is NO
82warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
83";
84
85my $configdir = '@gnu-configdir@';
86#'/home/kergoth/code/build-arm/tmp/staging/i686-linux/share/gnu-config';
87my $autoconf = $ENV{'AUTOCONF'} || 'autoconf';
88
89# use symlinks instead.
90my $symlink = 0;
91
92my $configure_ac;
93
94my $rm = "rm -f";
95my $ln_s = "ln -sf";
96my $cp = "cp -f";
97my $mkdir = "mkdir";
98my $chmod = "chmod";
99
100## ---------- ##
101## Routines. ##
102## ---------- ##
103
104
105# parse_args ()
106# -------------
107# Process any command line arguments.
108sub parse_args ()
109{
110 my $srcdir;
111
112 getopt ('s|symlink' => \$symlink);
113
114 # Even if the user specified a configure.ac, trim to get the
115 # directory, and look for configure.ac again. Because (i) the code
116 # is simpler, and (ii) we are still able to diagnose simultaneous
117 # presence of configure.ac and configure.in.
118 @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV;
119 push @ARGV, '.' unless @ARGV;
120}
121
122
123# &gnu_configize_current_directory
124# -----------------------------
125sub gnu_configize_current_directory ()
126{
127 my $configure_ac = require_configure_ac;
128
129 # ---------------------- #
130 # Is it using Autoconf? #
131 # ---------------------- #
132
133 my $uses_autoconf;
134 my $uses_gettext;
135 my $configure_ac_file = new Autom4te::XFile $configure_ac;
136 while ($_ = $configure_ac_file->getline)
137 {
138 s/#.*//;
139 s/dnl.*//;
140 $uses_autoconf = 1 if /AC_INIT/;
141 }
142
143 if (!$uses_autoconf)
144 {
145 verb "$configure_ac: not using Autoconf";
146 return;
147 }
148
149 my $aux_dir;
150 my @subdir;
151 my $cmd;
152 my $dest;
153
154 verb "$configure_ac: tracing";
155 my $traces = new Autom4te::XFile
156 ("$autoconf"
157 . join (' --trace=', '',
158 # If you change this list, update the
159 # `Autoreconf-preselections' section of autom4te.in.
160 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
161 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
162 'AC_INIT',
163 )
164 . ' |');
165 while ($_ = $traces->getline)
166 {
167 $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/;
168 $uses_autoconf = 1 if /AC_INIT/;
169 push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
170 }
171
172 # The subdirs are *optional*, they may not exist.
173 foreach (@subdir)
174 {
175 if (-d)
176 {
177 verb "$configure_ac: subdirectory $_ to gnu-configize";
178 gnu_configize ($_);
179 }
180 else
181 {
182 verb "$configure_ac: subdirectory $_ not present";
183 }
184 }
185
186 $dest = ".";
187
188 if (defined $aux_dir)
189 {
190 $dest = $aux_dir;
191 if (! -d $aux_dir)
192 {
193 verb "$configure_ac: creating directory $aux_dir";
194 mkdir $aux_dir
195 or error "cannot create $aux_dir: $!";
196 }
197 }
198
199 if (!$symlink)
200 {
201 $cmd = $cp;
202 }
203 else
204 {
205 $cmd = $ln_s;
206 }
207
208 xsystem ("$cmd $configdir/config.guess $dest/");
209 xsystem ("$chmod u+x $dest/config.guess");
210 xsystem ("$cmd $configdir/config.sub $dest/");
211 xsystem ("$chmod u+x $dest/config.sub");
212}
213
214
215# &gnu_configize ($DIRECTORY)
216# ------------------------
217# Reconf the $DIRECTORY.
218sub gnu_configize ($)
219{
220 my ($directory) = @_;
221 my $cwd = cwd;
222
223 # The format for this message is not free: taken from Emacs, itself
224 # using GNU Make's format.
225 verb "Entering directory `$directory'";
226 chdir $directory
227 or error "cannot chdir to $directory: $!";
228
229 gnu_configize_current_directory;
230
231 # The format is not free: taken from Emacs, itself using GNU Make's
232 # format.
233 verb "Leaving directory `$directory'";
234 chdir $cwd
235 or error "cannot chdir to $cwd: $!";
236}
237
238
239## ------ ##
240## Main. ##
241## ------ ##
242
243parse_args;
244
245# Autoreconf all the given configure.ac. A while loop, not a for,
246# since the list can change at runtime because of AC_CONFIG_SUBDIRS.
247for my $directory (@ARGV)
248 {
249 gnu_configize ($directory);
250 }
251
252### Setup "GNU" style for perl-mode and cperl-mode.
253## Local Variables:
254## perl-indent-level: 2
255## perl-continued-statement-offset: 2
256## perl-continued-brace-offset: 0
257## perl-brace-offset: 0
258## perl-brace-imaginary-offset: 0
259## perl-label-offset: -2
260## cperl-indent-level: 2
261## cperl-brace-offset: 0
262## cperl-continued-brace-offset: 0
263## cperl-label-offset: -2
264## cperl-extra-newline-before-brace: t
265## cperl-merge-trailing-else: nil
266## cperl-continued-statement-offset: 2
267## End:
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch b/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
new file mode 100644
index 0000000000..20a3b11f2f
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
@@ -0,0 +1,21 @@
1--- config.sub.orig 2004-05-14 19:38:36.000000000 -0500
2+++ config.sub 2004-05-14 19:39:17.000000000 -0500
3@@ -118,7 +118,7 @@
4 # Here we must recognize all the valid KERNEL-OS combinations.
5 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
6 case $maybe_os in
7- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
8+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
9 os=-$maybe_os
10 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
11 ;;
12@@ -1135,7 +1135,8 @@
13 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
14 | -chorusos* | -chorusrdb* \
15 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
16- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
17+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
18+ | -uxpv* | -beos* | -mpeix* | -udk* \
19 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
20 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
21 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb b/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb
new file mode 100644
index 0000000000..66d027e933
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb
@@ -0,0 +1,38 @@
1DESCRIPTION = "gnu-configize"
2SECTION = "devel"
3LICENSE = "GPL"
4DEPENDS = ""
5INHIBIT_DEFAULT_DEPS = "1"
6
7FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}"
8PV = "0.1+cvs${FIXEDSRCDATE}"
9PR = "r0"
10
11SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/config;module=config;method=pserver;date=${FIXEDSRCDATE} \
12 file://config-guess-uclibc.patch \
13 file://gnu-configize.in"
14S = "${WORKDIR}/config"
15
16do_compile() {
17 :
18}
19
20do_install () {
21 install -d ${D}${datadir}/gnu-config \
22 ${D}${bindir}
23 cat ${WORKDIR}/gnu-configize.in | \
24 sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \
25 -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize
26 # In the native case we want the system perl as perl-native can't have built yet
27 if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then
28 cat ${WORKDIR}/gnu-configize.in | \
29 sed -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize
30 fi
31 chmod 755 ${D}${bindir}/gnu-configize
32 install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
33}
34
35PACKAGES = "${PN}"
36FILES_${PN} = "${bindir} ${datadir}/gnu-config"
37
38BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/guilt/files/guilt-bash.patch b/meta/recipes-devtools/guilt/files/guilt-bash.patch
new file mode 100644
index 0000000000..d2058e8cf3
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-bash.patch
@@ -0,0 +1,286 @@
1guilt: explicitly call for bash
2
3Running complex guilt stacks of patches/commits can cause interesting
4failures after ~20m of processing, with errors like "Bad substitution".
5
6These have been traced back to having /bin/sh --> /bin/dash on Ubuntu
7systems. Putting a shell that actually *works* (such as /bin/bash)
8in as /bin/sh makes the problem go away. So here we change the guilt
9scripts to explicitly call for bash to ensure we don't have a similar
10issue after deployment.
11
12Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13
14---
15 guilt | 2 +-
16 guilt-add | 2 +-
17 guilt-applied | 2 +-
18 guilt-branch | 2 +-
19 guilt-delete | 2 +-
20 guilt-diff | 2 +-
21 guilt-export | 2 +-
22 guilt-files | 2 +-
23 guilt-fold | 2 +-
24 guilt-fork | 2 +-
25 guilt-graph | 2 +-
26 guilt-header | 2 +-
27 guilt-help | 2 +-
28 guilt-import | 2 +-
29 guilt-import-commit | 2 +-
30 guilt-init | 4 ++--
31 guilt-new | 2 +-
32 guilt-next | 2 +-
33 guilt-patchbomb | 2 +-
34 guilt-pop | 2 +-
35 guilt-prev | 2 +-
36 guilt-push | 2 +-
37 guilt-rebase | 2 +-
38 guilt-refresh | 2 +-
39 guilt-rm | 2 +-
40 guilt-series | 2 +-
41 guilt-status | 2 +-
42 guilt-top | 2 +-
43 guilt-unapplied | 2 +-
44 29 files changed, 30 insertions(+), 30 deletions(-)
45
46--- a/guilt
47+++ b/guilt
48@@ -1,4 +1,4 @@
49-#!/bin/sh
50+#!/bin/bash
51 #
52 # Copyright (c) Josef "Jeff" Sipek, 2006-2010
53 #
54--- a/guilt-add
55+++ b/guilt-add
56@@ -1,4 +1,4 @@
57-#!/bin/sh
58+#!/bin/bash
59 #
60 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
61 #
62--- a/guilt-applied
63+++ b/guilt-applied
64@@ -1,4 +1,4 @@
65-#!/bin/sh
66+#!/bin/bash
67 #
68 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
69 #
70--- a/guilt-branch
71+++ b/guilt-branch
72@@ -1,4 +1,4 @@
73-#!/bin/sh
74+#!/bin/bash
75 #
76 # Copyright (c) Josef "Jeff" Sipek, 2007-2008
77 #
78--- a/guilt-delete
79+++ b/guilt-delete
80@@ -1,4 +1,4 @@
81-#!/bin/sh
82+#!/bin/bash
83 #
84 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
85 #
86--- a/guilt-diff
87+++ b/guilt-diff
88@@ -1,4 +1,4 @@
89-#!/bin/sh
90+#!/bin/bash
91 #
92 # Copyright (C) 2007 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
93 #
94--- a/guilt-export
95+++ b/guilt-export
96@@ -1,4 +1,4 @@
97-#!/bin/sh
98+#!/bin/bash
99 #
100 # Copyright (c) Pierre Habouzit, 2007
101 #
102--- a/guilt-files
103+++ b/guilt-files
104@@ -1,4 +1,4 @@
105-#!/bin/sh
106+#!/bin/bash
107 #
108 # Copyright (C) 2007 Yasushi SHOJI <yashi@atmark-techno.com>
109 #
110--- a/guilt-fold
111+++ b/guilt-fold
112@@ -1,4 +1,4 @@
113-#!/bin/sh
114+#!/bin/bash
115 #
116 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
117 #
118--- a/guilt-fork
119+++ b/guilt-fork
120@@ -1,4 +1,4 @@
121-#!/bin/sh
122+#!/bin/bash
123 #
124 # Copyright (c) Josef "Jeff" Sipek, 2007
125 #
126--- a/guilt-graph
127+++ b/guilt-graph
128@@ -1,4 +1,4 @@
129-#!/bin/sh
130+#!/bin/bash
131 #
132 # Copyright (c) Josef "Jeff" Sipek, 2007
133 #
134--- a/guilt-header
135+++ b/guilt-header
136@@ -1,4 +1,4 @@
137-#!/bin/sh
138+#!/bin/bash
139 #
140 # Copyright (c) Josef "Jeff" Sipek, 2006-2010
141 #
142--- a/guilt-help
143+++ b/guilt-help
144@@ -1,4 +1,4 @@
145-#!/bin/sh
146+#!/bin/bash
147 #
148 # Copyright (c) Josef "Jeff" Sipek, 2007
149 #
150--- a/guilt-import
151+++ b/guilt-import
152@@ -1,4 +1,4 @@
153-#!/bin/sh
154+#!/bin/bash
155 #
156 # Copyright (c) Josef "Jeff" Sipek, 2007
157 #
158--- a/guilt-import-commit
159+++ b/guilt-import-commit
160@@ -1,4 +1,4 @@
161-#!/bin/sh
162+#!/bin/bash
163 #
164 # Copyright (c) Josef "Jeff" Sipek, 2007
165 #
166--- a/guilt-init
167+++ b/guilt-init
168@@ -1,4 +1,4 @@
169-#!/bin/sh
170+#!/bin/bash
171 #
172 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
173 #
174@@ -31,7 +31,7 @@ touch "$GUILT_DIR/$branch/status"
175
176 mkdir -p "$GIT_DIR/hooks/guilt"
177 cat > "$GIT_DIR/hooks/guilt/delete" <<EOF
178-#!/bin/sh
179+#!/bin/bash
180 # Usage: <script> <patch being removed>
181
182 echo "Removing patch '\$1'..."
183--- a/guilt-new
184+++ b/guilt-new
185@@ -1,4 +1,4 @@
186-#!/bin/sh
187+#!/bin/bash
188 #
189 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
190 #
191--- a/guilt-next
192+++ b/guilt-next
193@@ -1,4 +1,4 @@
194-#!/bin/sh
195+#!/bin/bash
196 #
197 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
198 #
199--- a/guilt-patchbomb
200+++ b/guilt-patchbomb
201@@ -1,4 +1,4 @@
202-#!/bin/sh
203+#!/bin/bash
204 #
205 # Copyright (c) Josef "Jeff" Sipek, 2007
206 #
207--- a/guilt-pop
208+++ b/guilt-pop
209@@ -1,4 +1,4 @@
210-#!/bin/sh
211+#!/bin/bash
212 #
213 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
214 #
215--- a/guilt-prev
216+++ b/guilt-prev
217@@ -1,4 +1,4 @@
218-#!/bin/sh
219+#!/bin/bash
220 #
221 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
222 #
223--- a/guilt-push
224+++ b/guilt-push
225@@ -1,4 +1,4 @@
226-#!/bin/sh
227+#!/bin/bash
228 #
229 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
230 #
231--- a/guilt-rebase
232+++ b/guilt-rebase
233@@ -1,4 +1,4 @@
234-#!/bin/sh
235+#!/bin/bash
236 #
237 # Copyright (c) Josef "Jeff" Sipek, 2007
238 #
239--- a/guilt-refresh
240+++ b/guilt-refresh
241@@ -1,4 +1,4 @@
242-#!/bin/sh
243+#!/bin/bash
244 #
245 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
246 #
247--- a/guilt-rm
248+++ b/guilt-rm
249@@ -1,4 +1,4 @@
250-#!/bin/sh
251+#!/bin/bash
252 #
253 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
254 #
255--- a/guilt-series
256+++ b/guilt-series
257@@ -1,4 +1,4 @@
258-#!/bin/sh
259+#!/bin/bash
260 #
261 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
262 #
263--- a/guilt-status
264+++ b/guilt-status
265@@ -1,4 +1,4 @@
266-#!/bin/sh
267+#!/bin/bash
268 #
269 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
270 #
271--- a/guilt-top
272+++ b/guilt-top
273@@ -1,4 +1,4 @@
274-#!/bin/sh
275+#!/bin/bash
276 #
277 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
278 #
279--- a/guilt-unapplied
280+++ b/guilt-unapplied
281@@ -1,4 +1,4 @@
282-#!/bin/sh
283+#!/bin/bash
284 #
285 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
286 #
diff --git a/meta/recipes-devtools/guilt/files/guilt-import-commit.patch b/meta/recipes-devtools/guilt/files/guilt-import-commit.patch
new file mode 100644
index 0000000000..78cc93e5d2
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-import-commit.patch
@@ -0,0 +1,94 @@
1guilt: import commits via git format-patch
2
3Rather than attempting to process commits directly, it
4is preferable to try dumping the change via git format-patch
5to take advantage of the proper header/subject/from lines that
6are generated.
7
8If patches cannot be exported, fall back to importing
9commits via a more custom method.
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12
13---
14 guilt-import-commit | 40 +++++++++++++++++++++++++++++-----------
15 1 file changed, 29 insertions(+), 11 deletions(-)
16
17--- a/guilt-import-commit
18+++ b/guilt-import-commit
19@@ -20,46 +20,64 @@ fi
20 disp "About to begin conversion..." >&2
21 disp "Current head: `cat $GIT_DIR/refs/heads/$branch`" >&2
22
23+# try git-format-patch first, if it fails fall back to internal
24+# methods.
25+patches=`git-format-patch -o $GUILT_DIR/$branch $rhash`
26+if [ -z "$patches" ]; then
27+ need_custom_patches="1"
28+fi
29+
30 for rev in `git rev-list $rhash`; do
31+ if [ ! -z "$need_custom_patches" ]; then
32 s=`git log --pretty=oneline -1 $rev | cut -c 42-`
33
34 fname=`echo $s | sed -e "s/&/and/g" -e "s/[ :]/_/g" -e "s,[/\\],-,g" \
35- -e "s/['\\[{}]//g" -e 's/]//g' -e 's/\*/-/g' \
36+ -e "s/['\\()<>[{}]//g" -e 's/]//g' -e 's/\*/-/g' \
37 -e 's/\?/-/g' | tr A-Z a-z`
38
39- disp "Converting `echo $rev | cut -c 1-8` as $fname"
40+ disp "Converting `echo $rev | cut -c 1-8` as $fname.patch"
41
42 mangle_prefix=1
43 fname_base=$fname
44- while [ -f "$GUILT_DIR/$branch/$fname" ]; do
45+ while [ -f "$GUILT_DIR/$branch/$fname.patch" ]; do
46 fname="$fname_base-$mangle_prefix"
47 mangle_prefix=`expr $mangle_prefix + 1`
48- disp "Patch under that name exists...trying '$fname'"
49+ disp "Patch under that name exists...trying '$fname.patch'"
50 done
51
52 (
53 do_make_header $rev
54 echo ""
55 git diff --binary $rev^..$rev
56- ) > $GUILT_DIR/$branch/$fname
57+ ) > $GUILT_DIR/$branch/$fname.patch
58
59 # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the
60 # timestamp on the patch
61
62- # insert the patch name into the series file
63- series_insert_patch $fname
64+ patches="$patches $fname.patch"
65+ fi
66
67- # Only reset if the commit was on this branch
68- if head_check $rev 2> /dev/null; then
69+ # Only reset if the commit was on this branch
70+ if head_check $rev 2> /dev/null; then
71 # BEWARE: "git reset" ahead! Is there a way to verify that
72 # we really created a patch? - We don't want to lose any
73 # history.
74 git reset --hard $rev^ > /dev/null
75- elif [ -z "$warned" ]; then
76+ elif [ -z "$warned" ]; then
77 disp "Warning: commit $rev is not the HEAD...preserving commit" >&2
78 disp "Warning: (this message is displayed only once)" >&2
79 warned=t
80- fi
81+ fi
82+done
83+
84+rpatches=`echo "$patches" | sed 's% %\n%g' | tac`
85+for patch in $rpatches; do
86+
87+ iname=`echo $patch | sed s%$GUILT_DIR/$branch/%%`
88+ echo "Inserting $iname"
89+
90+ # insert the patch name into the series file
91+ series_insert_patch $iname
92 done
93
94 disp "Done." >&2
diff --git a/meta/recipes-devtools/guilt/files/guilt-init.patch b/meta/recipes-devtools/guilt/files/guilt-init.patch
new file mode 100644
index 0000000000..a06da5bf74
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-init.patch
@@ -0,0 +1,23 @@
1guilt: allow previously initialized branches to be re-initialized
2
3Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
4
5---
6 guilt-init | 6 +++---
7 1 file changed, 3 insertions(+), 3 deletions(-)
8
9--- a/guilt-init
10+++ b/guilt-init
11@@ -20,9 +20,9 @@ while case $# in 0) break ;; esac; do
12 shift
13 done
14
15-if [ -d "$GUILT_DIR/$branch" ]; then
16- die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
17-fi
18+# if [ -d "$GUILT_DIR/$branch" ]; then
19+# die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
20+# fi
21
22 [ ! -d "$GUILT_DIR" ] && mkdir "$GUILT_DIR"
23 mkdir -p "$GUILT_DIR/$branch"
diff --git a/meta/recipes-devtools/guilt/files/guilt-pop.patch b/meta/recipes-devtools/guilt/files/guilt-pop.patch
new file mode 100644
index 0000000000..c26b324ccf
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-pop.patch
@@ -0,0 +1,71 @@
1guilt: pop and delete tags
2
3Add support for popping to a tag and the ability to delete
4a tag while popping from the tree
5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
7
8---
9 guilt-pop | 28 ++++++++++++++++++++++++++--
10 1 file changed, 26 insertions(+), 2 deletions(-)
11
12--- a/guilt-pop
13+++ b/guilt-pop
14@@ -17,6 +17,13 @@ while [ $# -gt 0 ]; do
15 -n)
16 num=t
17 ;;
18+ -t|--t)
19+ tag=$2
20+ shift
21+ ;;
22+ -d|--d) # can only be used with --t
23+ delete_tag=t
24+ ;;
25 *)
26 break
27 ;;
28@@ -24,7 +31,7 @@ while [ $# -gt 0 ]; do
29 shift
30 done
31
32-# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo"
33+# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo" or "guilt-pop -t <tag>"
34 if [ -z "$all" ] && [ $# -gt 1 ]; then
35 usage
36 fi
37@@ -44,12 +51,26 @@ fi
38 patch="$1"
39 [ ! -z "$all" ] && patch="-a"
40
41+
42+# tag processing will just roll into another one of
43+# the pop types, number or patch name
44+if [ ! -z "$tag" ]; then
45+ git-rev-list HEAD ^$tag > /dev/null 2>/dev/null
46+ if [ $? -eq 0 ]; then
47+ revs="`git-rev-list HEAD ^$tag`"
48+ num=`echo "$revs" | wc -l`
49+ patch=$num
50+ else
51+ echo "Cannot find tag $tag";
52+ exit 0
53+ fi
54+fi
55+
56 if [ ! -s "$applied" ]; then
57 disp "No patches applied."
58 exit 0
59 elif [ "$patch" = "-a" ]; then
60 # we are supposed to pop all patches
61-
62 sidx=`wc -l < $applied`
63 eidx=0
64 elif [ ! -z "$num" ]; then
65@@ -96,3 +117,6 @@ pop_many_patches `git rev-parse refs/pat
66 p=`get_top`
67 [ ! -z "$p" ] && disp "Now at $p." || disp "All patches popped."
68
69+if [ ! -z "$delete_tag" ]; then
70+ git tag -d $tag
71+fi;
diff --git a/meta/recipes-devtools/guilt/files/guilt-push-no-series.patch b/meta/recipes-devtools/guilt/files/guilt-push-no-series.patch
new file mode 100644
index 0000000000..d40119c712
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-push-no-series.patch
@@ -0,0 +1,27 @@
1guilt-push: Avoid duplicate hits in a series
2
3If a series file becomes mangled and a patch name appears in there
4more than once, then the guilt-push will fail a horrible and
5incomprehensible death. Make it fail in a sensible way.
6
7Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
8
9---
10
11 guilt-push | 5 +++++
12 1 file changed, 5 insertions(+)
13
14--- a/guilt-push
15+++ b/guilt-push
16@@ -90,6 +90,11 @@ else
17 if [ -z "$eidx" ]; then
18 die "Patch $patch is not in the series or is guarded."
19 fi
20+
21+ matches=`echo $eidx | wc -w`
22+ if [ $matches -gt 1 ]; then
23+ die "Patch $patch is in the series multiple times"
24+ fi
25 fi
26
27 # make sure that there are no unapplied changes
diff --git a/meta/recipes-devtools/guilt/files/guilt-push.patch b/meta/recipes-devtools/guilt/files/guilt-push.patch
new file mode 100644
index 0000000000..2184329595
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-push.patch
@@ -0,0 +1,40 @@
1guilt: add support for pushing and tagging
2
3It can be handy to push AND tag at the same time.
4
5Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
6
7---
8
9 guilt-push | 16 +++++++++++++++-
10 1 file changed, 15 insertions(+), 1 deletion(-)
11
12--- a/guilt-push
13+++ b/guilt-push
14@@ -19,7 +19,11 @@ while [ $# -gt 0 ]; do
15 -n)
16 num=t
17 ;;
18- *)
19+ -t|--t)
20+ tag=$2
21+ shift
22+ ;;
23+ *)
24 break
25 ;;
26 esac
27@@ -126,3 +130,13 @@ do
28 fi
29 done
30
31+ret=$?
32+if [ $ret -ne 0 ]; then
33+ exit $ret
34+fi
35+
36+# if a tag was specified, tag the tree now.
37+if [ -n "$tag" ]; then
38+ git-rev-parse HEAD > "$GIT_DIR/refs/tags/$tag"
39+fi
40+
diff --git a/meta/recipes-devtools/guilt/files/guilt-set-git_exec_path.patch b/meta/recipes-devtools/guilt/files/guilt-set-git_exec_path.patch
new file mode 100644
index 0000000000..92e75f29ef
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-set-git_exec_path.patch
@@ -0,0 +1,27 @@
1guilt: set GIT_EXEC_PATH in guilt wrapper
2
3git has the habit of tracking the directory where it was
4installed. If you build git, relocate git and then remove
5the old directory --exec-path will return that original
6(now non-existent) directory. We insist that git and
7guilt be in the same directory to ensure they are matched,
8so we use the environment variable GIT_EXEC_PATH to
9force the issue.
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12
13---
14 guilt | 2 ++
15 1 file changed, 2 insertions(+)
16
17--- a/guilt
18+++ b/guilt
19@@ -23,6 +23,8 @@ esac
20 # we change directories ourselves
21 SUBDIRECTORY_OK=1
22
23+export GIT_EXEC_PATH=`dirname $0`/../libexec/git-core
24+
25 if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
26 . "$(git --exec-path)/git-sh-setup"
27 fi
diff --git a/meta/recipes-devtools/guilt/files/guilt.patch b/meta/recipes-devtools/guilt/files/guilt.patch
new file mode 100644
index 0000000000..a3352cf810
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt.patch
@@ -0,0 +1,317 @@
1guilt: enhanced patch queue management
2
3guilt prefers to track the status and series of patches
4under .git/patches. But this location doesn't allow the
5status of a quilt queue to be committed to a secondary
6repository and later restored.
7
8This change does three things:
9
10 - allows GUILT_BASE to be changed (with a default to "wrs")
11 - allows shadow tracking of the patches (for rebase)
12 - enhances the header detection and creation of patches
13 as they are pushed onto the tree.
14
15Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
16
17---
18 guilt | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
19 1 file changed, 159 insertions(+), 24 deletions(-)
20
21--- a/guilt
22+++ b/guilt
23@@ -153,14 +153,16 @@ get_branch()
24
25 verify_branch()
26 {
27- [ ! -d "$GIT_DIR/patches" ] &&
28+ [ ! -d "$GUILT_DIR" ] &&
29 die "Patches directory doesn't exist, try guilt-init"
30- [ ! -d "$GIT_DIR/patches/$branch" ] &&
31+ [ ! -d "$GUILT_DIR/$branch" ] &&
32 die "Branch $branch is not initialized, try guilt-init"
33- [ ! -f "$GIT_DIR/patches/$branch/series" ] &&
34+ [ ! -f "$GUILT_DIR/$branch/series" ] &&
35 die "Branch $branch does not have a series file"
36- [ ! -f "$GIT_DIR/patches/$branch/status" ] &&
37+ [ ! -f "$GUILT_DIR/$branch/status" ] &&
38 die "Branch $branch does not have a status file"
39+ [ -f "$GUILT_DIR/$branch/applied" ] &&
40+ die "Warning: Branch $branch has 'applied' file - guilt is not compatible with stgit"
41 [ -f "$GIT_DIR/patches/$branch/applied" ] &&
42 die "Warning: Branch $branch has 'applied' file - guilt is not compatible with stgit"
43 }
44@@ -339,6 +341,17 @@ BEGIN{}
45 '
46 }
47
48+# usage: do_get_only_patch patchfile
49+# similar to do_get_patch except everything leading up to
50+# the first diff line and after the last chunk are removed
51+do_get_only_patch()
52+{
53+ cat "$1" | awk '
54+BEGIN{}
55+/^(diff )/,/^(-- |END{})/
56+' | sed '/^-- *$/D'
57+}
58+
59 # usage: do_get_header patchfile
60 do_get_header()
61 {
62@@ -352,8 +365,13 @@ do_get_header()
63 BEGIN{skip=0}
64 /^Subject:/ && (NR==1){print substr($0, 10); next}
65 /^From:/{skip=1; next}
66+/^Author:/{skip=1; next}
67+/^Date:/{skip=1; next}
68+/^commit/{skip=1; next}
69 /^[ \t\f\n\r\v]*$/ && (skip==1){skip=0; next}
70 /^(diff |---$|--- )/{exit}
71+/^diff --git/{exit}
72+/^Index: /{exit}
73 {print $0}
74 END{}
75 '
76@@ -415,6 +433,15 @@ series_insert_patch()
77 mv "$series.tmp" "$series"
78 }
79
80+series_append_patch()
81+{
82+ # unlike series_insert_patch, which inserts the passed
83+ # patch after the current top patch, this function always
84+ # appends the patch to the series
85+
86+ echo $1 >> "$series"
87+}
88+
89 # usage: series_remove_patch <patchname>
90 series_remove_patch()
91 {
92@@ -473,8 +500,7 @@ remove_patch_refs()
93 # usage: pop_many_patches <commitish> <number of patches>
94 pop_many_patches()
95 {
96- assert_head_check
97-
98+ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
99 (
100 cd_to_toplevel
101
102@@ -508,50 +534,149 @@ remove_ref()
103 )
104 }
105
106+prep_patch()
107+{
108+ patch=$1;
109+ tgt=$2;
110+
111+ if test -f $patch; then
112+ case $patch in
113+ *.gz) gzip -dc $patch > $tgt ;;
114+ *.bz2) bzip2 -dc $patch > $tgt ;;
115+ *) cp $patch $tgt ;;
116+ esac;
117+ fi;
118+}
119+
120 # usage: commit patchname parent
121 commit()
122 {
123 (
124 TMP_MSG=`get_tmp_file msg`
125+ TMP_PATCH=`get_tmp_file patch`
126+ TMP_PATCH_OUT=`get_tmp_file patch_out`
127+ TMP_INFO=`get_tmp_file info`
128
129 p="$GUILT_DIR/$branch/$1"
130 pname="$1"
131+ prep_patch "$p" "$TMP_PATCH"
132+ p=$TMP_PATCH
133+
134 cd_to_toplevel
135
136 git diff-files --name-only | (while read n; do git update-index "$n" ; done)
137
138+ # borrowed from git-am
139+ header_type=git
140+ git mailinfo "$TMP_MSG" "$TMP_PATCH_OUT" \
141+ <"$p" >"$TMP_INFO";
142+
143+ # skip pine's internal folder data
144+ grep '^Author: Mail System Internal Data$' \
145+ <"$TMP_INFO" >/dev/null
146+
147+ git stripspace < "$TMP_MSG" > "$TMP_MSG.clean"
148+ mv "$TMP_MSG.clean" "$TMP_MSG"
149+ git stripspace < "$TMP_INFO" > "$TMP_INFO.clean"
150+ mv "$TMP_INFO.clean" "$TMP_INFO"
151+
152+ # If mailinfo couldn't get something , try another way
153 # grab a commit message out of the patch
154- do_get_header "$p" > "$TMP_MSG"
155+ if [ ! -s "$TMP_MSG" ] || [ ! -s "$TMP_INFO" ]; then
156+ do_get_header "$p" > "$TMP_MSG"
157+ header_type=guilt
158+ fi
159
160- # make a default commit message if patch doesn't contain one
161- [ ! -s "$TMP_MSG" ] && echo "patch $pname" > "$TMP_MSG"
162+ # last try: make a default commit message if patch doesn't contain one
163+ [ ! -s "$TMP_MSG" ] && echo "auto_msg: patch $pname" > "$TMP_MSG"
164
165- # extract a From line from the patch header, and set
166- # GIT_AUTHOR_{NAME,EMAIL}
167- author_str=`sed -n -e '/^From:/ { s/^From: //; p; q; }; /^(diff |---$|--- )/ q' "$p"`
168- if [ ! -z "$author_str" ]; then
169+
170+ if [ "$header_type" = "guilt" ]; then
171+
172+ # extract a From line from the patch header, and set
173+ # GIT_AUTHOR_{NAME,EMAIL}
174+ author_str=`sed -n -e '/^From:/ { s/^From: //; p; q }; /^(diff |---)/ q' "$p"`
175+ if [ ! -z "$author_str" ]; then
176 GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
177 export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
178 export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
179- fi
180+ fi
181+
182+
183+ # check in the patch for a subject
184+ SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$p")"
185+ if [ -z "$SUBJECT" ]; then
186+ # if we can't find a subject in the patch, then let's construct
187+ # one from the header of the patch itself
188+ SUBJECT=`cat "$TMP_MSG" | head -n 1`
189+ if [ ${#SUBJECT} -gt 60 ]; then
190+ SUBJECT=${SUBJECT: -60}
191+ fi
192+ fi
193+
194+ if [ -z "$SUBJECT" ]; then
195+ # if we are *still* without a subject, then just use
196+ # the patch name
197+ SUBJECT=`echo $1 | sed 's%^patch *%%'`
198+
199+ if [ ${#SUBJECT} -gt 60 ]; then
200+ SUBJECT=${SUBJECT: -60}
201+ fi
202+ fi
203
204- # must strip nano-second part otherwise git gets very
205- # confused, and makes up strange timestamps from the past
206- # (chances are it decides to interpret it as a unix
207- # timestamp).
208- export GIT_AUTHOR_DATE="`stat -c %y "$p" | sed -e '
209+ SUBJECT=`echo $SUBJECT | sed s'%^ *%%'`
210+
211+ if [ ! -z "$SUBJECT" ]; then
212+ echo "$SUBJECT" >> $TMP_MSG.subject
213+ echo "" >> $TMP_MSG.subject
214+ cat "$TMP_MSG" >> $TMP_MSG.subject
215+ mv "$TMP_MSG.subject" "$TMP_MSG"
216+ fi
217+
218+ # must strip nano-second part otherwise git gets very
219+ # confused, and makes up strange timestamps from the past
220+ # (chances are it decides to interpret it as a unix
221+ # timestamp).
222+ export GIT_AUTHOR_DATE="`stat -c %y "$p" | sed -e '\
223 s/^\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\) \([0-9]\{2\}\):\([0-9]\{2\}\):\([0-9]\{2\}\)\.[0-9]* \(.*\)$/\1-\2-\3 \4:\5:\6 \7/'`"
224- export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
225+ export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
226+ else
227+ # using git headers, closely related to git-am
228+
229+ GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$TMP_INFO")"
230+ GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$TMP_INFO")"
231+ GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$TMP_INFO")"
232+ if test -z "$GIT_AUTHOR_EMAIL"
233+ then
234+ echo "Warning: patch does not have a valid e-mail address."
235+ GIT_AUTHOR_EMAIL=$GIT_AUTHOR_NAME
236+ fi
237+
238+ SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$TMP_INFO")"
239+ if [ ! -z "$SUBJECT" ]; then
240+ echo "$SUBJECT" >> $TMP_MSG.subject
241+ echo "" >> $TMP_MSG.subject
242+ cat "$TMP_MSG" >> $TMP_MSG.subject
243+ mv "$TMP_MSG.subject" "$TMP_MSG"
244+ fi
245+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
246+ fi
247
248 # commit
249 treeish=`git write-tree`
250 commitish=`git commit-tree $treeish -p $2 < "$TMP_MSG"`
251+ if [ ! $? -eq 0 ]; then
252+ echo "ERROR. Could not commit tree"
253+ git-reset --hard HEAD^
254+ exit 1
255+ fi
256 git update-ref HEAD $commitish
257
258 # mark patch as applied
259 git update-ref "refs/patches/$branch/$pname" HEAD
260
261- rm -f "$TMP_MSG"
262+ rm -f "$TMP_MSG" "$TMP_LOG" "$TMP_PATCH" "$TMP_INFO" "$TMP_PATCH_OUT"
263+
264 )
265 }
266
267@@ -568,7 +693,7 @@ push_patch()
268 bail_action="$2"
269 reject="--reject"
270
271- assert_head_check
272+ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
273 cd_to_toplevel
274
275 # apply the patch if and only if there is something to apply
276@@ -671,7 +796,7 @@ refresh_patch()
277 # incldiffstat
278 __refresh_patch()
279 {
280- assert_head_check
281+ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
282
283 (
284 TMP_DIFF=`get_tmp_file diff`
285@@ -711,6 +836,10 @@ __refresh_patch()
286
287 head -n "-$N" < "$applied" > "$applied.tmp"
288 mv "$applied.tmp" "$applied"
289+
290+ # update the shadow status.
291+ ref=`cat $GIT_DIR/refs/tags/${branch}_top`
292+ echo "$ref:$1" >> $applied_shadow
293 )
294 }
295
296@@ -791,7 +920,12 @@ diffstat=`git config --bool guilt.diffst
297 # The following gets run every time this file is source'd
298 #
299
300-GUILT_DIR="$GIT_DIR/patches"
301+
302+# GUILT_DIR="$GIT_DIR/patches"
303+if [ -z "$GUILT_BASE" ]; then
304+ GUILT_BASE=wrs
305+fi
306+GUILT_DIR="$GUILT_BASE/patches"
307
308 branch=`get_branch`
309
310@@ -814,6 +948,7 @@ fi
311 # very useful files
312 series="$GUILT_DIR/$branch/series"
313 applied="$GUILT_DIR/$branch/status"
314+applied_shadow="$GUILT_DIR/$branch/shadow_status"
315 guards_file="$GUILT_DIR/$branch/guards"
316
317 # determine a pager to use for anything interactive (fall back to more)
diff --git a/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch b/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
new file mode 100644
index 0000000000..b98ec5e9fe
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
@@ -0,0 +1,69 @@
1guilt: improve the generation of an automatic header
2
3Patches that do not have a proper header are encountered when generating
4a tree. This improves the detection of these patches and generates a sane
5header so the eventual commit will be coherent
6
7Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
8
9---
10
11 guilt | 24 ++++++++++++++++++------
12 1 file changed, 18 insertions(+), 6 deletions(-)
13
14--- a/guilt
15+++ b/guilt
16@@ -591,7 +591,12 @@ commit()
17 fi
18
19 # last try: make a default commit message if patch doesn't contain one
20- [ ! -s "$TMP_MSG" ] && echo "auto_msg: patch $pname" > "$TMP_MSG"
21+ if [ ! -s "$TMP_MSG" ]; then
22+ echo "auto_msg: importing `basename $pname`" > "$TMP_MSG"
23+ echo "" >> "$TMP_MSG"
24+ echo "This is an automatic import of patch $pname, no headers were" >> "$TMP_MSG"
25+ echo "detected and a default message was constructed" >> "$TMP_MSG"
26+ fi
27
28
29 if [ "$header_type" = "guilt" ]; then
30@@ -599,12 +604,14 @@ commit()
31 # extract a From line from the patch header, and set
32 # GIT_AUTHOR_{NAME,EMAIL}
33 author_str=`sed -n -e '/^From:/ { s/^From: //; p; q }; /^(diff |---)/ q' "$p"`
34- if [ ! -z "$author_str" ]; then
35- GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
36- export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
37- export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
38+ if [ -z "$author_str" ]; then
39+ author_str="auto commit <unknown@unknown>"
40 fi
41
42+ GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
43+ export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
44+ export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
45+
46
47 # check in the patch for a subject
48 SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$p")"
49@@ -615,6 +622,11 @@ commit()
50 if [ ${#SUBJECT} -gt 60 ]; then
51 SUBJECT=${SUBJECT: -60}
52 fi
53+
54+ # remove the line from the tmp msg
55+ mv "$TMP_MSG" "$TMP_MSG.work"
56+ cat "$TMP_MSG.work" | grep -v -E ".*$SUBJECT.*" > "$TMP_MSG"
57+ rm "$TMP_MSG.work"
58 fi
59
60 if [ -z "$SUBJECT" ]; then
61@@ -629,7 +641,7 @@ commit()
62
63 SUBJECT=`echo $SUBJECT | sed s'%^ *%%'`
64
65- if [ ! -z "$SUBJECT" ]; then
66+ if [ -n "$SUBJECT" ]; then
67 echo "$SUBJECT" >> $TMP_MSG.subject
68 echo "" >> $TMP_MSG.subject
69 cat "$TMP_MSG" >> $TMP_MSG.subject
diff --git a/meta/recipes-devtools/guilt/files/make_git_commands_conditional.patch b/meta/recipes-devtools/guilt/files/make_git_commands_conditional.patch
new file mode 100644
index 0000000000..b6d40dbc9f
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/make_git_commands_conditional.patch
@@ -0,0 +1,46 @@
1guilt: allow operation outside of git repos
2
3Sometimes guilt is sourced when there isn't a containing git repository.
4Some of the git commands that are always called will report errors
5unecesarility in this scenario. This adds a variable that will inhibit
6those problematic calls
7
8Signed-off-by <bruce.ashfield@windriver.com>
9
10---
11
12 guilt | 9 ++++++---
13 1 file changed, 6 insertions(+), 3 deletions(-)
14
15
16--- a/guilt
17+++ b/guilt
18@@ -23,7 +23,9 @@ esac
19 # we change directories ourselves
20 SUBDIRECTORY_OK=1
21
22-. "$(git --exec-path)/git-sh-setup"
23+if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
24+ . "$(git --exec-path)/git-sh-setup"
25+fi
26
27 #
28 # Git version check
29@@ -921,14 +923,15 @@ diffstat=`git config --bool guilt.diffst
30 # The following gets run every time this file is source'd
31 #
32
33-
34 # GUILT_DIR="$GIT_DIR/patches"
35 if [ -z "$GUILT_BASE" ]; then
36 GUILT_BASE=wrs
37 fi
38 GUILT_DIR="$GUILT_BASE/patches"
39
40-branch=`get_branch`
41+if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
42+ branch=`get_branch`
43+fi
44
45 # most of the time we want to verify that the repo's branch has been
46 # initialized, but every once in a blue moon (e.g., we want to run guilt-init),
diff --git a/meta/recipes-devtools/guilt/files/optional_head_check.patch b/meta/recipes-devtools/guilt/files/optional_head_check.patch
new file mode 100644
index 0000000000..368d63b6ab
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/optional_head_check.patch
@@ -0,0 +1,58 @@
1guilt: allow guilt-push to opt out of head checking
2
3Depending on the method used to construct a tree, it is entirely
4possible that branches are not only made up of guilt created commits.
5This mixed mode is valid, and in particular is valid when applying
6patches to a tree.
7
8In the default mode of operation, you will see a warning such as
9this when working on a branch:
10
11Expected HEAD commit dbd5861f81a92b8b329561f94b8575c7ee6768b6
12 got 3e8e6f6bd9f1772b91fc1fe9949f541d0560b487
13
14This looks severe, but is harmless during tree construction,
15since even if the HEAD commit was expected, you can still run into
16issues pushing a patch. This is particularly seen when templates are
17adding patches to a kernel.
18
19To make this look less ominous, we make the head check for patch
20pushing opt-in. Which means that by default, you'll no longer see
21this warning if you work with a mixed mode branch during tree
22construction.
23
24Other modes such as pop or refresh can run into problems when
25the HEAD commit isn't tracked or expected, so they should remained
26checked.
27
28Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
29
30---
31 guilt | 3 +++
32 guilt-push | 3 +++
33 2 files changed, 6 insertions(+)
34
35--- a/guilt
36+++ b/guilt
37@@ -417,6 +417,9 @@ head_check()
38 return 0 ;;
39 esac
40
41+ # If do_head_check isn't set, bail, we are "opt-in"
42+ [ -z "$do_head_check" ] && return 0
43+
44 if [ "`git rev-parse refs/heads/$branch`" != "`git rev-parse $1`" ]; then
45 disp "Expected HEAD commit $1" >&2
46 disp " got `git rev-parse refs/heads/$branch`" >&2
47--- a/guilt-push
48+++ b/guilt-push
49@@ -23,6 +23,9 @@ while [ $# -gt 0 ]; do
50 tag=$2
51 shift
52 ;;
53+ --head_check)
54+ do_head_check=t
55+ ;;
56 *)
57 break
58 ;;
diff --git a/meta/recipes-devtools/guilt/files/uninstall_force.patch b/meta/recipes-devtools/guilt/files/uninstall_force.patch
new file mode 100644
index 0000000000..8c9067dd46
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/uninstall_force.patch
@@ -0,0 +1,12 @@
1guilt: force removal when uninstalling
2
3Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
4
5--- a/uninstall.orig
6+++ b/uninstall
7@@ -12,4 +12,4 @@
8
9 shift
10
11-(cd $PRE; rm "$@")
12+(cd $PRE; rm -f "$@")
diff --git a/meta/recipes-devtools/guilt/guilt-native_0.33.bb b/meta/recipes-devtools/guilt/guilt-native_0.33.bb
new file mode 100644
index 0000000000..62d91f6953
--- /dev/null
+++ b/meta/recipes-devtools/guilt/guilt-native_0.33.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "guilt is quilt like tool for git"
2LICENSE = "GPL"
3
4PR = r0
5PV = "0.33"
6
7inherit native
8
9SRC_URI = "http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-${PV}.tar.gz\
10 file://guilt-push.patch \
11 file://guilt-pop.patch \
12 file://guilt.patch \
13 file://guilt-init.patch \
14 file://guilt-import-commit.patch \
15 file://uninstall_force.patch \
16 file://guilt-push-no-series.patch \
17 file://make_git_commands_conditional.patch \
18 file://improve_auto_header_gen.patch \
19 file://guilt-set-git_exec_path.patch \
20 file://guilt-bash.patch \
21 file://optional_head_check.patch"
22
23# we don't compile, we just install
24do_compile() {
25 :
26}
27
28do_install() {
29 oe_runmake PREFIX=${D}/${base_prefix}/usr install
30} \ No newline at end of file
diff --git a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils-native_0.8.7.bb b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils-native_0.8.7.bb
new file mode 100644
index 0000000000..ef41c538af
--- /dev/null
+++ b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils-native_0.8.7.bb
@@ -0,0 +1,9 @@
1LICENSE = "GPLv2"
2DEPENDS = "libxml-simple-perl-native"
3PR = "r1"
4
5SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-0.8.7.tar.gz"
6
7S = "${WORKDIR}/icon-naming-utils-${PV}"
8
9inherit autotools native
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.2.10.bb b/meta/recipes-devtools/libtool/libtool-cross_2.2.10.bb
new file mode 100644
index 0000000000..23135f7edb
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.2.10.bb
@@ -0,0 +1,34 @@
1require libtool_${PV}.bb
2
3PR = "r1"
4PACKAGES = ""
5SRC_URI_append = " file://cross_compile.patch \
6 file://prefix.patch "
7
8DEPENDS += "libtool-native"
9
10do_configure_prepend () {
11 # Remove any existing libtool m4 since old stale versions would break
12 # any upgrade
13 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
14 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
15}
16
17do_install () {
18 install -d ${D}${bindir}/
19 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
20 install -d ${D}${datadir}/libtool/
21 install -d ${D}${datadir}/aclocal/
22 install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/
23 install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/
24 install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/
25 install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/
26 install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/
27}
28
29SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
30
31libtoolcross_sysroot_preprocess () {
32 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
33 install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
34}
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.2.10.bb b/meta/recipes-devtools/libtool/libtool-native_2.2.10.bb
new file mode 100644
index 0000000000..322da4a99b
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-native_2.2.10.bb
@@ -0,0 +1,22 @@
1require libtool_${PV}.bb
2
3DEPENDS = ""
4
5PR = "r1"
6SRC_URI_append = " file://cross_compile.patch \
7 file://prefix.patch "
8
9inherit native
10
11do_configure_prepend () {
12 # Remove any existing libtool m4 since old stale versions would break
13 # any upgrade
14 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
15 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
16}
17
18do_install () {
19 autotools_do_install
20 install -d ${D}${bindir}/
21 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
22}
diff --git a/meta/recipes-devtools/libtool/libtool-nativesdk_2.2.10.bb b/meta/recipes-devtools/libtool/libtool-nativesdk_2.2.10.bb
new file mode 100644
index 0000000000..e972d9ef3d
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-nativesdk_2.2.10.bb
@@ -0,0 +1,27 @@
1require libtool_${PV}.bb
2
3PR = "r1"
4SRC_URI_append = " file://cross_compile.patch \
5 file://prefix.patch "
6
7inherit nativesdk
8
9do_configure_prepend () {
10 # Remove any existing libtool m4 since old stale versions would break
11 # any upgrade
12 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
13 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
14}
15
16do_install () {
17 autotools_do_install
18 install -d ${D}${bindir}/
19 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
20}
21
22SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
23
24libtoolnativesdk_sysroot_preprocess () {
25 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
26 install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
27}
diff --git a/meta/recipes-devtools/libtool/libtool.inc b/meta/recipes-devtools/libtool/libtool.inc
new file mode 100644
index 0000000000..c94dadd0af
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool.inc
@@ -0,0 +1,14 @@
1DESCRIPTION = "Generic library support script \
2This is GNU libtool, a generic library support script. Libtool hides \
3the complexity of generating special library types (such as shared \
4libraries) behind a consistent interface."
5HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
6SECTION = "devel"
7LICENSE = "GPLv2, LGPLv2.1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
9 file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06 "
10
11SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
12 file://trailingslash.patch \
13 file://prefix-manpage-fix.patch "
14
diff --git a/meta/recipes-devtools/libtool/libtool/cross_compile.patch b/meta/recipes-devtools/libtool/libtool/cross_compile.patch
new file mode 100644
index 0000000000..fc1f4b6fb2
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/cross_compile.patch
@@ -0,0 +1,55 @@
1Tweaks to make cross-compiling work combined and updated from various
2older patches, some by Chris Larson.
3Not upstreable in this form.
4
5RP - 01/05/2008
6
7Index: libtool-2.2.10/libltdl/config/ltmain.m4sh
8===================================================================
9--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh
10+++ libtool-2.2.10/libltdl/config/ltmain.m4sh
11@@ -5147,8 +5147,14 @@ func_mode_link ()
12 absdir="$abs_ladir"
13 libdir="$abs_ladir"
14 else
15- dir="$libdir"
16- absdir="$libdir"
17+ # Adding 'libdir' from the .la file to our library search paths
18+ # breaks crosscompilation horribly. We cheat here and don't add
19+ # it, instead adding the path where we found the .la. -CL
20+ dir="$abs_ladir"
21+ absdir="$abs_ladir"
22+ libdir="$abs_ladir"
23+ #dir="$libdir"
24+ #absdir="$libdir"
25 fi
26 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
27 else
28@@ -5519,8 +5525,6 @@ func_mode_link ()
29 add="$libdir/$linklib"
30 fi
31 else
32- # We cannot seem to hardcode it, guess we'll fake it.
33- add_dir="-L$libdir"
34 # Try looking first in the location we're being installed to.
35 if test -n "$inst_prefix_dir"; then
36 case $libdir in
37@@ -5667,7 +5671,17 @@ func_mode_link ()
38 fi
39 ;;
40 *)
41- path="-L$absdir/$objdir"
42+ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
43+ # preferring $objdir. RP 31/04/2008
44+ if test -f "$absdir/$objdir/$depdepl" ; then
45+ depdepl="$absdir/$objdir/$depdepl"
46+ path="-L$absdir/$objdir"
47+ elif test -f "$absdir/$depdepl" ; then
48+ depdepl="$absdir/$depdepl"
49+ path="-L$absdir"
50+ else
51+ path="-L$absdir/$objdir"
52+ fi
53 ;;
54 esac
55 else
diff --git a/meta/recipes-devtools/libtool/libtool/prefix-manpage-fix.patch b/meta/recipes-devtools/libtool/libtool/prefix-manpage-fix.patch
new file mode 100644
index 0000000000..47286699fb
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/prefix-manpage-fix.patch
@@ -0,0 +1,19 @@
1For cross environment, it not possible to run the generated executable.
2nstead use the build version of libtool to generate the man pages.
3
4Date: 2010/07/09
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
6
7Index: libtool-2.2.10/Makefile.am
8===================================================================
9--- libtool-2.2.10.orig/Makefile.am
10+++ libtool-2.2.10/Makefile.am
11@@ -337,7 +337,7 @@ update_mans = \
12 PATH=.$(PATH_SEPARATOR)$$PATH; export PATH; \
13 $(HELP2MAN) --output=$@
14 $(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
15- $(update_mans) --help-option=--help-all libtool
16+ $(update_mans) --help-option=--help-all ${build_alias}-libtool
17 $(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
18 $(update_mans) libtoolize
19
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
new file mode 100644
index 0000000000..d008608a4a
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -0,0 +1,109 @@
1Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
2it can't be confused with the host libtool.
3
4Originally by: RP
5
6Updated: Date: 2010/06/28
7Nitin A Kamble <nitin.a.kamble@intel.com>
8
9
10Index: libtool-2.2.10/libltdl/m4/libtool.m4
11===================================================================
12--- libtool-2.2.10.orig/libltdl/m4/libtool.m4
13+++ libtool-2.2.10/libltdl/m4/libtool.m4
14@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
15 LIBTOOL_DEPS="$ltmain"
16
17 # Always use our own libtool.
18-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19+LIBTOOL='$(SHELL) $(top_builddir)'
20+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
21 AC_SUBST(LIBTOOL)dnl
22
23 _LT_SETUP
24@@ -201,7 +202,7 @@ aix3*)
25 esac
26
27 # Global variables:
28-ofile=libtool
29+ofile=${host_alias}-libtool
30 can_build_shared=yes
31
32 # All known linkers require a `.a' archive for static linking (except MSVC,
33Index: libtool-2.2.10/Makefile.am
34===================================================================
35--- libtool-2.2.10.orig/Makefile.am
36+++ libtool-2.2.10/Makefile.am
37@@ -31,7 +31,7 @@ AM_LDFLAGS =
38 DIST_SUBDIRS = .
39 EXTRA_DIST =
40
41-BUILT_SOURCES = libtool libtoolize
42+BUILT_SOURCES = $(host_alias)-libtool libtoolize
43
44 CLEANFILES =
45 MOSTLYCLEANFILES =
46@@ -65,7 +65,7 @@ rebuild = rebuild=:; $(timestamp); corre
47 ## ---------------- ##
48
49 # The libtool distributor and the standalone libtool script.
50-bin_SCRIPTS = libtoolize libtool
51+bin_SCRIPTS = libtoolize $(host_alias)-libtool
52
53 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
54 rm -f libtoolize.tmp libtoolize
55@@ -91,8 +91,8 @@ $(srcdir)/libtoolize.in: $(sh_files) lib
56 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
57 # would rerun configure on every invocation, so now we manually
58 # check the version numbers from the build rule when necessary.
59-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
60- @target=libtool; $(rebuild); \
61+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
62+ @target=$(host_alias)-libtool; $(rebuild); \
63 if test -f "$$target"; then \
64 set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
65 test "$$actualver" = "$$correctver" && rebuild=false; \
66@@ -101,8 +101,8 @@ libtool: $(top_builddir)/config.status $
67 case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
68 done; \
69 if $$rebuild; then \
70- echo $(SHELL) ./config.status $$target; \
71- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
72+ echo $(SHELL) ./config.status libtool; \
73+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
74 fi
75
76 .PHONY: configure-subdirs
77@@ -147,7 +147,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
78 ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
79 ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
80 ChangeLog.2008 ChangeLog.2009
81-CLEANFILES += libtool libtoolize libtoolize.tmp \
82+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
83 $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
84
85 ## We build ltversion.m4 here, instead of from config.status,
86@@ -523,12 +523,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
87
88 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
89 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
90- LIBTOOL="$(abs_top_builddir)/libtool" \
91+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
92 tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
93
94 INSTALLCHECK_ENVIRONMENT = \
95 LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
96- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
97+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
98 LTDLINCL="-I$(includedir)" \
99 LIBLTDL="$(libdir)/libltdl.la" \
100 tst_aclocaldir="$(aclocaldir)"
101@@ -679,7 +679,7 @@ if HAVE_FC
102 TESTS += $(FC_TESTS)
103 endif
104
105-tests/demo-conf.test: libtool
106+tests/demo-conf.test: $(host_alias)-libtool
107
108 EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
109 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)
diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
new file mode 100644
index 0000000000..313c26291a
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -0,0 +1,32 @@
1A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio)
2
3This is because libdir has a trailing slash which breaks the comparision.
4
5RP 2/1/10
6
7Merged a patch received from Gary Thomas <gary@mlbassoc.com>
8
9Date: 2010/07/12
10Nitin A Kamble <nitin.a.kamble@intel.com>
11
12Index: libtool-2.2.10/libltdl/config/ltmain.m4sh
13===================================================================
14--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh
15+++ libtool-2.2.10/libltdl/config/ltmain.m4sh
16@@ -1634,8 +1634,15 @@ func_mode_install ()
17 dir="$dir$objdir"
18
19 if test -n "$relink_command"; then
20+ # Strip any trailing slash from the destination.
21+ func_stripname '' '/' "$libdir"
22+ destlibdir=$func_stripname_result
23+
24+ func_stripname '' '/' "$destdir"
25+ s_destdir=$func_stripname_result
26+
27 # Determine the prefix the user has applied to our future dir.
28- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
29+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
30
31 # Don't allow the user to place us outside of our expected
32 # location b/c this prevents finding dependent libraries that
diff --git a/meta/recipes-devtools/libtool/libtool_2.2.10.bb b/meta/recipes-devtools/libtool/libtool_2.2.10.bb
new file mode 100644
index 0000000000..9eaec2da67
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool_2.2.10.bb
@@ -0,0 +1,33 @@
1require libtool.inc
2DEPENDS = "libtool-native"
3
4PR = "r1"
5
6PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"
7FILES_${PN} += "${datadir}/aclocal*"
8FILES_libltdl = "${libdir}/libltdl.so.*"
9FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
10FILES_libltdl-dbg = "${libdir}/.debug/"
11
12inherit autotools
13
14EXTRA_AUTORECONF = "--exclude=libtoolize"
15
16do_compile_prepend () {
17 # Sometimes this file doesn't get rebuilt, force the issue
18 rm -f ${S}/libltdl/config/ltmain.sh
19 make libltdl/config/ltmain.sh
20}
21
22#
23# We want the results of libtool-cross preserved - don't stage anything ourselves.
24#
25SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
26
27libtool_sysroot_preprocess () {
28 if [ "${PN}" == "libtool" ]; then
29 rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${bindir}/*
30 rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/aclocal/*
31 rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/libtool/config/*
32 fi
33}
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.13.bb b/meta/recipes-devtools/m4/m4-native_1.4.13.bb
new file mode 100644
index 0000000000..fa871b38ae
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4-native_1.4.13.bb
@@ -0,0 +1,12 @@
1require m4_${PV}.bb
2inherit native
3
4INHIBIT_AUTOTOOLS_DEPS = "1"
5DEPENDS += "gnu-config-native"
6
7do_configure() {
8 install -m 0644 ${STAGING_DATADIR}/gnu-config/config.sub .
9 install -m 0644 ${STAGING_DATADIR}/gnu-config/config.guess .
10 oe_runconf
11}
12
diff --git a/meta/recipes-devtools/m4/m4/ac_config_links.patch b/meta/recipes-devtools/m4/m4/ac_config_links.patch
new file mode 100644
index 0000000000..22103876e3
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -0,0 +1,28 @@
1This patch fixes a build problem for m4-native experienced on Ubuntu 9.10,
2where autoconf/automake (AC_CONFIG_LINKS) ends up making GNUmakefile a
3symlink to itself.
4
5The patch comments out ac_config_links directly in configure,
6as autoreconf is not actually run for m4-native.
7
8I believe it should be safe, as GNUmakefile is actually unpacked from
9source, and what we want is to is to not touch it.
10
11Tested on x86_64_linux (Ubuntu 8.04 and 9.10).
12
132009-11-10 Esben Haabendal <eha@doredevelopment.dk>
14
15diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
16--- m4-1.4.13.orig/configure 2009-11-10 10:54:00.301707097 +0100
17+++ m4-1.4.13/configure 2009-11-10 10:54:17.314206379 +0100
18@@ -14860,8 +14860,8 @@
19 # only, it does not matter if we skip the link with older autoconf.
20 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21 # builds, so use a shell variable to bypass this.
22- GNUmakefile=GNUmakefile
23- ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
24+ # GNUmakefile=GNUmakefile
25+ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
26
27
28
diff --git a/meta/recipes-devtools/m4/m4/make.patch b/meta/recipes-devtools/m4/m4/make.patch
new file mode 100644
index 0000000000..3577b0b7db
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/make.patch
@@ -0,0 +1,41 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- m4-1.4.2/doc/Makefile.in~make
7+++ m4-1.4.2/doc/Makefile.in
8@@ -57,9 +57,9 @@
9 date > $(srcdir)/stamp-vti
10
11 install: all
12- $(srcdir)/../mkinstalldirs $(infodir)
13+ $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
14 cd $(srcdir) && for file in m4.info*; do \
15- $(INSTALL_DATA) $$file $(infodir)/$$file; \
16+ $(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file; \
17 done
18
19 uninstall:
20--- m4-1.4.2/src/Makefile.in~make
21+++ m4-1.4.2/src/Makefile.in
22@@ -35,7 +35,7 @@
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25 transform = @program_transform_name@
26-bindir = $(exec_prefix)/bin
27+bindir = @bindir@
28
29 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
30 LINK = $(CC) $(LDFLAGS) -o $@
31@@ -84,8 +84,8 @@
32 $(LINK) ansi2knr.o $(LIBS)
33
34 install: all
35- $(srcdir)/../mkinstalldirs $(bindir)
36- $(INSTALL_PROGRAM) m4 $(bindir)/`echo m4 | sed '$(transform)'`
37+ $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir)
38+ $(INSTALL_PROGRAM) m4 $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform)'`
39
40 uninstall:
41 rm -f $(bindir)/`echo m4 | sed '$(transform)'`
diff --git a/meta/recipes-devtools/m4/m4_1.4.13.bb b/meta/recipes-devtools/m4/m4_1.4.13.bb
new file mode 100644
index 0000000000..32d153ea12
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4_1.4.13.bb
@@ -0,0 +1,9 @@
1DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor."
2LICENSE = "GPLv3"
3SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
4 file://ac_config_links.patch;patch=1"
5PR = "r2"
6
7inherit autotools
8
9EXTRA_OEMAKE += "'infodir=${infodir}'"
diff --git a/meta/recipes-devtools/make/files/SCCS.patch b/meta/recipes-devtools/make/files/SCCS.patch
new file mode 100644
index 0000000000..c998e118ed
--- /dev/null
+++ b/meta/recipes-devtools/make/files/SCCS.patch
@@ -0,0 +1,16 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- make-3.80/configure.in~SCCS
7+++ make-3.80/configure.in
8@@ -264,7 +264,7 @@
9 [Define this if the SCCS 'get' command understands the '-G<file>' option.]);;
10 esac
11 fi
12-rm -f s.conftest conftoast
13+rm -f s.conftest conftoast SCCS/*s.conftest
14
15 # Check the system to see if it provides GNU glob. If not, use our
16 # local version.
diff --git a/meta/recipes-devtools/make/make.inc b/meta/recipes-devtools/make/make.inc
new file mode 100644
index 0000000000..23629d37b0
--- /dev/null
+++ b/meta/recipes-devtools/make/make.inc
@@ -0,0 +1,11 @@
1DESCRIPTION = "GNU Make examines the timestamps on a set of \
2interdependent files, and, if necessary, issues commands \
3to bring them up-to-date."
4HOMEPAGE = "http://www.gnu.org/software/make/"
5SECTION = "devel"
6LICENSE = "GPL"
7
8SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
9 file://SCCS.patch;patch=1"
10
11inherit autotools gettext
diff --git a/meta/recipes-devtools/make/make_3.81.bb b/meta/recipes-devtools/make/make_3.81.bb
new file mode 100644
index 0000000000..797d26b3be
--- /dev/null
+++ b/meta/recipes-devtools/make/make_3.81.bb
@@ -0,0 +1,3 @@
1PR = "r0"
2
3require make.inc
diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
new file mode 100644
index 0000000000..c7ad722f2e
--- /dev/null
+++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
@@ -0,0 +1,360 @@
1#define _GNU_SOURCE
2#include <stdio.h>
3#include <errno.h>
4#include <string.h>
5#include <stdarg.h>
6#include <stdlib.h>
7#include <ctype.h>
8#include <fcntl.h>
9#include <dirent.h>
10#include <unistd.h>
11#include <time.h>
12#include <getopt.h>
13#include <libgen.h>
14#include <sys/types.h>
15#include <sys/stat.h>
16
17#define MINORBITS 8
18#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
19
20/* These are all stolen from busybox's libbb to make
21 * error handling simpler (and since I maintain busybox,
22 * I'm rather partial to these for error handling).
23 * -Erik
24 */
25static const char *const app_name = "makedevs";
26static const char *const memory_exhausted = "memory exhausted";
27static char default_rootdir[]=".";
28static char *rootdir = default_rootdir;
29
30static void verror_msg(const char *s, va_list p)
31{
32 fflush(stdout);
33 fprintf(stderr, "%s: ", app_name);
34 vfprintf(stderr, s, p);
35}
36
37static void error_msg_and_die(const char *s, ...)
38{
39 va_list p;
40
41 va_start(p, s);
42 verror_msg(s, p);
43 va_end(p);
44 putc('\n', stderr);
45 exit(EXIT_FAILURE);
46}
47
48static void vperror_msg(const char *s, va_list p)
49{
50 int err = errno;
51
52 if (s == 0)
53 s = "";
54 verror_msg(s, p);
55 if (*s)
56 s = ": ";
57 fprintf(stderr, "%s%s\n", s, strerror(err));
58}
59
60#if 0
61static void perror_msg(const char *s, ...)
62{
63 va_list p;
64
65 va_start(p, s);
66 vperror_msg(s, p);
67 va_end(p);
68}
69#endif
70
71static void perror_msg_and_die(const char *s, ...)
72{
73 va_list p;
74
75 va_start(p, s);
76 vperror_msg(s, p);
77 va_end(p);
78 exit(EXIT_FAILURE);
79}
80
81static FILE *xfopen(const char *path, const char *mode)
82{
83 FILE *fp;
84
85 if ((fp = fopen(path, mode)) == NULL)
86 perror_msg_and_die("%s", path);
87 return fp;
88}
89
90static char *xstrdup(const char *s)
91{
92 char *t;
93
94 if (s == NULL)
95 return NULL;
96
97 t = strdup(s);
98
99 if (t == NULL)
100 error_msg_and_die(memory_exhausted);
101
102 return t;
103}
104
105
106static void add_new_directory(char *name, char *path,
107 unsigned long uid, unsigned long gid, unsigned long mode)
108{
109 mkdir(path, mode);
110 chown(path, uid, gid);
111// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode);
112}
113
114static void add_new_device(char *name, char *path, unsigned long uid,
115 unsigned long gid, unsigned long mode, dev_t rdev)
116{
117 int status;
118 struct stat sb;
119 time_t timestamp = time(NULL);
120
121 memset(&sb, 0, sizeof(struct stat));
122 status = lstat(path, &sb);
123
124 if (status >= 0) {
125 /* It is ok for some types of files to not exit on disk (such as
126 * device nodes), but if they _do_ exist the specified mode had
127 * better match the actual file or strange things will happen.... */
128 if ((mode & S_IFMT) != (sb.st_mode & S_IFMT))
129 error_msg_and_die("%s: file type does not match specified type!", path);
130 timestamp = sb.st_mtime;
131 }
132
133 mknod(name, mode, rdev);
134 chown(path, uid, gid);
135// printf("Device: %s %s UID: %ld GID: %ld MODE: %ld MAJOR: %d MINOR: %d\n",
136// path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff));
137}
138
139static void add_new_file(char *name, char *path, unsigned long uid,
140 unsigned long gid, unsigned long mode)
141{
142 int fd = open(path,O_CREAT | O_WRONLY, mode);
143 if (fd < 0) {
144 error_msg_and_die("%s: file can not be created!", path);
145 } else {
146 close(fd);
147 }
148 chmod(path, mode);
149 chown(path, uid, gid);
150// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
151// path, name, gid, uid, mode);
152}
153
154
155static void add_new_fifo(char *name, char *path, unsigned long uid,
156 unsigned long gid, unsigned long mode)
157{
158 if (mknod(path, mode, 0))
159 error_msg_and_die("%s: file can not be created with mknod!", path);
160 chown(path, uid, gid);
161// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
162// path, name, gid, uid, mode);
163}
164
165
166/* device table entries take the form of:
167 <path> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
168 /dev/mem c 640 0 0 1 1 0 0 -
169
170 type can be one of:
171 f A regular file
172 d Directory
173 c Character special device file
174 b Block special device file
175 p Fifo (named pipe)
176
177 I don't bother with symlinks (permissions are irrelevant), hard
178 links (special cases of regular files), or sockets (why bother).
179
180 Regular files must exist in the target root directory. If a char,
181 block, fifo, or directory does not exist, it will be created.
182*/
183static int interpret_table_entry(char *line)
184{
185 char *name;
186 char path[4096], type;
187 unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
188 unsigned long start = 0, increment = 1, count = 0;
189
190 if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %lu", path,
191 &type, &mode, &uid, &gid, &major, &minor, &start,
192 &increment, &count))
193 {
194 return 1;
195 }
196
197 if (!strcmp(path, "/")) {
198 error_msg_and_die("Device table entries require absolute paths");
199 }
200 name = xstrdup(path + 1);
201 sprintf(path, "%s/%s\0", rootdir, name);
202
203 switch (type) {
204 case 'd':
205 mode |= S_IFDIR;
206 add_new_directory(name, path, uid, gid, mode);
207 break;
208 case 'f':
209 mode |= S_IFREG;
210 add_new_file(name, path, uid, gid, mode);
211 break;
212 case 'p':
213 mode |= S_IFIFO;
214 add_new_fifo(name, path, uid, gid, mode);
215 break;
216 case 'c':
217 case 'b':
218 mode |= (type == 'c') ? S_IFCHR : S_IFBLK;
219 if (count > 0) {
220 int i;
221 dev_t rdev;
222 char buf[80];
223
224 for (i = start; i < count; i++) {
225 sprintf(buf, "%s%d", name, i);
226 /* FIXME: MKDEV uses illicit insider knowledge of kernel
227 * major/minor representation... */
228 rdev = MKDEV(major, minor + (i * increment - start));
229 add_new_device(buf, path, uid, gid, mode, rdev);
230 }
231 } else {
232 /* FIXME: MKDEV uses illicit insider knowledge of kernel
233 * major/minor representation... */
234 dev_t rdev = MKDEV(major, minor);
235
236 add_new_device(name, path, uid, gid, mode, rdev);
237 }
238 break;
239 default:
240 error_msg_and_die("Unsupported file type");
241 }
242 if (name) free(name);
243 return 0;
244}
245
246
247static void parse_device_table(FILE * file)
248{
249 char *line;
250 size_t length = 256;
251 int len = 0;
252
253 /* Looks ok so far. The general plan now is to read in one
254 * line at a time, check for leading comment delimiters ('#'),
255 * then try and parse the line as a device table. If we fail
256 * to parse things, try and help the poor fool to fix their
257 * device table with a useful error msg... */
258
259 if((line = (char *)malloc(length)) == NULL) {
260 fclose(file);
261 return;
262 }
263
264 while ((len = getline(&line, &length, file)) != -1) {
265 /* First trim off any whitespace */
266
267 /* trim trailing whitespace */
268 while (len > 0 && isspace(line[len - 1]))
269 line[--len] = '\0';
270
271 /* trim leading whitespace */
272 memmove(line, &line[strspn(line, " \n\r\t\v")], len + 1);
273
274 /* If this is NOT a comment line, try to interpret it */
275 if (*line != '#') interpret_table_entry(line);
276 }
277 if (line) free(line);
278
279 fclose(file);
280}
281
282static int go(char *dname, FILE * devtable)
283{
284 struct stat sb;
285
286 if (lstat(dname, &sb)) {
287 perror_msg_and_die("%s", dname);
288 }
289 if (chdir(dname))
290 perror_msg_and_die("%s", dname);
291
292 if (devtable)
293 parse_device_table(devtable);
294
295 return 0;
296}
297
298
299static struct option long_options[] = {
300 {"root", 1, NULL, 'r'},
301 {"help", 0, NULL, 'h'},
302 {"squash", 0, NULL, 'q'},
303 {"version", 0, NULL, 'v'},
304 {"devtable", 1, NULL, 'D'},
305 {NULL, 0, NULL, 0}
306};
307
308static char *helptext =
309 "Usage: makedevs [OPTIONS]\n"
310 "Build entries based upon device_table.txt\n\n"
311 "Options:\n"
312 " -r, -d, --root=DIR Build filesystem from directory DIR (default: cwd)\n"
313 " -D, --devtable=FILE Use the named FILE as a device table file\n"
314 " -q, --squash Squash permissions and owners making all files be owned by root\n"
315 " -h, --help Display this help text\n"
316 " -v, --version Display version information\n\n";
317
318
319static char *revtext = "$Revision: 0.1 $";
320
321int main(int argc, char **argv)
322{
323 int c, opt;
324 extern char *optarg;
325 struct stat statbuf;
326 FILE *devtable = NULL;
327
328 umask (0);
329
330 while ((opt = getopt_long(argc, argv, "D:d:r:qhv",
331 long_options, &c)) >= 0) {
332 switch (opt) {
333 case 'D':
334 devtable = xfopen(optarg, "r");
335 if (fstat(fileno(devtable), &statbuf) < 0)
336 perror_msg_and_die(optarg);
337 if (statbuf.st_size < 10)
338 error_msg_and_die("%s: not a proper device table file", optarg);
339 break;
340 case 'h':
341 fprintf(stderr, helptext);
342 exit(1);
343 case 'r':
344 case 'd': /* for compatibility with mkfs.jffs, genext2fs, etc... */
345 if (rootdir != default_rootdir) {
346 error_msg_and_die("root directory specified more than once");
347 }
348 rootdir = xstrdup(optarg);
349 break;
350
351 case 'v':
352 fprintf(stderr, "makedevs revision %.*s\n",
353 (int) strlen(revtext) - 13, revtext + 11);
354 exit(1);
355 }
356 }
357
358 go(rootdir, devtable);
359 return 0;
360}
diff --git a/meta/recipes-devtools/makedevs/makedevs_1.0.0.bb b/meta/recipes-devtools/makedevs/makedevs_1.0.0.bb
new file mode 100644
index 0000000000..5db2d9b142
--- /dev/null
+++ b/meta/recipes-devtools/makedevs/makedevs_1.0.0.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "A tool to make device nodes"
2LICENSE = "GPLv2"
3SECTION = "base"
4PRIORITY = "required"
5SRC_URI = "file://makedevs.c"
6PR = "r6"
7
8do_configure() {
9 install -m 0644 ${WORKDIR}/makedevs.c ${S}/
10}
11
12do_compile() {
13 ${CC} ${CFLAGS} -o ${S}/makedevs ${S}/makedevs.c
14}
15
16do_install() {
17 install -d ${D}${base_sbindir}
18 install -m 0755 ${S}/makedevs ${D}${base_sbindir}/makedevs
19}
20
21BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/mpfr/mpfr.inc b/meta/recipes-devtools/mpfr/mpfr.inc
new file mode 100644
index 0000000000..dbb859fe3e
--- /dev/null
+++ b/meta/recipes-devtools/mpfr/mpfr.inc
@@ -0,0 +1,6 @@
1DESCRIPTION = "A C library for multiple-precision floating-point computations with exact rounding"
2HOMEPAGE = "http://www.mpfr.org/"
3LICENSE = "LGPLv3+"
4SECTION = "devel"
5
6inherit autotools
diff --git a/meta/recipes-devtools/mpfr/mpfr_3.0.0.bb b/meta/recipes-devtools/mpfr/mpfr_3.0.0.bb
new file mode 100644
index 0000000000..188a5d95cd
--- /dev/null
+++ b/meta/recipes-devtools/mpfr/mpfr_3.0.0.bb
@@ -0,0 +1,9 @@
1require mpfr.inc
2
3DEPENDS = "gmp"
4PR = "r0"
5
6SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.bz2"
7S = "${WORKDIR}/mpfr-${PV}"
8
9BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch
new file mode 100644
index 0000000000..fb776fddce
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -0,0 +1,101 @@
1--- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100
2+++ git/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100
3@@ -100,6 +100,11 @@
4 struct rb_node hardlink_rb;
5 };
6
7+struct ignorepath_entry {
8+ struct ignorepath_entry* next; /* Points to the next ignorepath element */
9+ char name[PATH_MAX]; /* Name of the entry */
10+};
11+static struct ignorepath_entry* ignorepath = 0;
12 struct rb_root hardlinks;
13 static int out_fd = -1;
14 static int in_fd = -1;
15@@ -408,7 +413,7 @@
16 char *hpath, *tpath;
17 struct dirent *dp, **namelist;
18 struct filesystem_entry *entry;
19-
20+ struct ignorepath_entry* element = ignorepath;
21
22 if (lstat(hostpath, &sb)) {
23 perror_msg_and_die("%s", hostpath);
24@@ -417,6 +422,15 @@
25 entry = add_host_filesystem_entry(targetpath, hostpath,
26 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
27
28+ while ( element ) {
29+ if ( strcmp( element->name, targetpath ) == 0 ) {
30+ printf( "Note: ignoring directories below '%s'\n", targetpath );
31+ return entry;
32+ break;
33+ }
34+ element = element->next;
35+ }
36+
37 n = scandir(hostpath, &namelist, 0, alphasort);
38 if (n < 0) {
39 perror_msg_and_die("opening directory %s", hostpath);
40@@ -1453,6 +1467,7 @@
41 {"root", 1, NULL, 'r'},
42 {"pagesize", 1, NULL, 's'},
43 {"eraseblock", 1, NULL, 'e'},
44+ {"ignore", 1, NULL, 'I'},
45 {"output", 1, NULL, 'o'},
46 {"help", 0, NULL, 'h'},
47 {"verbose", 0, NULL, 'v'},
48@@ -1500,6 +1515,7 @@
49 " -L, --list-compressors Show the list of the avaiable compressors\n"
50 " -t, --test-compression Call decompress and compare with the original (for test)\n"
51 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
52+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
53 " -o, --output=FILE Output to FILE (default: stdout)\n"
54 " -l, --little-endian Create a little-endian filesystem\n"
55 " -b, --big-endian Create a big-endian filesystem\n"
56@@ -1666,6 +1682,7 @@
57 char *compr_name = NULL;
58 int compr_prior = -1;
59 int warn_page_size = 0;
60+ struct ignorepath_entry* element = ignorepath;
61
62 page_size = sysconf(_SC_PAGESIZE);
63 if (page_size < 0) /* System doesn't know so ... */
64@@ -1676,7 +1693,7 @@
65 jffs2_compressors_init();
66
67 while ((opt = getopt_long(argc, argv,
68- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
69+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
70 {
71 switch (opt) {
72 case 'D':
73@@ -1700,6 +1717,28 @@
74 warn_page_size = 0; /* set by user, so don't need to warn */
75 break;
76
77+ case 'I':
78+ printf( "Note: Adding '%s' to ignore Path\n", optarg );
79+ element = ignorepath;
80+ if ( !ignorepath ) {
81+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
82+ ignorepath->next = 0;
83+ strcpy( &ignorepath->name[0], optarg );
84+ } else {
85+ while ( element->next ) element = element->next;
86+ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
87+ element->next->next = 0;
88+ strcpy( &element->next->name[0], optarg );
89+ }
90+ printf( "--------- Dumping ignore path list ----------------\n" );
91+ element = ignorepath;
92+ while ( element ) {
93+ printf( " * '%s'\n", &element->name[0] );
94+ element = element->next;
95+ }
96+ printf( "---------------------------------------------------\n" );
97+ break;
98+
99 case 'o':
100 if (out_fd != -1) {
101 error_msg_and_die("output filename specified more than once");
diff --git a/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch b/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch
new file mode 100644
index 0000000000..64f25f79e1
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch
@@ -0,0 +1,24 @@
1Index: git/nanddump.c
2===================================================================
3--- git.orig/nanddump.c 2010-04-29 10:24:15.000000000 +0200
4+++ git/nanddump.c 2010-04-29 10:28:45.000000000 +0200
5@@ -210,6 +210,7 @@
6
7 /* Make sure device page sizes are valid */
8 if (!(meminfo.oobsize == 128 && meminfo.writesize == 4096) &&
9+ !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
10 !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
11 !(meminfo.oobsize == 32 && meminfo.writesize == 1024) &&
12 !(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
13Index: git/nandwrite.c
14===================================================================
15--- git.orig/nandwrite.c 2010-04-29 09:59:30.000000000 +0200
16+++ git/nandwrite.c 2010-04-29 10:27:51.000000000 +0200
17@@ -294,6 +294,7 @@
18 if (!(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
19 !(meminfo.oobsize == 8 && meminfo.writesize == 256) &&
20 !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
21+ !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
22 !(meminfo.oobsize == 128 && meminfo.writesize == 4096)) {
23 fprintf(stderr, "Unknown flash (not normal NAND)\n");
24 close(fd);
diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
new file mode 100644
index 0000000000..5555654490
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
@@ -0,0 +1,134 @@
1---
2 mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
3 1 file changed, 42 insertions(+), 2 deletions(-)
4
5--- git.orig/mkfs.jffs2.c
6+++ git/mkfs.jffs2.c
7@@ -98,10 +98,16 @@ struct filesystem_entry {
8 struct filesystem_entry *next; /* Only relevant to non-directories */
9 struct filesystem_entry *files; /* Only relevant to directories */
10 struct rb_node hardlink_rb;
11 };
12
13+struct ignorepath_entry {
14+ struct ignorepath_entry* next; /* Points to the next ignorepath element */
15+ char name[PATH_MAX]; /* Name of the entry */
16+};
17+
18+static struct ignorepath_entry* ignorepath = 0;
19 struct rb_root hardlinks;
20 static int out_fd = -1;
21 static int in_fd = -1;
22 static char default_rootdir[] = ".";
23 static char *rootdir = default_rootdir;
24@@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv
25 int i, n;
26 struct stat sb;
27 char *hpath, *tpath;
28 struct dirent *dp, **namelist;
29 struct filesystem_entry *entry;
30-
31+ struct ignorepath_entry* element = ignorepath;
32
33 if (lstat(hostpath, &sb)) {
34 perror_msg_and_die("%s", hostpath);
35 }
36
37 entry = add_host_filesystem_entry(targetpath, hostpath,
38 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
39
40+ while ( element ) {
41+ if ( strcmp( element->name, targetpath ) == 0 ) {
42+ printf( "Note: ignoring directories below '%s'\n", targetpath );
43+ return entry;
44+ break;
45+ }
46+ element = element->next;
47+ }
48+
49 n = scandir(hostpath, &namelist, 0, alphasort);
50 if (n < 0) {
51 perror_msg_and_die("opening directory %s", hostpath);
52 }
53
54@@ -1446,10 +1461,11 @@ static void create_target_filesystem(str
55 static struct option long_options[] = {
56 {"pad", 2, NULL, 'p'},
57 {"root", 1, NULL, 'r'},
58 {"pagesize", 1, NULL, 's'},
59 {"eraseblock", 1, NULL, 'e'},
60+ {"ignore", 1, NULL, 'I'},
61 {"output", 1, NULL, 'o'},
62 {"help", 0, NULL, 'h'},
63 {"verbose", 0, NULL, 'v'},
64 {"version", 0, NULL, 'V'},
65 {"big-endian", 0, NULL, 'b'},
66@@ -1493,10 +1509,11 @@ static char *helptext =
67 " -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME\n"
68 " Set the priority of a compressor\n"
69 " -L, --list-compressors Show the list of the avaiable compressors\n"
70 " -t, --test-compression Call decompress and compare with the original (for test)\n"
71 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
72+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
73 " -o, --output=FILE Output to FILE (default: stdout)\n"
74 " -l, --little-endian Create a little-endian filesystem\n"
75 " -b, --big-endian Create a big-endian filesystem\n"
76 " -D, --devtable=FILE Use the named FILE as a device table file\n"
77 " -f, --faketime Change all file times to '0' for regression testing\n"
78@@ -1659,21 +1676,22 @@ int main(int argc, char **argv)
79 FILE *devtable = NULL;
80 struct filesystem_entry *root;
81 char *compr_name = NULL;
82 int compr_prior = -1;
83 int warn_page_size = 0;
84+ struct ignorepath_entry* element = ignorepath;
85
86 page_size = sysconf(_SC_PAGESIZE);
87 if (page_size < 0) /* System doesn't know so ... */
88 page_size = 4096; /* ... we make an educated guess */
89 if (page_size != 4096)
90 warn_page_size = 1; /* warn user if page size not 4096 */
91
92 jffs2_compressors_init();
93
94 while ((opt = getopt_long(argc, argv,
95- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
96+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
97 {
98 switch (opt) {
99 case 'D':
100 devtable = xfopen(optarg, "r");
101 if (fstat(fileno(devtable), &sb) < 0)
102@@ -1693,10 +1711,32 @@ int main(int argc, char **argv)
103 case 's':
104 page_size = strtol(optarg, NULL, 0);
105 warn_page_size = 0; /* set by user, so don't need to warn */
106 break;
107
108+ case 'I':
109+ printf( "Note: Adding '%s' to ignore Path\n", optarg );
110+ element = ignorepath;
111+ if ( !ignorepath ) {
112+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
113+ ignorepath->next = 0;
114+ strcpy( &ignorepath->name[0], optarg );
115+ } else {
116+ while ( element->next ) element = element->next;
117+ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
118+ element->next->next = 0;
119+ strcpy( &element->next->name[0], optarg );
120+ }
121+ printf( "--------- Dumping ignore path list ----------------\n" );
122+ element = ignorepath;
123+ while ( element ) {
124+ printf( " * '%s'\n", &element->name[0] );
125+ element = element->next;
126+ }
127+ printf( "---------------------------------------------------\n" );
128+ break;
129+
130 case 'o':
131 if (out_fd != -1) {
132 error_msg_and_die("output filename specified more than once");
133 }
134 out_fd = open(optarg, O_CREAT | O_TRUNC | O_RDWR, 0644);
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch
new file mode 100644
index 0000000000..bec60a18c1
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch
@@ -0,0 +1,26 @@
1---
2 nanddump.c | 4 ++--
3 1 file changed, 2 insertions(+), 2 deletions(-)
4
5Index: git/nanddump.c
6===================================================================
7--- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000
8+++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000
9@@ -281,7 +281,7 @@ int main(int argc, char **argv)
10 }
11 }
12
13- if (badblock) {
14+ if (badblock && !ignoreerrors) {
15 if (omitbad)
16 continue;
17 memset (readbuf, 0xff, bs);
18@@ -335,7 +335,7 @@ int main(int argc, char **argv)
19 if (omitoob)
20 continue;
21
22- if (badblock) {
23+ if (badblock && !ignoreerrors) {
24 memset (readbuf, 0xff, meminfo.oobsize);
25 } else {
26 /* Read OOB data and exit on failure */
diff --git a/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch b/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch
new file mode 100644
index 0000000000..4928db00be
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch
@@ -0,0 +1,33 @@
1---
2 Makefile | 3 ---
3 1 file changed, 3 deletions(-)
4
5--- git.orig/Makefile
6+++ git/Makefile
7@@ -41,19 +41,17 @@ $(BUILDDIR)/%.o: %.c
8 $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(<F).dep
9
10 .SUFFIXES:
11
12 all: $(TARGETS)
13- make -C $(BUILDDIR)/ubi-utils
14
15 IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
16 -include ${IGNORE}
17
18 clean:
19 rm -f $(BUILDDIR)/*.o $(TARGETS) $(BUILDDIR)/.*.c.dep $(SYMLINKS)
20 if [ "$(BUILDDIR)x" != ".x" ]; then rm -rf $(BUILDDIR); fi
21- make -C $(BUILDDIR)/ubi-utils clean
22
23 $(SYMLINKS):
24 ln -sf ../fs/jffs2/$@ $@
25
26 $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc32.o \
27@@ -91,6 +89,5 @@ $(BUILDDIR)/fectest: $(BUILDDIR)/fectest
28 install: ${TARGETS}
29 mkdir -p ${DESTDIR}/${SBINDIR}
30 install -m0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
31 mkdir -p ${DESTDIR}/${MANDIR}/man1
32 gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
33- make -C $(BUILDDIR)/ubi-utils install
diff --git a/meta/recipes-devtools/mtd/mtd-utils_1.1.0+git.bb b/meta/recipes-devtools/mtd/mtd-utils_1.1.0+git.bb
new file mode 100644
index 0000000000..12e1c75e31
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils_1.1.0+git.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib lzo"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6PR = "r2"
7
8SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=b995f89a81589be8d8a41c374a6df109d0ee12b3 \
9 file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \
10 file://remove-ubi.patch;patch=1 \
11 file://fix-ignoreerrors-git.patch;patch=1"
12
13S = "${WORKDIR}/git/"
14
15EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'"
16
17do_install () {
18 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
19 install -d ${D}${includedir}/mtd/
20 for f in ${S}/include/mtd/*.h; do
21 install -m 0644 $f ${D}${includedir}/mtd/
22 done
23
24}
25
26PARALLEL_MAKE = ""
27
28BBCLASSEXTEND = "native"
29NATIVE_INSTALL_WORKS = "1"
diff --git a/meta/recipes-devtools/mtd/mtd-utils_1.3.1.bb b/meta/recipes-devtools/mtd/mtd-utils_1.3.1.bb
new file mode 100644
index 0000000000..faa2332a25
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils_1.3.1.bb
@@ -0,0 +1,26 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib lzo e2fsprogs util-linux"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6
7SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV} \
8 file://add-exclusion-to-mkfs-jffs2-git-2.patch;patch=1 \
9 file://fix-ignoreerrors-git.patch;patch=1 \
10 file://add-oobsize-64-and-writesize-4096-as-normal-nand.patch;patch=1"
11
12S = "${WORKDIR}/git/"
13
14EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
15
16do_install () {
17 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
18 install -d ${D}${includedir}/mtd/
19 for f in ${S}/include/mtd/*.h; do
20 install -m 0644 $f ${D}${includedir}/mtd/
21 done
22}
23
24PARALLEL_MAKE = ""
25
26BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch b/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
new file mode 100644
index 0000000000..35fae44aba
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -0,0 +1,63 @@
1--- mtools-3.9.9/configure.in.orig 2006-04-14 16:05:54.337655192 -0600
2+++ mtools-3.9.9/configure.in 2006-04-14 16:12:29.736545424 -0600
3@@ -21,6 +21,33 @@
4 AC_C_CONST
5 AC_C_INLINE
6
7+AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
8+if test "x$MAKEINFO" = "x"; then
9+ MAKEINFO="@echo makeinfo missing; true"
10+fi
11+AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, )
12+if test "x$TEXI2DVI" = "x"; then
13+ TEXI2DVI="@echo texi2dvi missing; true"
14+fi
15+AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, )
16+if test "x$TEXI2PDF" = "x"; then
17+ TEXI2PDF="@echo texi2pdf missing; true"
18+fi
19+AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, )
20+if test "x$TEXI2HTML" = "x"; then
21+ TEXI2HTML="@echo texi2html missing; true"
22+fi
23+AC_CHECK_PROG(DVI2PS, dvi2ps, dvi2ps, )
24+if test "x$DVI2PS" = "x"; then
25+ DVI2PS="@echo dvi2ps missing; true"
26+fi
27+
28+AC_SUBST(MAKEINFO)
29+AC_SUBST(TEXI2DVI)
30+AC_SUBST(TEXI2PDF)
31+AC_SUBST(TEXI2HTML)
32+AC_SUBST(DVI2PS)
33+
34
35 dnl Check for configuration options
36 dnl Enable OS/2 extended density format disks
37--- mtools-3.9.9/Makefile.in.sav 2006-04-14 15:56:19.000000000 -0600
38+++ mtools-3.9.9/Makefile.in 2006-04-14 16:15:29.315245312 -0600
39@@ -11,10 +11,11 @@
40 USERLDFLAGS =
41 USERLDLIBS =
42
43-MAKEINFO = makeinfo
44-TEXI2DVI = texi2dvi
45-TEXI2PDF = texi2pdf
46-TEXI2HTML = texi2html
47+MAKEINFO = @MAKEINFO@
48+TEXI2DVI = @TEXI2DVI@
49+TEXI2PDF = @TEXI2PDF@
50+TEXI2HTML = @TEXI2HTML@
51+DVI2PS = @DVI2PS@
52
53
54 # do not edit below this line
55@@ -181,7 +182,7 @@
56
57 ps: mtools.ps
58 %.ps: %.dvi
59- dvips -f < $< > $@
60+ $(DVI2PS) -f < $< > $@
61
62 pdf: mtools.pdf
63 %.pdf: %.texi
diff --git a/meta/recipes-devtools/mtools/mtools/mtools.patch b/meta/recipes-devtools/mtools/mtools/mtools.patch
new file mode 100644
index 0000000000..2abf534731
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/mtools.patch
@@ -0,0 +1,127 @@
1$NetBSD: patch-aa,v 1.10 2007/08/17 20:55:34 joerg Exp $
2
3---
4 Makefile.in | 74 ++++++++++++++++++++++++++----------------------------------
5 1 file changed, 33 insertions(+), 41 deletions(-)
6
7Index: mtools-3.9.9/Makefile.in
8===================================================================
9--- mtools-3.9.9.orig/Makefile.in 2007-10-12 11:18:46.000000000 +0100
10+++ mtools-3.9.9/Makefile.in 2007-10-12 11:28:14.000000000 +0100
11@@ -195,30 +195,22 @@ html: mtools.html mtools_toc.html
12
13 # Don't cd, to avoid breaking install-sh references.
14 install-info: info
15- $(top_srcdir)/mkinstalldirs $(infodir)
16+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(infodir)
17 if test -f mtools.info; then \
18 for i in mtools.info*; do \
19- $(INSTALL_DATA) $$i $(infodir)/$$i; \
20+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \
21 done; \
22 else \
23 for i in $(srcdir)/mtools.info*; do \
24- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
25+ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
26 done; \
27 fi; \
28- if [ -n "$(INSTALL_INFO)" ] ; then \
29- if [ -f $(infodir)/dir.info ] ; then \
30- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir.info; \
31- fi; \
32- if [ -f $(infodir)/dir ] ; then \
33- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir; \
34- fi; \
35- fi
36
37 uninstall-info:
38 cd $(infodir) && rm -f mtools.info*
39
40-install: $(bindir)/mtools @BINFLOPPYD@ install-man install-links \
41- $(bindir)/mkmanifest install-scripts install-info
42+install: ${DESTDIR}$(bindir)/mtools ${DESTDIR}$(bindir)/floppyd install-man install-links \
43+ ${DESTDIR}$(bindir)/mkmanifest install-scripts install-info
44
45 uninstall: uninstall-bin uninstall-man uninstall-links \
46 uninstall-scripts
47@@ -228,52 +220,52 @@ distclean: clean texclean
48 maintainer-clean: distclean
49
50
51-$(bindir)/floppyd: floppyd
52- $(top_srcdir)/mkinstalldirs $(bindir)
53- $(INSTALL_PROGRAM) floppyd $(bindir)/floppyd
54+${DESTDIR}$(bindir)/floppyd: floppyd
55+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
56+ $(INSTALL_PROGRAM) floppyd ${DESTDIR}$(bindir)/floppyd
57
58-$(bindir)/floppyd_installtest: floppyd_installtest
59- $(top_srcdir)/mkinstalldirs $(bindir)
60- $(INSTALL_PROGRAM) floppyd_installtest $(bindir)/floppyd_installtest
61+${DESTDIR}$(bindir)/floppyd_installtest: floppyd_installtest
62+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
63+ $(INSTALL_PROGRAM) floppyd_installtest ${DESTDIR}$(bindir)/floppyd_installtest
64
65-$(bindir)/mtools: mtools
66- $(top_srcdir)/mkinstalldirs $(bindir)
67- $(INSTALL_PROGRAM) mtools $(bindir)/mtools
68+${DESTDIR}$(bindir)/mtools: mtools
69+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
70+ $(INSTALL_PROGRAM) mtools ${DESTDIR}$(bindir)/mtools
71
72-$(bindir)/mkmanifest: mkmanifest
73- $(top_srcdir)/mkinstalldirs $(bindir)
74- $(INSTALL_PROGRAM) mkmanifest $(bindir)/mkmanifest
75+${DESTDIR}$(bindir)/mkmanifest: mkmanifest
76+ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
77+ $(INSTALL_PROGRAM) mkmanifest ${DESTDIR}$(bindir)/mkmanifest
78
79 #$(ETCDIR)/mtools: mtools.etc
80 # cp mtools.etc $(ETCDIR)/mtools
81
82-install-links: $(bindir)/mtools
83+install-links: ${DESTDIR}$(bindir)/mtools
84 @for j in $(LINKS); do \
85- rm -f $(bindir)/$$j ; \
86- $(LN_S) mtools $(bindir)/$$j ; \
87- echo $(bindir)/$$j ; \
88+ rm -f ${DESTDIR}$(bindir)/$$j ; \
89+ $(LN_S) mtools ${DESTDIR}$(bindir)/$$j ; \
90+ echo ${DESTDIR}$(bindir)/$$j ; \
91 done
92
93 ## "z" is the older version of "gz"; the name is just *too* short
94-install-scripts: $(bindir)/mtools
95- @$(top_srcdir)/mkinstalldirs $(bindir)
96+install-scripts: ${DESTDIR}$(bindir)/mtools
97+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
98 @for j in $(SCRIPTS) ; do \
99- $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j $(bindir)/$$j ; \
100- echo $(bindir)/$$j ; \
101+ $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
102+ echo ${DESTDIR}$(bindir)/$$j ; \
103 done
104- rm -f $(bindir)/lz
105- $(LN_S) uz $(bindir)/lz
106+ rm -f ${DESTDIR}$(bindir)/lz
107+ $(LN_S) uz ${DESTDIR}$(bindir)/lz
108
109 install-man:
110- @$(top_srcdir)/mkinstalldirs $(MAN1DIR)
111+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN1DIR)
112 @for j in $(MAN1); do \
113- $(INSTALL_DATA) $(srcdir)/$$j $(MAN1DIR)/$$j ; \
114- echo $(MAN1DIR)/$$j ; \
115+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN1DIR)/$$j ; \
116+ echo ${DESTDIR}$(MAN1DIR)/$$j ; \
117 done
118- @$(top_srcdir)/mkinstalldirs $(MAN5DIR)
119+ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN5DIR)
120 @for j in $(MAN5); do \
121- $(INSTALL_DATA) $(srcdir)/$$j $(MAN5DIR)/$$j ; \
122- echo $(MAN5DIR)/$$j ; \
123+ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN5DIR)/$$j ; \
124+ echo ${DESTDIR}$(MAN5DIR)/$$j ; \
125 done
126
127 uninstall-bin:
diff --git a/meta/recipes-devtools/mtools/mtools/no-x11.patch b/meta/recipes-devtools/mtools/mtools/no-x11.patch
new file mode 100644
index 0000000000..300f43f000
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/no-x11.patch
@@ -0,0 +1,19 @@
1---
2 Makefile.in | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- mtools-3.9.9.orig/Makefile.in
6+++ mtools-3.9.9/Makefile.in
7@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
8 X_PRE_LIBS = @X_PRE_LIBS@
9 CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
10 CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
11 LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
12 ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
13-X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
14+X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
15 X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
16
17 all: mtools $(LINKS) mkmanifest @FLOPPYD@
18
19 %.o: %.c
diff --git a/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
new file mode 100644
index 0000000000..932d88f2a3
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -0,0 +1,22 @@
1# mtools OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5DESCRIPTION="Mtools is a collection of utilities for accessing MS-DOS disks from Unix without mounting them."
6HOMEPAGE="http://mtools.linux.lu"
7LICENSE="GPL"
8PR = "r4"
9
10#http://mtools.linux.lu/mtools-${PV}.tar.gz
11SRC_URI="http://folks.o-hand.com/richard/poky/sources/mtools-${PV}.tar.gz \
12 file://mtools-makeinfo.patch;patch=1 \
13 file://mtools.patch;patch=1 \
14 file://no-x11.patch;patch=1"
15
16S = "${WORKDIR}/mtools-${PV}"
17
18inherit autotools
19
20EXTRA_OECONF = "--without-x"
21
22BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch
new file mode 100644
index 0000000000..e4a548156f
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch
@@ -0,0 +1,54 @@
1If we're building an image and some package rebuilds while this is happening
2some package can be removed/added to the ipk deploy directory. The image will
3not depend on this package so we can safely ignore these cases rather than
4error out.
5
6RP - 26/8/09
7
8Index: opkg-utils/opkg-make-index
9===================================================================
10--- opkg-utils.orig/opkg-make-index 2009-08-26 17:21:26.000000000 +0100
11+++ opkg-utils/opkg-make-index 2009-08-27 16:11:22.000000000 +0100
12@@ -96,6 +96,7 @@
13 files=glob(pkg_dir + '/*.ipk') + glob(pkg_dir + '/*.deb')
14 files.sort()
15 for filename in files:
16+ try:
17 basename = os.path.basename(filename)
18 pkg = None
19 fnameStat = os.stat(filename)
20@@ -130,6 +131,12 @@
21 to_morgue(basename)
22 if opt_s:
23 print filename
24+ except OSError:
25+ sys.stderr.write("Package %s disappeared on us!\n" % (filename))
26+ continue
27+ except IOError:
28+ sys.stderr.write("Package %s disappeared on us!\n" % (filename))
29+ continue
30
31 pkgsStampsFile = open(stamplist_filename, "w")
32 for f in pkgsStamps.keys():
33@@ -148,6 +155,7 @@
34 names = packages.packages.keys()
35 names.sort()
36 for name in names:
37+ try:
38 pkg = packages.packages[name]
39 if locales_dir and pkg.depends:
40 depends = string.split(pkg.depends, ',')
41@@ -165,6 +173,13 @@
42 if (verbose):
43 sys.stderr.write("Writing info for package %s\n" % (pkg.package,))
44 print pkg
45+ except OSError:
46+ sys.stderr.write("Package %s disappeared on us!\n" % (name))
47+ continue
48+ except IOError:
49+ sys.stderr.write("Package %s disappeared on us!\n" % (name))
50+ continue
51+
52 if packages_filename:
53 sys.stdout.close()
54 sys.stdout = old_stdout
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
new file mode 100644
index 0000000000..f3b6f1f4cb
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "OPKG Package Manager Utilities"
2SECTION = "base"
3HOMEPAGE = "http://wiki.openmoko.org/wiki/Opkg"
4PRIORITY = "optional"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
8RDEPENDS = "python"
9RDEPENDS_virtclass-native = ""
10PR = "r1"
11
12SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
13 file://index-ignore-filenotfound.patch"
14
15S = "${WORKDIR}/opkg-utils"
16
17# Avoid circular dependencies from package_ipk.bbclass
18PACKAGES_virtclass-native = ""
19
20do_install() {
21 oe_runmake PREFIX=${prefix} DESTDIR=${D} install
22}
23
24BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch
new file mode 100644
index 0000000000..540be83950
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch
@@ -0,0 +1,34 @@
1Index: trunk/libopkg/opkg.c
2===================================================================
3--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
4+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
5@@ -876,3 +876,18 @@
6
7 return ret;
8 }
9+
10+int
11+opkg_compare_versions (const char *ver1, const char *ver2)
12+{
13+ pkg_t *pkg1, *pkg2;
14+
15+ pkg1 = pkg_new();
16+ pkg2 = pkg_new();
17+
18+ parse_version(pkg1, ver1);
19+ parse_version(pkg2, ver2);
20+
21+ return pkg_compare_versions(pkg1, pkg2);
22+}
23+
24Index: trunk/libopkg/opkg.h
25===================================================================
26--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
27+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
28@@ -58,4 +58,6 @@
29
30 int opkg_repository_accessibility_check(void);
31
32+int opkg_compare_versions (const char *ver1, const char *ver2);
33+
34 #endif /* OPKG_H */
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch
new file mode 100644
index 0000000000..d0711ecd0e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch
@@ -0,0 +1,17 @@
1Without this, the FILE reference in this header can cause compile issues.
2
3RP - 29/1/10
4
5Index: trunk/libopkg/pkg_dest.h
6===================================================================
7--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
8+++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
9@@ -18,6 +18,8 @@
10 #ifndef PKG_DEST_H
11 #define PKG_DEST_H
12
13+#include <stdio.h>
14+
15 typedef struct pkg_dest pkg_dest_t;
16 struct pkg_dest
17 {
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch
new file mode 100644
index 0000000000..4b12448155
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch
@@ -0,0 +1,17 @@
1Rebase for the latest version
2Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c
5--- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800
6+++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800
7@@ -523,6 +523,10 @@
8 }
9 }
10
11+ if (strlen(tar_entry->name) > 100) {
12+ tar_entry->name[100] = 0;
13+ }
14+
15 // tar_entry->name = xstrdup(tar.formated.name);
16
17 /*
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
new file mode 100644
index 0000000000..79c741d7be
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "opkg configuration files"
2SECTION = "base"
3LICENSE = "MIT"
4
5SRC_URI = "file://opkg.conf.comments \
6 file://lists \
7 file://dest \
8 file://src "
9
10do_compile () {
11 cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
12 cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
13 cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
14 cat ${WORKDIR}/lists >>${WORKDIR}/opkg.conf
15}
16
17do_install () {
18 install -d ${D}${sysconfdir}/
19 install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf
20}
21
22CONFFILES_${PN} = "${sysconfdir}/opkg.conf"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/dest b/meta/recipes-devtools/opkg/opkg-collateral/dest
new file mode 100644
index 0000000000..088ca403da
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/dest
@@ -0,0 +1 @@
dest root /
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/lists b/meta/recipes-devtools/opkg/opkg-collateral/lists
new file mode 100644
index 0000000000..3c524f8c77
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/lists
@@ -0,0 +1,2 @@
1lists_dir ext /var/lib/ipkg
2
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments b/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments
new file mode 100644
index 0000000000..51623f4d53
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments
@@ -0,0 +1,23 @@
1# Must have one or more source entries of the form:
2#
3# src <src-name> <source-url>
4#
5# and one or more destination entries of the form:
6#
7# dest <dest-name> <target-path>
8#
9# where <src-name> and <dest-names> are identifiers that
10# should match [a-zA-Z0-9._-]+, <source-url> should be a
11# URL that points to a directory containing a Familiar
12# Packages file, and <target-path> should be a directory
13# that exists on the target system.
14
15# Proxy Support
16#option http_proxy http://proxy.tld:3128
17#option ftp_proxy http://proxy.tld:3128
18#option proxy_username <username>
19#option proxy_password <password>
20
21# Offline mode (for use in constructing flash images offline)
22#option offline_root target
23
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/src b/meta/recipes-devtools/opkg/opkg-collateral/src
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/src
diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
new file mode 100644
index 0000000000..9e27e9343f
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "Base configuration files for opkg"
2LICENSE = "MIT"
3
4PACKAGE_ARCH = "${MACHINE_ARCH}"
5
6do_compile() {
7 mkdir -p ${S}/${sysconfdir}/opkg/
8
9 archconf=${S}/${sysconfdir}/opkg/arch.conf
10
11 rm -f $archconf
12 ipkgarchs="${PACKAGE_ARCHS}"
13 priority=1
14 for arch in $ipkgarchs; do
15 echo "arch $arch $priority" >> $archconf
16 priority=$(expr $priority + 5)
17 done
18}
19
20
21do_install () {
22 install -d ${D}${sysconfdir}/opkg
23 install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
24}
25
26FILES_${PN} = "${sysconfdir}/opkg/ "
27
28CONFFILES_${PN} += "${sysconfdir}/opkg/arch.conf"
29
diff --git a/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb
new file mode 100644
index 0000000000..259a60ebc9
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb
@@ -0,0 +1,8 @@
1require opkg_${PV}.bb
2
3DEPENDS = "curl"
4PROVIDES += "opkg"
5
6EXTRA_OECONF += "--disable-gpg"
7
8DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
new file mode 100644
index 0000000000..aa16b551fe
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
@@ -0,0 +1,10 @@
1require opkg_svn.bb
2
3DEPENDS = "curl"
4PROVIDES += "opkg"
5
6SRCREV = "${SRCREV_pn-opkg}"
7
8EXTRA_OECONF += "--disable-gpg"
9
10DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
new file mode 100644
index 0000000000..add1563c47
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -0,0 +1,33 @@
1DESCRIPTION = "Open Package Manager"
2DESCRIPTION_libopkg = "Open Package Manager Library"
3DESCRIPTION_update-alternatives-cworth = "Update alternatives"
4SECTION = "base"
5HOMEPAGE = "http://code.google.com/p/opkg/"
6BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
10DEPENDS = "curl gpgme openssl"
11DEPENDS_virtclass-native = "curl-native"
12DEPENDS_virtclass-nativesdk = "curl-nativesdk"
13
14PE = "1"
15
16FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg"
17
18# Werror gives all kinds bounds issuses with gcc 4.3.3
19do_configure_prepend() {
20 sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
21}
22
23inherit autotools pkgconfig
24
25target_localstatedir := "${localstatedir}"
26EXTRA_OECONF = "--with-opkglibdir=${localstatedir}/lib"
27EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
28EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
29
30#PROVIDES_append_virtclass-native = "virtual/update-alternatives-native"
31#RPROVIDES_${PN} += "update-alternatives-native"
32
33BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
new file mode 100644
index 0000000000..540be83950
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
@@ -0,0 +1,34 @@
1Index: trunk/libopkg/opkg.c
2===================================================================
3--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
4+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
5@@ -876,3 +876,18 @@
6
7 return ret;
8 }
9+
10+int
11+opkg_compare_versions (const char *ver1, const char *ver2)
12+{
13+ pkg_t *pkg1, *pkg2;
14+
15+ pkg1 = pkg_new();
16+ pkg2 = pkg_new();
17+
18+ parse_version(pkg1, ver1);
19+ parse_version(pkg2, ver2);
20+
21+ return pkg_compare_versions(pkg1, pkg2);
22+}
23+
24Index: trunk/libopkg/opkg.h
25===================================================================
26--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
27+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
28@@ -58,4 +58,6 @@
29
30 int opkg_repository_accessibility_check(void);
31
32+int opkg_compare_versions (const char *ver1, const char *ver2);
33+
34 #endif /* OPKG_H */
diff --git a/meta/recipes-devtools/opkg/opkg/headerfix.patch b/meta/recipes-devtools/opkg/opkg/headerfix.patch
new file mode 100644
index 0000000000..d0711ecd0e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/headerfix.patch
@@ -0,0 +1,17 @@
1Without this, the FILE reference in this header can cause compile issues.
2
3RP - 29/1/10
4
5Index: trunk/libopkg/pkg_dest.h
6===================================================================
7--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
8+++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
9@@ -18,6 +18,8 @@
10 #ifndef PKG_DEST_H
11 #define PKG_DEST_H
12
13+#include <stdio.h>
14+
15 typedef struct pkg_dest pkg_dest_t;
16 struct pkg_dest
17 {
diff --git a/meta/recipes-devtools/opkg/opkg/logfix.patch b/meta/recipes-devtools/opkg/opkg/logfix.patch
new file mode 100644
index 0000000000..da06f00bd0
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/logfix.patch
@@ -0,0 +1,23 @@
1Patch to remove "duplicate" bits of logs from opkg output, which
2massively simplifies do_rootfs logs. The reason is we get unflushed
3data passed to the children and duplicated.
4
5RP - 26/1/10
6
7Index: trunk/libbb/gz_open.c
8===================================================================
9--- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000
10+++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000
11@@ -38,6 +38,12 @@
12 perror_msg("pipe");
13 return(NULL);
14 }
15+
16+ /* If we don't flush, we end up with two copies of anything pending,
17+ one from the parent, one from the child */
18+ fflush(stdout);
19+ fflush(stderr);
20+
21 if ((*pid = fork()) == -1) {
22 perror_msg("fork");
23 return(NULL);
diff --git a/meta/recipes-devtools/opkg/opkg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
new file mode 100644
index 0000000000..4eb3ff9a11
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
@@ -0,0 +1,53 @@
1require opkg.inc
2
3PROVIDES += "virtual/update-alternatives"
4RPROVIDES_update-alternatives-cworth += "update-alternatives"
5RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
6RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
7RDEPENDS_${PN}_virtclass-native = ""
8RDEPENDS_${PN}_virtclass-nativesdk = ""
9PACKAGE_ARCH_update-alternatives-cworth = "all"
10
11SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
12 file://add_vercmp.patch \
13 file://headerfix.patch \
14"
15
16PR = "r3"
17
18PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
19
20FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
21FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
22FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/"
23
24# We need to create the lock directory
25do_install_append() {
26 install -d ${D}${localstatedir}/lib/opkg
27}
28
29# Define a variable to allow distros to run configure earlier.
30# (for example, to enable loading of ethernet kernel modules before networking starts)
31OPKG_INIT_POSITION = "98"
32OPKG_INIT_POSITION_slugos = "41"
33
34pkg_postinst_${PN} () {
35#!/bin/sh
36if [ "x$D" != "x" ]; then
37 install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
38 # this happens at S98 where our good 'ole packages script used to run
39 echo "#!/bin/sh
40opkg-cl configure
41rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
42" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
43 chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
44fi
45
46update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
47}
48
49pkg_postrm_${PN} () {
50#!/bin/sh
51update-alternatives --remove opkg ${bindir}/opkg-cl
52}
53
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
new file mode 100644
index 0000000000..518c767354
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -0,0 +1,57 @@
1require opkg.inc
2
3PROVIDES += "virtual/update-alternatives"
4RPROVIDES_update-alternatives-cworth += "update-alternatives"
5RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
6RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
7RDEPENDS_${PN}_virtclass-native = ""
8RDEPENDS_${PN}_virtclass-nativesdk = ""
9PACKAGE_ARCH_update-alternatives-cworth = "all"
10
11SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
12 file://opkg_unarchive.patch \
13 file://add_vercmp.patch \
14 file://headerfix.patch \
15 file://logfix.patch"
16
17S = "${WORKDIR}/trunk"
18
19PV = "0.0+svnr${SRCREV}"
20PR = "r15"
21
22PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
23
24FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
25FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
26FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/"
27
28# We need to create the lock directory
29do_install_append() {
30 install -d ${D}${localstatedir}/lib/opkg
31}
32
33# Define a variable to allow distros to run configure earlier.
34# (for example, to enable loading of ethernet kernel modules before networking starts)
35OPKG_INIT_POSITION = "98"
36OPKG_INIT_POSITION_slugos = "41"
37
38pkg_postinst_${PN} () {
39#!/bin/sh
40if [ "x$D" != "x" ]; then
41 install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
42 # this happens at S98 where our good 'ole packages script used to run
43 echo "#!/bin/sh
44opkg-cl configure
45rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
46" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
47 chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
48fi
49
50update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
51}
52
53pkg_postrm_${PN} () {
54#!/bin/sh
55update-alternatives --remove opkg ${bindir}/opkg-cl
56}
57
diff --git a/meta/recipes-devtools/patch/patch-2.5.9/2.5.9.patch b/meta/recipes-devtools/patch/patch-2.5.9/2.5.9.patch
new file mode 100644
index 0000000000..7b64ecdd42
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/2.5.9.patch
@@ -0,0 +1,27399 @@
1diff -urNd -urNd patch-2.5.4/aclocal.m4 patch-2.5.9/aclocal.m4
2--- patch-2.5.4/aclocal.m4 1999-08-29 09:09:30.000000000 -0400
3+++ patch-2.5.9/aclocal.m4 2003-05-19 02:30:52.000000000 -0400
4@@ -1,106 +1,34 @@
5-# The following is taken from automake 1.4,
6-# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
7-# because only the former supports 64-bit integral types on HP-UX 10.20.
8-
9-## ----------------------------------------- ##
10-## ANSIfy the C compiler whenever possible. ##
11-## From Franc,ois Pinard ##
12-## ----------------------------------------- ##
13-
14-# serial 2
15+# backupfile.m4 serial 1
16+dnl Copyright (C) 2002 Free Software Foundation, Inc.
17+dnl This file is free software, distributed under the terms of the GNU
18+dnl General Public License. As a special exception to the GNU General
19+dnl Public License, this file may be distributed as part of a program
20+dnl that contains a configuration script generated by Autoconf, under
21+dnl the same distribution terms as the rest of that program.
22
23-# @defmac AC_PROG_CC_STDC
24-# @maindex PROG_CC_STDC
25-# @ovindex CC
26-# If the C compiler in not in ANSI C mode by default, try to add an option
27-# to output variable @code{CC} to make it so. This macro tries various
28-# options that select ANSI C on some system or another. It considers the
29-# compiler to be in ANSI C mode if it handles function prototypes correctly.
30-#
31-# If you use this macro, you should check after calling it whether the C
32-# compiler has been set to accept ANSI C; if not, the shell variable
33-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
34-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
35-# program @code{ansi2knr}, which comes with Ghostscript.
36-# @end defmac
37+AC_DEFUN([gl_BACKUPFILE],
38+[
39+ dnl Prerequisites of lib/backupfile.c.
40+ AC_REQUIRE([AC_HEADER_DIRENT])
41+ AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
42+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
43+ AC_CHECK_DECLS_ONCE(getenv malloc)
44+ jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
45
46-AC_DEFUN(AM_PROG_CC_STDC,
47-[AC_REQUIRE([AC_PROG_CC])
48-AC_BEFORE([$0], [AC_C_INLINE])
49-AC_BEFORE([$0], [AC_C_CONST])
50-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
51-dnl a magic option to avoid problems with ANSI preprocessor commands
52-dnl like #elif.
53-dnl FIXME: can't do this because then AC_AIX won't work due to a
54-dnl circular dependency.
55-dnl AC_BEFORE([$0], [AC_PROG_CPP])
56-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
57-AC_CACHE_VAL(am_cv_prog_cc_stdc,
58-[am_cv_prog_cc_stdc=no
59-ac_save_CC="$CC"
60-# Don't try gcc -ansi; that turns off useful extensions and
61-# breaks some systems' header files.
62-# AIX -qlanglvl=ansi
63-# Ultrix and OSF/1 -std1
64-# HP-UX -Aa -D_HPUX_SOURCE
65-# SVR4 -Xc -D__EXTENSIONS__
66-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
67-do
68- CC="$ac_save_CC $ac_arg"
69- AC_TRY_COMPILE(
70-[#include <stdarg.h>
71-#include <stdio.h>
72-#include <sys/types.h>
73-#include <sys/stat.h>
74-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
75-struct buf { int x; };
76-FILE * (*rcsopen) (struct buf *, struct stat *, int);
77-static char *e (p, i)
78- char **p;
79- int i;
80-{
81- return p[i];
82-}
83-static char *f (char * (*g) (char **, int), char **p, ...)
84-{
85- char *s;
86- va_list v;
87- va_start (v,p);
88- s = g (p, va_arg (v,int));
89- va_end (v);
90- return s;
91-}
92-int test (int i, double x);
93-struct s1 {int (*f) (int a);};
94-struct s2 {int (*f) (double a);};
95-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
96-int argc;
97-char **argv;
98-], [
99-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
100-],
101-[am_cv_prog_cc_stdc="$ac_arg"; break])
102-done
103-CC="$ac_save_CC"
104-])
105-if test -z "$am_cv_prog_cc_stdc"; then
106- AC_MSG_RESULT([none needed])
107-else
108- AC_MSG_RESULT($am_cv_prog_cc_stdc)
109-fi
110-case "x$am_cv_prog_cc_stdc" in
111- x|xno) ;;
112- *) CC="$CC $am_cv_prog_cc_stdc" ;;
113-esac
114+ dnl Prerequisites of lib/addext.c.
115+ AC_REQUIRE([jm_AC_DOS])
116+ AC_SYS_LONG_FILE_NAMES
117+ AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
118+ AC_CHECK_FUNCS(pathconf)
119 ])
120-#serial 2
121+#serial 5
122
123 dnl From Jim Meyering.
124 dnl
125 dnl Check whether struct dirent has a member named d_ino.
126 dnl
127
128-AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
129+AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
130 [AC_REQUIRE([AC_HEADER_DIRENT])dnl
131 AC_CACHE_CHECK([for d_ino member in directory struct],
132 jm_cv_struct_dirent_d_ino,
133@@ -130,244 +58,548 @@
134 )
135 if test $jm_cv_struct_dirent_d_ino = yes; then
136 AC_DEFINE(D_INO_IN_DIRENT, 1,
137- [Define if there is a member named d_ino in the struct describing
138- directory headers.])
139+ [Define if there is a member named d_ino in the struct describing
140+ directory headers.])
141 fi
142 ]
143 )
144-#serial 3
145+# dirname.m4 serial 1
146+dnl Copyright (C) 2002 Free Software Foundation, Inc.
147+dnl This file is free software, distributed under the terms of the GNU
148+dnl General Public License. As a special exception to the GNU General
149+dnl Public License, this file may be distributed as part of a program
150+dnl that contains a configuration script generated by Autoconf, under
151+dnl the same distribution terms as the rest of that program.
152
153-dnl From Paul Eggert.
154+AC_DEFUN([gl_DIRNAME],
155+[
156+ dnl Prerequisites of lib/dirname.h.
157+ AC_REQUIRE([jm_AC_DOS])
158
159-# Define HAVE_INTTYPES_H if <inttypes.h> exists,
160-# doesn't clash with <sys/types.h>, and declares uintmax_t.
161+ dnl Prerequisites of lib/dirname.c.
162+ AC_REQUIRE([AC_HEADER_STDC])
163+ AC_CHECK_HEADERS_ONCE(string.h)
164
165-AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
166-[
167- AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
168- [AC_TRY_COMPILE(
169- [#include <sys/types.h>
170-#include <inttypes.h>],
171- [uintmax_t i = (uintmax_t) -1;],
172- jm_ac_cv_header_inttypes_h=yes,
173- jm_ac_cv_header_inttypes_h=no)])
174- if test $jm_ac_cv_header_inttypes_h = yes; then
175- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
176-[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
177- and declares uintmax_t. ])
178- fi
179+ dnl Prerequisites of lib/basename.c.
180+ AC_REQUIRE([AC_HEADER_STDC])
181+ AC_CHECK_HEADERS_ONCE(string.h)
182+
183+ dnl Prerequisites of lib/stripslash.c.
184+ AC_REQUIRE([AC_HEADER_STDC])
185+ AC_CHECK_HEADERS_ONCE(string.h)
186 ])
187 #serial 5
188
189-dnl By default, many hosts won't let programs access large files;
190-dnl one must use special compiler options to get large-file access to work.
191-dnl For more details about this brain damage please see:
192-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
193+# Define some macros required for proper operation of code in lib/*.c
194+# on MSDOS/Windows systems.
195
196-dnl Written by Paul Eggert <eggert@twinsun.com>.
197+# From Jim Meyering.
198
199-dnl Internal subroutine of AC_SYS_LARGEFILE.
200-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
201-AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
202- [AC_CACHE_CHECK([for $1 value to request large file support],
203- ac_cv_sys_largefile_$1,
204- [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
205- ac_cv_sys_largefile_$1=no
206- ifelse($1, CFLAGS,
207- [case "$host_os" in
208- # IRIX 6.2 and later require cc -n32.
209-changequote(, )dnl
210- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
211-changequote([, ])dnl
212- if test "$GCC" != yes; then
213- ac_cv_sys_largefile_CFLAGS=-n32
214- fi
215- ac_save_CC="$CC"
216- CC="$CC $ac_cv_sys_largefile_CFLAGS"
217- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
218- CC="$ac_save_CC"
219- esac])
220- }])])
221+AC_DEFUN([jm_AC_DOS],
222+ [
223+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
224+ [
225+ AC_TRY_COMPILE([],
226+ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
227+neither MSDOS nor Windows
228+#endif],
229+ [ac_cv_win_or_dos=yes],
230+ [ac_cv_win_or_dos=no])
231+ ])
232
233-dnl Internal subroutine of AC_SYS_LARGEFILE.
234-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
235-AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
236- [case $2 in
237- no) ;;
238- ?*)
239- case "[$]$1" in
240- '') $1=$2 ;;
241- *) $1=[$]$1' '$2 ;;
242- esac ;;
243- esac])
244+ if test x"$ac_cv_win_or_dos" = xyes; then
245+ ac_fs_accepts_drive_letter_prefix=1
246+ ac_fs_backslash_is_file_name_separator=1
247+ else
248+ ac_fs_accepts_drive_letter_prefix=0
249+ ac_fs_backslash_is_file_name_separator=0
250+ fi
251
252-dnl Internal subroutine of AC_SYS_LARGEFILE.
253-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
254-AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
255- [AC_CACHE_CHECK([for $1], $2,
256- [$2=no
257-changequote(, )dnl
258- $4
259- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
260- case "$ac_flag" in
261- -D$1)
262- $2=1 ;;
263- -D$1=*)
264- $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
265- esac
266- done
267-changequote([, ])dnl
268- ])
269- if test "[$]$2" != no; then
270- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
271- fi])
272+ AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
273+ [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
274+# define FILESYSTEM_PREFIX_LEN(Filename) \
275+ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
276+#else
277+# define FILESYSTEM_PREFIX_LEN(Filename) 0
278+#endif])
279
280-AC_DEFUN(AC_SYS_LARGEFILE,
281- [AC_REQUIRE([AC_CANONICAL_HOST])
282- AC_ARG_ENABLE(largefile,
283- [ --disable-largefile omit support for large files])
284- if test "$enable_largefile" != no; then
285- AC_CHECK_TOOL(GETCONF, getconf)
286- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
287- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
288- AC_SYS_LARGEFILE_FLAGS(LIBS)
289+ AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
290+ $ac_fs_accepts_drive_letter_prefix,
291+ [Define on systems for which file names may have a so-called
292+ `drive letter' prefix, define this to compute the length of that
293+ prefix, including the colon.])
294
295- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
296- case "$ac_flag" in
297- no) ;;
298- -D_FILE_OFFSET_BITS=*) ;;
299- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
300- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
301- -D?* | -I?*)
302- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
303- *)
304- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
305- esac
306- done
307- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
308- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
309- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
310- ac_cv_sys_file_offset_bits,
311- [Number of bits in a file offset, on hosts where this is settable.],
312- [case "$host_os" in
313- # HP-UX 10.20 and later
314- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
315- ac_cv_sys_file_offset_bits=64 ;;
316- esac])
317- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
318- ac_cv_sys_largefile_source,
319- [Define to make fseeko etc. visible, on some hosts.],
320- [case "$host_os" in
321- # HP-UX 10.20 and later
322- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
323- ac_cv_sys_largefile_source=1 ;;
324- esac])
325- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
326- ac_cv_sys_large_files,
327- [Define for large files, on AIX-style hosts.],
328- [case "$host_os" in
329- # AIX 4.2 and later
330- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
331- ac_cv_sys_large_files=1 ;;
332- esac])
333- fi
334+ AH_VERBATIM(ISSLASH,
335+ [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
336+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
337+#else
338+# define ISSLASH(C) ((C) == '/')
339+#endif])
340+
341+ AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
342+ $ac_fs_backslash_is_file_name_separator,
343+ [Define if the backslash character may also serve as a file name
344+ component separator.])
345 ])
346-#serial 3
347+#serial 7
348+
349+AC_DEFUN([gl_ERROR],
350+[
351+ AC_FUNC_ERROR_AT_LINE
352+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
353+ jm_PREREQ_ERROR
354+])
355+
356+# Prerequisites of lib/error.c.
357+AC_DEFUN([jm_PREREQ_ERROR],
358+[
359+ AC_REQUIRE([AC_HEADER_STDC])
360+ AC_REQUIRE([AC_FUNC_VPRINTF])
361+ AC_CHECK_FUNCS(strerror)
362+ AC_CHECK_DECLS([strerror])
363+ AC_FUNC_STRERROR_R
364+])
365+# getopt.m4 serial 1
366+dnl Copyright (C) 2002 Free Software Foundation, Inc.
367+dnl This file is free software, distributed under the terms of the GNU
368+dnl General Public License. As a special exception to the GNU General
369+dnl Public License, this file may be distributed as part of a program
370+dnl that contains a configuration script generated by Autoconf, under
371+dnl the same distribution terms as the rest of that program.
372+
373+AC_DEFUN([gl_GETOPT],
374+[
375+ dnl Prerequisites of lib/getopt.c.
376+ AC_CHECK_HEADERS_ONCE(string.h)
377+])
378+# malloc.m4 serial 7
379+dnl Copyright (C) 2002 Free Software Foundation, Inc.
380+dnl This file is free software, distributed under the terms of the GNU
381+dnl General Public License. As a special exception to the GNU General
382+dnl Public License, this file may be distributed as part of a program
383+dnl that contains a configuration script generated by Autoconf, under
384+dnl the same distribution terms as the rest of that program.
385
386 dnl From Jim Meyering.
387 dnl Determine whether malloc accepts 0 as its argument.
388 dnl If it doesn't, arrange to use the replacement function.
389-dnl
390
391-AC_DEFUN(jm_FUNC_MALLOC,
392+AC_DEFUN([jm_FUNC_MALLOC],
393 [
394- dnl xmalloc.c requires that this symbol be defined so it doesn't
395- dnl mistakenly use a broken malloc -- as it might if this test were omitted.
396- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
397- [Define if the malloc check has been performed. ])
398+ AC_REQUIRE([AC_FUNC_MALLOC])
399+ dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
400+ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
401+ gl_PREREQ_MALLOC
402+ fi
403+])
404
405- AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
406- [AC_TRY_RUN([
407- char *malloc ();
408- int
409- main ()
410- {
411- exit (malloc (0) ? 0 : 1);
412- }
413+# Prerequisites of lib/malloc.c.
414+AC_DEFUN([gl_PREREQ_MALLOC], [
415+ :
416+])
417+# mbrtowc.m4 serial 5
418+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
419+dnl This file is free software, distributed under the terms of the GNU
420+dnl General Public License. As a special exception to the GNU General
421+dnl Public License, this file may be distributed as part of a program
422+dnl that contains a configuration script generated by Autoconf, under
423+dnl the same distribution terms as the rest of that program.
424+
425+dnl From Paul Eggert
426+
427+dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
428+dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
429+
430+AC_DEFUN([jm_FUNC_MBRTOWC],
431+[
432+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
433+ jm_cv_func_mbrtowc,
434+ [AC_TRY_LINK(
435+ [#include <wchar.h>],
436+ [mbstate_t state; return ! (sizeof state && mbrtowc);],
437+ jm_cv_func_mbrtowc=yes,
438+ jm_cv_func_mbrtowc=no)])
439+ if test $jm_cv_func_mbrtowc = yes; then
440+ AC_DEFINE(HAVE_MBRTOWC, 1,
441+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
442+ fi
443+])
444+# mbstate_t.m4 serial 9
445+dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
446+dnl This file is free software, distributed under the terms of the GNU
447+dnl General Public License. As a special exception to the GNU General
448+dnl Public License, this file may be distributed as part of a program
449+dnl that contains a configuration script generated by Autoconf, under
450+dnl the same distribution terms as the rest of that program.
451+
452+# From Paul Eggert.
453+
454+# BeOS 5 has <wchar.h> but does not define mbstate_t,
455+# so you can't declare an object of that type.
456+# Check for this incompatibility with Standard C.
457+
458+# AC_TYPE_MBSTATE_T
459+# -----------------
460+AC_DEFUN([AC_TYPE_MBSTATE_T],
461+ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
462+ [AC_COMPILE_IFELSE(
463+ [AC_LANG_PROGRAM(
464+ [AC_INCLUDES_DEFAULT
465+# include <wchar.h>],
466+ [mbstate_t x; return sizeof x;])],
467+ [ac_cv_type_mbstate_t=yes],
468+ [ac_cv_type_mbstate_t=no])])
469+ if test $ac_cv_type_mbstate_t = yes; then
470+ AC_DEFINE([HAVE_MBSTATE_T], 1,
471+ [Define to 1 if <wchar.h> declares mbstate_t.])
472+ else
473+ AC_DEFINE([mbstate_t], int,
474+ [Define to a type if <wchar.h> does not define.])
475+ fi])
476+# memchr.m4 serial 1
477+dnl Copyright (C) 2002 Free Software Foundation, Inc.
478+dnl This file is free software, distributed under the terms of the GNU
479+dnl General Public License. As a special exception to the GNU General
480+dnl Public License, this file may be distributed as part of a program
481+dnl that contains a configuration script generated by Autoconf, under
482+dnl the same distribution terms as the rest of that program.
483+
484+AC_DEFUN([gl_FUNC_MEMCHR],
485+[
486+ AC_REPLACE_FUNCS(memchr)
487+ if test $ac_cv_func_memchr = no; then
488+ jm_PREREQ_MEMCHR
489+ fi
490+])
491+
492+# Prerequisites of lib/memchr.c.
493+AC_DEFUN([jm_PREREQ_MEMCHR], [
494+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
495+ AC_CHECK_HEADERS(bp-sym.h)
496+])
497+#serial 1
498+
499+dnl From Mumit Khan and Paul Eggert
500+dnl Determine whether mkdir accepts only one argument instead of the usual two.
501+
502+AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
503+ [AC_CHECK_FUNCS(mkdir)
504+ AC_CACHE_CHECK([whether mkdir takes only one argument],
505+ patch_cv_mkdir_takes_one_arg,
506+ [patch_cv_mkdir_takes_one_arg=no
507+ if test $ac_cv_func_mkdir = yes; then
508+ AC_TRY_COMPILE([
509+#include <sys/types.h>
510+#include <sys/stat.h>
511 ],
512- jm_cv_func_working_malloc=yes,
513- jm_cv_func_working_malloc=no,
514- dnl When crosscompiling, assume malloc is broken.
515- jm_cv_func_working_malloc=no)
516+ [mkdir (".", 0);],
517+ ,
518+ [AC_TRY_COMPILE([
519+#include <sys/types.h>
520+#include <sys/stat.h>
521+ ],
522+ [mkdir (".");],
523+ patch_cv_mkdir_takes_one_arg=yes
524+ )]
525+ )
526+ fi
527+ ]
528+ )
529+ if test $patch_cv_mkdir_takes_one_arg = yes; then
530+ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
531+ [Define if mkdir takes only one argument.])
532+ fi
533+ ]
534+)
535+# onceonly.m4 serial 3
536+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
537+dnl This file is free software, distributed under the terms of the GNU
538+dnl General Public License. As a special exception to the GNU General
539+dnl Public License, this file may be distributed as part of a program
540+dnl that contains a configuration script generated by Autoconf, under
541+dnl the same distribution terms as the rest of that program.
542+
543+dnl This file defines some "once only" variants of standard autoconf macros.
544+dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
545+dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
546+dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
547+dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
548+dnl The advantage is that the check for each of the headers/functions/decls
549+dnl will be put only once into the 'configure' file. It keeps the size of
550+dnl the 'configure' file down, and avoids redundant output when 'configure'
551+dnl is run.
552+dnl The drawback is that the checks cannot be conditionalized. If you write
553+dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
554+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
555+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
556+dnl function.
557+
558+dnl Autoconf version 2.57 or newer is recommended.
559+AC_PREREQ(2.54)
560+
561+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
562+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
563+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
564+ :
565+ AC_FOREACH([gl_HEADER_NAME], [$1], [
566+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
567+ [-./], [___])), [
568+ AC_CHECK_HEADERS(gl_HEADER_NAME)
569+ ])
570+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
571+ [-./], [___])))
572 ])
573- if test $jm_cv_func_working_malloc = no; then
574- AC_SUBST(LIBOBJS)
575- LIBOBJS="$LIBOBJS malloc.$ac_objext"
576- AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
577- [Define to rpl_malloc if the replacement function should be used.])
578- fi
579 ])
580-## ------------------------------- ##
581-## Check for function prototypes. ##
582-## From Franc,ois Pinard ##
583-## ------------------------------- ##
584
585-# serial 1
586+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
587+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
588+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
589+ :
590+ AC_FOREACH([gl_FUNC_NAME], [$1], [
591+ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
592+ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
593+ ])
594+ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
595+ ])
596+])
597
598-AC_DEFUN(AM_C_PROTOTYPES,
599-[AC_REQUIRE([AM_PROG_CC_STDC])
600-AC_REQUIRE([AC_PROG_CPP])
601-AC_MSG_CHECKING([for function prototypes])
602-if test "$am_cv_prog_cc_stdc" != no; then
603- AC_MSG_RESULT(yes)
604- AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
605- U= ANSI2KNR=
606-else
607- AC_MSG_RESULT(no)
608- U=_ ANSI2KNR=./ansi2knr
609- # Ensure some checks needed by ansi2knr itself.
610- AC_HEADER_STDC
611- AC_CHECK_HEADERS(string.h)
612-fi
613-AC_SUBST(U)dnl
614-AC_SUBST(ANSI2KNR)dnl
615+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
616+# AC_CHECK_DECLS(DECL1, DECL2, ...).
617+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
618+ :
619+ AC_FOREACH([gl_DECL_NAME], [$1], [
620+ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
621+ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
622+ ])
623+ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
624+ ])
625 ])
626-#serial 3
627+# quote.m4 serial 1
628+dnl Copyright (C) 2002 Free Software Foundation, Inc.
629+dnl This file is free software, distributed under the terms of the GNU
630+dnl General Public License. As a special exception to the GNU General
631+dnl Public License, this file may be distributed as part of a program
632+dnl that contains a configuration script generated by Autoconf, under
633+dnl the same distribution terms as the rest of that program.
634+
635+AC_DEFUN([gl_QUOTE],
636+[
637+ dnl Prerequisites of lib/quote.c.
638+ AC_CHECK_HEADERS_ONCE(stddef.h)
639+])
640+# quotearg.m4 serial 1
641+dnl Copyright (C) 2002 Free Software Foundation, Inc.
642+dnl This file is free software, distributed under the terms of the GNU
643+dnl General Public License. As a special exception to the GNU General
644+dnl Public License, this file may be distributed as part of a program
645+dnl that contains a configuration script generated by Autoconf, under
646+dnl the same distribution terms as the rest of that program.
647+
648+AC_DEFUN([gl_QUOTEARG],
649+[
650+ dnl Prerequisites of lib/quotearg.c.
651+ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
652+ AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
653+ AC_TYPE_MBSTATE_T
654+ jm_FUNC_MBRTOWC
655+])
656+# realloc.m4 serial 7
657+dnl Copyright (C) 2002 Free Software Foundation, Inc.
658+dnl This file is free software, distributed under the terms of the GNU
659+dnl General Public License. As a special exception to the GNU General
660+dnl Public License, this file may be distributed as part of a program
661+dnl that contains a configuration script generated by Autoconf, under
662+dnl the same distribution terms as the rest of that program.
663
664 dnl From Jim Meyering.
665 dnl Determine whether realloc works when both arguments are 0.
666 dnl If it doesn't, arrange to use the replacement function.
667-dnl
668
669-AC_DEFUN(jm_FUNC_REALLOC,
670+AC_DEFUN([jm_FUNC_REALLOC],
671 [
672- dnl xmalloc.c requires that this symbol be defined so it doesn't
673- dnl mistakenly use a broken realloc -- as it might if this test were omitted.
674- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
675- [Define if the realloc check has been performed. ])
676+ AC_REQUIRE([AC_FUNC_REALLOC])
677+ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
678+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
679+ gl_PREREQ_REALLOC
680+ fi
681+])
682
683- AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
684- [AC_TRY_RUN([
685- char *realloc ();
686- int
687- main ()
688- {
689- exit (realloc (0, 0) ? 0 : 1);
690- }
691- ],
692- jm_cv_func_working_realloc=yes,
693- jm_cv_func_working_realloc=no,
694- dnl When crosscompiling, assume realloc is broken.
695- jm_cv_func_working_realloc=no)
696- ])
697- if test $jm_cv_func_working_realloc = no; then
698- AC_SUBST(LIBOBJS)
699- LIBOBJS="$LIBOBJS realloc.$ac_objext"
700- AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
701- [Define to rpl_realloc if the replacement function should be used.])
702+# Prerequisites of lib/realloc.c.
703+AC_DEFUN([gl_PREREQ_REALLOC], [
704+ :
705+])
706+# rmdir.m4 serial 1
707+dnl Copyright (C) 2002 Free Software Foundation, Inc.
708+dnl This file is free software, distributed under the terms of the GNU
709+dnl General Public License. As a special exception to the GNU General
710+dnl Public License, this file may be distributed as part of a program
711+dnl that contains a configuration script generated by Autoconf, under
712+dnl the same distribution terms as the rest of that program.
713+
714+AC_DEFUN([gl_FUNC_RMDIR],
715+[
716+ AC_REPLACE_FUNCS(rmdir)
717+ if test $ac_cv_func_rmdir = no; then
718+ gl_PREREQ_RMDIR
719 fi
720 ])
721-#serial 2
722+
723+# Prerequisites of lib/rmdir.c.
724+AC_DEFUN([gl_PREREQ_RMDIR], [
725+ AC_REQUIRE([AC_HEADER_STAT])
726+ :
727+])
728+
729+# Check for setmode, DOS style.
730+
731+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
732+
733+# This program is free software; you can redistribute it and/or modify
734+# it under the terms of the GNU General Public License as published by
735+# the Free Software Foundation; either version 2, or (at your option)
736+# any later version.
737+
738+# This program is distributed in the hope that it will be useful,
739+# but WITHOUT ANY WARRANTY; without even the implied warranty of
740+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
741+# GNU General Public License for more details.
742+
743+# You should have received a copy of the GNU General Public License
744+# along with this program; if not, write to the Free Software
745+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746+# 02111-1307, USA.
747+
748+AC_DEFUN([AC_FUNC_SETMODE_DOS],
749+ [AC_CHECK_HEADERS(fcntl.h unistd.h)
750+ AC_CACHE_CHECK([for DOS-style setmode],
751+ [ac_cv_func_setmode_dos],
752+ [AC_TRY_LINK(
753+ [#include <io.h>
754+ #if HAVE_FCNTL_H
755+ # include <fcntl.h>
756+ #endif
757+ #if HAVE_UNISTD_H
758+ # include <unistd.h>
759+ #endif],
760+ [int ret = setmode && setmode (1, O_BINARY);],
761+ [ac_cv_func_setmode_dos=yes],
762+ [ac_cv_func_setmode_dos=no])])
763+ if test $ac_cv_func_setmode_dos = yes; then
764+ AC_DEFINE(HAVE_SETMODE_DOS, 1,
765+ [Define to 1 if you have the DOS-style `setmode' function.])
766+ fi])
767+# Check for stdbool.h that conforms to C99.
768+
769+# Copyright (C) 2002-2003 Free Software Foundation, Inc.
770+
771+# This program is free software; you can redistribute it and/or modify
772+# it under the terms of the GNU General Public License as published by
773+# the Free Software Foundation; either version 2, or (at your option)
774+# any later version.
775+
776+# This program is distributed in the hope that it will be useful,
777+# but WITHOUT ANY WARRANTY; without even the implied warranty of
778+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
779+# GNU General Public License for more details.
780+
781+# You should have received a copy of the GNU General Public License
782+# along with this program; if not, write to the Free Software
783+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
784+# 02111-1307, USA.
785+
786+# Prepare for substituting <stdbool.h> if it is not supported.
787+
788+AC_DEFUN([AM_STDBOOL_H],
789+[
790+ AC_REQUIRE([AC_HEADER_STDBOOL])
791+
792+ # Define two additional variables used in the Makefile substitution.
793+
794+ if test "$ac_cv_header_stdbool_h" = yes; then
795+ STDBOOL_H=''
796+ else
797+ STDBOOL_H='stdbool.h'
798+ fi
799+ AC_SUBST([STDBOOL_H])
800+
801+ if test "$ac_cv_type__Bool" = yes; then
802+ HAVE__BOOL=1
803+ else
804+ HAVE__BOOL=0
805+ fi
806+ AC_SUBST([HAVE__BOOL])
807+])
808+
809+# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
810+# have this macro built-in.
811+
812+AC_DEFUN([AC_HEADER_STDBOOL],
813+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
814+ [ac_cv_header_stdbool_h],
815+ [AC_TRY_COMPILE(
816+ [
817+ #include <stdbool.h>
818+ #ifndef bool
819+ "error: bool is not defined"
820+ #endif
821+ #ifndef false
822+ "error: false is not defined"
823+ #endif
824+ #if false
825+ "error: false is not 0"
826+ #endif
827+ #ifndef true
828+ "error: false is not defined"
829+ #endif
830+ #if true != 1
831+ "error: true is not 1"
832+ #endif
833+ #ifndef __bool_true_false_are_defined
834+ "error: __bool_true_false_are_defined is not defined"
835+ #endif
836+
837+ struct s { _Bool s: 1; _Bool t; } s;
838+
839+ char a[true == 1 ? 1 : -1];
840+ char b[false == 0 ? 1 : -1];
841+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
842+ char d[(bool) -0.5 == true ? 1 : -1];
843+ bool e = &s;
844+ char f[(_Bool) -0.0 == false ? 1 : -1];
845+ char g[true];
846+ char h[sizeof (_Bool)];
847+ char i[sizeof s.t];
848+ ],
849+ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
850+ [ac_cv_header_stdbool_h=yes],
851+ [ac_cv_header_stdbool_h=no])])
852+ AC_CHECK_TYPES([_Bool])
853+ if test $ac_cv_header_stdbool_h = yes; then
854+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
855+ fi])
856+#serial 7 -*- autoconf -*-
857+
858+dnl From Jim Meyering.
859+dnl
860+dnl See if the glibc *_unlocked I/O macros or functions are available.
861+dnl Use only those *_unlocked macros or functions that are declared
862+dnl (because some of them were declared in Solaris 2.5.1 but were removed
863+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
864+dnl on Solaris 2.6).
865+
866+AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
867+[
868+ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
869+ dnl etc.
870+ AC_REQUIRE([AC_GNU_SOURCE])
871+
872+ AC_CHECK_DECLS_ONCE(
873+ [clearerr_unlocked feof_unlocked ferror_unlocked
874+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
875+ fread_unlocked fwrite_unlocked getc_unlocked
876+ getchar_unlocked putc_unlocked putchar_unlocked])
877+])
878+#serial 5
879
880 dnl From Jim Meyering
881
882@@ -375,9 +607,9 @@
883 dnl usually in <utime.h>.
884 dnl Some systems have utime.h but don't declare the struct anywhere.
885
886-AC_DEFUN(jm_STRUCT_UTIMBUF,
887+AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
888 [
889- AC_CHECK_HEADERS(utime.h)
890+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
891 AC_REQUIRE([AC_HEADER_TIME])
892 AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
893 [AC_TRY_COMPILE(
894@@ -402,8 +634,34 @@
895 ])
896
897 if test $fu_cv_sys_struct_utimbuf = yes; then
898- AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
899-[Define if struct utimbuf is declared -- usually in <utime.h>.
900- Some systems have utime.h but don't declare the struct anywhere. ])
901+ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
902+ [Define if struct utimbuf is declared -- usually in <utime.h>.
903+ Some systems have utime.h but don't declare the struct anywhere. ])
904 fi
905 ])
906+# xalloc.m4 serial 1
907+dnl Copyright (C) 2002 Free Software Foundation, Inc.
908+dnl This file is free software, distributed under the terms of the GNU
909+dnl General Public License. As a special exception to the GNU General
910+dnl Public License, this file may be distributed as part of a program
911+dnl that contains a configuration script generated by Autoconf, under
912+dnl the same distribution terms as the rest of that program.
913+
914+AC_DEFUN([gl_XALLOC],
915+[
916+ gl_PREREQ_XMALLOC
917+ gl_PREREQ_XSTRDUP
918+])
919+
920+# Prerequisites of lib/xmalloc.c.
921+AC_DEFUN([gl_PREREQ_XMALLOC], [
922+ AC_REQUIRE([AC_HEADER_STDC])
923+ AC_REQUIRE([jm_FUNC_MALLOC])
924+ AC_REQUIRE([jm_FUNC_REALLOC])
925+])
926+
927+# Prerequisites of lib/xstrdup.c.
928+AC_DEFUN([gl_PREREQ_XSTRDUP], [
929+ AC_REQUIRE([AC_HEADER_STDC])
930+ AC_CHECK_HEADERS_ONCE(string.h)
931+])
932diff -urNd -urNd patch-2.5.4/addext.c patch-2.5.9/addext.c
933--- patch-2.5.4/addext.c 1999-01-18 12:02:28.000000000 -0500
934+++ patch-2.5.9/addext.c 2003-05-18 01:30:52.000000000 -0400
935@@ -1,5 +1,7 @@
936 /* addext.c -- add an extension to a file name
937- Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
938+
939+ Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
940+ Foundation, Inc.
941
942 This program is free software; you can redistribute it and/or modify
943 it under the terms of the GNU General Public License as published by
944@@ -29,8 +31,6 @@
945 # define HAVE_LONG_FILE_NAMES 0
946 #endif
947
948-#include <backupfile.h>
949-
950 #if HAVE_LIMITS_H
951 # include <limits.h>
952 #endif
953@@ -49,7 +49,13 @@
954 # include <unistd.h>
955 #endif
956
957-char *base_name PARAMS ((char const *));
958+#include <errno.h>
959+#ifndef errno
960+extern int errno;
961+#endif
962+
963+#include "backupfile.h"
964+#include "dirname.h"
965
966 /* Append to FILENAME the extension EXT, unless the result would be too long,
967 in which case just append the character E. */
968@@ -58,25 +64,34 @@
969 addext (char *filename, char const *ext, int e)
970 {
971 char *s = base_name (filename);
972- size_t slen = strlen (s), extlen = strlen (ext);
973- long slen_max = -1;
974+ size_t slen = base_len (s);
975+ size_t extlen = strlen (ext);
976+ size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX;
977
978 #if HAVE_PATHCONF && defined _PC_NAME_MAX
979- if (slen + extlen <= _POSIX_NAME_MAX && ! HAVE_DOS_FILE_NAMES)
980- /* The file name is so short there's no need to call pathconf. */
981- slen_max = _POSIX_NAME_MAX;
982- else if (s == filename)
983- slen_max = pathconf (".", _PC_NAME_MAX);
984- else
985+ if (_POSIX_NAME_MAX < slen + extlen || HAVE_DOS_FILE_NAMES)
986 {
987- char c = *s;
988- *s = 0;
989- slen_max = pathconf (filename, _PC_NAME_MAX);
990- *s = c;
991+ /* The new base name is long enough to require a pathconf check. */
992+ long name_max;
993+ errno = 0;
994+ if (s == filename)
995+ name_max = pathconf (".", _PC_NAME_MAX);
996+ else
997+ {
998+ char c = *s;
999+ if (! ISSLASH (c))
1000+ *s = 0;
1001+ name_max = pathconf (filename, _PC_NAME_MAX);
1002+ *s = c;
1003+ }
1004+ if (0 <= name_max || errno == 0)
1005+ {
1006+ long size = slen_max = name_max;
1007+ if (name_max != size)
1008+ slen_max = -1;
1009+ }
1010 }
1011 #endif
1012- if (slen_max < 0)
1013- slen_max = HAVE_LONG_FILE_NAMES ? 255 : 14;
1014
1015 if (HAVE_DOS_FILE_NAMES && slen_max <= 12)
1016 {
1017diff -urNd -urNd patch-2.5.4/ansi2knr.1 patch-2.5.9/ansi2knr.1
1018--- patch-2.5.4/ansi2knr.1 1997-07-04 15:39:00.000000000 -0400
1019+++ patch-2.5.9/ansi2knr.1 1969-12-31 19:00:00.000000000 -0500
1020@@ -1,36 +0,0 @@
1021-.TH ANSI2KNR 1 "19 Jan 1996"
1022-.SH NAME
1023-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
1024-.SH SYNOPSIS
1025-.I ansi2knr
1026-[--varargs] input_file [output_file]
1027-.SH DESCRIPTION
1028-If no output_file is supplied, output goes to stdout.
1029-.br
1030-There are no error messages.
1031-.sp
1032-.I ansi2knr
1033-recognizes function definitions by seeing a non-keyword identifier at the left
1034-margin, followed by a left parenthesis, with a right parenthesis as the last
1035-character on the line, and with a left brace as the first token on the
1036-following line (ignoring possible intervening comments). It will recognize a
1037-multi-line header provided that no intervening line ends with a left or right
1038-brace or a semicolon. These algorithms ignore whitespace and comments, except
1039-that the function name must be the first thing on the line.
1040-.sp
1041-The following constructs will confuse it:
1042-.br
1043- - Any other construct that starts at the left margin and follows the
1044-above syntax (such as a macro or function call).
1045-.br
1046- - Some macros that tinker with the syntax of the function header.
1047-.sp
1048-The --varargs switch is obsolete, and is recognized only for
1049-backwards compatibility. The present version of
1050-.I ansi2knr
1051-will always attempt to convert a ... argument to va_alist and va_dcl.
1052-.SH AUTHOR
1053-L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
1054-continues to maintain the current version; most of the code in the current
1055-version is his work. ansi2knr also includes contributions by Francois
1056-Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
1057diff -urNd -urNd patch-2.5.4/ansi2knr.c patch-2.5.9/ansi2knr.c
1058--- patch-2.5.4/ansi2knr.c 1999-04-13 10:44:41.000000000 -0400
1059+++ patch-2.5.9/ansi2knr.c 1969-12-31 19:00:00.000000000 -0500
1060@@ -1,678 +0,0 @@
1061-/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
1062-
1063-/*$Id: ansi2knr.c,v 1.14 1999/04/13 14:44:33 meyering Exp $*/
1064-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
1065-
1066-/*
1067-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
1068-WARRANTY. No author or distributor accepts responsibility to anyone for the
1069-consequences of using it or for whether it serves any particular purpose or
1070-works at all, unless he says so in writing. Refer to the GNU General Public
1071-License (the "GPL") for full details.
1072-
1073-Everyone is granted permission to copy, modify and redistribute ansi2knr,
1074-but only under the conditions described in the GPL. A copy of this license
1075-is supposed to have been given to you along with ansi2knr so you can know
1076-your rights and responsibilities. It should be in a file named COPYLEFT,
1077-or, if there is no file named COPYLEFT, a file named COPYING. Among other
1078-things, the copyright notice and this notice must be preserved on all
1079-copies.
1080-
1081-We explicitly state here what we believe is already implied by the GPL: if
1082-the ansi2knr program is distributed as a separate set of sources and a
1083-separate executable file which are aggregated on a storage medium together
1084-with another program, this in itself does not bring the other program under
1085-the GPL, nor does the mere fact that such a program or the procedures for
1086-constructing it invoke the ansi2knr executable bring any other part of the
1087-program under the GPL.
1088-*/
1089-
1090-/*
1091- * Usage:
1092- ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
1093- * --filename provides the file name for the #line directive in the output,
1094- * overriding input_file (if present).
1095- * If no input_file is supplied, input is read from stdin.
1096- * If no output_file is supplied, output goes to stdout.
1097- * There are no error messages.
1098- *
1099- * ansi2knr recognizes function definitions by seeing a non-keyword
1100- * identifier at the left margin, followed by a left parenthesis,
1101- * with a right parenthesis as the last character on the line,
1102- * and with a left brace as the first token on the following line
1103- * (ignoring possible intervening comments), except that a line
1104- * consisting of only
1105- * identifier1(identifier2)
1106- * will not be considered a function definition unless identifier2 is
1107- * the word "void", and a line consisting of
1108- * identifier1(identifier2, <<arbitrary>>)
1109- * will not be considered a function definition.
1110- * ansi2knr will recognize a multi-line header provided
1111- * that no intervening line ends with a left or right brace or a semicolon.
1112- * These algorithms ignore whitespace and comments, except that
1113- * the function name must be the first thing on the line.
1114- * The following constructs will confuse it:
1115- * - Any other construct that starts at the left margin and
1116- * follows the above syntax (such as a macro or function call).
1117- * - Some macros that tinker with the syntax of function headers.
1118- */
1119-
1120-/*
1121- * The original and principal author of ansi2knr is L. Peter Deutsch
1122- * <ghost@aladdin.com>. Other authors are noted in the change history
1123- * that follows (in reverse chronological order):
1124- lpd 1999-04-12 added minor fixes from Pavel Roskin
1125- <pavel_roskin@geocities.com> for clean compilation with
1126- gcc -W -Wall
1127- lpd 1999-03-22 added hack to recognize lines consisting of
1128- identifier1(identifier2, xxx) as *not* being procedures
1129- lpd 1999-02-03 made indentation of preprocessor commands consistent
1130- lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
1131- endless loop; quoted strings within an argument list
1132- confused the parser
1133- lpd 1999-01-24 added a check for write errors on the output,
1134- suggested by Jim Meyering <meyering@ascend.com>
1135- lpd 1998-11-09 added further hack to recognize identifier(void)
1136- as being a procedure
1137- lpd 1998-10-23 added hack to recognize lines consisting of
1138- identifier1(identifier2) as *not* being procedures
1139- lpd 1997-12-08 made input_file optional; only closes input and/or
1140- output file if not stdin or stdout respectively; prints
1141- usage message on stderr rather than stdout; adds
1142- --filename switch (changes suggested by
1143- <ceder@lysator.liu.se>)
1144- lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
1145- compilers that don't understand void, as suggested by
1146- Tom Lane
1147- lpd 1996-01-15 changed to require that the first non-comment token
1148- on the line following a function header be a left brace,
1149- to reduce sensitivity to macros, as suggested by Tom Lane
1150- <tgl@sss.pgh.pa.us>
1151- lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
1152- undefined preprocessor symbols as 0; changed all #ifdefs
1153- for configuration symbols to #ifs
1154- lpd 1995-04-05 changed copyright notice to make it clear that
1155- including ansi2knr in a program does not bring the entire
1156- program under the GPL
1157- lpd 1994-12-18 added conditionals for systems where ctype macros
1158- don't handle 8-bit characters properly, suggested by
1159- Francois Pinard <pinard@iro.umontreal.ca>;
1160- removed --varargs switch (this is now the default)
1161- lpd 1994-10-10 removed CONFIG_BROKETS conditional
1162- lpd 1994-07-16 added some conditionals to help GNU `configure',
1163- suggested by Francois Pinard <pinard@iro.umontreal.ca>;
1164- properly erase prototype args in function parameters,
1165- contributed by Jim Avera <jima@netcom.com>;
1166- correct error in writeblanks (it shouldn't erase EOLs)
1167- lpd 1989-xx-xx original version
1168- */
1169-
1170-/* Most of the conditionals here are to make ansi2knr work with */
1171-/* or without the GNU configure machinery. */
1172-
1173-#if HAVE_CONFIG_H
1174-# include <config.h>
1175-#endif
1176-
1177-#include <stdio.h>
1178-#include <ctype.h>
1179-
1180-#if HAVE_CONFIG_H
1181-
1182-/*
1183- For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
1184- This will define HAVE_CONFIG_H and so, activate the following lines.
1185- */
1186-
1187-# if STDC_HEADERS || HAVE_STRING_H
1188-# include <string.h>
1189-# else
1190-# include <strings.h>
1191-# endif
1192-
1193-#else /* not HAVE_CONFIG_H */
1194-
1195-/* Otherwise do it the hard way */
1196-
1197-# ifdef BSD
1198-# include <strings.h>
1199-# else
1200-# ifdef VMS
1201- extern int strlen(), strncmp();
1202-# else
1203-# include <string.h>
1204-# endif
1205-# endif
1206-
1207-#endif /* not HAVE_CONFIG_H */
1208-
1209-#if STDC_HEADERS
1210-# include <stdlib.h>
1211-#else
1212-/*
1213- malloc and free should be declared in stdlib.h,
1214- but if you've got a K&R compiler, they probably aren't.
1215- */
1216-# ifdef MSDOS
1217-# include <malloc.h>
1218-# else
1219-# ifdef VMS
1220- extern char *malloc();
1221- extern void free();
1222-# else
1223- extern char *malloc();
1224- extern int free();
1225-# endif
1226-# endif
1227-
1228-#endif
1229-
1230-/* Define NULL (for *very* old compilers). */
1231-#ifndef NULL
1232-# define NULL (0)
1233-#endif
1234-
1235-/*
1236- * The ctype macros don't always handle 8-bit characters correctly.
1237- * Compensate for this here.
1238- */
1239-#ifdef isascii
1240-# undef HAVE_ISASCII /* just in case */
1241-# define HAVE_ISASCII 1
1242-#else
1243-#endif
1244-#if STDC_HEADERS || !HAVE_ISASCII
1245-# define is_ascii(c) 1
1246-#else
1247-# define is_ascii(c) isascii(c)
1248-#endif
1249-
1250-#define is_space(c) (is_ascii(c) && isspace(c))
1251-#define is_alpha(c) (is_ascii(c) && isalpha(c))
1252-#define is_alnum(c) (is_ascii(c) && isalnum(c))
1253-
1254-/* Scanning macros */
1255-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
1256-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
1257-
1258-/* Forward references */
1259-char *skipspace();
1260-char *scanstring();
1261-int writeblanks();
1262-int test1();
1263-int convert1();
1264-
1265-/* The main program */
1266-int
1267-main(argc, argv)
1268- int argc;
1269- char *argv[];
1270-{ FILE *in = stdin;
1271- FILE *out = stdout;
1272- char *filename = 0;
1273- char *program_name = argv[0];
1274- char *output_name = 0;
1275-#define bufsize 5000 /* arbitrary size */
1276- char *buf;
1277- char *line;
1278- char *more;
1279- char *usage =
1280- "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
1281- /*
1282- * In previous versions, ansi2knr recognized a --varargs switch.
1283- * If this switch was supplied, ansi2knr would attempt to convert
1284- * a ... argument to va_alist and va_dcl; if this switch was not
1285- * supplied, ansi2knr would simply drop any such arguments.
1286- * Now, ansi2knr always does this conversion, and we only
1287- * check for this switch for backward compatibility.
1288- */
1289- int convert_varargs = 1;
1290- int output_error;
1291-
1292- while ( argc > 1 && argv[1][0] == '-' ) {
1293- if ( !strcmp(argv[1], "--varargs") ) {
1294- convert_varargs = 1;
1295- argc--;
1296- argv++;
1297- continue;
1298- }
1299- if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
1300- filename = argv[2];
1301- argc -= 2;
1302- argv += 2;
1303- continue;
1304- }
1305- fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
1306- argv[1]);
1307- fprintf(stderr, usage);
1308- exit(1);
1309- }
1310- switch ( argc )
1311- {
1312- default:
1313- fprintf(stderr, usage);
1314- exit(0);
1315- case 3:
1316- output_name = argv[2];
1317- out = fopen(output_name, "w");
1318- if ( out == NULL ) {
1319- fprintf(stderr, "%s: Cannot open output file %s\n",
1320- program_name, output_name);
1321- exit(1);
1322- }
1323- /* falls through */
1324- case 2:
1325- in = fopen(argv[1], "r");
1326- if ( in == NULL ) {
1327- fprintf(stderr, "%s: Cannot open input file %s\n",
1328- program_name, argv[1]);
1329- exit(1);
1330- }
1331- if ( filename == 0 )
1332- filename = argv[1];
1333- /* falls through */
1334- case 1:
1335- break;
1336- }
1337- if ( filename )
1338- fprintf(out, "#line 1 \"%s\"\n", filename);
1339- buf = malloc(bufsize);
1340- if ( buf == NULL )
1341- {
1342- fprintf(stderr, "Unable to allocate read buffer!\n");
1343- exit(1);
1344- }
1345- line = buf;
1346- while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
1347- {
1348-test: line += strlen(line);
1349- switch ( test1(buf) )
1350- {
1351- case 2: /* a function header */
1352- convert1(buf, out, 1, convert_varargs);
1353- break;
1354- case 1: /* a function */
1355- /* Check for a { at the start of the next line. */
1356- more = ++line;
1357-f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
1358- goto wl;
1359- if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
1360- goto wl;
1361- switch ( *skipspace(more, 1) )
1362- {
1363- case '{':
1364- /* Definitely a function header. */
1365- convert1(buf, out, 0, convert_varargs);
1366- fputs(more, out);
1367- break;
1368- case 0:
1369- /* The next line was blank or a comment: */
1370- /* keep scanning for a non-comment. */
1371- line += strlen(line);
1372- goto f;
1373- default:
1374- /* buf isn't a function header, but */
1375- /* more might be. */
1376- fputs(buf, out);
1377- strcpy(buf, more);
1378- line = buf;
1379- goto test;
1380- }
1381- break;
1382- case -1: /* maybe the start of a function */
1383- if ( line != buf + (bufsize - 1) ) /* overflow check */
1384- continue;
1385- /* falls through */
1386- default: /* not a function */
1387-wl: fputs(buf, out);
1388- break;
1389- }
1390- line = buf;
1391- }
1392- if ( line != buf )
1393- fputs(buf, out);
1394- free(buf);
1395- if ( output_name ) {
1396- output_error = ferror(out);
1397- output_error |= fclose(out);
1398- } else { /* out == stdout */
1399- fflush(out);
1400- output_error = ferror(out);
1401- }
1402- if ( output_error ) {
1403- fprintf(stderr, "%s: error writing to %s\n", program_name,
1404- (output_name ? output_name : "stdout"));
1405- exit(1);
1406- }
1407- if ( in != stdin )
1408- fclose(in);
1409- return 0;
1410-}
1411-
1412-/* Skip over whitespace and comments, in either direction. */
1413-char *
1414-skipspace(p, dir)
1415- register char *p;
1416- register int dir; /* 1 for forward, -1 for backward */
1417-{ for ( ; ; )
1418- { while ( is_space(*p) )
1419- p += dir;
1420- if ( !(*p == '/' && p[dir] == '*') )
1421- break;
1422- p += dir; p += dir;
1423- while ( !(*p == '*' && p[dir] == '/') )
1424- { if ( *p == 0 )
1425- return p; /* multi-line comment?? */
1426- p += dir;
1427- }
1428- p += dir; p += dir;
1429- }
1430- return p;
1431-}
1432-
1433-/* Scan over a quoted string, in either direction. */
1434-char *
1435-scanstring(p, dir)
1436- register char *p;
1437- register int dir;
1438-{
1439- for (p += dir; ; p += dir)
1440- if (*p == '"' && p[-dir] != '\\')
1441- return p + dir;
1442-}
1443-
1444-/*
1445- * Write blanks over part of a string.
1446- * Don't overwrite end-of-line characters.
1447- */
1448-int
1449-writeblanks(start, end)
1450- char *start;
1451- char *end;
1452-{ char *p;
1453- for ( p = start; p < end; p++ )
1454- if ( *p != '\r' && *p != '\n' )
1455- *p = ' ';
1456- return 0;
1457-}
1458-
1459-/*
1460- * Test whether the string in buf is a function definition.
1461- * The string may contain and/or end with a newline.
1462- * Return as follows:
1463- * 0 - definitely not a function definition;
1464- * 1 - definitely a function definition;
1465- * 2 - definitely a function prototype (NOT USED);
1466- * -1 - may be the beginning of a function definition,
1467- * append another line and look again.
1468- * The reason we don't attempt to convert function prototypes is that
1469- * Ghostscript's declaration-generating macros look too much like
1470- * prototypes, and confuse the algorithms.
1471- */
1472-int
1473-test1(buf)
1474- char *buf;
1475-{ register char *p = buf;
1476- char *bend;
1477- char *endfn;
1478- int contin;
1479-
1480- if ( !isidfirstchar(*p) )
1481- return 0; /* no name at left margin */
1482- bend = skipspace(buf + strlen(buf) - 1, -1);
1483- switch ( *bend )
1484- {
1485- case ';': contin = 0 /*2*/; break;
1486- case ')': contin = 1; break;
1487- case '{': return 0; /* not a function */
1488- case '}': return 0; /* not a function */
1489- default: contin = -1;
1490- }
1491- while ( isidchar(*p) )
1492- p++;
1493- endfn = p;
1494- p = skipspace(p, 1);
1495- if ( *p++ != '(' )
1496- return 0; /* not a function */
1497- p = skipspace(p, 1);
1498- if ( *p == ')' )
1499- return 0; /* no parameters */
1500- /* Check that the apparent function name isn't a keyword. */
1501- /* We only need to check for keywords that could be followed */
1502- /* by a left parenthesis (which, unfortunately, is most of them). */
1503- { static char *words[] =
1504- { "asm", "auto", "case", "char", "const", "double",
1505- "extern", "float", "for", "if", "int", "long",
1506- "register", "return", "short", "signed", "sizeof",
1507- "static", "switch", "typedef", "unsigned",
1508- "void", "volatile", "while", 0
1509- };
1510- char **key = words;
1511- char *kp;
1512- unsigned len = endfn - buf;
1513-
1514- while ( (kp = *key) != 0 )
1515- { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
1516- return 0; /* name is a keyword */
1517- key++;
1518- }
1519- }
1520- {
1521- char *id = p;
1522- int len;
1523- /*
1524- * Check for identifier1(identifier2) and not
1525- * identifier1(void), or identifier1(identifier2, xxxx).
1526- */
1527-
1528- while ( isidchar(*p) )
1529- p++;
1530- len = p - id;
1531- p = skipspace(p, 1);
1532- if (*p == ',' ||
1533- (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
1534- )
1535- return 0; /* not a function */
1536- }
1537- /*
1538- * If the last significant character was a ), we need to count
1539- * parentheses, because it might be part of a formal parameter
1540- * that is a procedure.
1541- */
1542- if (contin > 0) {
1543- int level = 0;
1544-
1545- for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
1546- level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
1547- if (level > 0)
1548- contin = -1;
1549- }
1550- return contin;
1551-}
1552-
1553-/* Convert a recognized function definition or header to K&R syntax. */
1554-int
1555-convert1(buf, out, header, convert_varargs)
1556- char *buf;
1557- FILE *out;
1558- int header; /* Boolean */
1559- int convert_varargs; /* Boolean */
1560-{ char *endfn;
1561- register char *p;
1562- /*
1563- * The breaks table contains pointers to the beginning and end
1564- * of each argument.
1565- */
1566- char **breaks;
1567- unsigned num_breaks = 2; /* for testing */
1568- char **btop;
1569- char **bp;
1570- char **ap;
1571- char *vararg = 0;
1572-
1573- /* Pre-ANSI implementations don't agree on whether strchr */
1574- /* is called strchr or index, so we open-code it here. */
1575- for ( endfn = buf; *(endfn++) != '('; )
1576- ;
1577-top: p = endfn;
1578- breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
1579- if ( breaks == NULL )
1580- { /* Couldn't allocate break table, give up */
1581- fprintf(stderr, "Unable to allocate break table!\n");
1582- fputs(buf, out);
1583- return -1;
1584- }
1585- btop = breaks + num_breaks * 2 - 2;
1586- bp = breaks;
1587- /* Parse the argument list */
1588- do
1589- { int level = 0;
1590- char *lp = NULL;
1591- char *rp = NULL;
1592- char *end = NULL;
1593-
1594- if ( bp >= btop )
1595- { /* Filled up break table. */
1596- /* Allocate a bigger one and start over. */
1597- free((char *)breaks);
1598- num_breaks <<= 1;
1599- goto top;
1600- }
1601- *bp++ = p;
1602- /* Find the end of the argument */
1603- for ( ; end == NULL; p++ )
1604- { switch(*p)
1605- {
1606- case ',':
1607- if ( !level ) end = p;
1608- break;
1609- case '(':
1610- if ( !level ) lp = p;
1611- level++;
1612- break;
1613- case ')':
1614- if ( --level < 0 ) end = p;
1615- else rp = p;
1616- break;
1617- case '/':
1618- if (p[1] == '*')
1619- p = skipspace(p, 1) - 1;
1620- break;
1621- case '"':
1622- p = scanstring(p, 1) - 1;
1623- break;
1624- default:
1625- ;
1626- }
1627- }
1628- /* Erase any embedded prototype parameters. */
1629- if ( lp && rp )
1630- writeblanks(lp + 1, rp);
1631- p--; /* back up over terminator */
1632- /* Find the name being declared. */
1633- /* This is complicated because of procedure and */
1634- /* array modifiers. */
1635- for ( ; ; )
1636- { p = skipspace(p - 1, -1);
1637- switch ( *p )
1638- {
1639- case ']': /* skip array dimension(s) */
1640- case ')': /* skip procedure args OR name */
1641- { int level = 1;
1642- while ( level )
1643- switch ( *--p )
1644- {
1645- case ']': case ')':
1646- level++;
1647- break;
1648- case '[': case '(':
1649- level--;
1650- break;
1651- case '/':
1652- if (p > buf && p[-1] == '*')
1653- p = skipspace(p, -1) + 1;
1654- break;
1655- case '"':
1656- p = scanstring(p, -1) + 1;
1657- break;
1658- default: ;
1659- }
1660- }
1661- if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
1662- { /* We found the name being declared */
1663- while ( !isidfirstchar(*p) )
1664- p = skipspace(p, 1) + 1;
1665- goto found;
1666- }
1667- break;
1668- default:
1669- goto found;
1670- }
1671- }
1672-found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
1673- { if ( convert_varargs )
1674- { *bp++ = "va_alist";
1675- vararg = p-2;
1676- }
1677- else
1678- { p++;
1679- if ( bp == breaks + 1 ) /* sole argument */
1680- writeblanks(breaks[0], p);
1681- else
1682- writeblanks(bp[-1] - 1, p);
1683- bp--;
1684- }
1685- }
1686- else
1687- { while ( isidchar(*p) ) p--;
1688- *bp++ = p+1;
1689- }
1690- p = end;
1691- }
1692- while ( *p++ == ',' );
1693- *bp = p;
1694- /* Make a special check for 'void' arglist */
1695- if ( bp == breaks+2 )
1696- { p = skipspace(breaks[0], 1);
1697- if ( !strncmp(p, "void", 4) )
1698- { p = skipspace(p+4, 1);
1699- if ( p == breaks[2] - 1 )
1700- { bp = breaks; /* yup, pretend arglist is empty */
1701- writeblanks(breaks[0], p + 1);
1702- }
1703- }
1704- }
1705- /* Put out the function name and left parenthesis. */
1706- p = buf;
1707- while ( p != endfn ) putc(*p, out), p++;
1708- /* Put out the declaration. */
1709- if ( header )
1710- { fputs(");", out);
1711- for ( p = breaks[0]; *p; p++ )
1712- if ( *p == '\r' || *p == '\n' )
1713- putc(*p, out);
1714- }
1715- else
1716- { for ( ap = breaks+1; ap < bp; ap += 2 )
1717- { p = *ap;
1718- while ( isidchar(*p) )
1719- putc(*p, out), p++;
1720- if ( ap < bp - 1 )
1721- fputs(", ", out);
1722- }
1723- fputs(") ", out);
1724- /* Put out the argument declarations */
1725- for ( ap = breaks+2; ap <= bp; ap += 2 )
1726- (*ap)[-1] = ';';
1727- if ( vararg != 0 )
1728- { *vararg = 0;
1729- fputs(breaks[0], out); /* any prior args */
1730- fputs("va_dcl", out); /* the final arg */
1731- fputs(bp[0], out);
1732- }
1733- else
1734- fputs(breaks[0], out);
1735- }
1736- free((char *)breaks);
1737- return 0;
1738-}
1739diff -urNd -urNd patch-2.5.4/argmatch.c patch-2.5.9/argmatch.c
1740--- patch-2.5.4/argmatch.c 1999-08-09 19:09:13.000000000 -0400
1741+++ patch-2.5.9/argmatch.c 2003-03-10 02:31:50.000000000 -0500
1742@@ -1,5 +1,7 @@
1743 /* argmatch.c -- find a match for a string in an array
1744- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
1745+
1746+ Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003 Free Software
1747+ Foundation, Inc.
1748
1749 This program is free software; you can redistribute it and/or modify
1750 it under the terms of the GNU General Public License as published by
1751@@ -18,26 +20,24 @@
1752 /* Written by David MacKenzie <djm@ai.mit.edu>
1753 Modified by Akim Demaille <demaille@inf.enst.fr> */
1754
1755+#if HAVE_CONFIG_H
1756+# include <config.h>
1757+#endif
1758+
1759+/* Specification. */
1760 #include "argmatch.h"
1761
1762 #include <stdio.h>
1763-#ifdef STDC_HEADERS
1764-# include <string.h>
1765-#endif
1766-
1767-#if HAVE_LOCALE_H
1768-# include <locale.h>
1769-#endif
1770+#include <stdlib.h>
1771+#include <string.h>
1772
1773-#if ENABLE_NLS
1774-# include <libintl.h>
1775-# define _(Text) gettext (Text)
1776-#else
1777-# define _(Text) Text
1778-#endif
1779+#include "gettext.h"
1780+#define _(msgid) gettext (msgid)
1781
1782 #include "error.h"
1783 #include "quotearg.h"
1784+#include "quote.h"
1785+#include "unlocked-io.h"
1786
1787 /* When reporting an invalid argument, show nonprinting characters
1788 by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
1789@@ -46,11 +46,7 @@
1790 # define ARGMATCH_QUOTING_STYLE locale_quoting_style
1791 #endif
1792
1793-/* The following test is to work around the gross typo in
1794- systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
1795- is defined to 0, not 1. */
1796-#if !EXIT_FAILURE
1797-# undef EXIT_FAILURE
1798+#ifndef EXIT_FAILURE
1799 # define EXIT_FAILURE 1
1800 #endif
1801
1802@@ -78,7 +74,6 @@
1803 null-terminated array ARGLIST, return the index in ARGLIST
1804 of the matched element, else -1 if it does not match any element
1805 or -2 if it is ambiguous (is a prefix of more than one element).
1806- If SENSITIVE, comparison is case sensitive.
1807
1808 If VALLIST is none null, use it to resolve ambiguities limited to
1809 synonyms, i.e., for
1810@@ -86,10 +81,9 @@
1811 "no", "nope" -> 1
1812 "y" is a valid argument, for `0', and "n" for `1'. */
1813
1814-static int
1815-__argmatch_internal (const char *arg, const char *const *arglist,
1816- const char *vallist, size_t valsize,
1817- int case_sensitive)
1818+int
1819+argmatch (const char *arg, const char *const *arglist,
1820+ const char *vallist, size_t valsize)
1821 {
1822 int i; /* Temporary index in ARGLIST. */
1823 size_t arglen; /* Length of ARG. */
1824@@ -101,9 +95,7 @@
1825 /* Test all elements for either exact match or abbreviated matches. */
1826 for (i = 0; arglist[i]; i++)
1827 {
1828- if (case_sensitive
1829- ? !strncmp (arglist[i], arg, arglen)
1830- : !strncasecmp (arglist[i], arg, arglen))
1831+ if (!strncmp (arglist[i], arg, arglen))
1832 {
1833 if (strlen (arglist[i]) == arglen)
1834 /* Exact match found. */
1835@@ -131,22 +123,6 @@
1836 return matchind;
1837 }
1838
1839-/* argmatch - case sensitive version */
1840-int
1841-argmatch (const char *arg, const char *const *arglist,
1842- const char *vallist, size_t valsize)
1843-{
1844- return __argmatch_internal (arg, arglist, vallist, valsize, 1);
1845-}
1846-
1847-/* argcasematch - case insensitive version */
1848-int
1849-argcasematch (const char *arg, const char *const *arglist,
1850- const char *vallist, size_t valsize)
1851-{
1852- return __argmatch_internal (arg, arglist, vallist, valsize, 0);
1853-}
1854-
1855 /* Error reporting for argmatch.
1856 CONTEXT is a description of the type of entity that was being matched.
1857 VALUE is the invalid value that was given.
1858@@ -156,10 +132,11 @@
1859 argmatch_invalid (const char *context, const char *value, int problem)
1860 {
1861 char const *format = (problem == -1
1862- ? _("invalid argument %s for `%s'")
1863- : _("ambiguous argument %s for `%s'"));
1864+ ? _("invalid argument %s for %s")
1865+ : _("ambiguous argument %s for %s"));
1866
1867- error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
1868+ error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
1869+ quote_n (1, context));
1870 }
1871
1872 /* List the valid arguments for argmatch.
1873@@ -200,12 +177,9 @@
1874 __xargmatch_internal (const char *context,
1875 const char *arg, const char *const *arglist,
1876 const char *vallist, size_t valsize,
1877- int case_sensitive,
1878 argmatch_exit_fn exit_fn)
1879 {
1880- int res = __argmatch_internal (arg, arglist,
1881- vallist, valsize,
1882- case_sensitive);
1883+ int res = argmatch (arg, arglist, vallist, valsize);
1884 if (res >= 0)
1885 /* Success. */
1886 return res;
1887@@ -291,12 +265,12 @@
1888 }
1889
1890 if ((cp = getenv ("VERSION_CONTROL")))
1891- backup_type = XARGCASEMATCH ("$VERSION_CONTROL", cp,
1892- backup_args, backup_vals);
1893+ backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
1894+ backup_args, backup_vals);
1895
1896 if (argc == 2)
1897- backup_type = XARGCASEMATCH (program_name, argv[1],
1898- backup_args, backup_vals);
1899+ backup_type = XARGMATCH (program_name, argv[1],
1900+ backup_args, backup_vals);
1901
1902 printf ("The version control is `%s'\n",
1903 ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
1904diff -urNd -urNd patch-2.5.4/argmatch.h patch-2.5.9/argmatch.h
1905--- patch-2.5.4/argmatch.h 1999-01-25 09:57:22.000000000 -0500
1906+++ patch-2.5.9/argmatch.h 2002-11-21 15:15:39.000000000 -0500
1907@@ -1,5 +1,5 @@
1908 /* argmatch.h -- definitions and prototypes for argmatch.c
1909- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
1910+ Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
1911
1912 This program is free software; you can redistribute it and/or modify
1913 it under the terms of the GNU General Public License as published by
1914@@ -21,109 +21,89 @@
1915 #ifndef ARGMATCH_H_
1916 # define ARGMATCH_H_ 1
1917
1918-# if HAVE_CONFIG_H
1919-# include <config.h>
1920-# endif
1921+# include <stddef.h>
1922
1923-# include <sys/types.h>
1924+# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
1925
1926-# ifndef PARAMS
1927-# if PROTOTYPES || (defined (__STDC__) && __STDC__)
1928-# define PARAMS(args) args
1929-# else
1930-# define PARAMS(args) ()
1931-# endif /* GCC. */
1932-# endif /* Not PARAMS. */
1933+# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
1934+ (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
1935
1936 /* Assert there are as many real arguments as there are values
1937- (argument list ends with a NULL guard). There is no execution
1938- cost, since it will be statically evalauted to `assert (0)' or
1939- `assert (1)'. Unfortunately there is no -Wassert-0. */
1940+ (argument list ends with a NULL guard). ARGMATCH_VERIFY is
1941+ preferred, since it is guaranteed to be checked at compile-time.
1942+ ARGMATCH_ASSERT is for backward compatibility only. */
1943
1944-# undef ARRAY_CARDINALITY
1945-# define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))
1946+# define ARGMATCH_VERIFY(Arglist, Vallist) \
1947+ struct argmatch_verify \
1948+ { \
1949+ char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
1950+ }
1951
1952-# define ARGMATCH_ASSERT(Arglist, Vallist) \
1953- assert (ARRAY_CARDINALITY ((Arglist)) == ARRAY_CARDINALITY ((Vallist)) + 1)
1954+# define ARGMATCH_ASSERT(Arglist, Vallist) \
1955+ assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
1956
1957 /* Return the index of the element of ARGLIST (NULL terminated) that
1958 matches with ARG. If VALLIST is not NULL, then use it to resolve
1959 false ambiguities (i.e., different matches of ARG but corresponding
1960 to the same values in VALLIST). */
1961
1962-int argmatch
1963- PARAMS ((const char *arg, const char *const *arglist,
1964- const char *vallist, size_t valsize));
1965-int argcasematch
1966- PARAMS ((const char *arg, const char *const *arglist,
1967- const char *vallist, size_t valsize));
1968+int argmatch (char const *arg, char const *const *arglist,
1969+ char const *vallist, size_t valsize);
1970
1971 # define ARGMATCH(Arg, Arglist, Vallist) \
1972- argmatch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1973-
1974-# define ARGCASEMATCH(Arg, Arglist, Vallist) \
1975- argcasematch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1976+ argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
1977
1978 /* xargmatch calls this function when it fails. This function should not
1979 return. By default, this is a function that calls ARGMATCH_DIE which
1980 in turn defaults to `exit (EXIT_FAILURE)'. */
1981-typedef void (*argmatch_exit_fn) PARAMS ((void));
1982+typedef void (*argmatch_exit_fn) (void);
1983 extern argmatch_exit_fn argmatch_die;
1984
1985 /* Report on stderr why argmatch failed. Report correct values. */
1986
1987-void argmatch_invalid
1988- PARAMS ((const char *context, const char *value, int problem));
1989+void argmatch_invalid (char const *context, char const *value, int problem);
1990
1991 /* Left for compatibility with the old name invalid_arg */
1992
1993 # define invalid_arg(Context, Value, Problem) \
1994- argmatch_invalid ((Context), (Value), (Problem))
1995+ argmatch_invalid (Context, Value, Problem)
1996
1997
1998
1999 /* Report on stderr the list of possible arguments. */
2000
2001-void argmatch_valid
2002- PARAMS ((const char *const *arglist,
2003- const char *vallist, size_t valsize));
2004+void argmatch_valid (char const *const *arglist,
2005+ char const *vallist, size_t valsize);
2006
2007 # define ARGMATCH_VALID(Arglist, Vallist) \
2008- argmatch_valid (Arglist, (const char *) Vallist, sizeof (*(Vallist)))
2009+ argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
2010
2011
2012
2013 /* Same as argmatch, but upon failure, reports a explanation on the
2014 failure, and exits using the function EXIT_FN. */
2015
2016-int __xargmatch_internal
2017- PARAMS ((const char *context,
2018- const char *arg, const char *const *arglist,
2019- const char *vallist, size_t valsize,
2020- int case_sensitive, argmatch_exit_fn exit_fn));
2021+int __xargmatch_internal (char const *context,
2022+ char const *arg, char const *const *arglist,
2023+ char const *vallist, size_t valsize,
2024+ argmatch_exit_fn exit_fn);
2025
2026 /* Programmer friendly interface to __xargmatch_internal. */
2027
2028-# define XARGMATCH(Context, Arg, Arglist, Vallist) \
2029- (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
2030- (const char *) (Vallist), \
2031- sizeof (*(Vallist)), \
2032- 1, argmatch_die)])
2033-
2034-# define XARGCASEMATCH(Context, Arg, Arglist, Vallist) \
2035- (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
2036- (const char *) (Vallist), \
2037- sizeof (*(Vallist)), \
2038- 0, argmatch_die)])
2039+# define XARGMATCH(Context, Arg, Arglist, Vallist) \
2040+ ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \
2041+ (char const *) (Vallist), \
2042+ sizeof *(Vallist), \
2043+ argmatch_die)])
2044
2045 /* Convert a value into a corresponding argument. */
2046
2047-const char *argmatch_to_argument
2048- PARAMS ((char const *value, const char *const *arglist,
2049- const char *vallist, size_t valsize));
2050+char const *argmatch_to_argument (char const *value,
2051+ char const *const *arglist,
2052+ char const *vallist, size_t valsize);
2053
2054 # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \
2055- argmatch_to_argument ((char const *) &(Value), (Arglist), \
2056- (const char *) (Vallist), sizeof (*(Vallist)))
2057+ argmatch_to_argument (Value, Arglist, \
2058+ (char const *) (Vallist), sizeof *(Vallist))
2059
2060 #endif /* ARGMATCH_H_ */
2061diff -urNd -urNd patch-2.5.4/backupfile.c patch-2.5.9/backupfile.c
2062--- patch-2.5.4/backupfile.c 1999-01-18 12:02:28.000000000 -0500
2063+++ patch-2.5.9/backupfile.c 2002-01-16 17:44:24.000000000 -0500
2064@@ -1,5 +1,6 @@
2065 /* backupfile.c -- make Emacs style backup file names
2066- Copyright (C) 1990-1997, 1998, 1999 Free Software Foundation, Inc.
2067+ Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
2068+ Foundation, Inc.
2069
2070 This program is free software; you can redistribute it and/or modify
2071 it under the terms of the GNU General Public License as published by
2072@@ -23,9 +24,6 @@
2073 # include <config.h>
2074 #endif
2075
2076-#include <argmatch.h>
2077-#include <backupfile.h>
2078-
2079 #include <stdio.h>
2080 #include <sys/types.h>
2081 #if HAVE_STRING_H
2082@@ -58,17 +56,23 @@
2083 # define CLOSEDIR(d) closedir (d)
2084 #endif
2085
2086-#if STDC_HEADERS
2087+#if HAVE_STDLIB_H
2088 # include <stdlib.h>
2089-#else
2090-char *malloc ();
2091 #endif
2092
2093 #ifndef HAVE_DECL_GETENV
2094+"this configure-time declaration test was not run"
2095+#endif
2096+#if !HAVE_DECL_GETENV
2097 char *getenv ();
2098 #endif
2099
2100-char *base_name PARAMS ((char const *));
2101+#ifndef HAVE_DECL_MALLOC
2102+"this configure-time declaration test was not run"
2103+#endif
2104+#if !HAVE_DECL_MALLOC
2105+char *malloc ();
2106+#endif
2107
2108 #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
2109 # define HAVE_DIR 1
2110@@ -91,10 +95,9 @@
2111 - Its arg may be any int or unsigned int; it need not be an unsigned char.
2112 - It's guaranteed to evaluate its argument exactly once.
2113 - It's typically faster.
2114- Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
2115- only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
2116- it's important to use the locale's definition of `digit' even when the
2117- host does not conform to Posix. */
2118+ POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
2119+ ISDIGIT_LOCALE unless it's important to use the locale's definition
2120+ of `digit' even when the host does not conform to POSIX. */
2121 #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
2122
2123 #if D_INO_IN_DIRENT
2124@@ -103,6 +106,10 @@
2125 # define REAL_DIR_ENTRY(dp) 1
2126 #endif
2127
2128+#include "argmatch.h"
2129+#include "backupfile.h"
2130+#include "dirname.h"
2131+
2132 /* The extension added to file names to produce a simple (as opposed
2133 to numbered) backup file name. */
2134 const char *simple_backup_suffix = "~";
2135@@ -129,29 +136,31 @@
2136 if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
2137 backup_suffix_size_max = numbered_suffix_size_max;
2138
2139- s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
2140+ s = malloc (file_len + 1
2141+ + backup_suffix_size_max + numbered_suffix_size_max);
2142 if (s)
2143 {
2144- strcpy (s, file);
2145-
2146 #if HAVE_DIR
2147 if (backup_type != simple)
2148 {
2149 int highest_backup;
2150- size_t dir_len = base_name (s) - s;
2151+ size_t dirlen = dir_len (file);
2152
2153- strcpy (s + dir_len, ".");
2154- highest_backup = max_backup_version (file + dir_len, s);
2155+ memcpy (s, file, dirlen);
2156+ if (dirlen == FILESYSTEM_PREFIX_LEN (file))
2157+ s[dirlen++] = '.';
2158+ s[dirlen] = '\0';
2159+ highest_backup = max_backup_version (base_name (file), s);
2160 if (! (backup_type == numbered_existing && highest_backup == 0))
2161 {
2162 char *numbered_suffix = s + (file_len + backup_suffix_size_max);
2163 sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
2164 suffix = numbered_suffix;
2165 }
2166- strcpy (s, file);
2167 }
2168 #endif /* HAVE_DIR */
2169
2170+ strcpy (s, file);
2171 addext (s, suffix, '~');
2172 }
2173 return s;
2174@@ -178,7 +187,7 @@
2175 return 0;
2176
2177 highest_version = 0;
2178- file_name_length = strlen (file);
2179+ file_name_length = base_len (file);
2180
2181 while ((dp = readdir (dirp)) != 0)
2182 {
2183diff -urNd -urNd patch-2.5.4/basename.c patch-2.5.9/basename.c
2184--- patch-2.5.4/basename.c 1999-03-18 11:56:34.000000000 -0500
2185+++ patch-2.5.9/basename.c 2001-05-12 11:39:45.000000000 -0400
2186@@ -1,5 +1,5 @@
2187 /* basename.c -- return the last element in a path
2188- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
2189+ Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
2190
2191 This program is free software; you can redistribute it and/or modify
2192 it under the terms of the GNU General Public License as published by
2193@@ -19,37 +19,61 @@
2194 # include <config.h>
2195 #endif
2196
2197-#ifndef FILESYSTEM_PREFIX_LEN
2198-# define FILESYSTEM_PREFIX_LEN(Filename) 0
2199-#endif
2200-
2201-#ifndef ISSLASH
2202-# define ISSLASH(C) ((C) == '/')
2203+#if STDC_HEADERS || HAVE_STRING_H
2204+# include <string.h>
2205 #endif
2206+#include "dirname.h"
2207
2208 /* In general, we can't use the builtin `basename' function if available,
2209 since it has different meanings in different environments.
2210 In some environments the builtin `basename' modifies its argument.
2211- If NAME is all slashes, be sure to return `/'. */
2212+
2213+ Return the address of the last file name component of NAME. If
2214+ NAME has no file name components because it is all slashes, return
2215+ NAME if it is empty, the address of its last slash otherwise. */
2216
2217 char *
2218 base_name (char const *name)
2219 {
2220- char const *base = name += FILESYSTEM_PREFIX_LEN (name);
2221- int all_slashes = 1;
2222+ char const *base = name + FILESYSTEM_PREFIX_LEN (name);
2223 char const *p;
2224
2225- for (p = name; *p; p++)
2226+ for (p = base; *p; p++)
2227 {
2228 if (ISSLASH (*p))
2229- base = p + 1;
2230- else
2231- all_slashes = 0;
2232- }
2233+ {
2234+ /* Treat multiple adjacent slashes like a single slash. */
2235+ do p++;
2236+ while (ISSLASH (*p));
2237
2238- /* If NAME is all slashes, arrange to return `/'. */
2239- if (*base == '\0' && ISSLASH (*name) && all_slashes)
2240- --base;
2241+ /* If the file name ends in slash, use the trailing slash as
2242+ the basename if no non-slashes have been found. */
2243+ if (! *p)
2244+ {
2245+ if (ISSLASH (*base))
2246+ base = p - 1;
2247+ break;
2248+ }
2249+
2250+ /* *P is a non-slash preceded by a slash. */
2251+ base = p;
2252+ }
2253+ }
2254
2255 return (char *) base;
2256 }
2257+
2258+/* Return the length of of the basename NAME. Typically NAME is the
2259+ value returned by base_name. Act like strlen (NAME), except omit
2260+ redundant trailing slashes. */
2261+
2262+size_t
2263+base_len (char const *name)
2264+{
2265+ size_t len;
2266+
2267+ for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
2268+ continue;
2269+
2270+ return len;
2271+}
2272diff -urNd -urNd patch-2.5.4/basename.h patch-2.5.9/basename.h
2273--- patch-2.5.4/basename.h 1999-07-07 14:06:40.000000000 -0400
2274+++ patch-2.5.9/basename.h 1969-12-31 19:00:00.000000000 -0500
2275@@ -1,9 +0,0 @@
2276-#ifndef PARAMS
2277-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
2278-# define PARAMS(Args) Args
2279-# else
2280-# define PARAMS(Args) ()
2281-# endif
2282-#endif
2283-
2284-char *base_name PARAMS ((char const *name));
2285diff -urNd -urNd patch-2.5.4/ChangeLog patch-2.5.9/ChangeLog
2286--- patch-2.5.4/ChangeLog 1999-08-30 02:38:49.000000000 -0400
2287+++ patch-2.5.9/ChangeLog 2003-05-20 12:16:31.000000000 -0400
2288@@ -1,3 +1,359 @@
2289+2003-05-20 Paul Eggert <eggert@twinsun.com>
2290+
2291+ * NEWS, configure.ac (AC_INIT): Version 2.5.9 released.
2292+
2293+ * Makefile.in (HDRS): Add gettext.h.
2294+
2295+ Use bool, not int, for booleans.
2296+
2297+ * pch.c (pch_says_nonexistent): Returns int, not bool.
2298+
2299+ * configure.ac: Add AM_STDBOOL_H.
2300+
2301+ * Makefile.in (MISC): Add stdbool.h.in.
2302+ (stdbool.h): New rule.
2303+ (ACINCLUDE_INPUTS): Add stdbool.m4.
2304+ (mostlyclean): Remove stdbool.h.
2305+ (COMMON): New macro; use it instead of common.h for dependencies.
2306+
2307+ * common.h: Include <stdbool.h>.
2308+ Remove TRUE, FALSE, bool. All uses changed to standard names.
2309+
2310+ * common.h (reverse, set_time, set_utc):
2311+ Use bool, not int, for booleans.
2312+ * pch.c (p_strip_trailing_cr, p_pass_comments_through,
2313+ prefix_components, pget_line, re_patch,
2314+ there_is_another_patch, intuit_diff_type, scan_linenum,
2315+ another_hunk, pget_line, pch_timestamp): Likewise.
2316+ * inp.h (ifetch): Likewise.
2317+ * util.c (move_file, version_controller, version_get, ok_to_reverse,
2318+ set_signals): Likewise.
2319+ * inp.c (report_revision, get_input_file, plan_a, plan_b, ifetch):
2320+ Likewise.
2321+ * util.h (ok_to_reverse, version_controller, version_get,
2322+ move_file, set_signals): Likewise.
2323+ * pch.h (another_hunk, pch_says_nonexistent, pch_timestamp):
2324+ Likewise.
2325+ * patch.c (struct outstate, numeric_string, make_backups,
2326+ backup_if_mismatch, remove_empty_files,
2327+ reverse_flag_specified, main, reinitialize_almost_everything,
2328+ get_some_switches, apply_hunk, init_output, copy_till):
2329+ Likewise.
2330+
2331+2003-05-18 Paul Eggert <eggert@twinsun.com>
2332+
2333+ * pch.c (p_pass_comments_through): New var.
2334+ (pget_line): Accept new arg for pass_comments_through.
2335+ All callers changed.
2336+ (there_is_another_patch): Do not suggest -p for ed diffs.
2337+ (intuit_diff_type): Check ed command for correct syntax.
2338+ Do not set p_strip_trailing_cr merely because a -p line contains a CR.
2339+ (get_ed_command_letter): New function.
2340+ (do_ed_script): Use it. Do not treat '#' data lines as comments in ed
2341+ scripts.
2342+
2343+ * util.c (move_file):
2344+ Don't assume that when 'rename(A,B)' succeeds then A no
2345+ longer exists. This is not true of POSIX 1003.1-2001 rename when A
2346+ and B are links to the same file.
2347+ (fetchname): Fix test for file names with internal spaces.
2348+
2349+ * version.c: Don't include patchlevel.h.
2350+ (version): Use PACKAGE_NAME and PACKAGE_VERSION instead of obsolete
2351+ PROGRAM_NAME and PATCH_VERSION.
2352+ (copyright_string): Bump to 2003.
2353+
2354+ * common.h (FILESYSTEM_PREFIX_LEN, ISSLASH):
2355+ Remove; now done by 'configure'.
2356+ (PROGRAM_NAME): Remove; now done by 'configure' as PACKAGE_NAME.
2357+
2358+ * patch.c: Do not include <exitfail.h>.
2359+ (main): Set xalloc_exit_failure, not exit_failure.
2360+ Add "&& !skip_rest_of_patch" when deciding to continue ed scripts.
2361+ (option_help): Use PACKAGE_BUGREPORT rather than hardcoding.
2362+
2363+ * configure.ac (AC_PREREQ): Bump to 2.57.
2364+ (AC_GNU_SOURCE): Add, early on.
2365+ (gl_BACKUPFILE, gl_DIRNAME, gl_ERROR, gl_FUNC_MEMCHR, gl_FUNC_RMDIR,
2366+ gl_GETOPT, gl_PREREQ_XMALLOC, gl_QUOTE, gl_QUOTEARG): Add.
2367+ (jm_PREREQ_ADDEXT): Add, with definition.
2368+ (jm_PREREQ_DIRNAME, jm_PREREQ_ERROR, jm_PREREQ_MEMCHR,
2369+ jm_PREREQ_QUOTEARG): Remove.
2370+ (AC_REPLACE_FUNCS): Remove memchr, rename, rmdir).
2371+ (jm_FUNC_GLIBC_UNLOCKED_IO, jm_AC_DOS): Add.
2372+ (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Do not call directly.
2373+ (AC_OUTPUT): Use new style, with AC_CONFIG_FILES.
2374+
2375+ Update to current CVS gnulib.
2376+
2377+ * exitfail.c, exitfail.h, patchlevel.h, rename.c, m4/c-bs-a.m4,
2378+ m4/jm-glibc-io.m4, m4/prereq.m4: Remove.
2379+ * m4/backupfile.m4, m4/dirname.m4, m4/dos.m4, m4/getopt.m4,
2380+ m4/memchr.m4, m4/onceonly.m4, m4/quote.m4, m4/quotearg.m4,
2381+ m4/rmdir.m4, m4/unlocked-io.m4, m4/xalloc.m4: New files.
2382+ * Makefile.in (LIBSRCS): Move error.c here from SRCS.
2383+ Remove rename.c.
2384+ (OBJS): Remove error.$(OBJEXT).
2385+ (HDRS): Remove exitfail.h, patchlevel.h.
2386+ (ACINCLUDE_INPUTS): Remove c-bs-a.m4, jm-glibc-io.m4, prereq.m4.
2387+ Add backupfile.m4, dirname.m4, dos.m4, getopt.m4, memchr.m4,
2388+ onceonly.m4, quote.m4, quotearg.m4, rmdir.m4, unlocked-io.m4,
2389+ xalloc.m4.
2390+ (patchlevel.h): Remove. All uses removed.
2391+ (argmatch.$(OBJEXT), error.$(OBJEXT), quotesys.$(OBJEXT)),
2392+ xmalloc.$(OBJEXT)): Depend on gettext.h.
2393+ (dirname.$(OBJEXT), quote.$(OBJEXT), strncasecmp.$(OBJEXT)): New rules.
2394+ (patch.$(OBJEXT), xmalloc.$(OBJEXT)): Remove exitfail.h.
2395+ (rename.$(OBJEXT)): Remove.
2396+ (version.$(OBJEXT)): Remove util.h.
2397+ (xmalloc.$(OBJEXT)): Add error.h.
2398+
2399+2002-11-23 Paul Eggert <eggert@twinsun.com>
2400+
2401+ * patch.c (main): Don't check for zero-sized file after 'ed'
2402+ when skipping patch. From Michael Fedrowitz.
2403+
2404+2002-06-03 Paul Eggert <eggert@twinsun.com>
2405+
2406+ * configure.ac (AC_OUTPUT): Use new form, with AC_CONFIG_FILES,
2407+ instead of obsolescent form. Patch from Art Haas.
2408+
2409+ * pch.c (intuit_diff_type): Do not warn about trailing white space
2410+ after Prereq: word. Bug reported by Mike Castle.
2411+
2412+2002-06-02 Paul Eggert <eggert@twinsun.com>
2413+
2414+ * NEWS, configure.ac (AC_INIT): Version 2.5.8 released.
2415+
2416+ * README: POSIX.2 -> POSIX.
2417+ * inp.c (report_revision): Don't modify 'revision', since
2418+ it gets freed later. Bug reported by Mike Castle.
2419+
2420+2002-05-30 Paul Eggert <eggert@twinsun.com>
2421+
2422+ * NEWS, configure.ac (AC_INIT): Version 2.5.7 released.
2423+
2424+ * Makefile.in (MISC): Remove README-alpha.
2425+ (patchlevel.h): Depend on configure, not configure.ac.
2426+
2427+ * INSTALL: Upgrade to Autoconf 2.53 version.
2428+
2429+2002-05-28 Paul Eggert <eggert@twinsun.com>
2430+
2431+ * patch.c (end_defined, apply_hunk): Output #endif without
2432+ the comment, as POSIX 1003.1-2001 requires.
2433+
2434+ * pch.c (there_is_another_patch): Flush stderr after perror.
2435+
2436+ * NEWS, configure.ac (AC_INIT): Version 2.5.6 released.
2437+
2438+ * strcasecmp.c, strncasecmp.c: New files, taken from fileutils.
2439+ * config.guess, config.sub: Remove.
2440+ * Makefile.in (LIBSRCS): Add strcasecmp.c, strncasecmp.c.
2441+ (MISC): Remove config.guess, config.sub.
2442+
2443+ The code already assumes C89 or better, so remove K&R stuff.
2444+ * common.h (volatile): Remove.
2445+ (GENERIC_OBJECT): Remove; all uses changed to 'void'.
2446+ (PARAMS): Remove; all uses changed to prototypes.
2447+ * configure.ac (AC_PROG_CC_STDC): Add.
2448+ * util.c (vararg_start): Remove. All uses changed to va_start.
2449+ Always include <stdarg.h>.
2450+
2451+ * configure.ac (AC_CANONICAL_HOST): Remove.
2452+ (AC_REPLACE_FUNCS): Add strncasecmp.
2453+ (AC_CHECK_DECLS): Add mktemp.
2454+
2455+ * patch.c (main): Remove useless prototype decl.
2456+ (mktemp): Don't declare if HAVE_DECL_MKTEMP || defined mktemp.
2457+ (make_temp): Now accepts char, not int.
2458+
2459+2002-05-26 Paul Eggert <eggert@twinsun.com>
2460+
2461+ * patch.c (not_defined): Prepend newline. All uses changed.
2462+ (apply_hunk): Fix bug: -D was outputting #ifdef when it should
2463+ have been outputting #ifndef. Bug report and partial fix by
2464+ Jason Short.
2465+
2466+ * pch.c (intuit_diff_type): When reading an ed diff, don't use
2467+ indent and trailing-CR-ness of "." line; instead, use that of the
2468+ command. Bug reported by Anthony Towns; partial fix by Michael
2469+ Fedrowitz.
2470+ (intuit_diff_type): If the index line exists, don't report a
2471+ missing header. Fix by Chip Salzenberg.
2472+
2473+2002-05-26 Alessandro Rubini <rubini@gnu.org>
2474+
2475+ * patch.c (locate_hunk): Fixed updating of last_offset.
2476+
2477+2002-05-25 Paul Eggert <eggert@twinsun.com>
2478+
2479+ * NEWS, README: Diffutils doc is up to date now.
2480+ Bug reporting address is now <bug-patch@gnu.org>.
2481+ * README: Describe '--disable-largefile'.
2482+
2483+ * NEWS-alpha, dirname.c, dirname.h, exitfail.c, exitfail.h,
2484+ quote.c, quote.h, unlocked-io.h: New files, taken from diffutils
2485+ and fileutils.
2486+
2487+ * argmatch.c: [STDC_HEADERS]: Include stdlib.h, for 'exit'.
2488+
2489+ * addext.c, argmatch.c, argmatch.h, backupfile.c, basename.c:
2490+ Update from diffutils and fileutils.
2491+
2492+ * ansi2knr.1, ansi2knr.c: Remove.
2493+
2494+ * common.h: HAVE_SETMODE && O_BINARY -> HAVE_SETMODE_DOS.
2495+ * patch.c (usage): Likewise.
2496+ * pch.c (open_patch_file): Likewise.
2497+
2498+ * configure.ac: Renamed from configure.in. Add copyright notice.
2499+ (AC_PREREQ): Bump to 2.53.
2500+ (AC_INIT): Use 2.5x style.
2501+ (AC_CONFIG_SRCDIR): Add.
2502+ (PACKAGE, VERSION): Remove.
2503+ (AC_C_PROTOTYPES): Use this instead of AM_C_PROTOTYPES.
2504+ (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use this instead of jm_STRUCT_UTIMBUF.
2505+ (jm_PREREQ_ADDEXT, jm_PREREQ_DIRNAME, jm_PREREQ_ERROR,
2506+ jm_PREREQ_MEMCHR, jm_PREREQ_QUOTEARG): Add.
2507+ (AC_CHECK_DECLS): Add free, getenv, malloc.
2508+ (AC_CHECK_FUNCS): Remove setmode.
2509+ (AC_FUNC_SETMODE_DOS): Add.
2510+ (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use this instead of
2511+ jm_STRUCT_DIRENT_D_INO.
2512+
2513+ * Makefile.in (OBJEXT): New var.
2514+ (PACKAGE_NAME): Renamed from PACKAGE. All uses changed.
2515+ (PACKAGE_VERSION): Renamed from VERSION. All uses changed.
2516+ (U): Remove. All uses of "$U.o" changed to ".$(OBJEXT)".
2517+ (LIBSRCS): REmove getopt.c getopt1.c. Add mkdir.c, rmdir.c.
2518+ (SRCS): Add dirname.c, exitfail.c, getopt.c, getopt1.c, quote.c.
2519+ Remove mkdir.c.
2520+ (OBJS): Keep in sync with SRCS.
2521+ (HDRS): Remove basename.h.
2522+ Add dirname.h, exitfail.h, quote.h, unlocked-io.h.
2523+ (MISC, configure, config.hin, patchlevel.h):
2524+ configure.ac renamed from configure.in.
2525+ (MISC): Add README-alpha. Remove ansi2knr.1, ansi2knr.c.
2526+ (.c.$(OBJEXT)): Renamed from .c.o.
2527+ (ACINCLUDE_INPUTS): Add c-bs-a.m4, error.m4, jm-glibc-io.m4,
2528+ mbstate_t.m4, mkdir.m4, mbrtowc.m4, prereq.m4, setmode.m4.
2529+ Remove ccstdc.m4, inttypes_h.m4, largefile.m4, protos.m4.
2530+ (mostlyclean): Don't clean ansi2knr.
2531+ (ansi2knr.o, ansi2knr): Remove.
2532+ Redo dependencies.
2533+
2534+ * patch.c: Include <exitfail.h>.
2535+ (main): Initialize exit_failure.
2536+
2537+ * patch.man: Update copyright notice.
2538+
2539+ * pch.c, util.c: Include <dirname.h>, not <basename.h>.
2540+
2541+ * version.c (copyright_string): Update copyright notice.
2542+
2543+2002-02-17 Paul Eggert <eggert@twinsun.com>
2544+
2545+ * partime.c (parse_pattern_letter): Don't overrun buffer if it
2546+ contains only alphanumerics. Bug reported by Winni
2547+ <Winni470@gmx.net>.
2548+
2549+2001-07-28 Paul Eggert <eggert@sic.twinsun.com>
2550+
2551+ * util.c (fetchname), NEWS:
2552+ Allow file names with internal spaces, so long as they
2553+ don't contain tabs.
2554+
2555+ * pch.c (intuit_diff_type): Do not allow Prereq with multiple words.
2556+
2557+ * configure.in (AC_PREREQ): Bump to 2.50.
2558+ (AC_CHECK_FUNCS): Remove fseeko.
2559+ (AC_FUNC_FSEEKO): Add.
2560+ * Makefile.in (ACINCLUDE_INPUTS):
2561+ Remove largefile.m4; no longer needed with Autoconf 2.50.
2562+
2563+2001-02-07 "Tony E. Bennett" <tbennett@nvidia.com>
2564+
2565+ * util.c (PERFORCE_CO): New var.
2566+ (version_controller): Support Perforce.
2567+ * patch.man: Document this.
2568+
2569+2000-06-30 Paul Eggert <eggert@sic.twinsun.com>
2570+
2571+ * patch.man: Ignore comment lines.
2572+
2573+ * NEWS, pch.c: Ignore lines beginning with "#".
2574+
2575+1999-10-24 Paul Eggert <eggert@twinsun.com>
2576+
2577+ * pch.c (another_hunk): Report a fatal error if a regular
2578+ context hunk's pattern has a different number of unchanged
2579+ lines than the replacement.
2580+
2581+1999-10-18 Paul Eggert <eggert@twinsun.com>
2582+
2583+ * patch.c (main): If we skipped an ed patch, exit with nonzero status.
2584+
2585+1999-10-17 Paul Eggert <eggert@twinsun.com>
2586+
2587+ * patch.c (main): Apply do_ed_script even if dry_run, because
2588+ we need to make progress on the patch file.
2589+ * pch.c (do_ed_script): If skip_rest_of_patch is nonzero,
2590+ gobble up the patch without any other side effect.
2591+
2592+1999-10-12 Paul Eggert <eggert@twinsun.com>
2593+
2594+ * NEWS, README: New bug reporting address.
2595+ * NEWS: Report change in 2.5.4 that we forgot to document.
2596+ * README: Document `configure --disable-largefile'.
2597+
2598+ * basename.c, COPYING, getopt.c, getopt.h, getopt1.c, m4/largefile.m4:
2599+ Update to latest version.
2600+ * Makefile.in (basename$U.o): Depend on basename.h.
2601+ (config.hin): Depend on $(srcdir)/aclocal.m4.
2602+
2603+ * ansi2knr.c, maketime.c, mkinstalldirs, partime.c: Fix $Id.
2604+
2605+ FreeBSD has an unrelated setmode function; work around this.
2606+ * common.h (binary_transput): Don't declare unless O_BINARY.
2607+ * patch.c (option_help, get_some_switches):
2608+ Don't use setmode unless O_BINARY.
2609+ * pch.c (open_patch_file): Don't invoke setmode unless O_BINARY.
2610+
2611+ Fix incompatiblities with error.c.
2612+ * common.h (program_name): Now XTERN char *, for compatibility
2613+ with error.c. All uses changed.
2614+ (PROGRAM_NAME): New macro.
2615+ (PARAMS): Use ANSI C version only if defined PROTOTYPES
2616+ || (defined __STDC__ && __STDC__), for compatibilty with error.c.
2617+ * util.c (vararg_start): Likewise.
2618+ * patch.c (program_name): Remove.
2619+ (main): Initialize program_name.
2620+ * version.c (version): Print PROGRAM_NAME, not program_name.
2621+
2622+ Accommodate mingw32 port, which has one-argument mkdir (yuck!)
2623+ and no geteuid.
2624+ * m4/mkdir.m4: New file.
2625+ * Makefile.in (ACINCLUDE_INPUTS): Add $(M4DIR)/mkdir.m4.
2626+ * configure.in (AC_CHECK_FUNCS): Add geteuid, getuid.
2627+ (PATCH_FUNC_MKDIR_TAKES_ONE_ARG): Add.
2628+ * common.h (mkdir): Define if mkdir takes one arg.
2629+ (geteuid): New macro, if not already defined.
2630+
2631+1999-10-11 Christopher R. Gabriel <cgabriel@tin.it>
2632+
2633+ * patch.c (option_help): Updated bug report address
2634+ * configure.in (VERSION): Version 2.5.5 released.
2635+
2636+1999-09-01 Paul Eggert <eggert@twinsun.com>
2637+
2638+ * patch.c (main): Default simple_backup_suffix to ".orig".
2639+
2640+1999-10-08 Paul Eggert <eggert@twinsun.com>
2641+
2642+ * patch.man: Make it clear that `patch -o F' should not be
2643+ used if F is one of the files to be patched.
2644+
2645 1999-08-30 Paul Eggert <eggert@twinsun.com>
2646
2647 Version 2.5.4 fixes a few minor bugs, converts C sources to
2648@@ -1910,9 +2266,26 @@
2649
2650 1984-11-09 Larry Wall <sdcrdcf!lwall>
2651 * patch.c: Initial revision
2652-
2653-Local Variables:
2654-mode: indented-text
2655-left-margin: 8
2656-version-control: never
2657-end:
2658+
2659+
2660+Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall.
2661+
2662+Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
2663+2002 Free Software Foundation, Inc.
2664+
2665+This file is part of GNU Patch.
2666+
2667+This program is free software; you can redistribute it and/or modify
2668+it under the terms of the GNU General Public License as published by
2669+the Free Software Foundation; either version 2, or (at your option)
2670+any later version.
2671+
2672+This program is distributed in the hope that they will be useful,
2673+but WITHOUT ANY WARRANTY; without even the implied warranty of
2674+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2675+GNU General Public License for more details.
2676+
2677+You should have received a copy of the GNU General Public License
2678+along with this program; see the file COPYING. If not, write to
2679+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2680+Boston, MA 02111-1307, USA.
2681diff -urNd -urNd patch-2.5.4/common.h patch-2.5.9/common.h
2682--- patch-2.5.4/common.h 1999-08-30 02:20:08.000000000 -0400
2683+++ patch-2.5.9/common.h 2003-05-19 02:57:36.000000000 -0400
2684@@ -1,9 +1,11 @@
2685 /* common definitions for `patch' */
2686
2687-/* $Id: common.h,v 1.20 1999/08/30 06:20:08 eggert Exp $ */
2688+/* $Id: common.h,v 1.34 2003/05/19 06:57:36 eggert Exp $ */
2689
2690-/* Copyright 1986, 1988 Larry Wall
2691- Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
2692+/* Copyright (C) 1986, 1988 Larry Wall
2693+
2694+ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
2695+ Free Software Foundation, Inc.
2696
2697 This program is free software; you can redistribute it and/or modify
2698 it under the terms of the GNU General Public License as published by
2699@@ -24,17 +26,10 @@
2700 #define DEBUGGING 1
2701 #endif
2702
2703-/* We must define `volatile' and `const' first (the latter inside config.h),
2704- so that they're used consistently in all system includes. */
2705-#ifndef __STDC__
2706-# ifndef volatile
2707-# define volatile
2708-# endif
2709-#endif
2710-
2711 #include <config.h>
2712
2713 #include <assert.h>
2714+#include <stdbool.h>
2715 #include <stdio.h>
2716 #include <sys/types.h>
2717 #include <time.h>
2718@@ -73,6 +68,9 @@
2719 #ifndef S_IRUSR
2720 #define S_IRUSR (S_IROTH << 6)
2721 #endif
2722+#ifdef MKDIR_TAKES_ONE_ARG
2723+# define mkdir(name, mode) ((mkdir) (name))
2724+#endif
2725
2726 #if HAVE_LIMITS_H
2727 # include <limits.h>
2728@@ -123,27 +121,6 @@
2729 #endif
2730
2731
2732-#ifndef FILESYSTEM_PREFIX_LEN
2733-#define FILESYSTEM_PREFIX_LEN(f) 0
2734-#endif
2735-
2736-#ifndef ISSLASH
2737-#define ISSLASH(c) ((c) == '/')
2738-#endif
2739-
2740-
2741-/* constants */
2742-
2743-/* AIX predefines these. */
2744-#ifdef TRUE
2745-#undef TRUE
2746-#endif
2747-#ifdef FALSE
2748-#undef FALSE
2749-#endif
2750-#define TRUE 1
2751-#define FALSE 0
2752-
2753 /* handy definitions */
2754
2755 #define strEQ(s1,s2) (!strcmp(s1, s2))
2756@@ -151,12 +128,11 @@
2757
2758 /* typedefs */
2759
2760-typedef int bool; /* must promote to itself */
2761 typedef off_t LINENUM; /* must be signed */
2762
2763 /* globals */
2764
2765-extern char const program_name[];
2766+XTERN char *program_name; /* The name this program was run with. */
2767
2768 XTERN char *buf; /* general purpose buffer */
2769 XTERN size_t bufsize; /* allocated size of buf */
2770@@ -190,14 +166,14 @@
2771 XTERN bool force;
2772 XTERN bool batch;
2773 XTERN bool noreverse;
2774-XTERN int reverse;
2775+XTERN bool reverse;
2776 XTERN enum { DEFAULT_VERBOSITY, SILENT, VERBOSE } verbosity;
2777 XTERN bool skip_rest_of_patch;
2778 XTERN int strippath;
2779 XTERN bool canonicalize;
2780 XTERN int patch_get;
2781-XTERN int set_time;
2782-XTERN int set_utc;
2783+XTERN bool set_time;
2784+XTERN bool set_utc;
2785
2786 enum diff
2787 {
2788@@ -213,25 +189,11 @@
2789
2790 XTERN char *revision; /* prerequisite revision, if any */
2791
2792-#ifdef __STDC__
2793-# define GENERIC_OBJECT void
2794-#else
2795-# define GENERIC_OBJECT char
2796-#endif
2797-
2798 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
2799 # define __attribute__(x)
2800 #endif
2801
2802-#ifndef PARAMS
2803-# ifdef __STDC__
2804-# define PARAMS(args) args
2805-# else
2806-# define PARAMS(args) ()
2807-# endif
2808-#endif
2809-
2810-void fatal_exit PARAMS ((int)) __attribute__ ((noreturn));
2811+void fatal_exit (int) __attribute__ ((noreturn));
2812
2813 #include <errno.h>
2814 #if !STDC_HEADERS && !defined errno
2815@@ -244,7 +206,7 @@
2816 # if !HAVE_MEMCHR
2817 # define memcmp(s1, s2, n) bcmp (s1, s2, n)
2818 # define memcpy(d, s, n) bcopy (s, d, n)
2819-GENERIC_OBJECT *memchr ();
2820+void *memchr ();
2821 # endif
2822 #endif
2823
2824@@ -252,8 +214,8 @@
2825 # include <stdlib.h>
2826 #else
2827 char *getenv ();
2828-GENERIC_OBJECT *malloc ();
2829-GENERIC_OBJECT *realloc ();
2830+void *malloc ();
2831+void *realloc ();
2832 #endif
2833
2834 #if HAVE_UNISTD_H
2835@@ -284,6 +246,13 @@
2836 # define file_seek fseek
2837 # define file_tell ftell
2838 #endif
2839+#if ! (HAVE_GETEUID || defined geteuid)
2840+# if ! (HAVE_GETUID || defined getuid)
2841+# define geteuid() (-1)
2842+# else
2843+# define geteuid() getuid ()
2844+# endif
2845+#endif
2846
2847 #if HAVE_FCNTL_H
2848 # include <fcntl.h>
2849@@ -313,7 +282,7 @@
2850 #define O_TRUNC 0
2851 #endif
2852
2853-#if HAVE_SETMODE
2854+#if HAVE_SETMODE_DOS
2855 XTERN int binary_transput; /* O_BINARY if binary i/o is desired */
2856 #else
2857 # define binary_transput 0
2858diff -urNd -urNd patch-2.5.4/config.guess patch-2.5.9/config.guess
2859--- patch-2.5.4/config.guess 1999-08-05 08:55:17.000000000 -0400
2860+++ patch-2.5.9/config.guess 1969-12-31 19:00:00.000000000 -0500
2861@@ -1,1088 +0,0 @@
2862-#! /bin/sh
2863-# Attempt to guess a canonical system name.
2864-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
2865-# Free Software Foundation, Inc.
2866-#
2867-# This file is free software; you can redistribute it and/or modify it
2868-# under the terms of the GNU General Public License as published by
2869-# the Free Software Foundation; either version 2 of the License, or
2870-# (at your option) any later version.
2871-#
2872-# This program is distributed in the hope that it will be useful, but
2873-# WITHOUT ANY WARRANTY; without even the implied warranty of
2874-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2875-# General Public License for more details.
2876-#
2877-# You should have received a copy of the GNU General Public License
2878-# along with this program; if not, write to the Free Software
2879-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2880-#
2881-# As a special exception to the GNU General Public License, if you
2882-# distribute this file as part of a program that contains a
2883-# configuration script generated by Autoconf, you may include it under
2884-# the same distribution terms that you use for the rest of that program.
2885-
2886-# Written by Per Bothner <bothner@cygnus.com>.
2887-# The master version of this file is at the FSF in /home/gd/gnu/lib.
2888-# Please send patches to <autoconf-patches@gnu.org>.
2889-#
2890-# This script attempts to guess a canonical system name similar to
2891-# config.sub. If it succeeds, it prints the system name on stdout, and
2892-# exits with 0. Otherwise, it exits with 1.
2893-#
2894-# The plan is that this can be called by configure scripts if you
2895-# don't specify an explicit system type (host/target name).
2896-#
2897-# Only a few systems have been added to this list; please add others
2898-# (but try to keep the structure clean).
2899-#
2900-
2901-# Use $HOST_CC if defined. $CC may point to a cross-compiler
2902-if test x"$CC_FOR_BUILD" = x; then
2903- if test x"$HOST_CC" != x; then
2904- CC_FOR_BUILD="$HOST_CC"
2905- else
2906- if test x"$CC" != x; then
2907- CC_FOR_BUILD="$CC"
2908- else
2909- CC_FOR_BUILD=cc
2910- fi
2911- fi
2912-fi
2913-
2914-
2915-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
2916-# (ghazi@noc.rutgers.edu 8/24/94.)
2917-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
2918- PATH=$PATH:/.attbin ; export PATH
2919-fi
2920-
2921-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
2922-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
2923-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
2924-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
2925-
2926-dummy=dummy-$$
2927-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
2928-
2929-# Note: order is significant - the case branches are not exclusive.
2930-
2931-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
2932- alpha:OSF1:*:*)
2933- if test $UNAME_RELEASE = "V4.0"; then
2934- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2935- fi
2936- # A Vn.n version is a released version.
2937- # A Tn.n version is a released field test version.
2938- # A Xn.n version is an unreleased experimental baselevel.
2939- # 1.2 uses "1.2" for uname -r.
2940- cat <<EOF >$dummy.s
2941- .globl main
2942- .ent main
2943-main:
2944- .frame \$30,0,\$26,0
2945- .prologue 0
2946- .long 0x47e03d80 # implver $0
2947- lda \$2,259
2948- .long 0x47e20c21 # amask $2,$1
2949- srl \$1,8,\$2
2950- sll \$2,2,\$2
2951- sll \$0,3,\$0
2952- addl \$1,\$0,\$0
2953- addl \$2,\$0,\$0
2954- ret \$31,(\$26),1
2955- .end main
2956-EOF
2957- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
2958- if test "$?" = 0 ; then
2959- ./$dummy
2960- case "$?" in
2961- 7)
2962- UNAME_MACHINE="alpha"
2963- ;;
2964- 15)
2965- UNAME_MACHINE="alphaev5"
2966- ;;
2967- 14)
2968- UNAME_MACHINE="alphaev56"
2969- ;;
2970- 10)
2971- UNAME_MACHINE="alphapca56"
2972- ;;
2973- 16)
2974- UNAME_MACHINE="alphaev6"
2975- ;;
2976- esac
2977- fi
2978- rm -f $dummy.s $dummy
2979- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2980- exit 0 ;;
2981- Alpha\ *:Windows_NT*:*)
2982- # How do we know it's Interix rather than the generic POSIX subsystem?
2983- # Should we change UNAME_MACHINE based on the output of uname instead
2984- # of the specific Alpha model?
2985- echo alpha-pc-interix
2986- exit 0 ;;
2987- 21064:Windows_NT:50:3)
2988- echo alpha-dec-winnt3.5
2989- exit 0 ;;
2990- Amiga*:UNIX_System_V:4.0:*)
2991- echo m68k-cbm-sysv4
2992- exit 0;;
2993- amiga:NetBSD:*:*)
2994- echo m68k-cbm-netbsd${UNAME_RELEASE}
2995- exit 0 ;;
2996- amiga:OpenBSD:*:*)
2997- echo m68k-unknown-openbsd${UNAME_RELEASE}
2998- exit 0 ;;
2999- *:[Aa]miga[Oo][Ss]:*:*)
3000- echo ${UNAME_MACHINE}-unknown-amigaos
3001- exit 0 ;;
3002- arc64:OpenBSD:*:*)
3003- echo mips64el-unknown-openbsd${UNAME_RELEASE}
3004- exit 0 ;;
3005- arc:OpenBSD:*:*)
3006- echo mipsel-unknown-openbsd${UNAME_RELEASE}
3007- exit 0 ;;
3008- hkmips:OpenBSD:*:*)
3009- echo mips-unknown-openbsd${UNAME_RELEASE}
3010- exit 0 ;;
3011- pmax:OpenBSD:*:*)
3012- echo mipsel-unknown-openbsd${UNAME_RELEASE}
3013- exit 0 ;;
3014- sgi:OpenBSD:*:*)
3015- echo mips-unknown-openbsd${UNAME_RELEASE}
3016- exit 0 ;;
3017- wgrisc:OpenBSD:*:*)
3018- echo mipsel-unknown-openbsd${UNAME_RELEASE}
3019- exit 0 ;;
3020- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3021- echo arm-acorn-riscix${UNAME_RELEASE}
3022- exit 0;;
3023- arm32:NetBSD:*:*)
3024- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3025- exit 0 ;;
3026- SR2?01:HI-UX/MPP:*:*)
3027- echo hppa1.1-hitachi-hiuxmpp
3028- exit 0;;
3029- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3030- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3031- if test "`(/bin/universe) 2>/dev/null`" = att ; then
3032- echo pyramid-pyramid-sysv3
3033- else
3034- echo pyramid-pyramid-bsd
3035- fi
3036- exit 0 ;;
3037- NILE*:*:*:dcosx)
3038- echo pyramid-pyramid-svr4
3039- exit 0 ;;
3040- sun4H:SunOS:5.*:*)
3041- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3042- exit 0 ;;
3043- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3044- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3045- exit 0 ;;
3046- i86pc:SunOS:5.*:*)
3047- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3048- exit 0 ;;
3049- sun4*:SunOS:6*:*)
3050- # According to config.sub, this is the proper way to canonicalize
3051- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
3052- # it's likely to be more like Solaris than SunOS4.
3053- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3054- exit 0 ;;
3055- sun4*:SunOS:*:*)
3056- case "`/usr/bin/arch -k`" in
3057- Series*|S4*)
3058- UNAME_RELEASE=`uname -v`
3059- ;;
3060- esac
3061- # Japanese Language versions have a version number like `4.1.3-JL'.
3062- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3063- exit 0 ;;
3064- sun3*:SunOS:*:*)
3065- echo m68k-sun-sunos${UNAME_RELEASE}
3066- exit 0 ;;
3067- sun*:*:4.2BSD:*)
3068- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3069- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3070- case "`/bin/arch`" in
3071- sun3)
3072- echo m68k-sun-sunos${UNAME_RELEASE}
3073- ;;
3074- sun4)
3075- echo sparc-sun-sunos${UNAME_RELEASE}
3076- ;;
3077- esac
3078- exit 0 ;;
3079- aushp:SunOS:*:*)
3080- echo sparc-auspex-sunos${UNAME_RELEASE}
3081- exit 0 ;;
3082- atari*:NetBSD:*:*)
3083- echo m68k-atari-netbsd${UNAME_RELEASE}
3084- exit 0 ;;
3085- atari*:OpenBSD:*:*)
3086- echo m68k-unknown-openbsd${UNAME_RELEASE}
3087- exit 0 ;;
3088- # The situation for MiNT is a little confusing. The machine name
3089- # can be virtually everything (everything which is not
3090- # "atarist" or "atariste" at least should have a processor
3091- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
3092- # to the lowercase version "mint" (or "freemint"). Finally
3093- # the system name "TOS" denotes a system which is actually not
3094- # MiNT. But MiNT is downward compatible to TOS, so this should
3095- # be no problem.
3096- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3097- echo m68k-atari-mint${UNAME_RELEASE}
3098- exit 0 ;;
3099- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
3100- echo m68k-atari-mint${UNAME_RELEASE}
3101- exit 0 ;;
3102- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
3103- echo m68k-atari-mint${UNAME_RELEASE}
3104- exit 0 ;;
3105- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
3106- echo m68k-milan-mint${UNAME_RELEASE}
3107- exit 0 ;;
3108- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
3109- echo m68k-hades-mint${UNAME_RELEASE}
3110- exit 0 ;;
3111- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
3112- echo m68k-unknown-mint${UNAME_RELEASE}
3113- exit 0 ;;
3114- sun3*:NetBSD:*:*)
3115- echo m68k-sun-netbsd${UNAME_RELEASE}
3116- exit 0 ;;
3117- sun3*:OpenBSD:*:*)
3118- echo m68k-unknown-openbsd${UNAME_RELEASE}
3119- exit 0 ;;
3120- mac68k:NetBSD:*:*)
3121- echo m68k-apple-netbsd${UNAME_RELEASE}
3122- exit 0 ;;
3123- mac68k:OpenBSD:*:*)
3124- echo m68k-unknown-openbsd${UNAME_RELEASE}
3125- exit 0 ;;
3126- mvme68k:OpenBSD:*:*)
3127- echo m68k-unknown-openbsd${UNAME_RELEASE}
3128- exit 0 ;;
3129- mvme88k:OpenBSD:*:*)
3130- echo m88k-unknown-openbsd${UNAME_RELEASE}
3131- exit 0 ;;
3132- powerpc:machten:*:*)
3133- echo powerpc-apple-machten${UNAME_RELEASE}
3134- exit 0 ;;
3135- macppc:NetBSD:*:*)
3136- echo powerpc-apple-netbsd${UNAME_RELEASE}
3137- exit 0 ;;
3138- RISC*:Mach:*:*)
3139- echo mips-dec-mach_bsd4.3
3140- exit 0 ;;
3141- RISC*:ULTRIX:*:*)
3142- echo mips-dec-ultrix${UNAME_RELEASE}
3143- exit 0 ;;
3144- VAX*:ULTRIX*:*:*)
3145- echo vax-dec-ultrix${UNAME_RELEASE}
3146- exit 0 ;;
3147- 2020:CLIX:*:* | 2430:CLIX:*:*)
3148- echo clipper-intergraph-clix${UNAME_RELEASE}
3149- exit 0 ;;
3150- mips:*:*:UMIPS | mips:*:*:RISCos)
3151- sed 's/^ //' << EOF >$dummy.c
3152-#ifdef __cplusplus
3153- int main (int argc, char *argv[]) {
3154-#else
3155- int main (argc, argv) int argc; char *argv[]; {
3156-#endif
3157- #if defined (host_mips) && defined (MIPSEB)
3158- #if defined (SYSTYPE_SYSV)
3159- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
3160- #endif
3161- #if defined (SYSTYPE_SVR4)
3162- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
3163- #endif
3164- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
3165- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
3166- #endif
3167- #endif
3168- exit (-1);
3169- }
3170-EOF
3171- $CC_FOR_BUILD $dummy.c -o $dummy \
3172- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
3173- && rm $dummy.c $dummy && exit 0
3174- rm -f $dummy.c $dummy
3175- echo mips-mips-riscos${UNAME_RELEASE}
3176- exit 0 ;;
3177- Night_Hawk:Power_UNIX:*:*)
3178- echo powerpc-harris-powerunix
3179- exit 0 ;;
3180- m88k:CX/UX:7*:*)
3181- echo m88k-harris-cxux7
3182- exit 0 ;;
3183- m88k:*:4*:R4*)
3184- echo m88k-motorola-sysv4
3185- exit 0 ;;
3186- m88k:*:3*:R3*)
3187- echo m88k-motorola-sysv3
3188- exit 0 ;;
3189- AViiON:dgux:*:*)
3190- # DG/UX returns AViiON for all architectures
3191- UNAME_PROCESSOR=`/usr/bin/uname -p`
3192- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
3193- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
3194- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
3195- echo m88k-dg-dgux${UNAME_RELEASE}
3196- else
3197- echo m88k-dg-dguxbcs${UNAME_RELEASE}
3198- fi
3199- else echo i586-dg-dgux${UNAME_RELEASE}
3200- fi
3201- exit 0 ;;
3202- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
3203- echo m88k-dolphin-sysv3
3204- exit 0 ;;
3205- M88*:*:R3*:*)
3206- # Delta 88k system running SVR3
3207- echo m88k-motorola-sysv3
3208- exit 0 ;;
3209- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
3210- echo m88k-tektronix-sysv3
3211- exit 0 ;;
3212- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
3213- echo m68k-tektronix-bsd
3214- exit 0 ;;
3215- *:IRIX*:*:*)
3216- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
3217- exit 0 ;;
3218- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
3219- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
3220- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
3221- i?86:AIX:*:*)
3222- echo i386-ibm-aix
3223- exit 0 ;;
3224- *:AIX:2:3)
3225- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
3226- sed 's/^ //' << EOF >$dummy.c
3227- #include <sys/systemcfg.h>
3228-
3229- main()
3230- {
3231- if (!__power_pc())
3232- exit(1);
3233- puts("powerpc-ibm-aix3.2.5");
3234- exit(0);
3235- }
3236-EOF
3237- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
3238- rm -f $dummy.c $dummy
3239- echo rs6000-ibm-aix3.2.5
3240- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
3241- echo rs6000-ibm-aix3.2.4
3242- else
3243- echo rs6000-ibm-aix3.2
3244- fi
3245- exit 0 ;;
3246- *:AIX:*:4)
3247- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
3248- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
3249- IBM_ARCH=rs6000
3250- else
3251- IBM_ARCH=powerpc
3252- fi
3253- if [ -x /usr/bin/oslevel ] ; then
3254- IBM_REV=`/usr/bin/oslevel`
3255- else
3256- IBM_REV=4.${UNAME_RELEASE}
3257- fi
3258- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
3259- exit 0 ;;
3260- *:AIX:*:*)
3261- echo rs6000-ibm-aix
3262- exit 0 ;;
3263- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
3264- echo romp-ibm-bsd4.4
3265- exit 0 ;;
3266- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
3267- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
3268- exit 0 ;; # report: romp-ibm BSD 4.3
3269- *:BOSX:*:*)
3270- echo rs6000-bull-bosx
3271- exit 0 ;;
3272- DPX/2?00:B.O.S.:*:*)
3273- echo m68k-bull-sysv3
3274- exit 0 ;;
3275- 9000/[34]??:4.3bsd:1.*:*)
3276- echo m68k-hp-bsd
3277- exit 0 ;;
3278- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
3279- echo m68k-hp-bsd4.4
3280- exit 0 ;;
3281- 9000/[34678]??:HP-UX:*:*)
3282- case "${UNAME_MACHINE}" in
3283- 9000/31? ) HP_ARCH=m68000 ;;
3284- 9000/[34]?? ) HP_ARCH=m68k ;;
3285- 9000/[678][0-9][0-9])
3286- sed 's/^ //' << EOF >$dummy.c
3287- #include <stdlib.h>
3288- #include <unistd.h>
3289-
3290- int main ()
3291- {
3292- #if defined(_SC_KERNEL_BITS)
3293- long bits = sysconf(_SC_KERNEL_BITS);
3294- #endif
3295- long cpu = sysconf (_SC_CPU_VERSION);
3296-
3297- switch (cpu)
3298- {
3299- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
3300- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
3301- case CPU_PA_RISC2_0:
3302- #if defined(_SC_KERNEL_BITS)
3303- switch (bits)
3304- {
3305- case 64: puts ("hppa2.0w"); break;
3306- case 32: puts ("hppa2.0n"); break;
3307- default: puts ("hppa2.0"); break;
3308- } break;
3309- #else /* !defined(_SC_KERNEL_BITS) */
3310- puts ("hppa2.0"); break;
3311- #endif
3312- default: puts ("hppa1.0"); break;
3313- }
3314- exit (0);
3315- }
3316-EOF
3317- ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
3318- rm -f $dummy.c $dummy
3319- esac
3320- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
3321- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
3322- exit 0 ;;
3323- 3050*:HI-UX:*:*)
3324- sed 's/^ //' << EOF >$dummy.c
3325- #include <unistd.h>
3326- int
3327- main ()
3328- {
3329- long cpu = sysconf (_SC_CPU_VERSION);
3330- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
3331- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
3332- results, however. */
3333- if (CPU_IS_PA_RISC (cpu))
3334- {
3335- switch (cpu)
3336- {
3337- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
3338- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
3339- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
3340- default: puts ("hppa-hitachi-hiuxwe2"); break;
3341- }
3342- }
3343- else if (CPU_IS_HP_MC68K (cpu))
3344- puts ("m68k-hitachi-hiuxwe2");
3345- else puts ("unknown-hitachi-hiuxwe2");
3346- exit (0);
3347- }
3348-EOF
3349- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
3350- rm -f $dummy.c $dummy
3351- echo unknown-hitachi-hiuxwe2
3352- exit 0 ;;
3353- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
3354- echo hppa1.1-hp-bsd
3355- exit 0 ;;
3356- 9000/8??:4.3bsd:*:*)
3357- echo hppa1.0-hp-bsd
3358- exit 0 ;;
3359- *9??*:MPE/iX:*:*)
3360- echo hppa1.0-hp-mpeix
3361- exit 0 ;;
3362- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
3363- echo hppa1.1-hp-osf
3364- exit 0 ;;
3365- hp8??:OSF1:*:*)
3366- echo hppa1.0-hp-osf
3367- exit 0 ;;
3368- i?86:OSF1:*:*)
3369- if [ -x /usr/sbin/sysversion ] ; then
3370- echo ${UNAME_MACHINE}-unknown-osf1mk
3371- else
3372- echo ${UNAME_MACHINE}-unknown-osf1
3373- fi
3374- exit 0 ;;
3375- parisc*:Lites*:*:*)
3376- echo hppa1.1-hp-lites
3377- exit 0 ;;
3378- hppa*:OpenBSD:*:*)
3379- echo hppa-unknown-openbsd
3380- exit 0 ;;
3381- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
3382- echo c1-convex-bsd
3383- exit 0 ;;
3384- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
3385- if getsysinfo -f scalar_acc
3386- then echo c32-convex-bsd
3387- else echo c2-convex-bsd
3388- fi
3389- exit 0 ;;
3390- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
3391- echo c34-convex-bsd
3392- exit 0 ;;
3393- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
3394- echo c38-convex-bsd
3395- exit 0 ;;
3396- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
3397- echo c4-convex-bsd
3398- exit 0 ;;
3399- CRAY*X-MP:*:*:*)
3400- echo xmp-cray-unicos
3401- exit 0 ;;
3402- CRAY*Y-MP:*:*:*)
3403- echo ymp-cray-unicos${UNAME_RELEASE}
3404- exit 0 ;;
3405- CRAY*[A-Z]90:*:*:*)
3406- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
3407- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
3408- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
3409- exit 0 ;;
3410- CRAY*TS:*:*:*)
3411- echo t90-cray-unicos${UNAME_RELEASE}
3412- exit 0 ;;
3413- CRAY*T3E:*:*:*)
3414- echo alpha-cray-unicosmk${UNAME_RELEASE}
3415- exit 0 ;;
3416- CRAY-2:*:*:*)
3417- echo cray2-cray-unicos
3418- exit 0 ;;
3419- F300:UNIX_System_V:*:*)
3420- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
3421- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
3422- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
3423- exit 0 ;;
3424- F301:UNIX_System_V:*:*)
3425- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
3426- exit 0 ;;
3427- hp3[0-9][05]:NetBSD:*:*)
3428- echo m68k-hp-netbsd${UNAME_RELEASE}
3429- exit 0 ;;
3430- hp300:OpenBSD:*:*)
3431- echo m68k-unknown-openbsd${UNAME_RELEASE}
3432- exit 0 ;;
3433- i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
3434- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
3435- exit 0 ;;
3436- sparc*:BSD/OS:*:*)
3437- echo sparc-unknown-bsdi${UNAME_RELEASE}
3438- exit 0 ;;
3439- *:BSD/OS:*:*)
3440- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
3441- exit 0 ;;
3442- *:FreeBSD:*:*)
3443- if test -x /usr/bin/objformat; then
3444- if test "elf" = "`/usr/bin/objformat`"; then
3445- echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
3446- exit 0
3447- fi
3448- fi
3449- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
3450- exit 0 ;;
3451- *:NetBSD:*:*)
3452- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3453- exit 0 ;;
3454- *:OpenBSD:*:*)
3455- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3456- exit 0 ;;
3457- i*:CYGWIN*:*)
3458- echo ${UNAME_MACHINE}-pc-cygwin
3459- exit 0 ;;
3460- i*:MINGW*:*)
3461- echo ${UNAME_MACHINE}-pc-mingw32
3462- exit 0 ;;
3463- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
3464- # How do we know it's Interix rather than the generic POSIX subsystem?
3465- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
3466- # UNAME_MACHINE based on the output of uname instead of i386?
3467- echo i386-pc-interix
3468- exit 0 ;;
3469- i*:UWIN*:*)
3470- echo ${UNAME_MACHINE}-pc-uwin
3471- exit 0 ;;
3472- p*:CYGWIN*:*)
3473- echo powerpcle-unknown-cygwin
3474- exit 0 ;;
3475- prep*:SunOS:5.*:*)
3476- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3477- exit 0 ;;
3478- *:GNU:*:*)
3479- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
3480- exit 0 ;;
3481- *:Linux:*:*)
3482- # uname on the ARM produces all sorts of strangeness, and we need to
3483- # filter it out.
3484- case "$UNAME_MACHINE" in
3485- armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
3486- arm* | sa110*) UNAME_MACHINE="arm" ;;
3487- esac
3488-
3489- # The BFD linker knows what the default object file format is, so
3490- # first see if it will tell us. cd to the root directory to prevent
3491- # problems with other programs or directories called `ld' in the path.
3492- ld_help_string=`cd /; ld --help 2>&1`
3493- ld_supported_emulations=`echo $ld_help_string \
3494- | sed -ne '/supported emulations:/!d
3495- s/[ ][ ]*/ /g
3496- s/.*supported emulations: *//
3497- s/ .*//
3498- p'`
3499- case "$ld_supported_emulations" in
3500- *ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;;
3501- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
3502- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
3503- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3504- armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3505- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3506- elf32ppc | elf32ppclinux)
3507- # Determine Lib Version
3508- cat >$dummy.c <<EOF
3509-#include <features.h>
3510-#if defined(__GLIBC__)
3511-extern char __libc_version[];
3512-extern char __libc_release[];
3513-#endif
3514-main(argc, argv)
3515- int argc;
3516- char *argv[];
3517-{
3518-#if defined(__GLIBC__)
3519- printf("%s %s\n", __libc_version, __libc_release);
3520-#else
3521- printf("unkown\n");
3522-#endif
3523- return 0;
3524-}
3525-EOF
3526- LIBC=""
3527- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
3528- if test "$?" = 0 ; then
3529- ./$dummy | grep 1\.99 > /dev/null
3530- if test "$?" = 0 ; then
3531- LIBC="libc1"
3532- fi
3533- fi
3534- rm -f $dummy.c $dummy
3535- echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
3536- esac
3537-
3538- if test "${UNAME_MACHINE}" = "alpha" ; then
3539- sed 's/^ //' <<EOF >$dummy.s
3540- .globl main
3541- .ent main
3542- main:
3543- .frame \$30,0,\$26,0
3544- .prologue 0
3545- .long 0x47e03d80 # implver $0
3546- lda \$2,259
3547- .long 0x47e20c21 # amask $2,$1
3548- srl \$1,8,\$2
3549- sll \$2,2,\$2
3550- sll \$0,3,\$0
3551- addl \$1,\$0,\$0
3552- addl \$2,\$0,\$0
3553- ret \$31,(\$26),1
3554- .end main
3555-EOF
3556- LIBC=""
3557- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
3558- if test "$?" = 0 ; then
3559- ./$dummy
3560- case "$?" in
3561- 7)
3562- UNAME_MACHINE="alpha"
3563- ;;
3564- 15)
3565- UNAME_MACHINE="alphaev5"
3566- ;;
3567- 14)
3568- UNAME_MACHINE="alphaev56"
3569- ;;
3570- 10)
3571- UNAME_MACHINE="alphapca56"
3572- ;;
3573- 16)
3574- UNAME_MACHINE="alphaev6"
3575- ;;
3576- esac
3577-
3578- objdump --private-headers $dummy | \
3579- grep ld.so.1 > /dev/null
3580- if test "$?" = 0 ; then
3581- LIBC="libc1"
3582- fi
3583- fi
3584- rm -f $dummy.s $dummy
3585- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
3586- elif test "${UNAME_MACHINE}" = "mips" ; then
3587- cat >$dummy.c <<EOF
3588-#ifdef __cplusplus
3589- int main (int argc, char *argv[]) {
3590-#else
3591- int main (argc, argv) int argc; char *argv[]; {
3592-#endif
3593-#ifdef __MIPSEB__
3594- printf ("%s-unknown-linux-gnu\n", argv[1]);
3595-#endif
3596-#ifdef __MIPSEL__
3597- printf ("%sel-unknown-linux-gnu\n", argv[1]);
3598-#endif
3599- return 0;
3600-}
3601-EOF
3602- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
3603- rm -f $dummy.c $dummy
3604- else
3605- # Either a pre-BFD a.out linker (linux-gnuoldld)
3606- # or one that does not give us useful --help.
3607- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
3608- # If ld does not provide *any* "supported emulations:"
3609- # that means it is gnuoldld.
3610- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
3611- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
3612-
3613- case "${UNAME_MACHINE}" in
3614- i?86)
3615- VENDOR=pc;
3616- ;;
3617- *)
3618- VENDOR=unknown;
3619- ;;
3620- esac
3621- # Determine whether the default compiler is a.out or elf
3622- cat >$dummy.c <<EOF
3623-#include <features.h>
3624-#ifdef __cplusplus
3625- int main (int argc, char *argv[]) {
3626-#else
3627- int main (argc, argv) int argc; char *argv[]; {
3628-#endif
3629-#ifdef __ELF__
3630-# ifdef __GLIBC__
3631-# if __GLIBC__ >= 2
3632- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
3633-# else
3634- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3635-# endif
3636-# else
3637- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3638-# endif
3639-#else
3640- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
3641-#endif
3642- return 0;
3643-}
3644-EOF
3645- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
3646- rm -f $dummy.c $dummy
3647- fi ;;
3648-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
3649-# are messed up and put the nodename in both sysname and nodename.
3650- i?86:DYNIX/ptx:4*:*)
3651- echo i386-sequent-sysv4
3652- exit 0 ;;
3653- i?86:UNIX_SV:4.2MP:2.*)
3654- # Unixware is an offshoot of SVR4, but it has its own version
3655- # number series starting with 2...
3656- # I am not positive that other SVR4 systems won't match this,
3657- # I just have to hope. -- rms.
3658- # Use sysv4.2uw... so that sysv4* matches it.
3659- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
3660- exit 0 ;;
3661- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
3662- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
3663- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
3664- else
3665- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
3666- fi
3667- exit 0 ;;
3668- i?86:*:5:7*)
3669- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
3670- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
3671- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
3672- (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
3673- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
3674- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
3675- exit 0 ;;
3676- i?86:*:3.2:*)
3677- if test -f /usr/options/cb.name; then
3678- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
3679- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
3680- elif /bin/uname -X 2>/dev/null >/dev/null ; then
3681- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
3682- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
3683- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
3684- && UNAME_MACHINE=i586
3685- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
3686- && UNAME_MACHINE=i686
3687- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
3688- && UNAME_MACHINE=i686
3689- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
3690- else
3691- echo ${UNAME_MACHINE}-pc-sysv32
3692- fi
3693- exit 0 ;;
3694- pc:*:*:*)
3695- # uname -m prints for DJGPP always 'pc', but it prints nothing about
3696- # the processor, so we play safe by assuming i386.
3697- echo i386-pc-msdosdjgpp
3698- exit 0 ;;
3699- Intel:Mach:3*:*)
3700- echo i386-pc-mach3
3701- exit 0 ;;
3702- paragon:*:*:*)
3703- echo i860-intel-osf1
3704- exit 0 ;;
3705- i860:*:4.*:*) # i860-SVR4
3706- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
3707- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
3708- else # Add other i860-SVR4 vendors below as they are discovered.
3709- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
3710- fi
3711- exit 0 ;;
3712- mini*:CTIX:SYS*5:*)
3713- # "miniframe"
3714- echo m68010-convergent-sysv
3715- exit 0 ;;
3716- M68*:*:R3V[567]*:*)
3717- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3718- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
3719- OS_REL=''
3720- test -r /etc/.relid \
3721- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
3722- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
3723- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
3724- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
3725- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3726- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
3727- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
3728- && echo i486-ncr-sysv4 && exit 0 ;;
3729- m68*:LynxOS:2.*:*)
3730- echo m68k-unknown-lynxos${UNAME_RELEASE}
3731- exit 0 ;;
3732- mc68030:UNIX_System_V:4.*:*)
3733- echo m68k-atari-sysv4
3734- exit 0 ;;
3735- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
3736- echo i386-unknown-lynxos${UNAME_RELEASE}
3737- exit 0 ;;
3738- TSUNAMI:LynxOS:2.*:*)
3739- echo sparc-unknown-lynxos${UNAME_RELEASE}
3740- exit 0 ;;
3741- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
3742- echo rs6000-unknown-lynxos${UNAME_RELEASE}
3743- exit 0 ;;
3744- SM[BE]S:UNIX_SV:*:*)
3745- echo mips-dde-sysv${UNAME_RELEASE}
3746- exit 0 ;;
3747- RM*:ReliantUNIX-*:*:*)
3748- echo mips-sni-sysv4
3749- exit 0 ;;
3750- RM*:SINIX-*:*:*)
3751- echo mips-sni-sysv4
3752- exit 0 ;;
3753- *:SINIX-*:*:*)
3754- if uname -p 2>/dev/null >/dev/null ; then
3755- UNAME_MACHINE=`(uname -p) 2>/dev/null`
3756- echo ${UNAME_MACHINE}-sni-sysv4
3757- else
3758- echo ns32k-sni-sysv
3759- fi
3760- exit 0 ;;
3761- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
3762- # says <Richard.M.Bartel@ccMail.Census.GOV>
3763- echo i586-unisys-sysv4
3764- exit 0 ;;
3765- *:UNIX_System_V:4*:FTX*)
3766- # From Gerald Hewes <hewes@openmarket.com>.
3767- # How about differentiating between stratus architectures? -djm
3768- echo hppa1.1-stratus-sysv4
3769- exit 0 ;;
3770- *:*:*:FTX*)
3771- # From seanf@swdc.stratus.com.
3772- echo i860-stratus-sysv4
3773- exit 0 ;;
3774- mc68*:A/UX:*:*)
3775- echo m68k-apple-aux${UNAME_RELEASE}
3776- exit 0 ;;
3777- news*:NEWS-OS:*:6*)
3778- echo mips-sony-newsos6
3779- exit 0 ;;
3780- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
3781- if [ -d /usr/nec ]; then
3782- echo mips-nec-sysv${UNAME_RELEASE}
3783- else
3784- echo mips-unknown-sysv${UNAME_RELEASE}
3785- fi
3786- exit 0 ;;
3787- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
3788- echo powerpc-be-beos
3789- exit 0 ;;
3790- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
3791- echo powerpc-apple-beos
3792- exit 0 ;;
3793- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
3794- echo i586-pc-beos
3795- exit 0 ;;
3796- SX-4:SUPER-UX:*:*)
3797- echo sx4-nec-superux${UNAME_RELEASE}
3798- exit 0 ;;
3799- SX-5:SUPER-UX:*:*)
3800- echo sx5-nec-superux${UNAME_RELEASE}
3801- exit 0 ;;
3802- Power*:Rhapsody:*:*)
3803- echo powerpc-apple-rhapsody${UNAME_RELEASE}
3804- exit 0 ;;
3805- *:Rhapsody:*:*)
3806- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
3807- exit 0 ;;
3808-esac
3809-
3810-#echo '(No uname command or uname output not recognized.)' 1>&2
3811-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
3812-
3813-cat >$dummy.c <<EOF
3814-#ifdef _SEQUENT_
3815-# include <sys/types.h>
3816-# include <sys/utsname.h>
3817-#endif
3818-main ()
3819-{
3820-#if defined (sony)
3821-#if defined (MIPSEB)
3822- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
3823- I don't know.... */
3824- printf ("mips-sony-bsd\n"); exit (0);
3825-#else
3826-#include <sys/param.h>
3827- printf ("m68k-sony-newsos%s\n",
3828-#ifdef NEWSOS4
3829- "4"
3830-#else
3831- ""
3832-#endif
3833- ); exit (0);
3834-#endif
3835-#endif
3836-
3837-#if defined (__arm) && defined (__acorn) && defined (__unix)
3838- printf ("arm-acorn-riscix"); exit (0);
3839-#endif
3840-
3841-#if defined (hp300) && !defined (hpux)
3842- printf ("m68k-hp-bsd\n"); exit (0);
3843-#endif
3844-
3845-#if defined (NeXT)
3846-#if !defined (__ARCHITECTURE__)
3847-#define __ARCHITECTURE__ "m68k"
3848-#endif
3849- int version;
3850- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
3851- if (version < 4)
3852- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
3853- else
3854- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
3855- exit (0);
3856-#endif
3857-
3858-#if defined (MULTIMAX) || defined (n16)
3859-#if defined (UMAXV)
3860- printf ("ns32k-encore-sysv\n"); exit (0);
3861-#else
3862-#if defined (CMU)
3863- printf ("ns32k-encore-mach\n"); exit (0);
3864-#else
3865- printf ("ns32k-encore-bsd\n"); exit (0);
3866-#endif
3867-#endif
3868-#endif
3869-
3870-#if defined (__386BSD__)
3871- printf ("i386-pc-bsd\n"); exit (0);
3872-#endif
3873-
3874-#if defined (sequent)
3875-#if defined (i386)
3876- printf ("i386-sequent-dynix\n"); exit (0);
3877-#endif
3878-#if defined (ns32000)
3879- printf ("ns32k-sequent-dynix\n"); exit (0);
3880-#endif
3881-#endif
3882-
3883-#if defined (_SEQUENT_)
3884- struct utsname un;
3885-
3886- uname(&un);
3887-
3888- if (strncmp(un.version, "V2", 2) == 0) {
3889- printf ("i386-sequent-ptx2\n"); exit (0);
3890- }
3891- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
3892- printf ("i386-sequent-ptx1\n"); exit (0);
3893- }
3894- printf ("i386-sequent-ptx\n"); exit (0);
3895-
3896-#endif
3897-
3898-#if defined (vax)
3899-#if !defined (ultrix)
3900- printf ("vax-dec-bsd\n"); exit (0);
3901-#else
3902- printf ("vax-dec-ultrix\n"); exit (0);
3903-#endif
3904-#endif
3905-
3906-#if defined (alliant) && defined (i860)
3907- printf ("i860-alliant-bsd\n"); exit (0);
3908-#endif
3909-
3910- exit (1);
3911-}
3912-EOF
3913-
3914-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
3915-rm -f $dummy.c $dummy
3916-
3917-# Apollos put the system type in the environment.
3918-
3919-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
3920-
3921-# Convex versions that predate uname can use getsysinfo(1)
3922-
3923-if [ -x /usr/convex/getsysinfo ]
3924-then
3925- case `getsysinfo -f cpu_type` in
3926- c1*)
3927- echo c1-convex-bsd
3928- exit 0 ;;
3929- c2*)
3930- if getsysinfo -f scalar_acc
3931- then echo c32-convex-bsd
3932- else echo c2-convex-bsd
3933- fi
3934- exit 0 ;;
3935- c34*)
3936- echo c34-convex-bsd
3937- exit 0 ;;
3938- c38*)
3939- echo c38-convex-bsd
3940- exit 0 ;;
3941- c4*)
3942- echo c4-convex-bsd
3943- exit 0 ;;
3944- esac
3945-fi
3946-
3947-#echo '(Unable to guess system type)' 1>&2
3948-
3949-exit 1
3950diff -urNd -urNd patch-2.5.4/config.hin patch-2.5.9/config.hin
3951--- patch-2.5.4/config.hin 1999-08-30 02:53:17.000000000 -0400
3952+++ patch-2.5.9/config.hin 2003-05-19 02:50:40.000000000 -0400
3953@@ -1,169 +1,365 @@
3954-/* config.hin. Generated automatically from configure.in by autoheader. */
3955+/* config.hin. Generated from configure.ac by autoheader. */
3956
3957-/* Define if on AIX 3.
3958- System headers sometimes define this.
3959- We just want to avoid a redefinition error message. */
3960-#ifndef _ALL_SOURCE
3961-#undef _ALL_SOURCE
3962+/* Define to 1 if the `closedir' function returns void instead of `int'. */
3963+#undef CLOSEDIR_VOID
3964+
3965+/* Define if there is a member named d_ino in the struct describing directory
3966+ headers. */
3967+#undef D_INO_IN_DIRENT
3968+
3969+/* Define on systems for which file names may have a so-called `drive letter'
3970+ prefix, define this to compute the length of that prefix, including the
3971+ colon. */
3972+#undef FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3973+
3974+/* Define if the backslash character may also serve as a file name component
3975+ separator. */
3976+#undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
3977+
3978+#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3979+# define FILESYSTEM_PREFIX_LEN(Filename) \
3980+ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
3981+#else
3982+# define FILESYSTEM_PREFIX_LEN(Filename) 0
3983 #endif
3984
3985-/* Define if the closedir function returns void instead of int. */
3986-#undef CLOSEDIR_VOID
3987+/* Define to 1 if you have the <bp-sym.h> header file. */
3988+#undef HAVE_BP_SYM_H
3989
3990-/* Define to empty if the keyword does not work. */
3991-#undef const
3992+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
3993+ you don't. */
3994+#undef HAVE_DECL_CLEARERR_UNLOCKED
3995
3996-/* Define if you don't have vprintf but do have _doprnt. */
3997-#undef HAVE_DOPRNT
3998+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
3999+ don't. */
4000+#undef HAVE_DECL_FEOF_UNLOCKED
4001
4002-/* Define if you support file names longer than 14 characters. */
4003-#undef HAVE_LONG_FILE_NAMES
4004+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
4005+ you don't. */
4006+#undef HAVE_DECL_FERROR_UNLOCKED
4007
4008-/* Define if you have the vprintf function. */
4009-#undef HAVE_VPRINTF
4010+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
4011+ you don't. */
4012+#undef HAVE_DECL_FFLUSH_UNLOCKED
4013
4014-/* Define if on MINIX. */
4015-#undef _MINIX
4016+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
4017+ you don't. */
4018+#undef HAVE_DECL_FGETS_UNLOCKED
4019
4020-/* Define to `int' if <sys/types.h> doesn't define. */
4021-#undef mode_t
4022+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
4023+ you don't. */
4024+#undef HAVE_DECL_FPUTC_UNLOCKED
4025
4026-/* Define to `long' if <sys/types.h> doesn't define. */
4027-#undef off_t
4028+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
4029+ you don't. */
4030+#undef HAVE_DECL_FPUTS_UNLOCKED
4031
4032-/* Define to `int' if <sys/types.h> doesn't define. */
4033-#undef pid_t
4034+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
4035+ you don't. */
4036+#undef HAVE_DECL_FREAD_UNLOCKED
4037
4038-/* Define if the system does not provide POSIX.1 features except
4039- with this defined. */
4040-#undef _POSIX_1_SOURCE
4041+/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
4042+ */
4043+#undef HAVE_DECL_FREE
4044
4045-/* Define if you need to in order for stat and other things to work. */
4046-#undef _POSIX_SOURCE
4047+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
4048+ you don't. */
4049+#undef HAVE_DECL_FWRITE_UNLOCKED
4050
4051-/* Define as the return type of signal handlers (int or void). */
4052-#undef RETSIGTYPE
4053+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
4054+ you don't. */
4055+#undef HAVE_DECL_GETCHAR_UNLOCKED
4056
4057-/* Define to `unsigned' if <sys/types.h> doesn't define. */
4058-#undef size_t
4059+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
4060+ don't. */
4061+#undef HAVE_DECL_GETC_UNLOCKED
4062
4063-/* Define if you have the ANSI C header files. */
4064-#undef STDC_HEADERS
4065+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
4066+ */
4067+#undef HAVE_DECL_GETENV
4068
4069-/* Define if you can safely include both <sys/time.h> and <time.h>. */
4070-#undef TIME_WITH_SYS_TIME
4071+/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
4072+ */
4073+#undef HAVE_DECL_MALLOC
4074
4075-/* Define if you have the _doprintf function. */
4076-#undef HAVE__DOPRINTF
4077+/* Define to 1 if you have the declaration of `mktemp', and to 0 if you don't.
4078+ */
4079+#undef HAVE_DECL_MKTEMP
4080
4081-/* Define if you have the fseeko function. */
4082+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
4083+ you don't. */
4084+#undef HAVE_DECL_PUTCHAR_UNLOCKED
4085+
4086+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
4087+ don't. */
4088+#undef HAVE_DECL_PUTC_UNLOCKED
4089+
4090+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
4091+ don't. */
4092+#undef HAVE_DECL_STRERROR
4093+
4094+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
4095+ don't. */
4096+#undef HAVE_DECL_STRERROR_R
4097+
4098+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
4099+ */
4100+#undef HAVE_DIRENT_H
4101+
4102+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
4103+#undef HAVE_DOPRNT
4104+
4105+/* Define to 1 if you have the <fcntl.h> header file. */
4106+#undef HAVE_FCNTL_H
4107+
4108+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
4109 #undef HAVE_FSEEKO
4110
4111-/* Define if you have the isascii function. */
4112+/* Define to 1 if you have the `geteuid' function. */
4113+#undef HAVE_GETEUID
4114+
4115+/* Define to 1 if you have the `getuid' function. */
4116+#undef HAVE_GETUID
4117+
4118+/* Define to 1 if you have the <inttypes.h> header file. */
4119+#undef HAVE_INTTYPES_H
4120+
4121+/* Define to 1 if you have the `isascii' function. */
4122 #undef HAVE_ISASCII
4123
4124-/* Define if you have the memchr function. */
4125+/* Define to 1 if you have the `iswprint' function. */
4126+#undef HAVE_ISWPRINT
4127+
4128+/* Define to 1 if you have the <limits.h> header file. */
4129+#undef HAVE_LIMITS_H
4130+
4131+/* Define to 1 if you support file names longer than 14 characters. */
4132+#undef HAVE_LONG_FILE_NAMES
4133+
4134+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
4135+ to 0 otherwise. */
4136+#undef HAVE_MALLOC
4137+
4138+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
4139+#undef HAVE_MBRTOWC
4140+
4141+/* Define to 1 if you have the `mbsinit' function. */
4142+#undef HAVE_MBSINIT
4143+
4144+/* Define to 1 if <wchar.h> declares mbstate_t. */
4145+#undef HAVE_MBSTATE_T
4146+
4147+/* Define to 1 if you have the `memchr' function. */
4148 #undef HAVE_MEMCHR
4149
4150-/* Define if you have the memcmp function. */
4151+/* Define to 1 if you have the `memcmp' function. */
4152 #undef HAVE_MEMCMP
4153
4154-/* Define if you have the mkdir function. */
4155+/* Define to 1 if you have the <memory.h> header file. */
4156+#undef HAVE_MEMORY_H
4157+
4158+/* Define to 1 if you have the `mkdir' function. */
4159 #undef HAVE_MKDIR
4160
4161-/* Define if you have the mktemp function. */
4162+/* Define to 1 if you have the `mktemp' function. */
4163 #undef HAVE_MKTEMP
4164
4165-/* Define if you have the pathconf function. */
4166+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
4167+#undef HAVE_NDIR_H
4168+
4169+/* Define to 1 if you have the `pathconf' function. */
4170 #undef HAVE_PATHCONF
4171
4172-/* Define if you have the raise function. */
4173+/* Define to 1 if you have the `raise' function. */
4174 #undef HAVE_RAISE
4175
4176-/* Define if you have the rename function. */
4177-#undef HAVE_RENAME
4178+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
4179+ and to 0 otherwise. */
4180+#undef HAVE_REALLOC
4181
4182-/* Define if you have the rmdir function. */
4183+/* Define to 1 if you have the `rmdir' function. */
4184 #undef HAVE_RMDIR
4185
4186-/* Define if you have the setmode function. */
4187-#undef HAVE_SETMODE
4188+/* Define to 1 if you have the DOS-style `setmode' function. */
4189+#undef HAVE_SETMODE_DOS
4190
4191-/* Define if you have the sigaction function. */
4192+/* Define to 1 if you have the `sigaction' function. */
4193 #undef HAVE_SIGACTION
4194
4195-/* Define if you have the sigprocmask function. */
4196+/* Define to 1 if you have the `sigprocmask' function. */
4197 #undef HAVE_SIGPROCMASK
4198
4199-/* Define if you have the sigsetmask function. */
4200+/* Define to 1 if you have the `sigsetmask' function. */
4201 #undef HAVE_SIGSETMASK
4202
4203-/* Define if you have the strerror function. */
4204-#undef HAVE_STRERROR
4205+/* Define to 1 if stdbool.h conforms to C99. */
4206+#undef HAVE_STDBOOL_H
4207
4208-/* Define if you have the <dirent.h> header file. */
4209-#undef HAVE_DIRENT_H
4210+/* Define to 1 if you have the <stddef.h> header file. */
4211+#undef HAVE_STDDEF_H
4212
4213-/* Define if you have the <fcntl.h> header file. */
4214-#undef HAVE_FCNTL_H
4215+/* Define to 1 if you have the <stdint.h> header file. */
4216+#undef HAVE_STDINT_H
4217
4218-/* Define if you have the <limits.h> header file. */
4219-#undef HAVE_LIMITS_H
4220+/* Define to 1 if you have the <stdlib.h> header file. */
4221+#undef HAVE_STDLIB_H
4222
4223-/* Define if you have the <ndir.h> header file. */
4224-#undef HAVE_NDIR_H
4225+/* Define to 1 if you have the `strerror' function. */
4226+#undef HAVE_STRERROR
4227
4228-/* Define if you have the <string.h> header file. */
4229+/* Define to 1 if you have the `strerror_r' function. */
4230+#undef HAVE_STRERROR_R
4231+
4232+/* Define to 1 if you have the <strings.h> header file. */
4233+#undef HAVE_STRINGS_H
4234+
4235+/* Define to 1 if you have the <string.h> header file. */
4236 #undef HAVE_STRING_H
4237
4238-/* Define if you have the <sys/dir.h> header file. */
4239+/* Define to 1 if you have the `strncasecmp' function. */
4240+#undef HAVE_STRNCASECMP
4241+
4242+/* Define if struct utimbuf is declared -- usually in <utime.h>. Some systems
4243+ have utime.h but don't declare the struct anywhere. */
4244+#undef HAVE_STRUCT_UTIMBUF
4245+
4246+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
4247+ */
4248 #undef HAVE_SYS_DIR_H
4249
4250-/* Define if you have the <sys/ndir.h> header file. */
4251+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
4252+ */
4253 #undef HAVE_SYS_NDIR_H
4254
4255-/* Define if you have the <unistd.h> header file. */
4256+/* Define to 1 if you have the <sys/stat.h> header file. */
4257+#undef HAVE_SYS_STAT_H
4258+
4259+/* Define to 1 if you have the <sys/time.h> header file. */
4260+#undef HAVE_SYS_TIME_H
4261+
4262+/* Define to 1 if you have the <sys/types.h> header file. */
4263+#undef HAVE_SYS_TYPES_H
4264+
4265+/* Define to 1 if you have the <unistd.h> header file. */
4266 #undef HAVE_UNISTD_H
4267
4268-/* Define if you have the <utime.h> header file. */
4269+/* Define to 1 if you have the <utime.h> header file. */
4270 #undef HAVE_UTIME_H
4271
4272-/* Define if you have the <varargs.h> header file. */
4273+/* Define to 1 if you have the <varargs.h> header file. */
4274 #undef HAVE_VARARGS_H
4275
4276+/* Define to 1 if you have the `vprintf' function. */
4277+#undef HAVE_VPRINTF
4278+
4279+/* Define to 1 if you have the <wchar.h> header file. */
4280+#undef HAVE_WCHAR_H
4281+
4282+/* Define to 1 if you have the <wctype.h> header file. */
4283+#undef HAVE_WCTYPE_H
4284+
4285+/* Define to 1 if the system has the type `_Bool'. */
4286+#undef HAVE__BOOL
4287+
4288+/* Define to 1 if you have the `_doprintf' function. */
4289+#undef HAVE__DOPRINTF
4290+
4291+#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
4292+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4293+#else
4294+# define ISSLASH(C) ((C) == '/')
4295+#endif
4296+
4297+/* Define if mkdir takes only one argument. */
4298+#undef MKDIR_TAKES_ONE_ARG
4299+
4300+/* Define to the address where bug reports for this package should be sent. */
4301+#undef PACKAGE_BUGREPORT
4302+
4303+/* Define to the full name of this package. */
4304+#undef PACKAGE_NAME
4305+
4306+/* Define to the full name and version of this package. */
4307+#undef PACKAGE_STRING
4308+
4309+/* Define to the one symbol short name of this package. */
4310+#undef PACKAGE_TARNAME
4311+
4312+/* Define to the version of this package. */
4313+#undef PACKAGE_VERSION
4314+
4315+/* Define to 1 if the C compiler supports function prototypes. */
4316+#undef PROTOTYPES
4317+
4318+/* Define as the return type of signal handlers (`int' or `void'). */
4319+#undef RETSIGTYPE
4320+
4321+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
4322+#undef STAT_MACROS_BROKEN
4323+
4324+/* Define to 1 if you have the ANSI C header files. */
4325+#undef STDC_HEADERS
4326+
4327+/* Define to 1 if strerror_r returns char *. */
4328+#undef STRERROR_R_CHAR_P
4329+
4330+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
4331+#undef TIME_WITH_SYS_TIME
4332+
4333+/* Define to 1 if on AIX 3.
4334+ System headers sometimes define this.
4335+ We just want to avoid a redefinition error message. */
4336+#ifndef _ALL_SOURCE
4337+# undef _ALL_SOURCE
4338+#endif
4339+
4340 /* Number of bits in a file offset, on hosts where this is settable. */
4341 #undef _FILE_OFFSET_BITS
4342
4343-/* Define to make fseeko etc. visible, on some hosts. */
4344+/* Enable GNU extensions on systems that have them. */
4345+#ifndef _GNU_SOURCE
4346+# undef _GNU_SOURCE
4347+#endif
4348+
4349+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
4350 #undef _LARGEFILE_SOURCE
4351
4352 /* Define for large files, on AIX-style hosts. */
4353 #undef _LARGE_FILES
4354
4355-/* Define if compiler has function prototypes */
4356-#undef PROTOTYPES
4357+/* Define to 1 if on MINIX. */
4358+#undef _MINIX
4359
4360-/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
4361- and declares uintmax_t. */
4362-#undef HAVE_INTTYPES_H
4363+/* Define to 2 if the system does not provide POSIX.1 features except with
4364+ this defined. */
4365+#undef _POSIX_1_SOURCE
4366
4367-/* Define if struct utimbuf is declared -- usually in <utime.h>.
4368- Some systems have utime.h but don't declare the struct anywhere. */
4369-#undef HAVE_STRUCT_UTIMBUF
4370+/* Define to 1 if you need to in order for `stat' and other things to work. */
4371+#undef _POSIX_SOURCE
4372
4373-/* Define if the malloc check has been performed. */
4374-#undef HAVE_DONE_WORKING_MALLOC_CHECK
4375+/* Define like PROTOTYPES; this can be used by system headers. */
4376+#undef __PROTOTYPES
4377+
4378+/* Define to empty if `const' does not conform to ANSI C. */
4379+#undef const
4380
4381 /* Define to rpl_malloc if the replacement function should be used. */
4382 #undef malloc
4383
4384-/* Define if the realloc check has been performed. */
4385-#undef HAVE_DONE_WORKING_REALLOC_CHECK
4386+/* Define to a type if <wchar.h> does not define. */
4387+#undef mbstate_t
4388+
4389+/* Define to `int' if <sys/types.h> does not define. */
4390+#undef mode_t
4391+
4392+/* Define to `long' if <sys/types.h> does not define. */
4393+#undef off_t
4394+
4395+/* Define to `int' if <sys/types.h> does not define. */
4396+#undef pid_t
4397
4398 /* Define to rpl_realloc if the replacement function should be used. */
4399 #undef realloc
4400
4401-/* Define if there is a member named d_ino in the struct describing
4402- directory headers. */
4403-#undef D_INO_IN_DIRENT
4404-
4405+/* Define to `unsigned' if <sys/types.h> does not define. */
4406+#undef size_t
4407diff -urNd -urNd patch-2.5.4/config.sub patch-2.5.9/config.sub
4408--- patch-2.5.4/config.sub 1999-08-05 08:55:20.000000000 -0400
4409+++ patch-2.5.9/config.sub 1969-12-31 19:00:00.000000000 -0500
4410@@ -1,1220 +0,0 @@
4411-#! /bin/sh
4412-# Configuration validation subroutine script, version 1.1.
4413-# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
4414-# This file is (in principle) common to ALL GNU software.
4415-# The presence of a machine in this file suggests that SOME GNU software
4416-# can handle that machine. It does not imply ALL GNU software can.
4417-#
4418-# This file is free software; you can redistribute it and/or modify
4419-# it under the terms of the GNU General Public License as published by
4420-# the Free Software Foundation; either version 2 of the License, or
4421-# (at your option) any later version.
4422-#
4423-# This program is distributed in the hope that it will be useful,
4424-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4425-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4426-# GNU General Public License for more details.
4427-#
4428-# You should have received a copy of the GNU General Public License
4429-# along with this program; if not, write to the Free Software
4430-# Foundation, Inc., 59 Temple Place - Suite 330,
4431-# Boston, MA 02111-1307, USA.
4432-
4433-# As a special exception to the GNU General Public License, if you
4434-# distribute this file as part of a program that contains a
4435-# configuration script generated by Autoconf, you may include it under
4436-# the same distribution terms that you use for the rest of that program.
4437-
4438-# Configuration subroutine to validate and canonicalize a configuration type.
4439-# Supply the specified configuration type as an argument.
4440-# If it is invalid, we print an error message on stderr and exit with code 1.
4441-# Otherwise, we print the canonical config type on stdout and succeed.
4442-
4443-# This file is supposed to be the same for all GNU packages
4444-# and recognize all the CPU types, system types and aliases
4445-# that are meaningful with *any* GNU software.
4446-# Each package is responsible for reporting which valid configurations
4447-# it does not support. The user should be able to distinguish
4448-# a failure to support a valid configuration from a meaningless
4449-# configuration.
4450-
4451-# The goal of this file is to map all the various variations of a given
4452-# machine specification into a single specification in the form:
4453-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
4454-# or in some cases, the newer four-part form:
4455-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
4456-# It is wrong to echo any other type of specification.
4457-
4458-if [ x$1 = x ]
4459-then
4460- echo Configuration name missing. 1>&2
4461- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
4462- echo "or $0 ALIAS" 1>&2
4463- echo where ALIAS is a recognized configuration type. 1>&2
4464- exit 1
4465-fi
4466-
4467-# First pass through any local machine types.
4468-case $1 in
4469- *local*)
4470- echo $1
4471- exit 0
4472- ;;
4473- *)
4474- ;;
4475-esac
4476-
4477-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
4478-# Here we must recognize all the valid KERNEL-OS combinations.
4479-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
4480-case $maybe_os in
4481- linux-gnu*)
4482- os=-$maybe_os
4483- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
4484- ;;
4485- *)
4486- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
4487- if [ $basic_machine != $1 ]
4488- then os=`echo $1 | sed 's/.*-/-/'`
4489- else os=; fi
4490- ;;
4491-esac
4492-
4493-### Let's recognize common machines as not being operating systems so
4494-### that things like config.sub decstation-3100 work. We also
4495-### recognize some manufacturers as not being operating systems, so we
4496-### can provide default operating systems below.
4497-case $os in
4498- -sun*os*)
4499- # Prevent following clause from handling this invalid input.
4500- ;;
4501- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
4502- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
4503- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
4504- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
4505- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
4506- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
4507- -apple)
4508- os=
4509- basic_machine=$1
4510- ;;
4511- -sim | -cisco | -oki | -wec | -winbond)
4512- os=
4513- basic_machine=$1
4514- ;;
4515- -scout)
4516- ;;
4517- -wrs)
4518- os=-vxworks
4519- basic_machine=$1
4520- ;;
4521- -hiux*)
4522- os=-hiuxwe2
4523- ;;
4524- -sco5)
4525- os=-sco3.2v5
4526- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4527- ;;
4528- -sco4)
4529- os=-sco3.2v4
4530- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4531- ;;
4532- -sco3.2.[4-9]*)
4533- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
4534- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4535- ;;
4536- -sco3.2v[4-9]*)
4537- # Don't forget version if it is 3.2v4 or newer.
4538- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4539- ;;
4540- -sco*)
4541- os=-sco3.2v2
4542- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4543- ;;
4544- -udk*)
4545- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4546- ;;
4547- -isc)
4548- os=-isc2.2
4549- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4550- ;;
4551- -clix*)
4552- basic_machine=clipper-intergraph
4553- ;;
4554- -isc*)
4555- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4556- ;;
4557- -lynx*)
4558- os=-lynxos
4559- ;;
4560- -ptx*)
4561- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
4562- ;;
4563- -windowsnt*)
4564- os=`echo $os | sed -e 's/windowsnt/winnt/'`
4565- ;;
4566- -psos*)
4567- os=-psos
4568- ;;
4569- -mint | -mint[0-9]*)
4570- basic_machine=m68k-atari
4571- os=-mint
4572- ;;
4573-esac
4574-
4575-# Decode aliases for certain CPU-COMPANY combinations.
4576-case $basic_machine in
4577- # Recognize the basic CPU types without company name.
4578- # Some are omitted here because they have special meanings below.
4579- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
4580- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
4581- | 580 | i960 | h8300 \
4582- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
4583- | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
4584- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
4585- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
4586- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
4587- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
4588- | mips64vr5000 | miprs64vr5000el | mcore \
4589- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
4590- | thumb | d10v)
4591- basic_machine=$basic_machine-unknown
4592- ;;
4593- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
4594- ;;
4595-
4596- # We use `pc' rather than `unknown'
4597- # because (1) that's what they normally are, and
4598- # (2) the word "unknown" tends to confuse beginning users.
4599- i[34567]86)
4600- basic_machine=$basic_machine-pc
4601- ;;
4602- # Object if more than one company name word.
4603- *-*-*)
4604- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
4605- exit 1
4606- ;;
4607- # Recognize the basic CPU types with company name.
4608- # FIXME: clean up the formatting here.
4609- vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
4610- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
4611- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
4612- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
4613- | xmp-* | ymp-* \
4614- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
4615- | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
4616- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
4617- | clipper-* | orion-* \
4618- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
4619- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
4620- | mips64el-* | mips64orion-* | mips64orionel-* \
4621- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
4622- | mipstx39-* | mipstx39el-* | mcore-* \
4623- | f301-* | armv*-* | t3e-* \
4624- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
4625- | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
4626- ;;
4627- # Recognize the various machine names and aliases which stand
4628- # for a CPU type and a company and sometimes even an OS.
4629- 386bsd)
4630- basic_machine=i386-unknown
4631- os=-bsd
4632- ;;
4633- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
4634- basic_machine=m68000-att
4635- ;;
4636- 3b*)
4637- basic_machine=we32k-att
4638- ;;
4639- a29khif)
4640- basic_machine=a29k-amd
4641- os=-udi
4642- ;;
4643- adobe68k)
4644- basic_machine=m68010-adobe
4645- os=-scout
4646- ;;
4647- alliant | fx80)
4648- basic_machine=fx80-alliant
4649- ;;
4650- altos | altos3068)
4651- basic_machine=m68k-altos
4652- ;;
4653- am29k)
4654- basic_machine=a29k-none
4655- os=-bsd
4656- ;;
4657- amdahl)
4658- basic_machine=580-amdahl
4659- os=-sysv
4660- ;;
4661- amiga | amiga-*)
4662- basic_machine=m68k-cbm
4663- ;;
4664- amigaos | amigados)
4665- basic_machine=m68k-cbm
4666- os=-amigaos
4667- ;;
4668- amigaunix | amix)
4669- basic_machine=m68k-cbm
4670- os=-sysv4
4671- ;;
4672- apollo68)
4673- basic_machine=m68k-apollo
4674- os=-sysv
4675- ;;
4676- apollo68bsd)
4677- basic_machine=m68k-apollo
4678- os=-bsd
4679- ;;
4680- aux)
4681- basic_machine=m68k-apple
4682- os=-aux
4683- ;;
4684- balance)
4685- basic_machine=ns32k-sequent
4686- os=-dynix
4687- ;;
4688- convex-c1)
4689- basic_machine=c1-convex
4690- os=-bsd
4691- ;;
4692- convex-c2)
4693- basic_machine=c2-convex
4694- os=-bsd
4695- ;;
4696- convex-c32)
4697- basic_machine=c32-convex
4698- os=-bsd
4699- ;;
4700- convex-c34)
4701- basic_machine=c34-convex
4702- os=-bsd
4703- ;;
4704- convex-c38)
4705- basic_machine=c38-convex
4706- os=-bsd
4707- ;;
4708- cray | ymp)
4709- basic_machine=ymp-cray
4710- os=-unicos
4711- ;;
4712- cray2)
4713- basic_machine=cray2-cray
4714- os=-unicos
4715- ;;
4716- [ctj]90-cray)
4717- basic_machine=c90-cray
4718- os=-unicos
4719- ;;
4720- crds | unos)
4721- basic_machine=m68k-crds
4722- ;;
4723- da30 | da30-*)
4724- basic_machine=m68k-da30
4725- ;;
4726- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
4727- basic_machine=mips-dec
4728- ;;
4729- delta | 3300 | motorola-3300 | motorola-delta \
4730- | 3300-motorola | delta-motorola)
4731- basic_machine=m68k-motorola
4732- ;;
4733- delta88)
4734- basic_machine=m88k-motorola
4735- os=-sysv3
4736- ;;
4737- dpx20 | dpx20-*)
4738- basic_machine=rs6000-bull
4739- os=-bosx
4740- ;;
4741- dpx2* | dpx2*-bull)
4742- basic_machine=m68k-bull
4743- os=-sysv3
4744- ;;
4745- ebmon29k)
4746- basic_machine=a29k-amd
4747- os=-ebmon
4748- ;;
4749- elxsi)
4750- basic_machine=elxsi-elxsi
4751- os=-bsd
4752- ;;
4753- encore | umax | mmax)
4754- basic_machine=ns32k-encore
4755- ;;
4756- es1800 | OSE68k | ose68k | ose | OSE)
4757- basic_machine=m68k-ericsson
4758- os=-ose
4759- ;;
4760- fx2800)
4761- basic_machine=i860-alliant
4762- ;;
4763- genix)
4764- basic_machine=ns32k-ns
4765- ;;
4766- gmicro)
4767- basic_machine=tron-gmicro
4768- os=-sysv
4769- ;;
4770- h3050r* | hiux*)
4771- basic_machine=hppa1.1-hitachi
4772- os=-hiuxwe2
4773- ;;
4774- h8300hms)
4775- basic_machine=h8300-hitachi
4776- os=-hms
4777- ;;
4778- h8300xray)
4779- basic_machine=h8300-hitachi
4780- os=-xray
4781- ;;
4782- h8500hms)
4783- basic_machine=h8500-hitachi
4784- os=-hms
4785- ;;
4786- harris)
4787- basic_machine=m88k-harris
4788- os=-sysv3
4789- ;;
4790- hp300-*)
4791- basic_machine=m68k-hp
4792- ;;
4793- hp300bsd)
4794- basic_machine=m68k-hp
4795- os=-bsd
4796- ;;
4797- hp300hpux)
4798- basic_machine=m68k-hp
4799- os=-hpux
4800- ;;
4801- hp3k9[0-9][0-9] | hp9[0-9][0-9])
4802- basic_machine=hppa1.0-hp
4803- ;;
4804- hp9k2[0-9][0-9] | hp9k31[0-9])
4805- basic_machine=m68000-hp
4806- ;;
4807- hp9k3[2-9][0-9])
4808- basic_machine=m68k-hp
4809- ;;
4810- hp9k6[0-9][0-9] | hp6[0-9][0-9])
4811- basic_machine=hppa1.0-hp
4812- ;;
4813- hp9k7[0-79][0-9] | hp7[0-79][0-9])
4814- basic_machine=hppa1.1-hp
4815- ;;
4816- hp9k78[0-9] | hp78[0-9])
4817- # FIXME: really hppa2.0-hp
4818- basic_machine=hppa1.1-hp
4819- ;;
4820- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
4821- # FIXME: really hppa2.0-hp
4822- basic_machine=hppa1.1-hp
4823- ;;
4824- hp9k8[0-9][13679] | hp8[0-9][13679])
4825- basic_machine=hppa1.1-hp
4826- ;;
4827- hp9k8[0-9][0-9] | hp8[0-9][0-9])
4828- basic_machine=hppa1.0-hp
4829- ;;
4830- hppa-next)
4831- os=-nextstep3
4832- ;;
4833- hppaosf)
4834- basic_machine=hppa1.1-hp
4835- os=-osf
4836- ;;
4837- hppro)
4838- basic_machine=hppa1.1-hp
4839- os=-proelf
4840- ;;
4841- i370-ibm* | ibm*)
4842- basic_machine=i370-ibm
4843- os=-mvs
4844- ;;
4845-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
4846- i[34567]86v32)
4847- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4848- os=-sysv32
4849- ;;
4850- i[34567]86v4*)
4851- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4852- os=-sysv4
4853- ;;
4854- i[34567]86v)
4855- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4856- os=-sysv
4857- ;;
4858- i[34567]86sol2)
4859- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4860- os=-solaris2
4861- ;;
4862- i386mach)
4863- basic_machine=i386-mach
4864- os=-mach
4865- ;;
4866- i386-vsta | vsta)
4867- basic_machine=i386-unknown
4868- os=-vsta
4869- ;;
4870- i386-go32 | go32)
4871- basic_machine=i386-unknown
4872- os=-go32
4873- ;;
4874- i386-mingw32 | mingw32)
4875- basic_machine=i386-unknown
4876- os=-mingw32
4877- ;;
4878- iris | iris4d)
4879- basic_machine=mips-sgi
4880- case $os in
4881- -irix*)
4882- ;;
4883- *)
4884- os=-irix4
4885- ;;
4886- esac
4887- ;;
4888- isi68 | isi)
4889- basic_machine=m68k-isi
4890- os=-sysv
4891- ;;
4892- m88k-omron*)
4893- basic_machine=m88k-omron
4894- ;;
4895- magnum | m3230)
4896- basic_machine=mips-mips
4897- os=-sysv
4898- ;;
4899- merlin)
4900- basic_machine=ns32k-utek
4901- os=-sysv
4902- ;;
4903- miniframe)
4904- basic_machine=m68000-convergent
4905- ;;
4906- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
4907- basic_machine=m68k-atari
4908- os=-mint
4909- ;;
4910- mipsel*-linux*)
4911- basic_machine=mipsel-unknown
4912- os=-linux-gnu
4913- ;;
4914- mips*-linux*)
4915- basic_machine=mips-unknown
4916- os=-linux-gnu
4917- ;;
4918- mips3*-*)
4919- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
4920- ;;
4921- mips3*)
4922- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
4923- ;;
4924- monitor)
4925- basic_machine=m68k-rom68k
4926- os=-coff
4927- ;;
4928- msdos)
4929- basic_machine=i386-unknown
4930- os=-msdos
4931- ;;
4932- ncr3000)
4933- basic_machine=i486-ncr
4934- os=-sysv4
4935- ;;
4936- netbsd386)
4937- basic_machine=i386-unknown
4938- os=-netbsd
4939- ;;
4940- netwinder)
4941- basic_machine=armv4l-corel
4942- os=-linux
4943- ;;
4944- news | news700 | news800 | news900)
4945- basic_machine=m68k-sony
4946- os=-newsos
4947- ;;
4948- news1000)
4949- basic_machine=m68030-sony
4950- os=-newsos
4951- ;;
4952- news-3600 | risc-news)
4953- basic_machine=mips-sony
4954- os=-newsos
4955- ;;
4956- necv70)
4957- basic_machine=v70-nec
4958- os=-sysv
4959- ;;
4960- next | m*-next )
4961- basic_machine=m68k-next
4962- case $os in
4963- -nextstep* )
4964- ;;
4965- -ns2*)
4966- os=-nextstep2
4967- ;;
4968- *)
4969- os=-nextstep3
4970- ;;
4971- esac
4972- ;;
4973- nh3000)
4974- basic_machine=m68k-harris
4975- os=-cxux
4976- ;;
4977- nh[45]000)
4978- basic_machine=m88k-harris
4979- os=-cxux
4980- ;;
4981- nindy960)
4982- basic_machine=i960-intel
4983- os=-nindy
4984- ;;
4985- mon960)
4986- basic_machine=i960-intel
4987- os=-mon960
4988- ;;
4989- np1)
4990- basic_machine=np1-gould
4991- ;;
4992- op50n-* | op60c-*)
4993- basic_machine=hppa1.1-oki
4994- os=-proelf
4995- ;;
4996- OSE68000 | ose68000)
4997- basic_machine=m68000-ericsson
4998- os=-ose
4999- ;;
5000- os68k)
5001- basic_machine=m68k-none
5002- os=-os68k
5003- ;;
5004- pa-hitachi)
5005- basic_machine=hppa1.1-hitachi
5006- os=-hiuxwe2
5007- ;;
5008- paragon)
5009- basic_machine=i860-intel
5010- os=-osf
5011- ;;
5012- pbd)
5013- basic_machine=sparc-tti
5014- ;;
5015- pbb)
5016- basic_machine=m68k-tti
5017- ;;
5018- pc532 | pc532-*)
5019- basic_machine=ns32k-pc532
5020- ;;
5021- pentium | p5 | k5 | k6 | nexen)
5022- basic_machine=i586-pc
5023- ;;
5024- pentiumpro | p6 | 6x86)
5025- basic_machine=i686-pc
5026- ;;
5027- pentiumii | pentium2)
5028- basic_machine=i786-pc
5029- ;;
5030- pentium-* | p5-* | k5-* | k6-* | nexen-*)
5031- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
5032- ;;
5033- pentiumpro-* | p6-* | 6x86-*)
5034- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
5035- ;;
5036- pentiumii-* | pentium2-*)
5037- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
5038- ;;
5039- pn)
5040- basic_machine=pn-gould
5041- ;;
5042- power) basic_machine=rs6000-ibm
5043- ;;
5044- ppc) basic_machine=powerpc-unknown
5045- ;;
5046- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
5047- ;;
5048- ppcle | powerpclittle | ppc-le | powerpc-little)
5049- basic_machine=powerpcle-unknown
5050- ;;
5051- ppcle-* | powerpclittle-*)
5052- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
5053- ;;
5054- ps2)
5055- basic_machine=i386-ibm
5056- ;;
5057- rom68k)
5058- basic_machine=m68k-rom68k
5059- os=-coff
5060- ;;
5061- rm[46]00)
5062- basic_machine=mips-siemens
5063- ;;
5064- rtpc | rtpc-*)
5065- basic_machine=romp-ibm
5066- ;;
5067- sa29200)
5068- basic_machine=a29k-amd
5069- os=-udi
5070- ;;
5071- sequent)
5072- basic_machine=i386-sequent
5073- ;;
5074- sh)
5075- basic_machine=sh-hitachi
5076- os=-hms
5077- ;;
5078- sparclite-wrs)
5079- basic_machine=sparclite-wrs
5080- os=-vxworks
5081- ;;
5082- sps7)
5083- basic_machine=m68k-bull
5084- os=-sysv2
5085- ;;
5086- spur)
5087- basic_machine=spur-unknown
5088- ;;
5089- st2000)
5090- basic_machine=m68k-tandem
5091- ;;
5092- stratus)
5093- basic_machine=i860-stratus
5094- os=-sysv4
5095- ;;
5096- sun2)
5097- basic_machine=m68000-sun
5098- ;;
5099- sun2os3)
5100- basic_machine=m68000-sun
5101- os=-sunos3
5102- ;;
5103- sun2os4)
5104- basic_machine=m68000-sun
5105- os=-sunos4
5106- ;;
5107- sun3os3)
5108- basic_machine=m68k-sun
5109- os=-sunos3
5110- ;;
5111- sun3os4)
5112- basic_machine=m68k-sun
5113- os=-sunos4
5114- ;;
5115- sun4os3)
5116- basic_machine=sparc-sun
5117- os=-sunos3
5118- ;;
5119- sun4os4)
5120- basic_machine=sparc-sun
5121- os=-sunos4
5122- ;;
5123- sun4sol2)
5124- basic_machine=sparc-sun
5125- os=-solaris2
5126- ;;
5127- sun3 | sun3-*)
5128- basic_machine=m68k-sun
5129- ;;
5130- sun4)
5131- basic_machine=sparc-sun
5132- ;;
5133- sun386 | sun386i | roadrunner)
5134- basic_machine=i386-sun
5135- ;;
5136- symmetry)
5137- basic_machine=i386-sequent
5138- os=-dynix
5139- ;;
5140- t3e)
5141- basic_machine=t3e-cray
5142- os=-unicos
5143- ;;
5144- tx39)
5145- basic_machine=mipstx39-unknown
5146- ;;
5147- tx39el)
5148- basic_machine=mipstx39el-unknown
5149- ;;
5150- tower | tower-32)
5151- basic_machine=m68k-ncr
5152- ;;
5153- udi29k)
5154- basic_machine=a29k-amd
5155- os=-udi
5156- ;;
5157- ultra3)
5158- basic_machine=a29k-nyu
5159- os=-sym1
5160- ;;
5161- v810 | necv810)
5162- basic_machine=v810-nec
5163- os=-none
5164- ;;
5165- vaxv)
5166- basic_machine=vax-dec
5167- os=-sysv
5168- ;;
5169- vms)
5170- basic_machine=vax-dec
5171- os=-vms
5172- ;;
5173- vpp*|vx|vx-*)
5174- basic_machine=f301-fujitsu
5175- ;;
5176- vxworks960)
5177- basic_machine=i960-wrs
5178- os=-vxworks
5179- ;;
5180- vxworks68)
5181- basic_machine=m68k-wrs
5182- os=-vxworks
5183- ;;
5184- vxworks29k)
5185- basic_machine=a29k-wrs
5186- os=-vxworks
5187- ;;
5188- w65*)
5189- basic_machine=w65-wdc
5190- os=-none
5191- ;;
5192- w89k-*)
5193- basic_machine=hppa1.1-winbond
5194- os=-proelf
5195- ;;
5196- xmp)
5197- basic_machine=xmp-cray
5198- os=-unicos
5199- ;;
5200- xps | xps100)
5201- basic_machine=xps100-honeywell
5202- ;;
5203- z8k-*-coff)
5204- basic_machine=z8k-unknown
5205- os=-sim
5206- ;;
5207- none)
5208- basic_machine=none-none
5209- os=-none
5210- ;;
5211-
5212-# Here we handle the default manufacturer of certain CPU types. It is in
5213-# some cases the only manufacturer, in others, it is the most popular.
5214- w89k)
5215- basic_machine=hppa1.1-winbond
5216- ;;
5217- op50n)
5218- basic_machine=hppa1.1-oki
5219- ;;
5220- op60c)
5221- basic_machine=hppa1.1-oki
5222- ;;
5223- mips)
5224- if [ x$os = x-linux-gnu ]; then
5225- basic_machine=mips-unknown
5226- else
5227- basic_machine=mips-mips
5228- fi
5229- ;;
5230- romp)
5231- basic_machine=romp-ibm
5232- ;;
5233- rs6000)
5234- basic_machine=rs6000-ibm
5235- ;;
5236- vax)
5237- basic_machine=vax-dec
5238- ;;
5239- pdp11)
5240- basic_machine=pdp11-dec
5241- ;;
5242- we32k)
5243- basic_machine=we32k-att
5244- ;;
5245- sparc | sparcv9)
5246- basic_machine=sparc-sun
5247- ;;
5248- cydra)
5249- basic_machine=cydra-cydrome
5250- ;;
5251- orion)
5252- basic_machine=orion-highlevel
5253- ;;
5254- orion105)
5255- basic_machine=clipper-highlevel
5256- ;;
5257- mac | mpw | mac-mpw)
5258- basic_machine=m68k-apple
5259- ;;
5260- pmac | pmac-mpw)
5261- basic_machine=powerpc-apple
5262- ;;
5263- c4x*)
5264- basic_machine=c4x-none
5265- os=-coff
5266- ;;
5267- *)
5268- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
5269- exit 1
5270- ;;
5271-esac
5272-
5273-# Here we canonicalize certain aliases for manufacturers.
5274-case $basic_machine in
5275- *-digital*)
5276- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
5277- ;;
5278- *-commodore*)
5279- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
5280- ;;
5281- *)
5282- ;;
5283-esac
5284-
5285-# Decode manufacturer-specific aliases for certain operating systems.
5286-
5287-if [ x"$os" != x"" ]
5288-then
5289-case $os in
5290- # First match some system type aliases
5291- # that might get confused with valid system types.
5292- # -solaris* is a basic system type, with this one exception.
5293- -solaris1 | -solaris1.*)
5294- os=`echo $os | sed -e 's|solaris1|sunos4|'`
5295- ;;
5296- -solaris)
5297- os=-solaris2
5298- ;;
5299- -svr4*)
5300- os=-sysv4
5301- ;;
5302- -unixware*)
5303- os=-sysv4.2uw
5304- ;;
5305- -gnu/linux*)
5306- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
5307- ;;
5308- # First accept the basic system types.
5309- # The portable systems comes first.
5310- # Each alternative MUST END IN A *, to match a version number.
5311- # -sysv* is not here because it comes later, after sysvr4.
5312- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
5313- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
5314- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
5315- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
5316- | -aos* \
5317- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
5318- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
5319- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
5320- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
5321- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
5322- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
5323- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
5324- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
5325- | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
5326- # Remember, each alternative MUST END IN *, to match a version number.
5327- ;;
5328- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
5329- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
5330- | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
5331- ;;
5332- -mac*)
5333- os=`echo $os | sed -e 's|mac|macos|'`
5334- ;;
5335- -linux*)
5336- os=`echo $os | sed -e 's|linux|linux-gnu|'`
5337- ;;
5338- -sunos5*)
5339- os=`echo $os | sed -e 's|sunos5|solaris2|'`
5340- ;;
5341- -sunos6*)
5342- os=`echo $os | sed -e 's|sunos6|solaris3|'`
5343- ;;
5344- -osfrose*)
5345- os=-osfrose
5346- ;;
5347- -osf*)
5348- os=-osf
5349- ;;
5350- -utek*)
5351- os=-bsd
5352- ;;
5353- -dynix*)
5354- os=-bsd
5355- ;;
5356- -acis*)
5357- os=-aos
5358- ;;
5359- -386bsd)
5360- os=-bsd
5361- ;;
5362- -ctix* | -uts*)
5363- os=-sysv
5364- ;;
5365- -ns2 )
5366- os=-nextstep2
5367- ;;
5368- # Preserve the version number of sinix5.
5369- -sinix5.*)
5370- os=`echo $os | sed -e 's|sinix|sysv|'`
5371- ;;
5372- -sinix*)
5373- os=-sysv4
5374- ;;
5375- -triton*)
5376- os=-sysv3
5377- ;;
5378- -oss*)
5379- os=-sysv3
5380- ;;
5381- -svr4)
5382- os=-sysv4
5383- ;;
5384- -svr3)
5385- os=-sysv3
5386- ;;
5387- -sysvr4)
5388- os=-sysv4
5389- ;;
5390- # This must come after -sysvr4.
5391- -sysv*)
5392- ;;
5393- -ose*)
5394- os=-ose
5395- ;;
5396- -es1800*)
5397- os=-ose
5398- ;;
5399- -xenix)
5400- os=-xenix
5401- ;;
5402- -*mint | -*MiNT)
5403- os=-mint
5404- ;;
5405- -none)
5406- ;;
5407- *)
5408- # Get rid of the `-' at the beginning of $os.
5409- os=`echo $os | sed 's/[^-]*-//'`
5410- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
5411- exit 1
5412- ;;
5413-esac
5414-else
5415-
5416-# Here we handle the default operating systems that come with various machines.
5417-# The value should be what the vendor currently ships out the door with their
5418-# machine or put another way, the most popular os provided with the machine.
5419-
5420-# Note that if you're going to try to match "-MANUFACTURER" here (say,
5421-# "-sun"), then you have to tell the case statement up towards the top
5422-# that MANUFACTURER isn't an operating system. Otherwise, code above
5423-# will signal an error saying that MANUFACTURER isn't an operating
5424-# system, and we'll never get to this point.
5425-
5426-case $basic_machine in
5427- *-acorn)
5428- os=-riscix1.2
5429- ;;
5430- arm*-corel)
5431- os=-linux
5432- ;;
5433- arm*-semi)
5434- os=-aout
5435- ;;
5436- pdp11-*)
5437- os=-none
5438- ;;
5439- *-dec | vax-*)
5440- os=-ultrix4.2
5441- ;;
5442- m68*-apollo)
5443- os=-domain
5444- ;;
5445- i386-sun)
5446- os=-sunos4.0.2
5447- ;;
5448- m68000-sun)
5449- os=-sunos3
5450- # This also exists in the configure program, but was not the
5451- # default.
5452- # os=-sunos4
5453- ;;
5454- m68*-cisco)
5455- os=-aout
5456- ;;
5457- mips*-cisco)
5458- os=-elf
5459- ;;
5460- mips*-*)
5461- os=-elf
5462- ;;
5463- *-tti) # must be before sparc entry or we get the wrong os.
5464- os=-sysv3
5465- ;;
5466- sparc-* | *-sun)
5467- os=-sunos4.1.1
5468- ;;
5469- *-be)
5470- os=-beos
5471- ;;
5472- *-ibm)
5473- os=-aix
5474- ;;
5475- *-wec)
5476- os=-proelf
5477- ;;
5478- *-winbond)
5479- os=-proelf
5480- ;;
5481- *-oki)
5482- os=-proelf
5483- ;;
5484- *-hp)
5485- os=-hpux
5486- ;;
5487- *-hitachi)
5488- os=-hiux
5489- ;;
5490- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
5491- os=-sysv
5492- ;;
5493- *-cbm)
5494- os=-amigaos
5495- ;;
5496- *-dg)
5497- os=-dgux
5498- ;;
5499- *-dolphin)
5500- os=-sysv3
5501- ;;
5502- m68k-ccur)
5503- os=-rtu
5504- ;;
5505- m88k-omron*)
5506- os=-luna
5507- ;;
5508- *-next )
5509- os=-nextstep
5510- ;;
5511- *-sequent)
5512- os=-ptx
5513- ;;
5514- *-crds)
5515- os=-unos
5516- ;;
5517- *-ns)
5518- os=-genix
5519- ;;
5520- i370-*)
5521- os=-mvs
5522- ;;
5523- *-next)
5524- os=-nextstep3
5525- ;;
5526- *-gould)
5527- os=-sysv
5528- ;;
5529- *-highlevel)
5530- os=-bsd
5531- ;;
5532- *-encore)
5533- os=-bsd
5534- ;;
5535- *-sgi)
5536- os=-irix
5537- ;;
5538- *-siemens)
5539- os=-sysv4
5540- ;;
5541- *-masscomp)
5542- os=-rtu
5543- ;;
5544- f301-fujitsu)
5545- os=-uxpv
5546- ;;
5547- *-rom68k)
5548- os=-coff
5549- ;;
5550- *-*bug)
5551- os=-coff
5552- ;;
5553- *-apple)
5554- os=-macos
5555- ;;
5556- *-atari*)
5557- os=-mint
5558- ;;
5559- *)
5560- os=-none
5561- ;;
5562-esac
5563-fi
5564-
5565-# Here we handle the case where we know the os, and the CPU type, but not the
5566-# manufacturer. We pick the logical manufacturer.
5567-vendor=unknown
5568-case $basic_machine in
5569- *-unknown)
5570- case $os in
5571- -riscix*)
5572- vendor=acorn
5573- ;;
5574- -sunos*)
5575- vendor=sun
5576- ;;
5577- -aix*)
5578- vendor=ibm
5579- ;;
5580- -beos*)
5581- vendor=be
5582- ;;
5583- -hpux*)
5584- vendor=hp
5585- ;;
5586- -mpeix*)
5587- vendor=hp
5588- ;;
5589- -hiux*)
5590- vendor=hitachi
5591- ;;
5592- -unos*)
5593- vendor=crds
5594- ;;
5595- -dgux*)
5596- vendor=dg
5597- ;;
5598- -luna*)
5599- vendor=omron
5600- ;;
5601- -genix*)
5602- vendor=ns
5603- ;;
5604- -mvs*)
5605- vendor=ibm
5606- ;;
5607- -ptx*)
5608- vendor=sequent
5609- ;;
5610- -vxsim* | -vxworks*)
5611- vendor=wrs
5612- ;;
5613- -aux*)
5614- vendor=apple
5615- ;;
5616- -hms*)
5617- vendor=hitachi
5618- ;;
5619- -mpw* | -macos*)
5620- vendor=apple
5621- ;;
5622- -*mint | -*MiNT)
5623- vendor=atari
5624- ;;
5625- esac
5626- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
5627- ;;
5628-esac
5629-
5630-echo $basic_machine$os
5631diff -urNd -urNd patch-2.5.4/configure patch-2.5.9/configure
5632--- patch-2.5.4/configure 1999-08-30 02:44:34.000000000 -0400
5633+++ patch-2.5.9/configure 2003-05-19 02:50:21.000000000 -0400
5634@@ -1,28 +1,326 @@
5635 #! /bin/sh
5636-
5637 # Guess values for system-dependent variables and create Makefiles.
5638-# Generated automatically using autoconf version 2.13
5639-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5640+# Generated by GNU Autoconf 2.57 for patch 2.5.9.
5641 #
5642+# Report bugs to <bug-patch@gnu.org>.
5643+#
5644+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
5645+# Free Software Foundation, Inc.
5646 # This configure script is free software; the Free Software Foundation
5647 # gives unlimited permission to copy, distribute and modify it.
5648+## --------------------- ##
5649+## M4sh Initialization. ##
5650+## --------------------- ##
5651
5652-# Defaults:
5653-ac_help=
5654+# Be Bourne compatible
5655+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5656+ emulate sh
5657+ NULLCMD=:
5658+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5659+ # is contrary to our usage. Disable this feature.
5660+ alias -g '${1+"$@"}'='"$@"'
5661+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5662+ set -o posix
5663+fi
5664+
5665+# Support unset when possible.
5666+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5667+ as_unset=unset
5668+else
5669+ as_unset=false
5670+fi
5671+
5672+
5673+# Work around bugs in pre-3.0 UWIN ksh.
5674+$as_unset ENV MAIL MAILPATH
5675+PS1='$ '
5676+PS2='> '
5677+PS4='+ '
5678+
5679+# NLS nuisances.
5680+for as_var in \
5681+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5682+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5683+ LC_TELEPHONE LC_TIME
5684+do
5685+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5686+ eval $as_var=C; export $as_var
5687+ else
5688+ $as_unset $as_var
5689+ fi
5690+done
5691+
5692+# Required to use basename.
5693+if expr a : '\(a\)' >/dev/null 2>&1; then
5694+ as_expr=expr
5695+else
5696+ as_expr=false
5697+fi
5698+
5699+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5700+ as_basename=basename
5701+else
5702+ as_basename=false
5703+fi
5704+
5705+
5706+# Name of the executable.
5707+as_me=`$as_basename "$0" ||
5708+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5709+ X"$0" : 'X\(//\)$' \| \
5710+ X"$0" : 'X\(/\)$' \| \
5711+ . : '\(.\)' 2>/dev/null ||
5712+echo X/"$0" |
5713+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5714+ /^X\/\(\/\/\)$/{ s//\1/; q; }
5715+ /^X\/\(\/\).*/{ s//\1/; q; }
5716+ s/.*/./; q'`
5717+
5718+
5719+# PATH needs CR, and LINENO needs CR and PATH.
5720+# Avoid depending upon Character Ranges.
5721+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5722+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5723+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5724+as_cr_digits='0123456789'
5725+as_cr_alnum=$as_cr_Letters$as_cr_digits
5726+
5727+# The user is always right.
5728+if test "${PATH_SEPARATOR+set}" != set; then
5729+ echo "#! /bin/sh" >conf$$.sh
5730+ echo "exit 0" >>conf$$.sh
5731+ chmod +x conf$$.sh
5732+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5733+ PATH_SEPARATOR=';'
5734+ else
5735+ PATH_SEPARATOR=:
5736+ fi
5737+ rm -f conf$$.sh
5738+fi
5739+
5740+
5741+ as_lineno_1=$LINENO
5742+ as_lineno_2=$LINENO
5743+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5744+ test "x$as_lineno_1" != "x$as_lineno_2" &&
5745+ test "x$as_lineno_3" = "x$as_lineno_2" || {
5746+ # Find who we are. Look in the path if we contain no path at all
5747+ # relative or not.
5748+ case $0 in
5749+ *[\\/]* ) as_myself=$0 ;;
5750+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751+for as_dir in $PATH
5752+do
5753+ IFS=$as_save_IFS
5754+ test -z "$as_dir" && as_dir=.
5755+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5756+done
5757+
5758+ ;;
5759+ esac
5760+ # We did not find ourselves, most probably we were run as `sh COMMAND'
5761+ # in which case we are not to be found in the path.
5762+ if test "x$as_myself" = x; then
5763+ as_myself=$0
5764+ fi
5765+ if test ! -f "$as_myself"; then
5766+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
5767+ { (exit 1); exit 1; }; }
5768+ fi
5769+ case $CONFIG_SHELL in
5770+ '')
5771+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5773+do
5774+ IFS=$as_save_IFS
5775+ test -z "$as_dir" && as_dir=.
5776+ for as_base in sh bash ksh sh5; do
5777+ case $as_dir in
5778+ /*)
5779+ if ("$as_dir/$as_base" -c '
5780+ as_lineno_1=$LINENO
5781+ as_lineno_2=$LINENO
5782+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5783+ test "x$as_lineno_1" != "x$as_lineno_2" &&
5784+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
5785+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
5786+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
5787+ CONFIG_SHELL=$as_dir/$as_base
5788+ export CONFIG_SHELL
5789+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
5790+ fi;;
5791+ esac
5792+ done
5793+done
5794+;;
5795+ esac
5796+
5797+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5798+ # uniformly replaced by the line number. The first 'sed' inserts a
5799+ # line-number line before each line; the second 'sed' does the real
5800+ # work. The second script uses 'N' to pair each line-number line
5801+ # with the numbered line, and appends trailing '-' during
5802+ # substitution so that $LINENO is not a special case at line end.
5803+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5804+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
5805+ sed '=' <$as_myself |
5806+ sed '
5807+ N
5808+ s,$,-,
5809+ : loop
5810+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
5811+ t loop
5812+ s,-$,,
5813+ s,^['$as_cr_digits']*\n,,
5814+ ' >$as_me.lineno &&
5815+ chmod +x $as_me.lineno ||
5816+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
5817+ { (exit 1); exit 1; }; }
5818+
5819+ # Don't try to exec as it changes $[0], causing all sort of problems
5820+ # (the dirname of $[0] is not the place where we might find the
5821+ # original and so on. Autoconf is especially sensible to this).
5822+ . ./$as_me.lineno
5823+ # Exit status is that of the last command.
5824+ exit
5825+}
5826+
5827+
5828+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5829+ *c*,-n*) ECHO_N= ECHO_C='
5830+' ECHO_T=' ' ;;
5831+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5832+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
5833+esac
5834+
5835+if expr a : '\(a\)' >/dev/null 2>&1; then
5836+ as_expr=expr
5837+else
5838+ as_expr=false
5839+fi
5840+
5841+rm -f conf$$ conf$$.exe conf$$.file
5842+echo >conf$$.file
5843+if ln -s conf$$.file conf$$ 2>/dev/null; then
5844+ # We could just check for DJGPP; but this test a) works b) is more generic
5845+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5846+ if test -f conf$$.exe; then
5847+ # Don't use ln at all; we don't have any links
5848+ as_ln_s='cp -p'
5849+ else
5850+ as_ln_s='ln -s'
5851+ fi
5852+elif ln conf$$.file conf$$ 2>/dev/null; then
5853+ as_ln_s=ln
5854+else
5855+ as_ln_s='cp -p'
5856+fi
5857+rm -f conf$$ conf$$.exe conf$$.file
5858+
5859+if mkdir -p . 2>/dev/null; then
5860+ as_mkdir_p=:
5861+else
5862+ as_mkdir_p=false
5863+fi
5864+
5865+as_executable_p="test -f"
5866+
5867+# Sed expression to map a string onto a valid CPP name.
5868+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
5869+
5870+# Sed expression to map a string onto a valid variable name.
5871+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5872+
5873+
5874+# IFS
5875+# We need space, tab and new line, in precisely that order.
5876+as_nl='
5877+'
5878+IFS=" $as_nl"
5879+
5880+# CDPATH.
5881+$as_unset CDPATH
5882+
5883+
5884+# Name of the host.
5885+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
5886+# so uname gets run too.
5887+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
5888+
5889+exec 6>&1
5890+
5891+#
5892+# Initializations.
5893+#
5894 ac_default_prefix=/usr/local
5895-# Any additions from configure.in:
5896-ac_help="$ac_help
5897- --disable-largefile omit support for large files"
5898+ac_config_libobj_dir=.
5899+cross_compiling=no
5900+subdirs=
5901+MFLAGS=
5902+MAKEFLAGS=
5903+SHELL=${CONFIG_SHELL-/bin/sh}
5904+
5905+# Maximum number of lines to put in a shell here document.
5906+# This variable seems obsolete. It should probably be removed, and
5907+# only ac_max_sed_lines should be used.
5908+: ${ac_max_here_lines=38}
5909+
5910+# Identity of this package.
5911+PACKAGE_NAME='patch'
5912+PACKAGE_TARNAME='patch'
5913+PACKAGE_VERSION='2.5.9'
5914+PACKAGE_STRING='patch 2.5.9'
5915+PACKAGE_BUGREPORT='bug-patch@gnu.org'
5916+
5917+ac_unique_file="patch.c"
5918+# Factoring default headers for most tests.
5919+ac_includes_default="\
5920+#include <stdio.h>
5921+#if HAVE_SYS_TYPES_H
5922+# include <sys/types.h>
5923+#endif
5924+#if HAVE_SYS_STAT_H
5925+# include <sys/stat.h>
5926+#endif
5927+#if STDC_HEADERS
5928+# include <stdlib.h>
5929+# include <stddef.h>
5930+#else
5931+# if HAVE_STDLIB_H
5932+# include <stdlib.h>
5933+# endif
5934+#endif
5935+#if HAVE_STRING_H
5936+# if !STDC_HEADERS && HAVE_MEMORY_H
5937+# include <memory.h>
5938+# endif
5939+# include <string.h>
5940+#endif
5941+#if HAVE_STRINGS_H
5942+# include <strings.h>
5943+#endif
5944+#if HAVE_INTTYPES_H
5945+# include <inttypes.h>
5946+#else
5947+# if HAVE_STDINT_H
5948+# include <stdint.h>
5949+# endif
5950+#endif
5951+#if HAVE_UNISTD_H
5952+# include <unistd.h>
5953+#endif"
5954+
5955+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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE ed_PROGRAM EGREP STDBOOL_H HAVE__BOOL LIBOBJS LTLIBOBJS'
5956+ac_subst_files=''
5957
5958 # Initialize some variables set by options.
5959+ac_init_help=
5960+ac_init_version=false
5961 # The variables have the same names as the options, with
5962 # dashes changed to underlines.
5963-build=NONE
5964-cache_file=./config.cache
5965+cache_file=/dev/null
5966 exec_prefix=NONE
5967-host=NONE
5968 no_create=
5969-nonopt=NONE
5970 no_recursion=
5971 prefix=NONE
5972 program_prefix=NONE
5973@@ -31,10 +329,15 @@
5974 silent=
5975 site=
5976 srcdir=
5977-target=NONE
5978 verbose=
5979 x_includes=NONE
5980 x_libraries=NONE
5981+
5982+# Installation directory options.
5983+# These are left unexpanded so users can "make install exec_prefix=/foo"
5984+# and all the variables that are supposed to be based on exec_prefix
5985+# by default will actually change.
5986+# Use braces instead of parens because sh, perl, etc. also accept them.
5987 bindir='${exec_prefix}/bin'
5988 sbindir='${exec_prefix}/sbin'
5989 libexecdir='${exec_prefix}/libexec'
5990@@ -48,17 +351,9 @@
5991 infodir='${prefix}/info'
5992 mandir='${prefix}/man'
5993
5994-# Initialize some other variables.
5995-subdirs=
5996-MFLAGS= MAKEFLAGS=
5997-SHELL=${CONFIG_SHELL-/bin/sh}
5998-# Maximum number of lines to put in a shell here document.
5999-ac_max_here_lines=12
6000-
6001 ac_prev=
6002 for ac_option
6003 do
6004-
6005 # If the previous option needs an argument, assign it.
6006 if test -n "$ac_prev"; then
6007 eval "$ac_prev=\$ac_option"
6008@@ -66,59 +361,59 @@
6009 continue
6010 fi
6011
6012- case "$ac_option" in
6013- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
6014- *) ac_optarg= ;;
6015- esac
6016+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
6017
6018 # Accept the important Cygnus configure options, so we can diagnose typos.
6019
6020- case "$ac_option" in
6021+ case $ac_option in
6022
6023 -bindir | --bindir | --bindi | --bind | --bin | --bi)
6024 ac_prev=bindir ;;
6025 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6026- bindir="$ac_optarg" ;;
6027+ bindir=$ac_optarg ;;
6028
6029 -build | --build | --buil | --bui | --bu)
6030- ac_prev=build ;;
6031+ ac_prev=build_alias ;;
6032 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6033- build="$ac_optarg" ;;
6034+ build_alias=$ac_optarg ;;
6035
6036 -cache-file | --cache-file | --cache-fil | --cache-fi \
6037 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6038 ac_prev=cache_file ;;
6039 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6040 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6041- cache_file="$ac_optarg" ;;
6042+ cache_file=$ac_optarg ;;
6043+
6044+ --config-cache | -C)
6045+ cache_file=config.cache ;;
6046
6047 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
6048 ac_prev=datadir ;;
6049 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
6050 | --da=*)
6051- datadir="$ac_optarg" ;;
6052+ datadir=$ac_optarg ;;
6053
6054 -disable-* | --disable-*)
6055- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
6056+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
6057 # Reject names that are not valid shell variable names.
6058- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
6059- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
6060- fi
6061- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
6062- eval "enable_${ac_feature}=no" ;;
6063+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6064+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6065+ { (exit 1); exit 1; }; }
6066+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6067+ eval "enable_$ac_feature=no" ;;
6068
6069 -enable-* | --enable-*)
6070- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
6071+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
6072 # Reject names that are not valid shell variable names.
6073- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
6074- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
6075- fi
6076- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
6077- case "$ac_option" in
6078- *=*) ;;
6079+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6080+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6081+ { (exit 1); exit 1; }; }
6082+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6083+ case $ac_option in
6084+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6085 *) ac_optarg=yes ;;
6086 esac
6087- eval "enable_${ac_feature}='$ac_optarg'" ;;
6088+ eval "enable_$ac_feature='$ac_optarg'" ;;
6089
6090 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
6091 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
6092@@ -127,95 +422,47 @@
6093 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
6094 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
6095 | --exec=* | --exe=* | --ex=*)
6096- exec_prefix="$ac_optarg" ;;
6097+ exec_prefix=$ac_optarg ;;
6098
6099 -gas | --gas | --ga | --g)
6100 # Obsolete; use --with-gas.
6101 with_gas=yes ;;
6102
6103- -help | --help | --hel | --he)
6104- # Omit some internal or obsolete options to make the list less imposing.
6105- # This message is too long to be a string in the A/UX 3.1 sh.
6106- cat << EOF
6107-Usage: configure [options] [host]
6108-Options: [defaults in brackets after descriptions]
6109-Configuration:
6110- --cache-file=FILE cache test results in FILE
6111- --help print this message
6112- --no-create do not create output files
6113- --quiet, --silent do not print \`checking...' messages
6114- --version print the version of autoconf that created configure
6115-Directory and file names:
6116- --prefix=PREFIX install architecture-independent files in PREFIX
6117- [$ac_default_prefix]
6118- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
6119- [same as prefix]
6120- --bindir=DIR user executables in DIR [EPREFIX/bin]
6121- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
6122- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
6123- --datadir=DIR read-only architecture-independent data in DIR
6124- [PREFIX/share]
6125- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
6126- --sharedstatedir=DIR modifiable architecture-independent data in DIR
6127- [PREFIX/com]
6128- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
6129- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
6130- --includedir=DIR C header files in DIR [PREFIX/include]
6131- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
6132- --infodir=DIR info documentation in DIR [PREFIX/info]
6133- --mandir=DIR man documentation in DIR [PREFIX/man]
6134- --srcdir=DIR find the sources in DIR [configure dir or ..]
6135- --program-prefix=PREFIX prepend PREFIX to installed program names
6136- --program-suffix=SUFFIX append SUFFIX to installed program names
6137- --program-transform-name=PROGRAM
6138- run sed PROGRAM on installed program names
6139-EOF
6140- cat << EOF
6141-Host type:
6142- --build=BUILD configure for building on BUILD [BUILD=HOST]
6143- --host=HOST configure for HOST [guessed]
6144- --target=TARGET configure for TARGET [TARGET=HOST]
6145-Features and packages:
6146- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
6147- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6148- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
6149- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
6150- --x-includes=DIR X include files are in DIR
6151- --x-libraries=DIR X library files are in DIR
6152-EOF
6153- if test -n "$ac_help"; then
6154- echo "--enable and --with options recognized:$ac_help"
6155- fi
6156- exit 0 ;;
6157+ -help | --help | --hel | --he | -h)
6158+ ac_init_help=long ;;
6159+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
6160+ ac_init_help=recursive ;;
6161+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
6162+ ac_init_help=short ;;
6163
6164 -host | --host | --hos | --ho)
6165- ac_prev=host ;;
6166+ ac_prev=host_alias ;;
6167 -host=* | --host=* | --hos=* | --ho=*)
6168- host="$ac_optarg" ;;
6169+ host_alias=$ac_optarg ;;
6170
6171 -includedir | --includedir | --includedi | --included | --include \
6172 | --includ | --inclu | --incl | --inc)
6173 ac_prev=includedir ;;
6174 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
6175 | --includ=* | --inclu=* | --incl=* | --inc=*)
6176- includedir="$ac_optarg" ;;
6177+ includedir=$ac_optarg ;;
6178
6179 -infodir | --infodir | --infodi | --infod | --info | --inf)
6180 ac_prev=infodir ;;
6181 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6182- infodir="$ac_optarg" ;;
6183+ infodir=$ac_optarg ;;
6184
6185 -libdir | --libdir | --libdi | --libd)
6186 ac_prev=libdir ;;
6187 -libdir=* | --libdir=* | --libdi=* | --libd=*)
6188- libdir="$ac_optarg" ;;
6189+ libdir=$ac_optarg ;;
6190
6191 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
6192 | --libexe | --libex | --libe)
6193 ac_prev=libexecdir ;;
6194 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
6195 | --libexe=* | --libex=* | --libe=*)
6196- libexecdir="$ac_optarg" ;;
6197+ libexecdir=$ac_optarg ;;
6198
6199 -localstatedir | --localstatedir | --localstatedi | --localstated \
6200 | --localstate | --localstat | --localsta | --localst \
6201@@ -224,19 +471,19 @@
6202 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
6203 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
6204 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
6205- localstatedir="$ac_optarg" ;;
6206+ localstatedir=$ac_optarg ;;
6207
6208 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
6209 ac_prev=mandir ;;
6210 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6211- mandir="$ac_optarg" ;;
6212+ mandir=$ac_optarg ;;
6213
6214 -nfp | --nfp | --nf)
6215 # Obsolete; use --without-fp.
6216 with_fp=no ;;
6217
6218 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
6219- | --no-cr | --no-c)
6220+ | --no-cr | --no-c | -n)
6221 no_create=yes ;;
6222
6223 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
6224@@ -250,26 +497,26 @@
6225 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
6226 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
6227 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
6228- oldincludedir="$ac_optarg" ;;
6229+ oldincludedir=$ac_optarg ;;
6230
6231 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6232 ac_prev=prefix ;;
6233 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6234- prefix="$ac_optarg" ;;
6235+ prefix=$ac_optarg ;;
6236
6237 -program-prefix | --program-prefix | --program-prefi | --program-pref \
6238 | --program-pre | --program-pr | --program-p)
6239 ac_prev=program_prefix ;;
6240 -program-prefix=* | --program-prefix=* | --program-prefi=* \
6241 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
6242- program_prefix="$ac_optarg" ;;
6243+ program_prefix=$ac_optarg ;;
6244
6245 -program-suffix | --program-suffix | --program-suffi | --program-suff \
6246 | --program-suf | --program-su | --program-s)
6247 ac_prev=program_suffix ;;
6248 -program-suffix=* | --program-suffix=* | --program-suffi=* \
6249 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
6250- program_suffix="$ac_optarg" ;;
6251+ program_suffix=$ac_optarg ;;
6252
6253 -program-transform-name | --program-transform-name \
6254 | --program-transform-nam | --program-transform-na \
6255@@ -286,7 +533,7 @@
6256 | --program-transfo=* | --program-transf=* \
6257 | --program-trans=* | --program-tran=* \
6258 | --progr-tra=* | --program-tr=* | --program-t=*)
6259- program_transform_name="$ac_optarg" ;;
6260+ program_transform_name=$ac_optarg ;;
6261
6262 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6263 | -silent | --silent | --silen | --sile | --sil)
6264@@ -296,7 +543,7 @@
6265 ac_prev=sbindir ;;
6266 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
6267 | --sbi=* | --sb=*)
6268- sbindir="$ac_optarg" ;;
6269+ sbindir=$ac_optarg ;;
6270
6271 -sharedstatedir | --sharedstatedir | --sharedstatedi \
6272 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
6273@@ -307,58 +554,57 @@
6274 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
6275 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
6276 | --sha=* | --sh=*)
6277- sharedstatedir="$ac_optarg" ;;
6278+ sharedstatedir=$ac_optarg ;;
6279
6280 -site | --site | --sit)
6281 ac_prev=site ;;
6282 -site=* | --site=* | --sit=*)
6283- site="$ac_optarg" ;;
6284+ site=$ac_optarg ;;
6285
6286 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6287 ac_prev=srcdir ;;
6288 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6289- srcdir="$ac_optarg" ;;
6290+ srcdir=$ac_optarg ;;
6291
6292 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
6293 | --syscon | --sysco | --sysc | --sys | --sy)
6294 ac_prev=sysconfdir ;;
6295 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
6296 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
6297- sysconfdir="$ac_optarg" ;;
6298+ sysconfdir=$ac_optarg ;;
6299
6300 -target | --target | --targe | --targ | --tar | --ta | --t)
6301- ac_prev=target ;;
6302+ ac_prev=target_alias ;;
6303 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6304- target="$ac_optarg" ;;
6305+ target_alias=$ac_optarg ;;
6306
6307 -v | -verbose | --verbose | --verbos | --verbo | --verb)
6308 verbose=yes ;;
6309
6310- -version | --version | --versio | --versi | --vers)
6311- echo "configure generated by autoconf version 2.13"
6312- exit 0 ;;
6313+ -version | --version | --versio | --versi | --vers | -V)
6314+ ac_init_version=: ;;
6315
6316 -with-* | --with-*)
6317- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
6318+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
6319 # Reject names that are not valid shell variable names.
6320- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
6321- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
6322- fi
6323+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6324+ { echo "$as_me: error: invalid package name: $ac_package" >&2
6325+ { (exit 1); exit 1; }; }
6326 ac_package=`echo $ac_package| sed 's/-/_/g'`
6327- case "$ac_option" in
6328- *=*) ;;
6329+ case $ac_option in
6330+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6331 *) ac_optarg=yes ;;
6332 esac
6333- eval "with_${ac_package}='$ac_optarg'" ;;
6334+ eval "with_$ac_package='$ac_optarg'" ;;
6335
6336 -without-* | --without-*)
6337- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
6338+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
6339 # Reject names that are not valid shell variable names.
6340- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
6341- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
6342- fi
6343- ac_package=`echo $ac_package| sed 's/-/_/g'`
6344- eval "with_${ac_package}=no" ;;
6345+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6346+ { echo "$as_me: error: invalid package name: $ac_package" >&2
6347+ { (exit 1); exit 1; }; }
6348+ ac_package=`echo $ac_package | sed 's/-/_/g'`
6349+ eval "with_$ac_package=no" ;;
6350
6351 --x)
6352 # Obsolete; use --with-x.
6353@@ -369,99 +615,110 @@
6354 ac_prev=x_includes ;;
6355 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
6356 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
6357- x_includes="$ac_optarg" ;;
6358+ x_includes=$ac_optarg ;;
6359
6360 -x-libraries | --x-libraries | --x-librarie | --x-librari \
6361 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
6362 ac_prev=x_libraries ;;
6363 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
6364 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
6365- x_libraries="$ac_optarg" ;;
6366+ x_libraries=$ac_optarg ;;
6367
6368- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
6369+ -*) { echo "$as_me: error: unrecognized option: $ac_option
6370+Try \`$0 --help' for more information." >&2
6371+ { (exit 1); exit 1; }; }
6372 ;;
6373
6374+ *=*)
6375+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
6376+ # Reject names that are not valid shell variable names.
6377+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
6378+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
6379+ { (exit 1); exit 1; }; }
6380+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
6381+ eval "$ac_envvar='$ac_optarg'"
6382+ export $ac_envvar ;;
6383+
6384 *)
6385- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
6386- echo "configure: warning: $ac_option: invalid host type" 1>&2
6387- fi
6388- if test "x$nonopt" != xNONE; then
6389- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
6390- fi
6391- nonopt="$ac_option"
6392+ # FIXME: should be removed in autoconf 3.0.
6393+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
6394+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
6395+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
6396+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
6397 ;;
6398
6399 esac
6400 done
6401
6402 if test -n "$ac_prev"; then
6403- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
6404-fi
6405-
6406-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6407-
6408-# File descriptor usage:
6409-# 0 standard input
6410-# 1 file creation
6411-# 2 errors and warnings
6412-# 3 some systems may open it to /dev/tty
6413-# 4 used on the Kubota Titan
6414-# 6 checking for... messages and results
6415-# 5 compiler messages saved in config.log
6416-if test "$silent" = yes; then
6417- exec 6>/dev/null
6418-else
6419- exec 6>&1
6420+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
6421+ { echo "$as_me: error: missing argument to $ac_option" >&2
6422+ { (exit 1); exit 1; }; }
6423 fi
6424-exec 5>./config.log
6425
6426-echo "\
6427-This file contains any messages produced by compilers while
6428-running configure, to aid debugging if configure makes a mistake.
6429-" 1>&5
6430+# Be sure to have absolute paths.
6431+for ac_var in exec_prefix prefix
6432+do
6433+ eval ac_val=$`echo $ac_var`
6434+ case $ac_val in
6435+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
6436+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6437+ { (exit 1); exit 1; }; };;
6438+ esac
6439+done
6440
6441-# Strip out --no-create and --no-recursion so they do not pile up.
6442-# Also quote any args containing shell metacharacters.
6443-ac_configure_args=
6444-for ac_arg
6445+# Be sure to have absolute paths.
6446+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
6447+ localstatedir libdir includedir oldincludedir infodir mandir
6448 do
6449- case "$ac_arg" in
6450- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
6451- | --no-cr | --no-c) ;;
6452- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
6453- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
6454- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
6455- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
6456- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
6457+ eval ac_val=$`echo $ac_var`
6458+ case $ac_val in
6459+ [\\/$]* | ?:[\\/]* ) ;;
6460+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6461+ { (exit 1); exit 1; }; };;
6462 esac
6463 done
6464
6465-# NLS nuisances.
6466-# Only set these to C if already set. These must not be set unconditionally
6467-# because not all systems understand e.g. LANG=C (notably SCO).
6468-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
6469-# Non-C LC_CTYPE values break the ctype check.
6470-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
6471-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
6472-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
6473-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
6474+# There might be people who depend on the old broken behavior: `$host'
6475+# used to hold the argument of --host etc.
6476+# FIXME: To remove some day.
6477+build=$build_alias
6478+host=$host_alias
6479+target=$target_alias
6480
6481-# confdefs.h avoids OS command line length limits that DEFS can exceed.
6482-rm -rf conftest* confdefs.h
6483-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
6484-echo > confdefs.h
6485+# FIXME: To remove some day.
6486+if test "x$host_alias" != x; then
6487+ if test "x$build_alias" = x; then
6488+ cross_compiling=maybe
6489+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
6490+ If a cross compiler is detected then cross compile mode will be used." >&2
6491+ elif test "x$build_alias" != "x$host_alias"; then
6492+ cross_compiling=yes
6493+ fi
6494+fi
6495+
6496+ac_tool_prefix=
6497+test -n "$host_alias" && ac_tool_prefix=$host_alias-
6498+
6499+test "$silent" = yes && exec 6>/dev/null
6500
6501-# A filename unique to this package, relative to the directory that
6502-# configure is in, which we can look for to find out if srcdir is correct.
6503-ac_unique_file=patch.c
6504
6505 # Find the source files, if location was not specified.
6506 if test -z "$srcdir"; then
6507 ac_srcdir_defaulted=yes
6508 # Try the directory containing this script, then its parent.
6509- ac_prog=$0
6510- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
6511- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
6512+ ac_confdir=`(dirname "$0") 2>/dev/null ||
6513+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6514+ X"$0" : 'X\(//\)[^/]' \| \
6515+ X"$0" : 'X\(//\)$' \| \
6516+ X"$0" : 'X\(/\)' \| \
6517+ . : '\(.\)' 2>/dev/null ||
6518+echo X"$0" |
6519+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6520+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6521+ /^X\(\/\/\)$/{ s//\1/; q; }
6522+ /^X\(\/\).*/{ s//\1/; q; }
6523+ s/.*/./; q'`
6524 srcdir=$ac_confdir
6525 if test ! -r $srcdir/$ac_unique_file; then
6526 srcdir=..
6527@@ -471,13 +728,437 @@
6528 fi
6529 if test ! -r $srcdir/$ac_unique_file; then
6530 if test "$ac_srcdir_defaulted" = yes; then
6531- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
6532+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
6533+ { (exit 1); exit 1; }; }
6534 else
6535- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
6536+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
6537+ { (exit 1); exit 1; }; }
6538 fi
6539 fi
6540-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
6541+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
6542+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
6543+ { (exit 1); exit 1; }; }
6544+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
6545+ac_env_build_alias_set=${build_alias+set}
6546+ac_env_build_alias_value=$build_alias
6547+ac_cv_env_build_alias_set=${build_alias+set}
6548+ac_cv_env_build_alias_value=$build_alias
6549+ac_env_host_alias_set=${host_alias+set}
6550+ac_env_host_alias_value=$host_alias
6551+ac_cv_env_host_alias_set=${host_alias+set}
6552+ac_cv_env_host_alias_value=$host_alias
6553+ac_env_target_alias_set=${target_alias+set}
6554+ac_env_target_alias_value=$target_alias
6555+ac_cv_env_target_alias_set=${target_alias+set}
6556+ac_cv_env_target_alias_value=$target_alias
6557+ac_env_CC_set=${CC+set}
6558+ac_env_CC_value=$CC
6559+ac_cv_env_CC_set=${CC+set}
6560+ac_cv_env_CC_value=$CC
6561+ac_env_CFLAGS_set=${CFLAGS+set}
6562+ac_env_CFLAGS_value=$CFLAGS
6563+ac_cv_env_CFLAGS_set=${CFLAGS+set}
6564+ac_cv_env_CFLAGS_value=$CFLAGS
6565+ac_env_LDFLAGS_set=${LDFLAGS+set}
6566+ac_env_LDFLAGS_value=$LDFLAGS
6567+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
6568+ac_cv_env_LDFLAGS_value=$LDFLAGS
6569+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
6570+ac_env_CPPFLAGS_value=$CPPFLAGS
6571+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
6572+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
6573+ac_env_CPP_set=${CPP+set}
6574+ac_env_CPP_value=$CPP
6575+ac_cv_env_CPP_set=${CPP+set}
6576+ac_cv_env_CPP_value=$CPP
6577+
6578+#
6579+# Report the --help message.
6580+#
6581+if test "$ac_init_help" = "long"; then
6582+ # Omit some internal or obsolete options to make the list less imposing.
6583+ # This message is too long to be a string in the A/UX 3.1 sh.
6584+ cat <<_ACEOF
6585+\`configure' configures patch 2.5.9 to adapt to many kinds of systems.
6586+
6587+Usage: $0 [OPTION]... [VAR=VALUE]...
6588+
6589+To assign environment variables (e.g., CC, CFLAGS...), specify them as
6590+VAR=VALUE. See below for descriptions of some of the useful variables.
6591+
6592+Defaults for the options are specified in brackets.
6593+
6594+Configuration:
6595+ -h, --help display this help and exit
6596+ --help=short display options specific to this package
6597+ --help=recursive display the short help of all the included packages
6598+ -V, --version display version information and exit
6599+ -q, --quiet, --silent do not print \`checking...' messages
6600+ --cache-file=FILE cache test results in FILE [disabled]
6601+ -C, --config-cache alias for \`--cache-file=config.cache'
6602+ -n, --no-create do not create output files
6603+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
6604+
6605+_ACEOF
6606+
6607+ cat <<_ACEOF
6608+Installation directories:
6609+ --prefix=PREFIX install architecture-independent files in PREFIX
6610+ [$ac_default_prefix]
6611+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
6612+ [PREFIX]
6613+
6614+By default, \`make install' will install all the files in
6615+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
6616+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
6617+for instance \`--prefix=\$HOME'.
6618+
6619+For better control, use the options below.
6620+
6621+Fine tuning of the installation directories:
6622+ --bindir=DIR user executables [EPREFIX/bin]
6623+ --sbindir=DIR system admin executables [EPREFIX/sbin]
6624+ --libexecdir=DIR program executables [EPREFIX/libexec]
6625+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
6626+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
6627+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
6628+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
6629+ --libdir=DIR object code libraries [EPREFIX/lib]
6630+ --includedir=DIR C header files [PREFIX/include]
6631+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
6632+ --infodir=DIR info documentation [PREFIX/info]
6633+ --mandir=DIR man documentation [PREFIX/man]
6634+_ACEOF
6635+
6636+ cat <<\_ACEOF
6637+
6638+Program names:
6639+ --program-prefix=PREFIX prepend PREFIX to installed program names
6640+ --program-suffix=SUFFIX append SUFFIX to installed program names
6641+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
6642+_ACEOF
6643+fi
6644+
6645+if test -n "$ac_init_help"; then
6646+ case $ac_init_help in
6647+ short | recursive ) echo "Configuration of patch 2.5.9:";;
6648+ esac
6649+ cat <<\_ACEOF
6650+
6651+Optional Features:
6652+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
6653+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6654+ --disable-largefile omit support for large files
6655+
6656+Some influential environment variables:
6657+ CC C compiler command
6658+ CFLAGS C compiler flags
6659+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
6660+ nonstandard directory <lib dir>
6661+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
6662+ headers in a nonstandard directory <include dir>
6663+ CPP C preprocessor
6664+
6665+Use these variables to override the choices made by `configure' or to help
6666+it to find libraries and programs with nonstandard names/locations.
6667+
6668+Report bugs to <bug-patch@gnu.org>.
6669+_ACEOF
6670+fi
6671+
6672+if test "$ac_init_help" = "recursive"; then
6673+ # If there are subdirs, report their specific --help.
6674+ ac_popdir=`pwd`
6675+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
6676+ test -d $ac_dir || continue
6677+ ac_builddir=.
6678+
6679+if test "$ac_dir" != .; then
6680+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6681+ # A "../" for each directory in $ac_dir_suffix.
6682+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6683+else
6684+ ac_dir_suffix= ac_top_builddir=
6685+fi
6686+
6687+case $srcdir in
6688+ .) # No --srcdir option. We are building in place.
6689+ ac_srcdir=.
6690+ if test -z "$ac_top_builddir"; then
6691+ ac_top_srcdir=.
6692+ else
6693+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6694+ fi ;;
6695+ [\\/]* | ?:[\\/]* ) # Absolute path.
6696+ ac_srcdir=$srcdir$ac_dir_suffix;
6697+ ac_top_srcdir=$srcdir ;;
6698+ *) # Relative path.
6699+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6700+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
6701+esac
6702+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6703+# absolute.
6704+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6705+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6706+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6707+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6708+
6709+ cd $ac_dir
6710+ # Check for guested configure; otherwise get Cygnus style configure.
6711+ if test -f $ac_srcdir/configure.gnu; then
6712+ echo
6713+ $SHELL $ac_srcdir/configure.gnu --help=recursive
6714+ elif test -f $ac_srcdir/configure; then
6715+ echo
6716+ $SHELL $ac_srcdir/configure --help=recursive
6717+ elif test -f $ac_srcdir/configure.ac ||
6718+ test -f $ac_srcdir/configure.in; then
6719+ echo
6720+ $ac_configure --help
6721+ else
6722+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
6723+ fi
6724+ cd $ac_popdir
6725+ done
6726+fi
6727+
6728+test -n "$ac_init_help" && exit 0
6729+if $ac_init_version; then
6730+ cat <<\_ACEOF
6731+patch configure 2.5.9
6732+generated by GNU Autoconf 2.57
6733+
6734+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6735+Free Software Foundation, Inc.
6736+This configure script is free software; the Free Software Foundation
6737+gives unlimited permission to copy, distribute and modify it.
6738+_ACEOF
6739+ exit 0
6740+fi
6741+exec 5>config.log
6742+cat >&5 <<_ACEOF
6743+This file contains any messages produced by compilers while
6744+running configure, to aid debugging if configure makes a mistake.
6745+
6746+It was created by patch $as_me 2.5.9, which was
6747+generated by GNU Autoconf 2.57. Invocation command line was
6748+
6749+ $ $0 $@
6750+
6751+_ACEOF
6752+{
6753+cat <<_ASUNAME
6754+## --------- ##
6755+## Platform. ##
6756+## --------- ##
6757+
6758+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
6759+uname -m = `(uname -m) 2>/dev/null || echo unknown`
6760+uname -r = `(uname -r) 2>/dev/null || echo unknown`
6761+uname -s = `(uname -s) 2>/dev/null || echo unknown`
6762+uname -v = `(uname -v) 2>/dev/null || echo unknown`
6763+
6764+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
6765+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
6766+
6767+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
6768+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
6769+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
6770+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
6771+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
6772+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
6773+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
6774+
6775+_ASUNAME
6776+
6777+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6778+for as_dir in $PATH
6779+do
6780+ IFS=$as_save_IFS
6781+ test -z "$as_dir" && as_dir=.
6782+ echo "PATH: $as_dir"
6783+done
6784+
6785+} >&5
6786+
6787+cat >&5 <<_ACEOF
6788+
6789+
6790+## ----------- ##
6791+## Core tests. ##
6792+## ----------- ##
6793+
6794+_ACEOF
6795+
6796+
6797+# Keep a trace of the command line.
6798+# Strip out --no-create and --no-recursion so they do not pile up.
6799+# Strip out --silent because we don't want to record it for future runs.
6800+# Also quote any args containing shell meta-characters.
6801+# Make two passes to allow for proper duplicate-argument suppression.
6802+ac_configure_args=
6803+ac_configure_args0=
6804+ac_configure_args1=
6805+ac_sep=
6806+ac_must_keep_next=false
6807+for ac_pass in 1 2
6808+do
6809+ for ac_arg
6810+ do
6811+ case $ac_arg in
6812+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
6813+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6814+ | -silent | --silent | --silen | --sile | --sil)
6815+ continue ;;
6816+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
6817+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6818+ esac
6819+ case $ac_pass in
6820+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
6821+ 2)
6822+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
6823+ if test $ac_must_keep_next = true; then
6824+ ac_must_keep_next=false # Got value, back to normal.
6825+ else
6826+ case $ac_arg in
6827+ *=* | --config-cache | -C | -disable-* | --disable-* \
6828+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
6829+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
6830+ | -with-* | --with-* | -without-* | --without-* | --x)
6831+ case "$ac_configure_args0 " in
6832+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
6833+ esac
6834+ ;;
6835+ -* ) ac_must_keep_next=true ;;
6836+ esac
6837+ fi
6838+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
6839+ # Get rid of the leading space.
6840+ ac_sep=" "
6841+ ;;
6842+ esac
6843+ done
6844+done
6845+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
6846+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
6847+
6848+# When interrupted or exit'd, cleanup temporary files, and complete
6849+# config.log. We remove comments because anyway the quotes in there
6850+# would cause problems or look ugly.
6851+# WARNING: Be sure not to use single quotes in there, as some shells,
6852+# such as our DU 5.0 friend, will then `close' the trap.
6853+trap 'exit_status=$?
6854+ # Save into config.log some information that might help in debugging.
6855+ {
6856+ echo
6857+
6858+ cat <<\_ASBOX
6859+## ---------------- ##
6860+## Cache variables. ##
6861+## ---------------- ##
6862+_ASBOX
6863+ echo
6864+ # The following way of writing the cache mishandles newlines in values,
6865+{
6866+ (set) 2>&1 |
6867+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
6868+ *ac_space=\ *)
6869+ sed -n \
6870+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
6871+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
6872+ ;;
6873+ *)
6874+ sed -n \
6875+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6876+ ;;
6877+ esac;
6878+}
6879+ echo
6880+
6881+ cat <<\_ASBOX
6882+## ----------------- ##
6883+## Output variables. ##
6884+## ----------------- ##
6885+_ASBOX
6886+ echo
6887+ for ac_var in $ac_subst_vars
6888+ do
6889+ eval ac_val=$`echo $ac_var`
6890+ echo "$ac_var='"'"'$ac_val'"'"'"
6891+ done | sort
6892+ echo
6893+
6894+ if test -n "$ac_subst_files"; then
6895+ cat <<\_ASBOX
6896+## ------------- ##
6897+## Output files. ##
6898+## ------------- ##
6899+_ASBOX
6900+ echo
6901+ for ac_var in $ac_subst_files
6902+ do
6903+ eval ac_val=$`echo $ac_var`
6904+ echo "$ac_var='"'"'$ac_val'"'"'"
6905+ done | sort
6906+ echo
6907+ fi
6908+
6909+ if test -s confdefs.h; then
6910+ cat <<\_ASBOX
6911+## ----------- ##
6912+## confdefs.h. ##
6913+## ----------- ##
6914+_ASBOX
6915+ echo
6916+ sed "/^$/d" confdefs.h | sort
6917+ echo
6918+ fi
6919+ test "$ac_signal" != 0 &&
6920+ echo "$as_me: caught signal $ac_signal"
6921+ echo "$as_me: exit $exit_status"
6922+ } >&5
6923+ rm -f core core.* *.core &&
6924+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
6925+ exit $exit_status
6926+ ' 0
6927+for ac_signal in 1 2 13 15; do
6928+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
6929+done
6930+ac_signal=0
6931+
6932+# confdefs.h avoids OS command line length limits that DEFS can exceed.
6933+rm -rf conftest* confdefs.h
6934+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
6935+echo >confdefs.h
6936+
6937+# Predefined preprocessor variables.
6938+
6939+cat >>confdefs.h <<_ACEOF
6940+#define PACKAGE_NAME "$PACKAGE_NAME"
6941+_ACEOF
6942
6943+
6944+cat >>confdefs.h <<_ACEOF
6945+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
6946+_ACEOF
6947+
6948+
6949+cat >>confdefs.h <<_ACEOF
6950+#define PACKAGE_VERSION "$PACKAGE_VERSION"
6951+_ACEOF
6952+
6953+
6954+cat >>confdefs.h <<_ACEOF
6955+#define PACKAGE_STRING "$PACKAGE_STRING"
6956+_ACEOF
6957+
6958+
6959+cat >>confdefs.h <<_ACEOF
6960+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
6961+_ACEOF
6962+
6963+
6964+# Let the site file select an alternate cache file if it wants to.
6965 # Prefer explicitly selected file to automatically selected ones.
6966 if test -z "$CONFIG_SITE"; then
6967 if test "x$prefix" != xNONE; then
6968@@ -488,321 +1169,767 @@
6969 fi
6970 for ac_site_file in $CONFIG_SITE; do
6971 if test -r "$ac_site_file"; then
6972- echo "loading site script $ac_site_file"
6973+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
6974+echo "$as_me: loading site script $ac_site_file" >&6;}
6975+ sed 's/^/| /' "$ac_site_file" >&5
6976 . "$ac_site_file"
6977 fi
6978 done
6979
6980 if test -r "$cache_file"; then
6981- echo "loading cache $cache_file"
6982- . $cache_file
6983+ # Some versions of bash will fail to source /dev/null (special
6984+ # files actually), so we avoid doing that.
6985+ if test -f "$cache_file"; then
6986+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
6987+echo "$as_me: loading cache $cache_file" >&6;}
6988+ case $cache_file in
6989+ [\\/]* | ?:[\\/]* ) . $cache_file;;
6990+ *) . ./$cache_file;;
6991+ esac
6992+ fi
6993 else
6994- echo "creating cache $cache_file"
6995- > $cache_file
6996+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
6997+echo "$as_me: creating cache $cache_file" >&6;}
6998+ >$cache_file
6999+fi
7000+
7001+# Check that the precious variables saved in the cache have kept the same
7002+# value.
7003+ac_cache_corrupted=false
7004+for ac_var in `(set) 2>&1 |
7005+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
7006+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
7007+ eval ac_new_set=\$ac_env_${ac_var}_set
7008+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
7009+ eval ac_new_val="\$ac_env_${ac_var}_value"
7010+ case $ac_old_set,$ac_new_set in
7011+ set,)
7012+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
7013+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
7014+ ac_cache_corrupted=: ;;
7015+ ,set)
7016+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
7017+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
7018+ ac_cache_corrupted=: ;;
7019+ ,);;
7020+ *)
7021+ if test "x$ac_old_val" != "x$ac_new_val"; then
7022+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
7023+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
7024+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
7025+echo "$as_me: former value: $ac_old_val" >&2;}
7026+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
7027+echo "$as_me: current value: $ac_new_val" >&2;}
7028+ ac_cache_corrupted=:
7029+ fi;;
7030+ esac
7031+ # Pass precious variables to config.status.
7032+ if test "$ac_new_set" = set; then
7033+ case $ac_new_val in
7034+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
7035+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
7036+ *) ac_arg=$ac_var=$ac_new_val ;;
7037+ esac
7038+ case " $ac_configure_args " in
7039+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
7040+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
7041+ esac
7042+ fi
7043+done
7044+if $ac_cache_corrupted; then
7045+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
7046+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
7047+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
7048+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
7049+ { (exit 1); exit 1; }; }
7050 fi
7051
7052 ac_ext=c
7053-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7054 ac_cpp='$CPP $CPPFLAGS'
7055-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7056-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7057-cross_compiling=$ac_cv_prog_cc_cross
7058+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7059+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7060+ac_compiler_gnu=$ac_cv_c_compiler_gnu
7061
7062-ac_exeext=
7063-ac_objext=o
7064-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
7065- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
7066- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
7067- ac_n= ac_c='
7068-' ac_t=' '
7069- else
7070- ac_n=-n ac_c= ac_t=
7071- fi
7072-else
7073- ac_n= ac_c='\c' ac_t=
7074-fi
7075
7076
7077
7078-if test "$program_transform_name" = s,x,x,; then
7079- program_transform_name=
7080-else
7081- # Double any \ or $. echo might interpret backslashes.
7082- cat <<\EOF_SED > conftestsed
7083-s,\\,\\\\,g; s,\$,$$,g
7084-EOF_SED
7085- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
7086- rm -f conftestsed
7087-fi
7088-test "$program_prefix" != NONE &&
7089- program_transform_name="s,^,${program_prefix},; $program_transform_name"
7090-# Use a double $ so make ignores it.
7091-test "$program_suffix" != NONE &&
7092- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
7093
7094-# sed with no file args requires a program.
7095-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
7096
7097-ac_aux_dir=
7098-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
7099- if test -f $ac_dir/install-sh; then
7100- ac_aux_dir=$ac_dir
7101- ac_install_sh="$ac_aux_dir/install-sh -c"
7102- break
7103- elif test -f $ac_dir/install.sh; then
7104- ac_aux_dir=$ac_dir
7105- ac_install_sh="$ac_aux_dir/install.sh -c"
7106- break
7107- fi
7108-done
7109-if test -z "$ac_aux_dir"; then
7110- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
7111-fi
7112-ac_config_guess=$ac_aux_dir/config.guess
7113-ac_config_sub=$ac_aux_dir/config.sub
7114-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
7115
7116
7117-# Make sure we can run config.sub.
7118-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
7119-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
7120-fi
7121
7122-echo $ac_n "checking host system type""... $ac_c" 1>&6
7123-echo "configure:573: checking host system type" >&5
7124
7125-host_alias=$host
7126-case "$host_alias" in
7127-NONE)
7128- case $nonopt in
7129- NONE)
7130- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
7131- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
7132- fi ;;
7133- *) host_alias=$nonopt ;;
7134- esac ;;
7135-esac
7136
7137-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
7138-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
7139-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
7140-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
7141-echo "$ac_t""$host" 1>&6
7142
7143
7144-PACKAGE=patch
7145-VERSION=2.5.4
7146
7147
7148
7149-# Extract the first word of "gcc", so it can be a program name with args.
7150+
7151+
7152+
7153+
7154+
7155+
7156+
7157+
7158+
7159+
7160+
7161+
7162+ ac_config_headers="$ac_config_headers config.h:config.hin"
7163+
7164+test "$program_prefix" != NONE &&
7165+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
7166+# Use a double $ so make ignores it.
7167+test "$program_suffix" != NONE &&
7168+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
7169+# Double any \ or $. echo might interpret backslashes.
7170+# By default was `s,x,x', remove it if useless.
7171+cat <<\_ACEOF >conftest.sed
7172+s/[\\$]/&&/g;s/;s,x,x,$//
7173+_ACEOF
7174+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
7175+rm conftest.sed
7176+
7177+
7178+ac_ext=c
7179+ac_cpp='$CPP $CPPFLAGS'
7180+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7181+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7182+ac_compiler_gnu=$ac_cv_c_compiler_gnu
7183+if test -n "$ac_tool_prefix"; then
7184+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
7185+set dummy ${ac_tool_prefix}gcc; ac_word=$2
7186+echo "$as_me:$LINENO: checking for $ac_word" >&5
7187+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7188+if test "${ac_cv_prog_CC+set}" = set; then
7189+ echo $ECHO_N "(cached) $ECHO_C" >&6
7190+else
7191+ if test -n "$CC"; then
7192+ ac_cv_prog_CC="$CC" # Let the user override the test.
7193+else
7194+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195+for as_dir in $PATH
7196+do
7197+ IFS=$as_save_IFS
7198+ test -z "$as_dir" && as_dir=.
7199+ for ac_exec_ext in '' $ac_executable_extensions; do
7200+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7201+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
7202+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7203+ break 2
7204+ fi
7205+done
7206+done
7207+
7208+fi
7209+fi
7210+CC=$ac_cv_prog_CC
7211+if test -n "$CC"; then
7212+ echo "$as_me:$LINENO: result: $CC" >&5
7213+echo "${ECHO_T}$CC" >&6
7214+else
7215+ echo "$as_me:$LINENO: result: no" >&5
7216+echo "${ECHO_T}no" >&6
7217+fi
7218+
7219+fi
7220+if test -z "$ac_cv_prog_CC"; then
7221+ ac_ct_CC=$CC
7222+ # Extract the first word of "gcc", so it can be a program name with args.
7223 set dummy gcc; ac_word=$2
7224-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7225-echo "configure:602: checking for $ac_word" >&5
7226-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7227- echo $ac_n "(cached) $ac_c" 1>&6
7228+echo "$as_me:$LINENO: checking for $ac_word" >&5
7229+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7230+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7231+ echo $ECHO_N "(cached) $ECHO_C" >&6
7232+else
7233+ if test -n "$ac_ct_CC"; then
7234+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7235+else
7236+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7237+for as_dir in $PATH
7238+do
7239+ IFS=$as_save_IFS
7240+ test -z "$as_dir" && as_dir=.
7241+ for ac_exec_ext in '' $ac_executable_extensions; do
7242+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7243+ ac_cv_prog_ac_ct_CC="gcc"
7244+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7245+ break 2
7246+ fi
7247+done
7248+done
7249+
7250+fi
7251+fi
7252+ac_ct_CC=$ac_cv_prog_ac_ct_CC
7253+if test -n "$ac_ct_CC"; then
7254+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7255+echo "${ECHO_T}$ac_ct_CC" >&6
7256+else
7257+ echo "$as_me:$LINENO: result: no" >&5
7258+echo "${ECHO_T}no" >&6
7259+fi
7260+
7261+ CC=$ac_ct_CC
7262+else
7263+ CC="$ac_cv_prog_CC"
7264+fi
7265+
7266+if test -z "$CC"; then
7267+ if test -n "$ac_tool_prefix"; then
7268+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
7269+set dummy ${ac_tool_prefix}cc; ac_word=$2
7270+echo "$as_me:$LINENO: checking for $ac_word" >&5
7271+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7272+if test "${ac_cv_prog_CC+set}" = set; then
7273+ echo $ECHO_N "(cached) $ECHO_C" >&6
7274 else
7275 if test -n "$CC"; then
7276 ac_cv_prog_CC="$CC" # Let the user override the test.
7277 else
7278- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7279- ac_dummy="$PATH"
7280- for ac_dir in $ac_dummy; do
7281- test -z "$ac_dir" && ac_dir=.
7282- if test -f $ac_dir/$ac_word; then
7283- ac_cv_prog_CC="gcc"
7284- break
7285- fi
7286- done
7287- IFS="$ac_save_ifs"
7288+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289+for as_dir in $PATH
7290+do
7291+ IFS=$as_save_IFS
7292+ test -z "$as_dir" && as_dir=.
7293+ for ac_exec_ext in '' $ac_executable_extensions; do
7294+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295+ ac_cv_prog_CC="${ac_tool_prefix}cc"
7296+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7297+ break 2
7298+ fi
7299+done
7300+done
7301+
7302 fi
7303 fi
7304-CC="$ac_cv_prog_CC"
7305+CC=$ac_cv_prog_CC
7306 if test -n "$CC"; then
7307- echo "$ac_t""$CC" 1>&6
7308+ echo "$as_me:$LINENO: result: $CC" >&5
7309+echo "${ECHO_T}$CC" >&6
7310 else
7311- echo "$ac_t""no" 1>&6
7312+ echo "$as_me:$LINENO: result: no" >&5
7313+echo "${ECHO_T}no" >&6
7314 fi
7315
7316+fi
7317+if test -z "$ac_cv_prog_CC"; then
7318+ ac_ct_CC=$CC
7319+ # Extract the first word of "cc", so it can be a program name with args.
7320+set dummy cc; ac_word=$2
7321+echo "$as_me:$LINENO: checking for $ac_word" >&5
7322+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7323+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7324+ echo $ECHO_N "(cached) $ECHO_C" >&6
7325+else
7326+ if test -n "$ac_ct_CC"; then
7327+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7328+else
7329+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330+for as_dir in $PATH
7331+do
7332+ IFS=$as_save_IFS
7333+ test -z "$as_dir" && as_dir=.
7334+ for ac_exec_ext in '' $ac_executable_extensions; do
7335+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7336+ ac_cv_prog_ac_ct_CC="cc"
7337+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7338+ break 2
7339+ fi
7340+done
7341+done
7342+
7343+fi
7344+fi
7345+ac_ct_CC=$ac_cv_prog_ac_ct_CC
7346+if test -n "$ac_ct_CC"; then
7347+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7348+echo "${ECHO_T}$ac_ct_CC" >&6
7349+else
7350+ echo "$as_me:$LINENO: result: no" >&5
7351+echo "${ECHO_T}no" >&6
7352+fi
7353+
7354+ CC=$ac_ct_CC
7355+else
7356+ CC="$ac_cv_prog_CC"
7357+fi
7358+
7359+fi
7360 if test -z "$CC"; then
7361 # Extract the first word of "cc", so it can be a program name with args.
7362 set dummy cc; ac_word=$2
7363-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7364-echo "configure:632: checking for $ac_word" >&5
7365-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7366- echo $ac_n "(cached) $ac_c" 1>&6
7367+echo "$as_me:$LINENO: checking for $ac_word" >&5
7368+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7369+if test "${ac_cv_prog_CC+set}" = set; then
7370+ echo $ECHO_N "(cached) $ECHO_C" >&6
7371 else
7372 if test -n "$CC"; then
7373 ac_cv_prog_CC="$CC" # Let the user override the test.
7374 else
7375- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7376 ac_prog_rejected=no
7377- ac_dummy="$PATH"
7378- for ac_dir in $ac_dummy; do
7379- test -z "$ac_dir" && ac_dir=.
7380- if test -f $ac_dir/$ac_word; then
7381- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
7382- ac_prog_rejected=yes
7383- continue
7384- fi
7385- ac_cv_prog_CC="cc"
7386- break
7387- fi
7388- done
7389- IFS="$ac_save_ifs"
7390+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7391+for as_dir in $PATH
7392+do
7393+ IFS=$as_save_IFS
7394+ test -z "$as_dir" && as_dir=.
7395+ for ac_exec_ext in '' $ac_executable_extensions; do
7396+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7397+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
7398+ ac_prog_rejected=yes
7399+ continue
7400+ fi
7401+ ac_cv_prog_CC="cc"
7402+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7403+ break 2
7404+ fi
7405+done
7406+done
7407+
7408 if test $ac_prog_rejected = yes; then
7409 # We found a bogon in the path, so make sure we never use it.
7410 set dummy $ac_cv_prog_CC
7411 shift
7412- if test $# -gt 0; then
7413+ if test $# != 0; then
7414 # We chose a different compiler from the bogus one.
7415 # However, it has the same basename, so the bogon will be chosen
7416 # first if we set CC to just the basename; use the full file name.
7417 shift
7418- set dummy "$ac_dir/$ac_word" "$@"
7419- shift
7420- ac_cv_prog_CC="$@"
7421+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
7422 fi
7423 fi
7424 fi
7425 fi
7426-CC="$ac_cv_prog_CC"
7427+CC=$ac_cv_prog_CC
7428 if test -n "$CC"; then
7429- echo "$ac_t""$CC" 1>&6
7430+ echo "$as_me:$LINENO: result: $CC" >&5
7431+echo "${ECHO_T}$CC" >&6
7432 else
7433- echo "$ac_t""no" 1>&6
7434+ echo "$as_me:$LINENO: result: no" >&5
7435+echo "${ECHO_T}no" >&6
7436 fi
7437
7438- if test -z "$CC"; then
7439- case "`uname -s`" in
7440- *win32* | *WIN32*)
7441- # Extract the first word of "cl", so it can be a program name with args.
7442-set dummy cl; ac_word=$2
7443-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7444-echo "configure:683: checking for $ac_word" >&5
7445-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7446- echo $ac_n "(cached) $ac_c" 1>&6
7447+fi
7448+if test -z "$CC"; then
7449+ if test -n "$ac_tool_prefix"; then
7450+ for ac_prog in cl
7451+ do
7452+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7453+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7454+echo "$as_me:$LINENO: checking for $ac_word" >&5
7455+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7456+if test "${ac_cv_prog_CC+set}" = set; then
7457+ echo $ECHO_N "(cached) $ECHO_C" >&6
7458 else
7459 if test -n "$CC"; then
7460 ac_cv_prog_CC="$CC" # Let the user override the test.
7461 else
7462- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7463- ac_dummy="$PATH"
7464- for ac_dir in $ac_dummy; do
7465- test -z "$ac_dir" && ac_dir=.
7466- if test -f $ac_dir/$ac_word; then
7467- ac_cv_prog_CC="cl"
7468- break
7469- fi
7470- done
7471- IFS="$ac_save_ifs"
7472+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473+for as_dir in $PATH
7474+do
7475+ IFS=$as_save_IFS
7476+ test -z "$as_dir" && as_dir=.
7477+ for ac_exec_ext in '' $ac_executable_extensions; do
7478+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7480+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7481+ break 2
7482+ fi
7483+done
7484+done
7485+
7486 fi
7487 fi
7488-CC="$ac_cv_prog_CC"
7489+CC=$ac_cv_prog_CC
7490 if test -n "$CC"; then
7491- echo "$ac_t""$CC" 1>&6
7492+ echo "$as_me:$LINENO: result: $CC" >&5
7493+echo "${ECHO_T}$CC" >&6
7494 else
7495- echo "$ac_t""no" 1>&6
7496+ echo "$as_me:$LINENO: result: no" >&5
7497+echo "${ECHO_T}no" >&6
7498 fi
7499- ;;
7500- esac
7501+
7502+ test -n "$CC" && break
7503+ done
7504+fi
7505+if test -z "$CC"; then
7506+ ac_ct_CC=$CC
7507+ for ac_prog in cl
7508+do
7509+ # Extract the first word of "$ac_prog", so it can be a program name with args.
7510+set dummy $ac_prog; ac_word=$2
7511+echo "$as_me:$LINENO: checking for $ac_word" >&5
7512+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7513+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7514+ echo $ECHO_N "(cached) $ECHO_C" >&6
7515+else
7516+ if test -n "$ac_ct_CC"; then
7517+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7518+else
7519+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7520+for as_dir in $PATH
7521+do
7522+ IFS=$as_save_IFS
7523+ test -z "$as_dir" && as_dir=.
7524+ for ac_exec_ext in '' $ac_executable_extensions; do
7525+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7526+ ac_cv_prog_ac_ct_CC="$ac_prog"
7527+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7528+ break 2
7529 fi
7530- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
7531+done
7532+done
7533+
7534+fi
7535+fi
7536+ac_ct_CC=$ac_cv_prog_ac_ct_CC
7537+if test -n "$ac_ct_CC"; then
7538+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7539+echo "${ECHO_T}$ac_ct_CC" >&6
7540+else
7541+ echo "$as_me:$LINENO: result: no" >&5
7542+echo "${ECHO_T}no" >&6
7543 fi
7544
7545-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
7546-echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
7547+ test -n "$ac_ct_CC" && break
7548+done
7549
7550-ac_ext=c
7551-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7552-ac_cpp='$CPP $CPPFLAGS'
7553-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7554-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7555-cross_compiling=$ac_cv_prog_cc_cross
7556+ CC=$ac_ct_CC
7557+fi
7558
7559-cat > conftest.$ac_ext << EOF
7560+fi
7561
7562-#line 726 "configure"
7563-#include "confdefs.h"
7564
7565-main(){return(0);}
7566-EOF
7567-if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7568- ac_cv_prog_cc_works=yes
7569- # If we can't run a trivial program, we are probably using a cross compiler.
7570- if (./conftest; exit) 2>/dev/null; then
7571- ac_cv_prog_cc_cross=no
7572+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
7573+See \`config.log' for more details." >&5
7574+echo "$as_me: error: no acceptable C compiler found in \$PATH
7575+See \`config.log' for more details." >&2;}
7576+ { (exit 1); exit 1; }; }
7577+
7578+# Provide some information about the compiler.
7579+echo "$as_me:$LINENO:" \
7580+ "checking for C compiler version" >&5
7581+ac_compiler=`set X $ac_compile; echo $2`
7582+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
7583+ (eval $ac_compiler --version </dev/null >&5) 2>&5
7584+ ac_status=$?
7585+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7586+ (exit $ac_status); }
7587+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
7588+ (eval $ac_compiler -v </dev/null >&5) 2>&5
7589+ ac_status=$?
7590+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591+ (exit $ac_status); }
7592+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
7593+ (eval $ac_compiler -V </dev/null >&5) 2>&5
7594+ ac_status=$?
7595+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596+ (exit $ac_status); }
7597+
7598+cat >conftest.$ac_ext <<_ACEOF
7599+#line $LINENO "configure"
7600+/* confdefs.h. */
7601+_ACEOF
7602+cat confdefs.h >>conftest.$ac_ext
7603+cat >>conftest.$ac_ext <<_ACEOF
7604+/* end confdefs.h. */
7605+
7606+int
7607+main ()
7608+{
7609+
7610+ ;
7611+ return 0;
7612+}
7613+_ACEOF
7614+ac_clean_files_save=$ac_clean_files
7615+ac_clean_files="$ac_clean_files a.out a.exe b.out"
7616+# Try to create an executable without -o first, disregard a.out.
7617+# It will help us diagnose broken compilers, and finding out an intuition
7618+# of exeext.
7619+echo "$as_me:$LINENO: checking for C compiler default output" >&5
7620+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
7621+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
7622+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
7623+ (eval $ac_link_default) 2>&5
7624+ ac_status=$?
7625+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626+ (exit $ac_status); }; then
7627+ # Find the output, starting from the most likely. This scheme is
7628+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
7629+# resort.
7630+
7631+# Be careful to initialize this variable, since it used to be cached.
7632+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
7633+ac_cv_exeext=
7634+# b.out is created by i960 compilers.
7635+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
7636+do
7637+ test -f "$ac_file" || continue
7638+ case $ac_file in
7639+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
7640+ ;;
7641+ conftest.$ac_ext )
7642+ # This is the source file.
7643+ ;;
7644+ [ab].out )
7645+ # We found the default executable, but exeext='' is most
7646+ # certainly right.
7647+ break;;
7648+ *.* )
7649+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7650+ # FIXME: I believe we export ac_cv_exeext for Libtool,
7651+ # but it would be cool to find out if it's true. Does anybody
7652+ # maintain Libtool? --akim.
7653+ export ac_cv_exeext
7654+ break;;
7655+ * )
7656+ break;;
7657+ esac
7658+done
7659+else
7660+ echo "$as_me: failed program was:" >&5
7661+sed 's/^/| /' conftest.$ac_ext >&5
7662+
7663+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
7664+See \`config.log' for more details." >&5
7665+echo "$as_me: error: C compiler cannot create executables
7666+See \`config.log' for more details." >&2;}
7667+ { (exit 77); exit 77; }; }
7668+fi
7669+
7670+ac_exeext=$ac_cv_exeext
7671+echo "$as_me:$LINENO: result: $ac_file" >&5
7672+echo "${ECHO_T}$ac_file" >&6
7673+
7674+# Check the compiler produces executables we can run. If not, either
7675+# the compiler is broken, or we cross compile.
7676+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
7677+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
7678+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
7679+# If not cross compiling, check that we can run a simple program.
7680+if test "$cross_compiling" != yes; then
7681+ if { ac_try='./$ac_file'
7682+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683+ (eval $ac_try) 2>&5
7684+ ac_status=$?
7685+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686+ (exit $ac_status); }; }; then
7687+ cross_compiling=no
7688 else
7689- ac_cv_prog_cc_cross=yes
7690+ if test "$cross_compiling" = maybe; then
7691+ cross_compiling=yes
7692+ else
7693+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
7694+If you meant to cross compile, use \`--host'.
7695+See \`config.log' for more details." >&5
7696+echo "$as_me: error: cannot run C compiled programs.
7697+If you meant to cross compile, use \`--host'.
7698+See \`config.log' for more details." >&2;}
7699+ { (exit 1); exit 1; }; }
7700+ fi
7701 fi
7702-else
7703- echo "configure: failed program was:" >&5
7704- cat conftest.$ac_ext >&5
7705- ac_cv_prog_cc_works=no
7706 fi
7707-rm -fr conftest*
7708-ac_ext=c
7709-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7710-ac_cpp='$CPP $CPPFLAGS'
7711-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7712-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7713-cross_compiling=$ac_cv_prog_cc_cross
7714+echo "$as_me:$LINENO: result: yes" >&5
7715+echo "${ECHO_T}yes" >&6
7716
7717-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
7718-if test $ac_cv_prog_cc_works = no; then
7719- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
7720+rm -f a.out a.exe conftest$ac_cv_exeext b.out
7721+ac_clean_files=$ac_clean_files_save
7722+# Check the compiler produces executables we can run. If not, either
7723+# the compiler is broken, or we cross compile.
7724+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
7725+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
7726+echo "$as_me:$LINENO: result: $cross_compiling" >&5
7727+echo "${ECHO_T}$cross_compiling" >&6
7728+
7729+echo "$as_me:$LINENO: checking for suffix of executables" >&5
7730+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
7731+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7732+ (eval $ac_link) 2>&5
7733+ ac_status=$?
7734+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735+ (exit $ac_status); }; then
7736+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
7737+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
7738+# work properly (i.e., refer to `conftest.exe'), while it won't with
7739+# `rm'.
7740+for ac_file in conftest.exe conftest conftest.*; do
7741+ test -f "$ac_file" || continue
7742+ case $ac_file in
7743+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
7744+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7745+ export ac_cv_exeext
7746+ break;;
7747+ * ) break;;
7748+ esac
7749+done
7750+else
7751+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
7752+See \`config.log' for more details." >&5
7753+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
7754+See \`config.log' for more details." >&2;}
7755+ { (exit 1); exit 1; }; }
7756 fi
7757-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
7758-echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
7759-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
7760-cross_compiling=$ac_cv_prog_cc_cross
7761
7762-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
7763-echo "configure:762: checking whether we are using GNU C" >&5
7764-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
7765- echo $ac_n "(cached) $ac_c" 1>&6
7766+rm -f conftest$ac_cv_exeext
7767+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
7768+echo "${ECHO_T}$ac_cv_exeext" >&6
7769+
7770+rm -f conftest.$ac_ext
7771+EXEEXT=$ac_cv_exeext
7772+ac_exeext=$EXEEXT
7773+echo "$as_me:$LINENO: checking for suffix of object files" >&5
7774+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
7775+if test "${ac_cv_objext+set}" = set; then
7776+ echo $ECHO_N "(cached) $ECHO_C" >&6
7777 else
7778- cat > conftest.c <<EOF
7779-#ifdef __GNUC__
7780- yes;
7781-#endif
7782-EOF
7783-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
7784- ac_cv_prog_gcc=yes
7785+ cat >conftest.$ac_ext <<_ACEOF
7786+#line $LINENO "configure"
7787+/* confdefs.h. */
7788+_ACEOF
7789+cat confdefs.h >>conftest.$ac_ext
7790+cat >>conftest.$ac_ext <<_ACEOF
7791+/* end confdefs.h. */
7792+
7793+int
7794+main ()
7795+{
7796+
7797+ ;
7798+ return 0;
7799+}
7800+_ACEOF
7801+rm -f conftest.o conftest.obj
7802+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7803+ (eval $ac_compile) 2>&5
7804+ ac_status=$?
7805+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806+ (exit $ac_status); }; then
7807+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
7808+ case $ac_file in
7809+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
7810+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
7811+ break;;
7812+ esac
7813+done
7814 else
7815- ac_cv_prog_gcc=no
7816+ echo "$as_me: failed program was:" >&5
7817+sed 's/^/| /' conftest.$ac_ext >&5
7818+
7819+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
7820+See \`config.log' for more details." >&5
7821+echo "$as_me: error: cannot compute suffix of object files: cannot compile
7822+See \`config.log' for more details." >&2;}
7823+ { (exit 1); exit 1; }; }
7824 fi
7825+
7826+rm -f conftest.$ac_cv_objext conftest.$ac_ext
7827 fi
7828+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
7829+echo "${ECHO_T}$ac_cv_objext" >&6
7830+OBJEXT=$ac_cv_objext
7831+ac_objext=$OBJEXT
7832+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
7833+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
7834+if test "${ac_cv_c_compiler_gnu+set}" = set; then
7835+ echo $ECHO_N "(cached) $ECHO_C" >&6
7836+else
7837+ cat >conftest.$ac_ext <<_ACEOF
7838+#line $LINENO "configure"
7839+/* confdefs.h. */
7840+_ACEOF
7841+cat confdefs.h >>conftest.$ac_ext
7842+cat >>conftest.$ac_ext <<_ACEOF
7843+/* end confdefs.h. */
7844
7845-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
7846+int
7847+main ()
7848+{
7849+#ifndef __GNUC__
7850+ choke me
7851+#endif
7852
7853-if test $ac_cv_prog_gcc = yes; then
7854- GCC=yes
7855+ ;
7856+ return 0;
7857+}
7858+_ACEOF
7859+rm -f conftest.$ac_objext
7860+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7861+ (eval $ac_compile) 2>&5
7862+ ac_status=$?
7863+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7864+ (exit $ac_status); } &&
7865+ { ac_try='test -s conftest.$ac_objext'
7866+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867+ (eval $ac_try) 2>&5
7868+ ac_status=$?
7869+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870+ (exit $ac_status); }; }; then
7871+ ac_compiler_gnu=yes
7872 else
7873- GCC=
7874+ echo "$as_me: failed program was:" >&5
7875+sed 's/^/| /' conftest.$ac_ext >&5
7876+
7877+ac_compiler_gnu=no
7878 fi
7879+rm -f conftest.$ac_objext conftest.$ac_ext
7880+ac_cv_c_compiler_gnu=$ac_compiler_gnu
7881
7882-ac_test_CFLAGS="${CFLAGS+set}"
7883-ac_save_CFLAGS="$CFLAGS"
7884-CFLAGS=
7885-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
7886-echo "configure:790: checking whether ${CC-cc} accepts -g" >&5
7887-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
7888- echo $ac_n "(cached) $ac_c" 1>&6
7889+fi
7890+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
7891+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
7892+GCC=`test $ac_compiler_gnu = yes && echo yes`
7893+ac_test_CFLAGS=${CFLAGS+set}
7894+ac_save_CFLAGS=$CFLAGS
7895+CFLAGS="-g"
7896+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
7897+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
7898+if test "${ac_cv_prog_cc_g+set}" = set; then
7899+ echo $ECHO_N "(cached) $ECHO_C" >&6
7900 else
7901- echo 'void f(){}' > conftest.c
7902-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
7903+ cat >conftest.$ac_ext <<_ACEOF
7904+#line $LINENO "configure"
7905+/* confdefs.h. */
7906+_ACEOF
7907+cat confdefs.h >>conftest.$ac_ext
7908+cat >>conftest.$ac_ext <<_ACEOF
7909+/* end confdefs.h. */
7910+
7911+int
7912+main ()
7913+{
7914+
7915+ ;
7916+ return 0;
7917+}
7918+_ACEOF
7919+rm -f conftest.$ac_objext
7920+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7921+ (eval $ac_compile) 2>&5
7922+ ac_status=$?
7923+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924+ (exit $ac_status); } &&
7925+ { ac_try='test -s conftest.$ac_objext'
7926+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927+ (eval $ac_try) 2>&5
7928+ ac_status=$?
7929+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930+ (exit $ac_status); }; }; then
7931 ac_cv_prog_cc_g=yes
7932 else
7933- ac_cv_prog_cc_g=no
7934-fi
7935-rm -f conftest*
7936+ echo "$as_me: failed program was:" >&5
7937+sed 's/^/| /' conftest.$ac_ext >&5
7938
7939+ac_cv_prog_cc_g=no
7940 fi
7941-
7942-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
7943+rm -f conftest.$ac_objext conftest.$ac_ext
7944+fi
7945+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
7946+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
7947 if test "$ac_test_CFLAGS" = set; then
7948- CFLAGS="$ac_save_CFLAGS"
7949+ CFLAGS=$ac_save_CFLAGS
7950 elif test $ac_cv_prog_cc_g = yes; then
7951 if test "$GCC" = yes; then
7952 CFLAGS="-g -O2"
7953@@ -816,86 +1943,482 @@
7954 CFLAGS=
7955 fi
7956 fi
7957+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
7958+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
7959+if test "${ac_cv_prog_cc_stdc+set}" = set; then
7960+ echo $ECHO_N "(cached) $ECHO_C" >&6
7961+else
7962+ ac_cv_prog_cc_stdc=no
7963+ac_save_CC=$CC
7964+cat >conftest.$ac_ext <<_ACEOF
7965+#line $LINENO "configure"
7966+/* confdefs.h. */
7967+_ACEOF
7968+cat confdefs.h >>conftest.$ac_ext
7969+cat >>conftest.$ac_ext <<_ACEOF
7970+/* end confdefs.h. */
7971+#include <stdarg.h>
7972+#include <stdio.h>
7973+#include <sys/types.h>
7974+#include <sys/stat.h>
7975+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7976+struct buf { int x; };
7977+FILE * (*rcsopen) (struct buf *, struct stat *, int);
7978+static char *e (p, i)
7979+ char **p;
7980+ int i;
7981+{
7982+ return p[i];
7983+}
7984+static char *f (char * (*g) (char **, int), char **p, ...)
7985+{
7986+ char *s;
7987+ va_list v;
7988+ va_start (v,p);
7989+ s = g (p, va_arg (v,int));
7990+ va_end (v);
7991+ return s;
7992+}
7993+int test (int i, double x);
7994+struct s1 {int (*f) (int a);};
7995+struct s2 {int (*f) (double a);};
7996+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7997+int argc;
7998+char **argv;
7999+int
8000+main ()
8001+{
8002+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
8003+ ;
8004+ return 0;
8005+}
8006+_ACEOF
8007+# Don't try gcc -ansi; that turns off useful extensions and
8008+# breaks some systems' header files.
8009+# AIX -qlanglvl=ansi
8010+# Ultrix and OSF/1 -std1
8011+# HP-UX 10.20 and later -Ae
8012+# HP-UX older versions -Aa -D_HPUX_SOURCE
8013+# SVR4 -Xc -D__EXTENSIONS__
8014+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8015+do
8016+ CC="$ac_save_CC $ac_arg"
8017+ rm -f conftest.$ac_objext
8018+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8019+ (eval $ac_compile) 2>&5
8020+ ac_status=$?
8021+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022+ (exit $ac_status); } &&
8023+ { ac_try='test -s conftest.$ac_objext'
8024+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025+ (eval $ac_try) 2>&5
8026+ ac_status=$?
8027+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028+ (exit $ac_status); }; }; then
8029+ ac_cv_prog_cc_stdc=$ac_arg
8030+break
8031+else
8032+ echo "$as_me: failed program was:" >&5
8033+sed 's/^/| /' conftest.$ac_ext >&5
8034
8035-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8036-echo "configure:822: checking how to run the C preprocessor" >&5
8037+fi
8038+rm -f conftest.$ac_objext
8039+done
8040+rm -f conftest.$ac_ext conftest.$ac_objext
8041+CC=$ac_save_CC
8042+
8043+fi
8044+
8045+case "x$ac_cv_prog_cc_stdc" in
8046+ x|xno)
8047+ echo "$as_me:$LINENO: result: none needed" >&5
8048+echo "${ECHO_T}none needed" >&6 ;;
8049+ *)
8050+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
8051+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
8052+ CC="$CC $ac_cv_prog_cc_stdc" ;;
8053+esac
8054+
8055+# Some people use a C++ compiler to compile C. Since we use `exit',
8056+# in C++ we need to declare it. In case someone uses the same compiler
8057+# for both compiling C and C++ we need to have the C++ compiler decide
8058+# the declaration of exit, since it's the most demanding environment.
8059+cat >conftest.$ac_ext <<_ACEOF
8060+#ifndef __cplusplus
8061+ choke me
8062+#endif
8063+_ACEOF
8064+rm -f conftest.$ac_objext
8065+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8066+ (eval $ac_compile) 2>&5
8067+ ac_status=$?
8068+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069+ (exit $ac_status); } &&
8070+ { ac_try='test -s conftest.$ac_objext'
8071+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072+ (eval $ac_try) 2>&5
8073+ ac_status=$?
8074+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075+ (exit $ac_status); }; }; then
8076+ for ac_declaration in \
8077+ ''\
8078+ '#include <stdlib.h>' \
8079+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
8080+ 'extern "C" void std::exit (int); using std::exit;' \
8081+ 'extern "C" void exit (int) throw ();' \
8082+ 'extern "C" void exit (int);' \
8083+ 'void exit (int);'
8084+do
8085+ cat >conftest.$ac_ext <<_ACEOF
8086+#line $LINENO "configure"
8087+/* confdefs.h. */
8088+_ACEOF
8089+cat confdefs.h >>conftest.$ac_ext
8090+cat >>conftest.$ac_ext <<_ACEOF
8091+/* end confdefs.h. */
8092+#include <stdlib.h>
8093+$ac_declaration
8094+int
8095+main ()
8096+{
8097+exit (42);
8098+ ;
8099+ return 0;
8100+}
8101+_ACEOF
8102+rm -f conftest.$ac_objext
8103+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8104+ (eval $ac_compile) 2>&5
8105+ ac_status=$?
8106+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107+ (exit $ac_status); } &&
8108+ { ac_try='test -s conftest.$ac_objext'
8109+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8110+ (eval $ac_try) 2>&5
8111+ ac_status=$?
8112+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113+ (exit $ac_status); }; }; then
8114+ :
8115+else
8116+ echo "$as_me: failed program was:" >&5
8117+sed 's/^/| /' conftest.$ac_ext >&5
8118+
8119+continue
8120+fi
8121+rm -f conftest.$ac_objext conftest.$ac_ext
8122+ cat >conftest.$ac_ext <<_ACEOF
8123+#line $LINENO "configure"
8124+/* confdefs.h. */
8125+_ACEOF
8126+cat confdefs.h >>conftest.$ac_ext
8127+cat >>conftest.$ac_ext <<_ACEOF
8128+/* end confdefs.h. */
8129+$ac_declaration
8130+int
8131+main ()
8132+{
8133+exit (42);
8134+ ;
8135+ return 0;
8136+}
8137+_ACEOF
8138+rm -f conftest.$ac_objext
8139+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8140+ (eval $ac_compile) 2>&5
8141+ ac_status=$?
8142+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143+ (exit $ac_status); } &&
8144+ { ac_try='test -s conftest.$ac_objext'
8145+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146+ (eval $ac_try) 2>&5
8147+ ac_status=$?
8148+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149+ (exit $ac_status); }; }; then
8150+ break
8151+else
8152+ echo "$as_me: failed program was:" >&5
8153+sed 's/^/| /' conftest.$ac_ext >&5
8154+
8155+fi
8156+rm -f conftest.$ac_objext conftest.$ac_ext
8157+done
8158+rm -f conftest*
8159+if test -n "$ac_declaration"; then
8160+ echo '#ifdef __cplusplus' >>confdefs.h
8161+ echo $ac_declaration >>confdefs.h
8162+ echo '#endif' >>confdefs.h
8163+fi
8164+
8165+else
8166+ echo "$as_me: failed program was:" >&5
8167+sed 's/^/| /' conftest.$ac_ext >&5
8168+
8169+fi
8170+rm -f conftest.$ac_objext conftest.$ac_ext
8171+ac_ext=c
8172+ac_cpp='$CPP $CPPFLAGS'
8173+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8174+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8175+ac_compiler_gnu=$ac_cv_c_compiler_gnu
8176+
8177+ac_ext=c
8178+ac_cpp='$CPP $CPPFLAGS'
8179+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8180+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8181+ac_compiler_gnu=$ac_cv_c_compiler_gnu
8182+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
8183+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
8184 # On Suns, sometimes $CPP names a directory.
8185 if test -n "$CPP" && test -d "$CPP"; then
8186 CPP=
8187 fi
8188 if test -z "$CPP"; then
8189-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
8190- echo $ac_n "(cached) $ac_c" 1>&6
8191+ if test "${ac_cv_prog_CPP+set}" = set; then
8192+ echo $ECHO_N "(cached) $ECHO_C" >&6
8193 else
8194- # This must be in double quotes, not single quotes, because CPP may get
8195- # substituted into the Makefile and "${CC-cc}" will confuse make.
8196- CPP="${CC-cc} -E"
8197+ # Double quotes because CPP needs to be expanded
8198+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8199+ do
8200+ ac_preproc_ok=false
8201+for ac_c_preproc_warn_flag in '' yes
8202+do
8203+ # Use a header file that comes with gcc, so configuring glibc
8204+ # with a fresh cross-compiler works.
8205+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8206+ # <limits.h> exists even on freestanding compilers.
8207 # On the NeXT, cc -E runs the code through the compiler's parser,
8208- # not just through cpp.
8209- cat > conftest.$ac_ext <<EOF
8210-#line 837 "configure"
8211-#include "confdefs.h"
8212-#include <assert.h>
8213-Syntax Error
8214-EOF
8215-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216-{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8218-if test -z "$ac_err"; then
8219- :
8220+ # not just through cpp. "Syntax error" is here to catch this case.
8221+ cat >conftest.$ac_ext <<_ACEOF
8222+#line $LINENO "configure"
8223+/* confdefs.h. */
8224+_ACEOF
8225+cat confdefs.h >>conftest.$ac_ext
8226+cat >>conftest.$ac_ext <<_ACEOF
8227+/* end confdefs.h. */
8228+#ifdef __STDC__
8229+# include <limits.h>
8230+#else
8231+# include <assert.h>
8232+#endif
8233+ Syntax error
8234+_ACEOF
8235+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8236+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8237+ ac_status=$?
8238+ grep -v '^ *+' conftest.er1 >conftest.err
8239+ rm -f conftest.er1
8240+ cat conftest.err >&5
8241+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242+ (exit $ac_status); } >/dev/null; then
8243+ if test -s conftest.err; then
8244+ ac_cpp_err=$ac_c_preproc_warn_flag
8245+ else
8246+ ac_cpp_err=
8247+ fi
8248 else
8249- echo "$ac_err" >&5
8250- echo "configure: failed program was:" >&5
8251- cat conftest.$ac_ext >&5
8252- rm -rf conftest*
8253- CPP="${CC-cc} -E -traditional-cpp"
8254- cat > conftest.$ac_ext <<EOF
8255-#line 854 "configure"
8256-#include "confdefs.h"
8257-#include <assert.h>
8258-Syntax Error
8259-EOF
8260-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8261-{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8262-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8263-if test -z "$ac_err"; then
8264+ ac_cpp_err=yes
8265+fi
8266+if test -z "$ac_cpp_err"; then
8267 :
8268 else
8269- echo "$ac_err" >&5
8270- echo "configure: failed program was:" >&5
8271- cat conftest.$ac_ext >&5
8272- rm -rf conftest*
8273- CPP="${CC-cc} -nologo -E"
8274- cat > conftest.$ac_ext <<EOF
8275-#line 871 "configure"
8276-#include "confdefs.h"
8277-#include <assert.h>
8278-Syntax Error
8279-EOF
8280-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8281-{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8282-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8283-if test -z "$ac_err"; then
8284- :
8285+ echo "$as_me: failed program was:" >&5
8286+sed 's/^/| /' conftest.$ac_ext >&5
8287+
8288+ # Broken: fails on valid input.
8289+continue
8290+fi
8291+rm -f conftest.err conftest.$ac_ext
8292+
8293+ # OK, works on sane cases. Now check whether non-existent headers
8294+ # can be detected and how.
8295+ cat >conftest.$ac_ext <<_ACEOF
8296+#line $LINENO "configure"
8297+/* confdefs.h. */
8298+_ACEOF
8299+cat confdefs.h >>conftest.$ac_ext
8300+cat >>conftest.$ac_ext <<_ACEOF
8301+/* end confdefs.h. */
8302+#include <ac_nonexistent.h>
8303+_ACEOF
8304+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8305+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8306+ ac_status=$?
8307+ grep -v '^ *+' conftest.er1 >conftest.err
8308+ rm -f conftest.er1
8309+ cat conftest.err >&5
8310+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311+ (exit $ac_status); } >/dev/null; then
8312+ if test -s conftest.err; then
8313+ ac_cpp_err=$ac_c_preproc_warn_flag
8314+ else
8315+ ac_cpp_err=
8316+ fi
8317 else
8318- echo "$ac_err" >&5
8319- echo "configure: failed program was:" >&5
8320- cat conftest.$ac_ext >&5
8321- rm -rf conftest*
8322- CPP=/lib/cpp
8323+ ac_cpp_err=yes
8324 fi
8325-rm -f conftest*
8326+if test -z "$ac_cpp_err"; then
8327+ # Broken: success on invalid input.
8328+continue
8329+else
8330+ echo "$as_me: failed program was:" >&5
8331+sed 's/^/| /' conftest.$ac_ext >&5
8332+
8333+ # Passes both tests.
8334+ac_preproc_ok=:
8335+break
8336 fi
8337-rm -f conftest*
8338+rm -f conftest.err conftest.$ac_ext
8339+
8340+done
8341+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8342+rm -f conftest.err conftest.$ac_ext
8343+if $ac_preproc_ok; then
8344+ break
8345 fi
8346-rm -f conftest*
8347- ac_cv_prog_CPP="$CPP"
8348+
8349+ done
8350+ ac_cv_prog_CPP=$CPP
8351+
8352 fi
8353- CPP="$ac_cv_prog_CPP"
8354+ CPP=$ac_cv_prog_CPP
8355 else
8356- ac_cv_prog_CPP="$CPP"
8357+ ac_cv_prog_CPP=$CPP
8358 fi
8359-echo "$ac_t""$CPP" 1>&6
8360+echo "$as_me:$LINENO: result: $CPP" >&5
8361+echo "${ECHO_T}$CPP" >&6
8362+ac_preproc_ok=false
8363+for ac_c_preproc_warn_flag in '' yes
8364+do
8365+ # Use a header file that comes with gcc, so configuring glibc
8366+ # with a fresh cross-compiler works.
8367+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8368+ # <limits.h> exists even on freestanding compilers.
8369+ # On the NeXT, cc -E runs the code through the compiler's parser,
8370+ # not just through cpp. "Syntax error" is here to catch this case.
8371+ cat >conftest.$ac_ext <<_ACEOF
8372+#line $LINENO "configure"
8373+/* confdefs.h. */
8374+_ACEOF
8375+cat confdefs.h >>conftest.$ac_ext
8376+cat >>conftest.$ac_ext <<_ACEOF
8377+/* end confdefs.h. */
8378+#ifdef __STDC__
8379+# include <limits.h>
8380+#else
8381+# include <assert.h>
8382+#endif
8383+ Syntax error
8384+_ACEOF
8385+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8386+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8387+ ac_status=$?
8388+ grep -v '^ *+' conftest.er1 >conftest.err
8389+ rm -f conftest.er1
8390+ cat conftest.err >&5
8391+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392+ (exit $ac_status); } >/dev/null; then
8393+ if test -s conftest.err; then
8394+ ac_cpp_err=$ac_c_preproc_warn_flag
8395+ else
8396+ ac_cpp_err=
8397+ fi
8398+else
8399+ ac_cpp_err=yes
8400+fi
8401+if test -z "$ac_cpp_err"; then
8402+ :
8403+else
8404+ echo "$as_me: failed program was:" >&5
8405+sed 's/^/| /' conftest.$ac_ext >&5
8406+
8407+ # Broken: fails on valid input.
8408+continue
8409+fi
8410+rm -f conftest.err conftest.$ac_ext
8411+
8412+ # OK, works on sane cases. Now check whether non-existent headers
8413+ # can be detected and how.
8414+ cat >conftest.$ac_ext <<_ACEOF
8415+#line $LINENO "configure"
8416+/* confdefs.h. */
8417+_ACEOF
8418+cat confdefs.h >>conftest.$ac_ext
8419+cat >>conftest.$ac_ext <<_ACEOF
8420+/* end confdefs.h. */
8421+#include <ac_nonexistent.h>
8422+_ACEOF
8423+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8424+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8425+ ac_status=$?
8426+ grep -v '^ *+' conftest.er1 >conftest.err
8427+ rm -f conftest.er1
8428+ cat conftest.err >&5
8429+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430+ (exit $ac_status); } >/dev/null; then
8431+ if test -s conftest.err; then
8432+ ac_cpp_err=$ac_c_preproc_warn_flag
8433+ else
8434+ ac_cpp_err=
8435+ fi
8436+else
8437+ ac_cpp_err=yes
8438+fi
8439+if test -z "$ac_cpp_err"; then
8440+ # Broken: success on invalid input.
8441+continue
8442+else
8443+ echo "$as_me: failed program was:" >&5
8444+sed 's/^/| /' conftest.$ac_ext >&5
8445+
8446+ # Passes both tests.
8447+ac_preproc_ok=:
8448+break
8449+fi
8450+rm -f conftest.err conftest.$ac_ext
8451+
8452+done
8453+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8454+rm -f conftest.err conftest.$ac_ext
8455+if $ac_preproc_ok; then
8456+ :
8457+else
8458+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
8459+See \`config.log' for more details." >&5
8460+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
8461+See \`config.log' for more details." >&2;}
8462+ { (exit 1); exit 1; }; }
8463+fi
8464+
8465+ac_ext=c
8466+ac_cpp='$CPP $CPPFLAGS'
8467+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8468+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8469+ac_compiler_gnu=$ac_cv_c_compiler_gnu
8470+
8471+ac_aux_dir=
8472+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
8473+ if test -f $ac_dir/install-sh; then
8474+ ac_aux_dir=$ac_dir
8475+ ac_install_sh="$ac_aux_dir/install-sh -c"
8476+ break
8477+ elif test -f $ac_dir/install.sh; then
8478+ ac_aux_dir=$ac_dir
8479+ ac_install_sh="$ac_aux_dir/install.sh -c"
8480+ break
8481+ elif test -f $ac_dir/shtool; then
8482+ ac_aux_dir=$ac_dir
8483+ ac_install_sh="$ac_aux_dir/shtool install -c"
8484+ break
8485+ fi
8486+done
8487+if test -z "$ac_aux_dir"; then
8488+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
8489+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
8490+ { (exit 1); exit 1; }; }
8491+fi
8492+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
8493+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
8494+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
8495
8496 # Find a good install program. We prefer a C program (faster),
8497 # so one script is as good as another. But avoid the broken or
8498@@ -904,87 +2427,102 @@
8499 # SunOS /usr/etc/install
8500 # IRIX /sbin/install
8501 # AIX /bin/install
8502+# AmigaOS /C/install, which installs bootblocks on floppy discs
8503 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8504 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8505 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8506 # ./install, which can be erroneously created by make from ./install.sh.
8507-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
8508-echo "configure:913: checking for a BSD compatible install" >&5
8509+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8510+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
8511 if test -z "$INSTALL"; then
8512-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
8513- echo $ac_n "(cached) $ac_c" 1>&6
8514+if test "${ac_cv_path_install+set}" = set; then
8515+ echo $ECHO_N "(cached) $ECHO_C" >&6
8516 else
8517- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
8518- for ac_dir in $PATH; do
8519- # Account for people who put trailing slashes in PATH elements.
8520- case "$ac_dir/" in
8521- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8522- *)
8523- # OSF1 and SCO ODT 3.0 have their own names for install.
8524- # Don't use installbsd from OSF since it installs stuff as root
8525- # by default.
8526- for ac_prog in ginstall scoinst install; do
8527- if test -f $ac_dir/$ac_prog; then
8528- if test $ac_prog = install &&
8529- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8530- # AIX install. It has an incompatible calling convention.
8531- :
8532- else
8533- ac_cv_path_install="$ac_dir/$ac_prog -c"
8534- break 2
8535- fi
8536- fi
8537+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538+for as_dir in $PATH
8539+do
8540+ IFS=$as_save_IFS
8541+ test -z "$as_dir" && as_dir=.
8542+ # Account for people who put trailing slashes in PATH elements.
8543+case $as_dir/ in
8544+ ./ | .// | /cC/* | \
8545+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8546+ /usr/ucb/* ) ;;
8547+ *)
8548+ # OSF1 and SCO ODT 3.0 have their own names for install.
8549+ # Don't use installbsd from OSF since it installs stuff as root
8550+ # by default.
8551+ for ac_prog in ginstall scoinst install; do
8552+ for ac_exec_ext in '' $ac_executable_extensions; do
8553+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8554+ if test $ac_prog = install &&
8555+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8556+ # AIX install. It has an incompatible calling convention.
8557+ :
8558+ elif test $ac_prog = install &&
8559+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8560+ # program-specific install script used by HP pwplus--don't use.
8561+ :
8562+ else
8563+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8564+ break 3
8565+ fi
8566+ fi
8567 done
8568- ;;
8569- esac
8570- done
8571- IFS="$ac_save_IFS"
8572+ done
8573+ ;;
8574+esac
8575+done
8576+
8577
8578 fi
8579 if test "${ac_cv_path_install+set}" = set; then
8580- INSTALL="$ac_cv_path_install"
8581+ INSTALL=$ac_cv_path_install
8582 else
8583 # As a last resort, use the slow shell script. We don't cache a
8584 # path for INSTALL within a source directory, because that will
8585 # break other packages using the cache if that directory is
8586 # removed, or if the path is relative.
8587- INSTALL="$ac_install_sh"
8588+ INSTALL=$ac_install_sh
8589 fi
8590 fi
8591-echo "$ac_t""$INSTALL" 1>&6
8592+echo "$as_me:$LINENO: result: $INSTALL" >&5
8593+echo "${ECHO_T}$INSTALL" >&6
8594
8595 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8596 # It thinks the first close brace ends the variable substitution.
8597 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8598
8599-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
8600+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8601
8602 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8603
8604-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
8605-echo "configure:966: checking whether ${MAKE-make} sets \${MAKE}" >&5
8606-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
8607-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
8608- echo $ac_n "(cached) $ac_c" 1>&6
8609+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8610+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8611+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
8612+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8613+ echo $ECHO_N "(cached) $ECHO_C" >&6
8614 else
8615- cat > conftestmake <<\EOF
8616+ cat >conftest.make <<\_ACEOF
8617 all:
8618- @echo 'ac_maketemp="${MAKE}"'
8619-EOF
8620+ @echo 'ac_maketemp="$(MAKE)"'
8621+_ACEOF
8622 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8623-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
8624+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8625 if test -n "$ac_maketemp"; then
8626 eval ac_cv_prog_make_${ac_make}_set=yes
8627 else
8628 eval ac_cv_prog_make_${ac_make}_set=no
8629 fi
8630-rm -f conftestmake
8631+rm -f conftest.make
8632 fi
8633 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8634- echo "$ac_t""yes" 1>&6
8635+ echo "$as_me:$LINENO: result: yes" >&5
8636+echo "${ECHO_T}yes" >&6
8637 SET_MAKE=
8638 else
8639- echo "$ac_t""no" 1>&6
8640+ echo "$as_me:$LINENO: result: no" >&5
8641+echo "${ECHO_T}no" >&6
8642 SET_MAKE="MAKE=${MAKE-make}"
8643 fi
8644
8645@@ -992,625 +2530,1355 @@
8646 # because <errno.h> reserves symbols starting with `E'.
8647 # Extract the first word of "ed", so it can be a program name with args.
8648 set dummy ed; ac_word=$2
8649-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8650-echo "configure:997: checking for $ac_word" >&5
8651-if eval "test \"`echo '$''{'ac_cv_path_ed_PROGRAM'+set}'`\" = set"; then
8652- echo $ac_n "(cached) $ac_c" 1>&6
8653+echo "$as_me:$LINENO: checking for $ac_word" >&5
8654+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8655+if test "${ac_cv_path_ed_PROGRAM+set}" = set; then
8656+ echo $ECHO_N "(cached) $ECHO_C" >&6
8657 else
8658- case "$ed_PROGRAM" in
8659- /*)
8660+ case $ed_PROGRAM in
8661+ [\\/]* | ?:[\\/]*)
8662 ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a path.
8663 ;;
8664- ?:/*)
8665- ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a dos path.
8666- ;;
8667 *)
8668- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8669- ac_dummy="$PATH"
8670- for ac_dir in $ac_dummy; do
8671- test -z "$ac_dir" && ac_dir=.
8672- if test -f $ac_dir/$ac_word; then
8673- ac_cv_path_ed_PROGRAM="$ac_dir/$ac_word"
8674- break
8675- fi
8676- done
8677- IFS="$ac_save_ifs"
8678+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679+for as_dir in $PATH
8680+do
8681+ IFS=$as_save_IFS
8682+ test -z "$as_dir" && as_dir=.
8683+ for ac_exec_ext in '' $ac_executable_extensions; do
8684+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685+ ac_cv_path_ed_PROGRAM="$as_dir/$ac_word$ac_exec_ext"
8686+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8687+ break 2
8688+ fi
8689+done
8690+done
8691+
8692 test -z "$ac_cv_path_ed_PROGRAM" && ac_cv_path_ed_PROGRAM="ed"
8693 ;;
8694 esac
8695 fi
8696-ed_PROGRAM="$ac_cv_path_ed_PROGRAM"
8697+ed_PROGRAM=$ac_cv_path_ed_PROGRAM
8698+
8699 if test -n "$ed_PROGRAM"; then
8700- echo "$ac_t""$ed_PROGRAM" 1>&6
8701+ echo "$as_me:$LINENO: result: $ed_PROGRAM" >&5
8702+echo "${ECHO_T}$ed_PROGRAM" >&6
8703 else
8704- echo "$ac_t""no" 1>&6
8705+ echo "$as_me:$LINENO: result: no" >&5
8706+echo "${ECHO_T}no" >&6
8707 fi
8708
8709
8710-echo $ac_n "checking build system type""... $ac_c" 1>&6
8711-echo "configure:1032: checking build system type" >&5
8712
8713-build_alias=$build
8714-case "$build_alias" in
8715-NONE)
8716- case $nonopt in
8717- NONE) build_alias=$host_alias ;;
8718- *) build_alias=$nonopt ;;
8719- esac ;;
8720-esac
8721+cat >>confdefs.h <<\_ACEOF
8722+#define _GNU_SOURCE 1
8723+_ACEOF
8724
8725-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
8726-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
8727-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
8728-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
8729-echo "$ac_t""$build" 1>&6
8730
8731-if test $host != $build; then
8732- ac_tool_prefix=${host_alias}-
8733-else
8734- ac_tool_prefix=
8735-fi
8736
8737
8738- # Check whether --enable-largefile or --disable-largefile was given.
8739-if test "${enable_largefile+set}" = set; then
8740- enableval="$enable_largefile"
8741- :
8742-fi
8743-
8744- if test "$enable_largefile" != no; then
8745- # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
8746-set dummy ${ac_tool_prefix}getconf; ac_word=$2
8747-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8748-echo "configure:1066: checking for $ac_word" >&5
8749-if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
8750- echo $ac_n "(cached) $ac_c" 1>&6
8751-else
8752- if test -n "$GETCONF"; then
8753- ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
8754+echo "$as_me:$LINENO: checking for egrep" >&5
8755+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
8756+if test "${ac_cv_prog_egrep+set}" = set; then
8757+ echo $ECHO_N "(cached) $ECHO_C" >&6
8758 else
8759- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8760- ac_dummy="$PATH"
8761- for ac_dir in $ac_dummy; do
8762- test -z "$ac_dir" && ac_dir=.
8763- if test -f $ac_dir/$ac_word; then
8764- ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
8765- break
8766+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
8767+ then ac_cv_prog_egrep='grep -E'
8768+ else ac_cv_prog_egrep='egrep'
8769 fi
8770- done
8771- IFS="$ac_save_ifs"
8772- test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
8773 fi
8774-fi
8775-GETCONF="$ac_cv_prog_GETCONF"
8776-if test -n "$GETCONF"; then
8777- echo "$ac_t""$GETCONF" 1>&6
8778+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
8779+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
8780+ EGREP=$ac_cv_prog_egrep
8781+
8782+
8783+
8784+echo "$as_me:$LINENO: checking for AIX" >&5
8785+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
8786+cat >conftest.$ac_ext <<_ACEOF
8787+#line $LINENO "configure"
8788+/* confdefs.h. */
8789+_ACEOF
8790+cat confdefs.h >>conftest.$ac_ext
8791+cat >>conftest.$ac_ext <<_ACEOF
8792+/* end confdefs.h. */
8793+#ifdef _AIX
8794+ yes
8795+#endif
8796+
8797+_ACEOF
8798+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8799+ $EGREP "yes" >/dev/null 2>&1; then
8800+ echo "$as_me:$LINENO: result: yes" >&5
8801+echo "${ECHO_T}yes" >&6
8802+cat >>confdefs.h <<\_ACEOF
8803+#define _ALL_SOURCE 1
8804+_ACEOF
8805+
8806 else
8807- echo "$ac_t""no" 1>&6
8808+ echo "$as_me:$LINENO: result: no" >&5
8809+echo "${ECHO_T}no" >&6
8810 fi
8811+rm -f conftest*
8812
8813
8814+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8815+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8816+if test "${ac_cv_header_stdc+set}" = set; then
8817+ echo $ECHO_N "(cached) $ECHO_C" >&6
8818+else
8819+ cat >conftest.$ac_ext <<_ACEOF
8820+#line $LINENO "configure"
8821+/* confdefs.h. */
8822+_ACEOF
8823+cat confdefs.h >>conftest.$ac_ext
8824+cat >>conftest.$ac_ext <<_ACEOF
8825+/* end confdefs.h. */
8826+#include <stdlib.h>
8827+#include <stdarg.h>
8828+#include <string.h>
8829+#include <float.h>
8830
8831- echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
8832-echo "configure:1096: checking for CFLAGS value to request large file support" >&5
8833-if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
8834- echo $ac_n "(cached) $ac_c" 1>&6
8835+int
8836+main ()
8837+{
8838+
8839+ ;
8840+ return 0;
8841+}
8842+_ACEOF
8843+rm -f conftest.$ac_objext
8844+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8845+ (eval $ac_compile) 2>&5
8846+ ac_status=$?
8847+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848+ (exit $ac_status); } &&
8849+ { ac_try='test -s conftest.$ac_objext'
8850+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8851+ (eval $ac_try) 2>&5
8852+ ac_status=$?
8853+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854+ (exit $ac_status); }; }; then
8855+ ac_cv_header_stdc=yes
8856 else
8857- ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
8858- ac_cv_sys_largefile_CFLAGS=no
8859- case "$host_os" in
8860- # IRIX 6.2 and later require cc -n32.
8861- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
8862- if test "$GCC" != yes; then
8863- ac_cv_sys_largefile_CFLAGS=-n32
8864- fi
8865- ac_save_CC="$CC"
8866- CC="$CC $ac_cv_sys_largefile_CFLAGS"
8867- cat > conftest.$ac_ext <<EOF
8868-#line 1111 "configure"
8869-#include "confdefs.h"
8870+ echo "$as_me: failed program was:" >&5
8871+sed 's/^/| /' conftest.$ac_ext >&5
8872
8873-int main() {
8874+ac_cv_header_stdc=no
8875+fi
8876+rm -f conftest.$ac_objext conftest.$ac_ext
8877
8878-; return 0; }
8879-EOF
8880-if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8881+if test $ac_cv_header_stdc = yes; then
8882+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8883+ cat >conftest.$ac_ext <<_ACEOF
8884+#line $LINENO "configure"
8885+/* confdefs.h. */
8886+_ACEOF
8887+cat confdefs.h >>conftest.$ac_ext
8888+cat >>conftest.$ac_ext <<_ACEOF
8889+/* end confdefs.h. */
8890+#include <string.h>
8891+
8892+_ACEOF
8893+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8894+ $EGREP "memchr" >/dev/null 2>&1; then
8895 :
8896 else
8897- echo "configure: failed program was:" >&5
8898- cat conftest.$ac_ext >&5
8899- rm -rf conftest*
8900- ac_cv_sys_largefile_CFLAGS=no
8901+ ac_cv_header_stdc=no
8902 fi
8903 rm -f conftest*
8904- CC="$ac_save_CC"
8905- esac
8906- }
8907+
8908 fi
8909
8910-echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
8911- echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
8912-echo "configure:1134: checking for LDFLAGS value to request large file support" >&5
8913-if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
8914- echo $ac_n "(cached) $ac_c" 1>&6
8915+if test $ac_cv_header_stdc = yes; then
8916+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8917+ cat >conftest.$ac_ext <<_ACEOF
8918+#line $LINENO "configure"
8919+/* confdefs.h. */
8920+_ACEOF
8921+cat confdefs.h >>conftest.$ac_ext
8922+cat >>conftest.$ac_ext <<_ACEOF
8923+/* end confdefs.h. */
8924+#include <stdlib.h>
8925+
8926+_ACEOF
8927+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8928+ $EGREP "free" >/dev/null 2>&1; then
8929+ :
8930 else
8931- ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
8932- ac_cv_sys_largefile_LDFLAGS=no
8933-
8934- }
8935+ ac_cv_header_stdc=no
8936 fi
8937+rm -f conftest*
8938
8939-echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
8940- echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
8941-echo "configure:1146: checking for LIBS value to request large file support" >&5
8942-if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
8943- echo $ac_n "(cached) $ac_c" 1>&6
8944-else
8945- ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
8946- ac_cv_sys_largefile_LIBS=no
8947-
8948- }
8949 fi
8950
8951-echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
8952+if test $ac_cv_header_stdc = yes; then
8953+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8954+ if test "$cross_compiling" = yes; then
8955+ :
8956+else
8957+ cat >conftest.$ac_ext <<_ACEOF
8958+#line $LINENO "configure"
8959+/* confdefs.h. */
8960+_ACEOF
8961+cat confdefs.h >>conftest.$ac_ext
8962+cat >>conftest.$ac_ext <<_ACEOF
8963+/* end confdefs.h. */
8964+#include <ctype.h>
8965+#if ((' ' & 0x0FF) == 0x020)
8966+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8967+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8968+#else
8969+# define ISLOWER(c) \
8970+ (('a' <= (c) && (c) <= 'i') \
8971+ || ('j' <= (c) && (c) <= 'r') \
8972+ || ('s' <= (c) && (c) <= 'z'))
8973+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8974+#endif
8975
8976- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
8977- case "$ac_flag" in
8978- no) ;;
8979- -D_FILE_OFFSET_BITS=*) ;;
8980- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
8981- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
8982- -D?* | -I?*)
8983- case "$ac_flag" in
8984- no) ;;
8985- ?*)
8986- case "$CPPFLAGS" in
8987- '') CPPFLAGS="$ac_flag" ;;
8988- *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
8989- esac ;;
8990- esac ;;
8991- *)
8992- case "$ac_flag" in
8993- no) ;;
8994- ?*)
8995- case "$CFLAGS" in
8996- '') CFLAGS="$ac_flag" ;;
8997- *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
8998- esac ;;
8999- esac ;;
9000- esac
9001- done
9002- case "$ac_cv_sys_largefile_LDFLAGS" in
9003- no) ;;
9004- ?*)
9005- case "$LDFLAGS" in
9006- '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
9007- *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
9008- esac ;;
9009- esac
9010- case "$ac_cv_sys_largefile_LIBS" in
9011- no) ;;
9012- ?*)
9013- case "$LIBS" in
9014- '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
9015- *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
9016- esac ;;
9017- esac
9018- echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
9019-echo "configure:1201: checking for _FILE_OFFSET_BITS" >&5
9020-if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
9021- echo $ac_n "(cached) $ac_c" 1>&6
9022+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9023+int
9024+main ()
9025+{
9026+ int i;
9027+ for (i = 0; i < 256; i++)
9028+ if (XOR (islower (i), ISLOWER (i))
9029+ || toupper (i) != TOUPPER (i))
9030+ exit(2);
9031+ exit (0);
9032+}
9033+_ACEOF
9034+rm -f conftest$ac_exeext
9035+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9036+ (eval $ac_link) 2>&5
9037+ ac_status=$?
9038+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9040+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9041+ (eval $ac_try) 2>&5
9042+ ac_status=$?
9043+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044+ (exit $ac_status); }; }; then
9045+ :
9046 else
9047- ac_cv_sys_file_offset_bits=no
9048- case "$host_os" in
9049- # HP-UX 10.20 and later
9050- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
9051- ac_cv_sys_file_offset_bits=64 ;;
9052- esac
9053- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9054- case "$ac_flag" in
9055- -D_FILE_OFFSET_BITS)
9056- ac_cv_sys_file_offset_bits=1 ;;
9057- -D_FILE_OFFSET_BITS=*)
9058- ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9059- esac
9060- done
9061-
9062+ echo "$as_me: program exited with status $ac_status" >&5
9063+echo "$as_me: failed program was:" >&5
9064+sed 's/^/| /' conftest.$ac_ext >&5
9065+
9066+( exit $ac_status )
9067+ac_cv_header_stdc=no
9068 fi
9069+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9070+fi
9071+fi
9072+fi
9073+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9074+echo "${ECHO_T}$ac_cv_header_stdc" >&6
9075+if test $ac_cv_header_stdc = yes; then
9076
9077-echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
9078- if test "$ac_cv_sys_file_offset_bits" != no; then
9079- cat >> confdefs.h <<EOF
9080-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9081-EOF
9082+cat >>confdefs.h <<\_ACEOF
9083+#define STDC_HEADERS 1
9084+_ACEOF
9085
9086- fi
9087- echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
9088-echo "configure:1230: checking for _LARGEFILE_SOURCE" >&5
9089-if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
9090- echo $ac_n "(cached) $ac_c" 1>&6
9091-else
9092- ac_cv_sys_largefile_source=no
9093- case "$host_os" in
9094- # HP-UX 10.20 and later
9095- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
9096- ac_cv_sys_largefile_source=1 ;;
9097- esac
9098- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9099- case "$ac_flag" in
9100- -D_LARGEFILE_SOURCE)
9101- ac_cv_sys_largefile_source=1 ;;
9102- -D_LARGEFILE_SOURCE=*)
9103- ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9104- esac
9105- done
9106-
9107 fi
9108
9109-echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
9110- if test "$ac_cv_sys_largefile_source" != no; then
9111- cat >> confdefs.h <<EOF
9112-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9113-EOF
9114+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
9115+
9116
9117- fi
9118- echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
9119-echo "configure:1259: checking for _LARGE_FILES" >&5
9120-if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
9121- echo $ac_n "(cached) $ac_c" 1>&6
9122-else
9123- ac_cv_sys_large_files=no
9124- case "$host_os" in
9125- # AIX 4.2 and later
9126- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
9127- ac_cv_sys_large_files=1 ;;
9128- esac
9129- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9130- case "$ac_flag" in
9131- -D_LARGE_FILES)
9132- ac_cv_sys_large_files=1 ;;
9133- -D_LARGE_FILES=*)
9134- ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9135- esac
9136- done
9137-
9138-fi
9139
9140-echo "$ac_t""$ac_cv_sys_large_files" 1>&6
9141- if test "$ac_cv_sys_large_files" != no; then
9142- cat >> confdefs.h <<EOF
9143-#define _LARGE_FILES $ac_cv_sys_large_files
9144-EOF
9145
9146- fi
9147- fi
9148-
9149
9150-echo $ac_n "checking for AIX""... $ac_c" 1>&6
9151-echo "configure:1291: checking for AIX" >&5
9152-cat > conftest.$ac_ext <<EOF
9153-#line 1293 "configure"
9154-#include "confdefs.h"
9155-#ifdef _AIX
9156- yes
9157-#endif
9158
9159-EOF
9160-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9161- egrep "yes" >/dev/null 2>&1; then
9162- rm -rf conftest*
9163- echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
9164-#define _ALL_SOURCE 1
9165-EOF
9166
9167+
9168+
9169+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9170+ inttypes.h stdint.h unistd.h
9171+do
9172+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9173+echo "$as_me:$LINENO: checking for $ac_header" >&5
9174+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9175+if eval "test \"\${$as_ac_Header+set}\" = set"; then
9176+ echo $ECHO_N "(cached) $ECHO_C" >&6
9177 else
9178- rm -rf conftest*
9179- echo "$ac_t""no" 1>&6
9180+ cat >conftest.$ac_ext <<_ACEOF
9181+#line $LINENO "configure"
9182+/* confdefs.h. */
9183+_ACEOF
9184+cat confdefs.h >>conftest.$ac_ext
9185+cat >>conftest.$ac_ext <<_ACEOF
9186+/* end confdefs.h. */
9187+$ac_includes_default
9188+
9189+#include <$ac_header>
9190+_ACEOF
9191+rm -f conftest.$ac_objext
9192+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193+ (eval $ac_compile) 2>&5
9194+ ac_status=$?
9195+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196+ (exit $ac_status); } &&
9197+ { ac_try='test -s conftest.$ac_objext'
9198+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9199+ (eval $ac_try) 2>&5
9200+ ac_status=$?
9201+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202+ (exit $ac_status); }; }; then
9203+ eval "$as_ac_Header=yes"
9204+else
9205+ echo "$as_me: failed program was:" >&5
9206+sed 's/^/| /' conftest.$ac_ext >&5
9207+
9208+eval "$as_ac_Header=no"
9209 fi
9210-rm -f conftest*
9211+rm -f conftest.$ac_objext conftest.$ac_ext
9212+fi
9213+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9214+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9215+if test `eval echo '${'$as_ac_Header'}'` = yes; then
9216+ cat >>confdefs.h <<_ACEOF
9217+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9218+_ACEOF
9219
9220+fi
9221
9222-ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
9223-echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
9224-echo "configure:1316: checking for minix/config.h" >&5
9225-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9226- echo $ac_n "(cached) $ac_c" 1>&6
9227+done
9228+
9229+
9230+if test "${ac_cv_header_minix_config_h+set}" = set; then
9231+ echo "$as_me:$LINENO: checking for minix/config.h" >&5
9232+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
9233+if test "${ac_cv_header_minix_config_h+set}" = set; then
9234+ echo $ECHO_N "(cached) $ECHO_C" >&6
9235+fi
9236+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9237+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
9238 else
9239- cat > conftest.$ac_ext <<EOF
9240-#line 1321 "configure"
9241-#include "confdefs.h"
9242+ # Is the header compilable?
9243+echo "$as_me:$LINENO: checking minix/config.h usability" >&5
9244+echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
9245+cat >conftest.$ac_ext <<_ACEOF
9246+#line $LINENO "configure"
9247+/* confdefs.h. */
9248+_ACEOF
9249+cat confdefs.h >>conftest.$ac_ext
9250+cat >>conftest.$ac_ext <<_ACEOF
9251+/* end confdefs.h. */
9252+$ac_includes_default
9253 #include <minix/config.h>
9254-EOF
9255-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9256-{ (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9257-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9258-if test -z "$ac_err"; then
9259- rm -rf conftest*
9260- eval "ac_cv_header_$ac_safe=yes"
9261+_ACEOF
9262+rm -f conftest.$ac_objext
9263+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9264+ (eval $ac_compile) 2>&5
9265+ ac_status=$?
9266+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267+ (exit $ac_status); } &&
9268+ { ac_try='test -s conftest.$ac_objext'
9269+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9270+ (eval $ac_try) 2>&5
9271+ ac_status=$?
9272+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273+ (exit $ac_status); }; }; then
9274+ ac_header_compiler=yes
9275 else
9276- echo "$ac_err" >&5
9277- echo "configure: failed program was:" >&5
9278- cat conftest.$ac_ext >&5
9279- rm -rf conftest*
9280- eval "ac_cv_header_$ac_safe=no"
9281+ echo "$as_me: failed program was:" >&5
9282+sed 's/^/| /' conftest.$ac_ext >&5
9283+
9284+ac_header_compiler=no
9285 fi
9286-rm -f conftest*
9287+rm -f conftest.$ac_objext conftest.$ac_ext
9288+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9289+echo "${ECHO_T}$ac_header_compiler" >&6
9290+
9291+# Is the header present?
9292+echo "$as_me:$LINENO: checking minix/config.h presence" >&5
9293+echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
9294+cat >conftest.$ac_ext <<_ACEOF
9295+#line $LINENO "configure"
9296+/* confdefs.h. */
9297+_ACEOF
9298+cat confdefs.h >>conftest.$ac_ext
9299+cat >>conftest.$ac_ext <<_ACEOF
9300+/* end confdefs.h. */
9301+#include <minix/config.h>
9302+_ACEOF
9303+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9304+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9305+ ac_status=$?
9306+ grep -v '^ *+' conftest.er1 >conftest.err
9307+ rm -f conftest.er1
9308+ cat conftest.err >&5
9309+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310+ (exit $ac_status); } >/dev/null; then
9311+ if test -s conftest.err; then
9312+ ac_cpp_err=$ac_c_preproc_warn_flag
9313+ else
9314+ ac_cpp_err=
9315+ fi
9316+else
9317+ ac_cpp_err=yes
9318 fi
9319-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9320- echo "$ac_t""yes" 1>&6
9321+if test -z "$ac_cpp_err"; then
9322+ ac_header_preproc=yes
9323+else
9324+ echo "$as_me: failed program was:" >&5
9325+sed 's/^/| /' conftest.$ac_ext >&5
9326+
9327+ ac_header_preproc=no
9328+fi
9329+rm -f conftest.err conftest.$ac_ext
9330+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9331+echo "${ECHO_T}$ac_header_preproc" >&6
9332+
9333+# So? What about this header?
9334+case $ac_header_compiler:$ac_header_preproc in
9335+ yes:no )
9336+ { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
9337+echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9338+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
9339+echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
9340+ (
9341+ cat <<\_ASBOX
9342+## ------------------------------------ ##
9343+## Report this to bug-autoconf@gnu.org. ##
9344+## ------------------------------------ ##
9345+_ASBOX
9346+ ) |
9347+ sed "s/^/$as_me: WARNING: /" >&2
9348+ ;;
9349+ no:yes )
9350+ { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
9351+echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
9352+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
9353+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
9354+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
9355+echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
9356+ (
9357+ cat <<\_ASBOX
9358+## ------------------------------------ ##
9359+## Report this to bug-autoconf@gnu.org. ##
9360+## ------------------------------------ ##
9361+_ASBOX
9362+ ) |
9363+ sed "s/^/$as_me: WARNING: /" >&2
9364+ ;;
9365+esac
9366+echo "$as_me:$LINENO: checking for minix/config.h" >&5
9367+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
9368+if test "${ac_cv_header_minix_config_h+set}" = set; then
9369+ echo $ECHO_N "(cached) $ECHO_C" >&6
9370+else
9371+ ac_cv_header_minix_config_h=$ac_header_preproc
9372+fi
9373+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9374+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
9375+
9376+fi
9377+if test $ac_cv_header_minix_config_h = yes; then
9378 MINIX=yes
9379 else
9380- echo "$ac_t""no" 1>&6
9381-MINIX=
9382+ MINIX=
9383 fi
9384
9385+
9386 if test "$MINIX" = yes; then
9387- cat >> confdefs.h <<\EOF
9388+
9389+cat >>confdefs.h <<\_ACEOF
9390 #define _POSIX_SOURCE 1
9391-EOF
9392+_ACEOF
9393
9394- cat >> confdefs.h <<\EOF
9395+
9396+cat >>confdefs.h <<\_ACEOF
9397 #define _POSIX_1_SOURCE 2
9398-EOF
9399+_ACEOF
9400
9401- cat >> confdefs.h <<\EOF
9402+
9403+cat >>confdefs.h <<\_ACEOF
9404 #define _MINIX 1
9405-EOF
9406+_ACEOF
9407
9408 fi
9409
9410-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
9411-echo "configure:1364: checking for POSIXized ISC" >&5
9412-if test -d /etc/conf/kconfig.d &&
9413- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
9414-then
9415- echo "$ac_t""yes" 1>&6
9416- ISC=yes # If later tests want to check for ISC.
9417- cat >> confdefs.h <<\EOF
9418-#define _POSIX_SOURCE 1
9419-EOF
9420
9421- if test "$GCC" = yes; then
9422- CC="$CC -posix"
9423- else
9424- CC="$CC -Xp"
9425- fi
9426+echo "$as_me:$LINENO: checking for library containing strerror" >&5
9427+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
9428+if test "${ac_cv_search_strerror+set}" = set; then
9429+ echo $ECHO_N "(cached) $ECHO_C" >&6
9430 else
9431- echo "$ac_t""no" 1>&6
9432- ISC=
9433-fi
9434+ ac_func_search_save_LIBS=$LIBS
9435+ac_cv_search_strerror=no
9436+cat >conftest.$ac_ext <<_ACEOF
9437+#line $LINENO "configure"
9438+/* confdefs.h. */
9439+_ACEOF
9440+cat confdefs.h >>conftest.$ac_ext
9441+cat >>conftest.$ac_ext <<_ACEOF
9442+/* end confdefs.h. */
9443
9444-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
9445-echo "configure:1385: checking for Cygwin environment" >&5
9446-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9447- echo $ac_n "(cached) $ac_c" 1>&6
9448+/* Override any gcc2 internal prototype to avoid an error. */
9449+#ifdef __cplusplus
9450+extern "C"
9451+#endif
9452+/* We use char because int might match the return type of a gcc2
9453+ builtin and then its argument prototype would still apply. */
9454+char strerror ();
9455+int
9456+main ()
9457+{
9458+strerror ();
9459+ ;
9460+ return 0;
9461+}
9462+_ACEOF
9463+rm -f conftest.$ac_objext conftest$ac_exeext
9464+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465+ (eval $ac_link) 2>&5
9466+ ac_status=$?
9467+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468+ (exit $ac_status); } &&
9469+ { ac_try='test -s conftest$ac_exeext'
9470+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9471+ (eval $ac_try) 2>&5
9472+ ac_status=$?
9473+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474+ (exit $ac_status); }; }; then
9475+ ac_cv_search_strerror="none required"
9476 else
9477- cat > conftest.$ac_ext <<EOF
9478-#line 1390 "configure"
9479-#include "confdefs.h"
9480+ echo "$as_me: failed program was:" >&5
9481+sed 's/^/| /' conftest.$ac_ext >&5
9482
9483-int main() {
9484+fi
9485+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9486+if test "$ac_cv_search_strerror" = no; then
9487+ for ac_lib in cposix; do
9488+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9489+ cat >conftest.$ac_ext <<_ACEOF
9490+#line $LINENO "configure"
9491+/* confdefs.h. */
9492+_ACEOF
9493+cat confdefs.h >>conftest.$ac_ext
9494+cat >>conftest.$ac_ext <<_ACEOF
9495+/* end confdefs.h. */
9496
9497-#ifndef __CYGWIN__
9498-#define __CYGWIN__ __CYGWIN32__
9499+/* Override any gcc2 internal prototype to avoid an error. */
9500+#ifdef __cplusplus
9501+extern "C"
9502 #endif
9503-return __CYGWIN__;
9504-; return 0; }
9505-EOF
9506-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9507- rm -rf conftest*
9508- ac_cv_cygwin=yes
9509+/* We use char because int might match the return type of a gcc2
9510+ builtin and then its argument prototype would still apply. */
9511+char strerror ();
9512+int
9513+main ()
9514+{
9515+strerror ();
9516+ ;
9517+ return 0;
9518+}
9519+_ACEOF
9520+rm -f conftest.$ac_objext conftest$ac_exeext
9521+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9522+ (eval $ac_link) 2>&5
9523+ ac_status=$?
9524+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9525+ (exit $ac_status); } &&
9526+ { ac_try='test -s conftest$ac_exeext'
9527+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9528+ (eval $ac_try) 2>&5
9529+ ac_status=$?
9530+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531+ (exit $ac_status); }; }; then
9532+ ac_cv_search_strerror="-l$ac_lib"
9533+break
9534 else
9535- echo "configure: failed program was:" >&5
9536- cat conftest.$ac_ext >&5
9537- rm -rf conftest*
9538- ac_cv_cygwin=no
9539+ echo "$as_me: failed program was:" >&5
9540+sed 's/^/| /' conftest.$ac_ext >&5
9541+
9542 fi
9543-rm -f conftest*
9544-rm -f conftest*
9545+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9546+ done
9547 fi
9548+LIBS=$ac_func_search_save_LIBS
9549+fi
9550+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
9551+echo "${ECHO_T}$ac_cv_search_strerror" >&6
9552+if test "$ac_cv_search_strerror" != no; then
9553+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
9554
9555-echo "$ac_t""$ac_cv_cygwin" 1>&6
9556-CYGWIN=
9557-test "$ac_cv_cygwin" = yes && CYGWIN=yes
9558-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
9559-echo "configure:1418: checking for mingw32 environment" >&5
9560-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
9561- echo $ac_n "(cached) $ac_c" 1>&6
9562+fi
9563+
9564+# Check whether --enable-largefile or --disable-largefile was given.
9565+if test "${enable_largefile+set}" = set; then
9566+ enableval="$enable_largefile"
9567+
9568+fi;
9569+if test "$enable_largefile" != no; then
9570+
9571+ echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
9572+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9573+if test "${ac_cv_sys_largefile_CC+set}" = set; then
9574+ echo $ECHO_N "(cached) $ECHO_C" >&6
9575 else
9576- cat > conftest.$ac_ext <<EOF
9577-#line 1423 "configure"
9578-#include "confdefs.h"
9579+ ac_cv_sys_largefile_CC=no
9580+ if test "$GCC" != yes; then
9581+ ac_save_CC=$CC
9582+ while :; do
9583+ # IRIX 6.2 and later do not support large files by default,
9584+ # so use the C compiler's -n32 option if that helps.
9585+ cat >conftest.$ac_ext <<_ACEOF
9586+#line $LINENO "configure"
9587+/* confdefs.h. */
9588+_ACEOF
9589+cat confdefs.h >>conftest.$ac_ext
9590+cat >>conftest.$ac_ext <<_ACEOF
9591+/* end confdefs.h. */
9592+#include <sys/types.h>
9593+ /* Check that off_t can represent 2**63 - 1 correctly.
9594+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
9595+ since some C++ compilers masquerading as C compilers
9596+ incorrectly reject 9223372036854775807. */
9597+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9598+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9599+ && LARGE_OFF_T % 2147483647 == 1)
9600+ ? 1 : -1];
9601+int
9602+main ()
9603+{
9604
9605-int main() {
9606-return __MINGW32__;
9607-; return 0; }
9608-EOF
9609-if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9610- rm -rf conftest*
9611- ac_cv_mingw32=yes
9612+ ;
9613+ return 0;
9614+}
9615+_ACEOF
9616+ rm -f conftest.$ac_objext
9617+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9618+ (eval $ac_compile) 2>&5
9619+ ac_status=$?
9620+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621+ (exit $ac_status); } &&
9622+ { ac_try='test -s conftest.$ac_objext'
9623+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9624+ (eval $ac_try) 2>&5
9625+ ac_status=$?
9626+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627+ (exit $ac_status); }; }; then
9628+ break
9629 else
9630- echo "configure: failed program was:" >&5
9631- cat conftest.$ac_ext >&5
9632- rm -rf conftest*
9633- ac_cv_mingw32=no
9634+ echo "$as_me: failed program was:" >&5
9635+sed 's/^/| /' conftest.$ac_ext >&5
9636+
9637+fi
9638+rm -f conftest.$ac_objext
9639+ CC="$CC -n32"
9640+ rm -f conftest.$ac_objext
9641+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9642+ (eval $ac_compile) 2>&5
9643+ ac_status=$?
9644+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645+ (exit $ac_status); } &&
9646+ { ac_try='test -s conftest.$ac_objext'
9647+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9648+ (eval $ac_try) 2>&5
9649+ ac_status=$?
9650+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651+ (exit $ac_status); }; }; then
9652+ ac_cv_sys_largefile_CC=' -n32'; break
9653+else
9654+ echo "$as_me: failed program was:" >&5
9655+sed 's/^/| /' conftest.$ac_ext >&5
9656+
9657+fi
9658+rm -f conftest.$ac_objext
9659+ break
9660+ done
9661+ CC=$ac_save_CC
9662+ rm -f conftest.$ac_ext
9663+ fi
9664+fi
9665+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
9666+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9667+ if test "$ac_cv_sys_largefile_CC" != no; then
9668+ CC=$CC$ac_cv_sys_largefile_CC
9669+ fi
9670+
9671+ echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9672+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9673+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9674+ echo $ECHO_N "(cached) $ECHO_C" >&6
9675+else
9676+ while :; do
9677+ ac_cv_sys_file_offset_bits=no
9678+ cat >conftest.$ac_ext <<_ACEOF
9679+#line $LINENO "configure"
9680+/* confdefs.h. */
9681+_ACEOF
9682+cat confdefs.h >>conftest.$ac_ext
9683+cat >>conftest.$ac_ext <<_ACEOF
9684+/* end confdefs.h. */
9685+#include <sys/types.h>
9686+ /* Check that off_t can represent 2**63 - 1 correctly.
9687+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
9688+ since some C++ compilers masquerading as C compilers
9689+ incorrectly reject 9223372036854775807. */
9690+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9691+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9692+ && LARGE_OFF_T % 2147483647 == 1)
9693+ ? 1 : -1];
9694+int
9695+main ()
9696+{
9697+
9698+ ;
9699+ return 0;
9700+}
9701+_ACEOF
9702+rm -f conftest.$ac_objext
9703+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9704+ (eval $ac_compile) 2>&5
9705+ ac_status=$?
9706+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9707+ (exit $ac_status); } &&
9708+ { ac_try='test -s conftest.$ac_objext'
9709+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710+ (eval $ac_try) 2>&5
9711+ ac_status=$?
9712+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713+ (exit $ac_status); }; }; then
9714+ break
9715+else
9716+ echo "$as_me: failed program was:" >&5
9717+sed 's/^/| /' conftest.$ac_ext >&5
9718+
9719+fi
9720+rm -f conftest.$ac_objext conftest.$ac_ext
9721+ cat >conftest.$ac_ext <<_ACEOF
9722+#line $LINENO "configure"
9723+/* confdefs.h. */
9724+_ACEOF
9725+cat confdefs.h >>conftest.$ac_ext
9726+cat >>conftest.$ac_ext <<_ACEOF
9727+/* end confdefs.h. */
9728+#define _FILE_OFFSET_BITS 64
9729+#include <sys/types.h>
9730+ /* Check that off_t can represent 2**63 - 1 correctly.
9731+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
9732+ since some C++ compilers masquerading as C compilers
9733+ incorrectly reject 9223372036854775807. */
9734+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9735+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9736+ && LARGE_OFF_T % 2147483647 == 1)
9737+ ? 1 : -1];
9738+int
9739+main ()
9740+{
9741+
9742+ ;
9743+ return 0;
9744+}
9745+_ACEOF
9746+rm -f conftest.$ac_objext
9747+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9748+ (eval $ac_compile) 2>&5
9749+ ac_status=$?
9750+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751+ (exit $ac_status); } &&
9752+ { ac_try='test -s conftest.$ac_objext'
9753+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754+ (eval $ac_try) 2>&5
9755+ ac_status=$?
9756+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757+ (exit $ac_status); }; }; then
9758+ ac_cv_sys_file_offset_bits=64; break
9759+else
9760+ echo "$as_me: failed program was:" >&5
9761+sed 's/^/| /' conftest.$ac_ext >&5
9762+
9763+fi
9764+rm -f conftest.$ac_objext conftest.$ac_ext
9765+ break
9766+done
9767+fi
9768+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
9769+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9770+if test "$ac_cv_sys_file_offset_bits" != no; then
9771+
9772+cat >>confdefs.h <<_ACEOF
9773+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9774+_ACEOF
9775+
9776 fi
9777 rm -f conftest*
9778+ echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
9779+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9780+if test "${ac_cv_sys_large_files+set}" = set; then
9781+ echo $ECHO_N "(cached) $ECHO_C" >&6
9782+else
9783+ while :; do
9784+ ac_cv_sys_large_files=no
9785+ cat >conftest.$ac_ext <<_ACEOF
9786+#line $LINENO "configure"
9787+/* confdefs.h. */
9788+_ACEOF
9789+cat confdefs.h >>conftest.$ac_ext
9790+cat >>conftest.$ac_ext <<_ACEOF
9791+/* end confdefs.h. */
9792+#include <sys/types.h>
9793+ /* Check that off_t can represent 2**63 - 1 correctly.
9794+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
9795+ since some C++ compilers masquerading as C compilers
9796+ incorrectly reject 9223372036854775807. */
9797+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9798+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9799+ && LARGE_OFF_T % 2147483647 == 1)
9800+ ? 1 : -1];
9801+int
9802+main ()
9803+{
9804+
9805+ ;
9806+ return 0;
9807+}
9808+_ACEOF
9809+rm -f conftest.$ac_objext
9810+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9811+ (eval $ac_compile) 2>&5
9812+ ac_status=$?
9813+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814+ (exit $ac_status); } &&
9815+ { ac_try='test -s conftest.$ac_objext'
9816+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9817+ (eval $ac_try) 2>&5
9818+ ac_status=$?
9819+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820+ (exit $ac_status); }; }; then
9821+ break
9822+else
9823+ echo "$as_me: failed program was:" >&5
9824+sed 's/^/| /' conftest.$ac_ext >&5
9825+
9826+fi
9827+rm -f conftest.$ac_objext conftest.$ac_ext
9828+ cat >conftest.$ac_ext <<_ACEOF
9829+#line $LINENO "configure"
9830+/* confdefs.h. */
9831+_ACEOF
9832+cat confdefs.h >>conftest.$ac_ext
9833+cat >>conftest.$ac_ext <<_ACEOF
9834+/* end confdefs.h. */
9835+#define _LARGE_FILES 1
9836+#include <sys/types.h>
9837+ /* Check that off_t can represent 2**63 - 1 correctly.
9838+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
9839+ since some C++ compilers masquerading as C compilers
9840+ incorrectly reject 9223372036854775807. */
9841+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9842+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9843+ && LARGE_OFF_T % 2147483647 == 1)
9844+ ? 1 : -1];
9845+int
9846+main ()
9847+{
9848+
9849+ ;
9850+ return 0;
9851+}
9852+_ACEOF
9853+rm -f conftest.$ac_objext
9854+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9855+ (eval $ac_compile) 2>&5
9856+ ac_status=$?
9857+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858+ (exit $ac_status); } &&
9859+ { ac_try='test -s conftest.$ac_objext'
9860+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861+ (eval $ac_try) 2>&5
9862+ ac_status=$?
9863+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864+ (exit $ac_status); }; }; then
9865+ ac_cv_sys_large_files=1; break
9866+else
9867+ echo "$as_me: failed program was:" >&5
9868+sed 's/^/| /' conftest.$ac_ext >&5
9869+
9870+fi
9871+rm -f conftest.$ac_objext conftest.$ac_ext
9872+ break
9873+done
9874+fi
9875+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
9876+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9877+if test "$ac_cv_sys_large_files" != no; then
9878+
9879+cat >>confdefs.h <<_ACEOF
9880+#define _LARGE_FILES $ac_cv_sys_large_files
9881+_ACEOF
9882+
9883+fi
9884 rm -f conftest*
9885 fi
9886
9887-echo "$ac_t""$ac_cv_mingw32" 1>&6
9888-MINGW32=
9889-test "$ac_cv_mingw32" = yes && MINGW32=yes
9890
9891
9892-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
9893-echo "configure:1449: checking for executable suffix" >&5
9894-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
9895- echo $ac_n "(cached) $ac_c" 1>&6
9896+echo "$as_me:$LINENO: checking for function prototypes" >&5
9897+echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
9898+if test "$ac_cv_prog_cc_stdc" != no; then
9899+ echo "$as_me:$LINENO: result: yes" >&5
9900+echo "${ECHO_T}yes" >&6
9901+
9902+cat >>confdefs.h <<\_ACEOF
9903+#define PROTOTYPES 1
9904+_ACEOF
9905+
9906+
9907+cat >>confdefs.h <<\_ACEOF
9908+#define __PROTOTYPES 1
9909+_ACEOF
9910+
9911 else
9912- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
9913- ac_cv_exeext=.exe
9914+ echo "$as_me:$LINENO: result: no" >&5
9915+echo "${ECHO_T}no" >&6
9916+fi
9917+
9918+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
9919+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
9920+if test "${ac_cv_c_const+set}" = set; then
9921+ echo $ECHO_N "(cached) $ECHO_C" >&6
9922 else
9923- rm -f conftest*
9924- echo 'int main () { return 0; }' > conftest.$ac_ext
9925- ac_cv_exeext=
9926- if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
9927- for file in conftest.*; do
9928- case $file in
9929- *.c | *.o | *.obj) ;;
9930- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
9931- esac
9932- done
9933- else
9934- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
9935- fi
9936- rm -f conftest*
9937- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
9938+ cat >conftest.$ac_ext <<_ACEOF
9939+#line $LINENO "configure"
9940+/* confdefs.h. */
9941+_ACEOF
9942+cat confdefs.h >>conftest.$ac_ext
9943+cat >>conftest.$ac_ext <<_ACEOF
9944+/* end confdefs.h. */
9945+
9946+int
9947+main ()
9948+{
9949+/* FIXME: Include the comments suggested by Paul. */
9950+#ifndef __cplusplus
9951+ /* Ultrix mips cc rejects this. */
9952+ typedef int charset[2];
9953+ const charset x;
9954+ /* SunOS 4.1.1 cc rejects this. */
9955+ char const *const *ccp;
9956+ char **p;
9957+ /* NEC SVR4.0.2 mips cc rejects this. */
9958+ struct point {int x, y;};
9959+ static struct point const zero = {0,0};
9960+ /* AIX XL C 1.02.0.0 rejects this.
9961+ It does not let you subtract one const X* pointer from another in
9962+ an arm of an if-expression whose if-part is not a constant
9963+ expression */
9964+ const char *g = "string";
9965+ ccp = &g + (g ? g-g : 0);
9966+ /* HPUX 7.0 cc rejects these. */
9967+ ++ccp;
9968+ p = (char**) ccp;
9969+ ccp = (char const *const *) p;
9970+ { /* SCO 3.2v4 cc rejects this. */
9971+ char *t;
9972+ char const *s = 0 ? (char *) 0 : (char const *) 0;
9973+
9974+ *t++ = 0;
9975+ }
9976+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9977+ int x[] = {25, 17};
9978+ const int *foo = &x[0];
9979+ ++foo;
9980+ }
9981+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9982+ typedef const int *iptr;
9983+ iptr p = 0;
9984+ ++p;
9985+ }
9986+ { /* AIX XL C 1.02.0.0 rejects this saying
9987+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9988+ struct s { int j; const int *ap[3]; };
9989+ struct s *b; b->j = 5;
9990+ }
9991+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9992+ const int foo = 10;
9993+ }
9994+#endif
9995+
9996+ ;
9997+ return 0;
9998+}
9999+_ACEOF
10000+rm -f conftest.$ac_objext
10001+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10002+ (eval $ac_compile) 2>&5
10003+ ac_status=$?
10004+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005+ (exit $ac_status); } &&
10006+ { ac_try='test -s conftest.$ac_objext'
10007+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008+ (eval $ac_try) 2>&5
10009+ ac_status=$?
10010+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011+ (exit $ac_status); }; }; then
10012+ ac_cv_c_const=yes
10013+else
10014+ echo "$as_me: failed program was:" >&5
10015+sed 's/^/| /' conftest.$ac_ext >&5
10016+
10017+ac_cv_c_const=no
10018 fi
10019+rm -f conftest.$ac_objext conftest.$ac_ext
10020 fi
10021+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10022+echo "${ECHO_T}$ac_cv_c_const" >&6
10023+if test $ac_cv_c_const = no; then
10024
10025-EXEEXT=""
10026-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10027-echo "$ac_t""${ac_cv_exeext}" 1>&6
10028-ac_exeext=$EXEEXT
10029+cat >>confdefs.h <<\_ACEOF
10030+#define const
10031+_ACEOF
10032
10033+fi
10034
10035
10036
10037
10038-echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
10039-echo "configure:1484: checking for ${CC-cc} option to accept ANSI C" >&5
10040-if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
10041- echo $ac_n "(cached) $ac_c" 1>&6
10042+
10043+
10044+
10045+ac_header_dirent=no
10046+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10047+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10048+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
10049+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10050+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10051+ echo $ECHO_N "(cached) $ECHO_C" >&6
10052 else
10053- am_cv_prog_cc_stdc=no
10054-ac_save_CC="$CC"
10055-# Don't try gcc -ansi; that turns off useful extensions and
10056-# breaks some systems' header files.
10057-# AIX -qlanglvl=ansi
10058-# Ultrix and OSF/1 -std1
10059-# HP-UX -Aa -D_HPUX_SOURCE
10060-# SVR4 -Xc -D__EXTENSIONS__
10061-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10062-do
10063- CC="$ac_save_CC $ac_arg"
10064- cat > conftest.$ac_ext <<EOF
10065-#line 1500 "configure"
10066-#include "confdefs.h"
10067-#include <stdarg.h>
10068-#include <stdio.h>
10069+ cat >conftest.$ac_ext <<_ACEOF
10070+#line $LINENO "configure"
10071+/* confdefs.h. */
10072+_ACEOF
10073+cat confdefs.h >>conftest.$ac_ext
10074+cat >>conftest.$ac_ext <<_ACEOF
10075+/* end confdefs.h. */
10076 #include <sys/types.h>
10077-#include <sys/stat.h>
10078-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
10079-struct buf { int x; };
10080-FILE * (*rcsopen) (struct buf *, struct stat *, int);
10081-static char *e (p, i)
10082- char **p;
10083- int i;
10084+#include <$ac_hdr>
10085+
10086+int
10087+main ()
10088 {
10089- return p[i];
10090+if ((DIR *) 0)
10091+return 0;
10092+ ;
10093+ return 0;
10094 }
10095-static char *f (char * (*g) (char **, int), char **p, ...)
10096+_ACEOF
10097+rm -f conftest.$ac_objext
10098+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10099+ (eval $ac_compile) 2>&5
10100+ ac_status=$?
10101+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102+ (exit $ac_status); } &&
10103+ { ac_try='test -s conftest.$ac_objext'
10104+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10105+ (eval $ac_try) 2>&5
10106+ ac_status=$?
10107+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108+ (exit $ac_status); }; }; then
10109+ eval "$as_ac_Header=yes"
10110+else
10111+ echo "$as_me: failed program was:" >&5
10112+sed 's/^/| /' conftest.$ac_ext >&5
10113+
10114+eval "$as_ac_Header=no"
10115+fi
10116+rm -f conftest.$ac_objext conftest.$ac_ext
10117+fi
10118+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10119+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10120+if test `eval echo '${'$as_ac_Header'}'` = yes; then
10121+ cat >>confdefs.h <<_ACEOF
10122+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10123+_ACEOF
10124+
10125+ac_header_dirent=$ac_hdr; break
10126+fi
10127+
10128+done
10129+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10130+if test $ac_header_dirent = dirent.h; then
10131+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
10132+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10133+if test "${ac_cv_search_opendir+set}" = set; then
10134+ echo $ECHO_N "(cached) $ECHO_C" >&6
10135+else
10136+ ac_func_search_save_LIBS=$LIBS
10137+ac_cv_search_opendir=no
10138+cat >conftest.$ac_ext <<_ACEOF
10139+#line $LINENO "configure"
10140+/* confdefs.h. */
10141+_ACEOF
10142+cat confdefs.h >>conftest.$ac_ext
10143+cat >>conftest.$ac_ext <<_ACEOF
10144+/* end confdefs.h. */
10145+
10146+/* Override any gcc2 internal prototype to avoid an error. */
10147+#ifdef __cplusplus
10148+extern "C"
10149+#endif
10150+/* We use char because int might match the return type of a gcc2
10151+ builtin and then its argument prototype would still apply. */
10152+char opendir ();
10153+int
10154+main ()
10155 {
10156- char *s;
10157- va_list v;
10158- va_start (v,p);
10159- s = g (p, va_arg (v,int));
10160- va_end (v);
10161- return s;
10162+opendir ();
10163+ ;
10164+ return 0;
10165 }
10166-int test (int i, double x);
10167-struct s1 {int (*f) (int a);};
10168-struct s2 {int (*f) (double a);};
10169-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10170-int argc;
10171-char **argv;
10172-
10173-int main() {
10174+_ACEOF
10175+rm -f conftest.$ac_objext conftest$ac_exeext
10176+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10177+ (eval $ac_link) 2>&5
10178+ ac_status=$?
10179+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10180+ (exit $ac_status); } &&
10181+ { ac_try='test -s conftest$ac_exeext'
10182+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10183+ (eval $ac_try) 2>&5
10184+ ac_status=$?
10185+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186+ (exit $ac_status); }; }; then
10187+ ac_cv_search_opendir="none required"
10188+else
10189+ echo "$as_me: failed program was:" >&5
10190+sed 's/^/| /' conftest.$ac_ext >&5
10191
10192-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
10193+fi
10194+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10195+if test "$ac_cv_search_opendir" = no; then
10196+ for ac_lib in dir; do
10197+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10198+ cat >conftest.$ac_ext <<_ACEOF
10199+#line $LINENO "configure"
10200+/* confdefs.h. */
10201+_ACEOF
10202+cat confdefs.h >>conftest.$ac_ext
10203+cat >>conftest.$ac_ext <<_ACEOF
10204+/* end confdefs.h. */
10205
10206-; return 0; }
10207-EOF
10208-if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10209- rm -rf conftest*
10210- am_cv_prog_cc_stdc="$ac_arg"; break
10211+/* Override any gcc2 internal prototype to avoid an error. */
10212+#ifdef __cplusplus
10213+extern "C"
10214+#endif
10215+/* We use char because int might match the return type of a gcc2
10216+ builtin and then its argument prototype would still apply. */
10217+char opendir ();
10218+int
10219+main ()
10220+{
10221+opendir ();
10222+ ;
10223+ return 0;
10224+}
10225+_ACEOF
10226+rm -f conftest.$ac_objext conftest$ac_exeext
10227+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10228+ (eval $ac_link) 2>&5
10229+ ac_status=$?
10230+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10231+ (exit $ac_status); } &&
10232+ { ac_try='test -s conftest$ac_exeext'
10233+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10234+ (eval $ac_try) 2>&5
10235+ ac_status=$?
10236+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237+ (exit $ac_status); }; }; then
10238+ ac_cv_search_opendir="-l$ac_lib"
10239+break
10240 else
10241- echo "configure: failed program was:" >&5
10242- cat conftest.$ac_ext >&5
10243+ echo "$as_me: failed program was:" >&5
10244+sed 's/^/| /' conftest.$ac_ext >&5
10245+
10246 fi
10247-rm -f conftest*
10248-done
10249-CC="$ac_save_CC"
10250+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10251+ done
10252+fi
10253+LIBS=$ac_func_search_save_LIBS
10254+fi
10255+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10256+echo "${ECHO_T}$ac_cv_search_opendir" >&6
10257+if test "$ac_cv_search_opendir" != no; then
10258+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10259
10260 fi
10261
10262-if test -z "$am_cv_prog_cc_stdc"; then
10263- echo "$ac_t""none needed" 1>&6
10264 else
10265- echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
10266+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
10267+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10268+if test "${ac_cv_search_opendir+set}" = set; then
10269+ echo $ECHO_N "(cached) $ECHO_C" >&6
10270+else
10271+ ac_func_search_save_LIBS=$LIBS
10272+ac_cv_search_opendir=no
10273+cat >conftest.$ac_ext <<_ACEOF
10274+#line $LINENO "configure"
10275+/* confdefs.h. */
10276+_ACEOF
10277+cat confdefs.h >>conftest.$ac_ext
10278+cat >>conftest.$ac_ext <<_ACEOF
10279+/* end confdefs.h. */
10280+
10281+/* Override any gcc2 internal prototype to avoid an error. */
10282+#ifdef __cplusplus
10283+extern "C"
10284+#endif
10285+/* We use char because int might match the return type of a gcc2
10286+ builtin and then its argument prototype would still apply. */
10287+char opendir ();
10288+int
10289+main ()
10290+{
10291+opendir ();
10292+ ;
10293+ return 0;
10294+}
10295+_ACEOF
10296+rm -f conftest.$ac_objext conftest$ac_exeext
10297+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10298+ (eval $ac_link) 2>&5
10299+ ac_status=$?
10300+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10301+ (exit $ac_status); } &&
10302+ { ac_try='test -s conftest$ac_exeext'
10303+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10304+ (eval $ac_try) 2>&5
10305+ ac_status=$?
10306+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307+ (exit $ac_status); }; }; then
10308+ ac_cv_search_opendir="none required"
10309+else
10310+ echo "$as_me: failed program was:" >&5
10311+sed 's/^/| /' conftest.$ac_ext >&5
10312+
10313 fi
10314-case "x$am_cv_prog_cc_stdc" in
10315- x|xno) ;;
10316- *) CC="$CC $am_cv_prog_cc_stdc" ;;
10317-esac
10318+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10319+if test "$ac_cv_search_opendir" = no; then
10320+ for ac_lib in x; do
10321+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10322+ cat >conftest.$ac_ext <<_ACEOF
10323+#line $LINENO "configure"
10324+/* confdefs.h. */
10325+_ACEOF
10326+cat confdefs.h >>conftest.$ac_ext
10327+cat >>conftest.$ac_ext <<_ACEOF
10328+/* end confdefs.h. */
10329
10330+/* Override any gcc2 internal prototype to avoid an error. */
10331+#ifdef __cplusplus
10332+extern "C"
10333+#endif
10334+/* We use char because int might match the return type of a gcc2
10335+ builtin and then its argument prototype would still apply. */
10336+char opendir ();
10337+int
10338+main ()
10339+{
10340+opendir ();
10341+ ;
10342+ return 0;
10343+}
10344+_ACEOF
10345+rm -f conftest.$ac_objext conftest$ac_exeext
10346+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10347+ (eval $ac_link) 2>&5
10348+ ac_status=$?
10349+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350+ (exit $ac_status); } &&
10351+ { ac_try='test -s conftest$ac_exeext'
10352+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10353+ (eval $ac_try) 2>&5
10354+ ac_status=$?
10355+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356+ (exit $ac_status); }; }; then
10357+ ac_cv_search_opendir="-l$ac_lib"
10358+break
10359+else
10360+ echo "$as_me: failed program was:" >&5
10361+sed 's/^/| /' conftest.$ac_ext >&5
10362
10363+fi
10364+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10365+ done
10366+fi
10367+LIBS=$ac_func_search_save_LIBS
10368+fi
10369+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10370+echo "${ECHO_T}$ac_cv_search_opendir" >&6
10371+if test "$ac_cv_search_opendir" != no; then
10372+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10373
10374-echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
10375-echo "configure:1563: checking for function prototypes" >&5
10376-if test "$am_cv_prog_cc_stdc" != no; then
10377- echo "$ac_t""yes" 1>&6
10378- cat >> confdefs.h <<\EOF
10379-#define PROTOTYPES 1
10380-EOF
10381+fi
10382
10383- U= ANSI2KNR=
10384-else
10385- echo "$ac_t""no" 1>&6
10386- U=_ ANSI2KNR=./ansi2knr
10387- # Ensure some checks needed by ansi2knr itself.
10388- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10389-echo "configure:1576: checking for ANSI C header files" >&5
10390-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10391- echo $ac_n "(cached) $ac_c" 1>&6
10392+fi
10393+
10394+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
10395+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10396+if test "${ac_cv_header_stdc+set}" = set; then
10397+ echo $ECHO_N "(cached) $ECHO_C" >&6
10398 else
10399- cat > conftest.$ac_ext <<EOF
10400-#line 1581 "configure"
10401-#include "confdefs.h"
10402+ cat >conftest.$ac_ext <<_ACEOF
10403+#line $LINENO "configure"
10404+/* confdefs.h. */
10405+_ACEOF
10406+cat confdefs.h >>conftest.$ac_ext
10407+cat >>conftest.$ac_ext <<_ACEOF
10408+/* end confdefs.h. */
10409 #include <stdlib.h>
10410 #include <stdarg.h>
10411 #include <string.h>
10412 #include <float.h>
10413-EOF
10414-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10415-{ (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10416-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10417-if test -z "$ac_err"; then
10418- rm -rf conftest*
10419+
10420+int
10421+main ()
10422+{
10423+
10424+ ;
10425+ return 0;
10426+}
10427+_ACEOF
10428+rm -f conftest.$ac_objext
10429+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10430+ (eval $ac_compile) 2>&5
10431+ ac_status=$?
10432+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433+ (exit $ac_status); } &&
10434+ { ac_try='test -s conftest.$ac_objext'
10435+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10436+ (eval $ac_try) 2>&5
10437+ ac_status=$?
10438+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439+ (exit $ac_status); }; }; then
10440 ac_cv_header_stdc=yes
10441 else
10442- echo "$ac_err" >&5
10443- echo "configure: failed program was:" >&5
10444- cat conftest.$ac_ext >&5
10445- rm -rf conftest*
10446- ac_cv_header_stdc=no
10447+ echo "$as_me: failed program was:" >&5
10448+sed 's/^/| /' conftest.$ac_ext >&5
10449+
10450+ac_cv_header_stdc=no
10451 fi
10452-rm -f conftest*
10453+rm -f conftest.$ac_objext conftest.$ac_ext
10454
10455 if test $ac_cv_header_stdc = yes; then
10456 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10457-cat > conftest.$ac_ext <<EOF
10458-#line 1606 "configure"
10459-#include "confdefs.h"
10460+ cat >conftest.$ac_ext <<_ACEOF
10461+#line $LINENO "configure"
10462+/* confdefs.h. */
10463+_ACEOF
10464+cat confdefs.h >>conftest.$ac_ext
10465+cat >>conftest.$ac_ext <<_ACEOF
10466+/* end confdefs.h. */
10467 #include <string.h>
10468-EOF
10469+
10470+_ACEOF
10471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10472- egrep "memchr" >/dev/null 2>&1; then
10473+ $EGREP "memchr" >/dev/null 2>&1; then
10474 :
10475 else
10476- rm -rf conftest*
10477 ac_cv_header_stdc=no
10478 fi
10479 rm -f conftest*
10480@@ -1619,16 +3887,20 @@
10481
10482 if test $ac_cv_header_stdc = yes; then
10483 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10484-cat > conftest.$ac_ext <<EOF
10485-#line 1624 "configure"
10486-#include "confdefs.h"
10487+ cat >conftest.$ac_ext <<_ACEOF
10488+#line $LINENO "configure"
10489+/* confdefs.h. */
10490+_ACEOF
10491+cat confdefs.h >>conftest.$ac_ext
10492+cat >>conftest.$ac_ext <<_ACEOF
10493+/* end confdefs.h. */
10494 #include <stdlib.h>
10495-EOF
10496+
10497+_ACEOF
10498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10499- egrep "free" >/dev/null 2>&1; then
10500+ $EGREP "free" >/dev/null 2>&1; then
10501 :
10502 else
10503- rm -rf conftest*
10504 ac_cv_header_stdc=no
10505 fi
10506 rm -f conftest*
10507@@ -1637,1179 +3909,6855 @@
10508
10509 if test $ac_cv_header_stdc = yes; then
10510 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10511-if test "$cross_compiling" = yes; then
10512+ if test "$cross_compiling" = yes; then
10513 :
10514 else
10515- cat > conftest.$ac_ext <<EOF
10516-#line 1645 "configure"
10517-#include "confdefs.h"
10518+ cat >conftest.$ac_ext <<_ACEOF
10519+#line $LINENO "configure"
10520+/* confdefs.h. */
10521+_ACEOF
10522+cat confdefs.h >>conftest.$ac_ext
10523+cat >>conftest.$ac_ext <<_ACEOF
10524+/* end confdefs.h. */
10525 #include <ctype.h>
10526-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10527-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10528-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10529-int main () { int i; for (i = 0; i < 256; i++)
10530-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10531-exit (0); }
10532+#if ((' ' & 0x0FF) == 0x020)
10533+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10534+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10535+#else
10536+# define ISLOWER(c) \
10537+ (('a' <= (c) && (c) <= 'i') \
10538+ || ('j' <= (c) && (c) <= 'r') \
10539+ || ('s' <= (c) && (c) <= 'z'))
10540+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10541+#endif
10542
10543-EOF
10544-if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10545-then
10546+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10547+int
10548+main ()
10549+{
10550+ int i;
10551+ for (i = 0; i < 256; i++)
10552+ if (XOR (islower (i), ISLOWER (i))
10553+ || toupper (i) != TOUPPER (i))
10554+ exit(2);
10555+ exit (0);
10556+}
10557+_ACEOF
10558+rm -f conftest$ac_exeext
10559+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10560+ (eval $ac_link) 2>&5
10561+ ac_status=$?
10562+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10563+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10564+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10565+ (eval $ac_try) 2>&5
10566+ ac_status=$?
10567+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568+ (exit $ac_status); }; }; then
10569 :
10570 else
10571- echo "configure: failed program was:" >&5
10572- cat conftest.$ac_ext >&5
10573- rm -fr conftest*
10574- ac_cv_header_stdc=no
10575+ echo "$as_me: program exited with status $ac_status" >&5
10576+echo "$as_me: failed program was:" >&5
10577+sed 's/^/| /' conftest.$ac_ext >&5
10578+
10579+( exit $ac_status )
10580+ac_cv_header_stdc=no
10581 fi
10582-rm -fr conftest*
10583+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10584 fi
10585-
10586 fi
10587 fi
10588-
10589-echo "$ac_t""$ac_cv_header_stdc" 1>&6
10590+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
10591+echo "${ECHO_T}$ac_cv_header_stdc" >&6
10592 if test $ac_cv_header_stdc = yes; then
10593- cat >> confdefs.h <<\EOF
10594+
10595+cat >>confdefs.h <<\_ACEOF
10596 #define STDC_HEADERS 1
10597-EOF
10598+_ACEOF
10599
10600 fi
10601
10602- for ac_hdr in string.h
10603+
10604+
10605+
10606+
10607+
10608+
10609+for ac_header in fcntl.h limits.h string.h unistd.h utime.h varargs.h
10610 do
10611-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10612-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10613-echo "configure:1683: checking for $ac_hdr" >&5
10614-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10615- echo $ac_n "(cached) $ac_c" 1>&6
10616+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10617+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10618+ echo "$as_me:$LINENO: checking for $ac_header" >&5
10619+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10620+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10621+ echo $ECHO_N "(cached) $ECHO_C" >&6
10622+fi
10623+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10624+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10625 else
10626- cat > conftest.$ac_ext <<EOF
10627-#line 1688 "configure"
10628-#include "confdefs.h"
10629-#include <$ac_hdr>
10630-EOF
10631-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10632-{ (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10633-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10634-if test -z "$ac_err"; then
10635- rm -rf conftest*
10636- eval "ac_cv_header_$ac_safe=yes"
10637+ # Is the header compilable?
10638+echo "$as_me:$LINENO: checking $ac_header usability" >&5
10639+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10640+cat >conftest.$ac_ext <<_ACEOF
10641+#line $LINENO "configure"
10642+/* confdefs.h. */
10643+_ACEOF
10644+cat confdefs.h >>conftest.$ac_ext
10645+cat >>conftest.$ac_ext <<_ACEOF
10646+/* end confdefs.h. */
10647+$ac_includes_default
10648+#include <$ac_header>
10649+_ACEOF
10650+rm -f conftest.$ac_objext
10651+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10652+ (eval $ac_compile) 2>&5
10653+ ac_status=$?
10654+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655+ (exit $ac_status); } &&
10656+ { ac_try='test -s conftest.$ac_objext'
10657+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10658+ (eval $ac_try) 2>&5
10659+ ac_status=$?
10660+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661+ (exit $ac_status); }; }; then
10662+ ac_header_compiler=yes
10663 else
10664- echo "$ac_err" >&5
10665- echo "configure: failed program was:" >&5
10666- cat conftest.$ac_ext >&5
10667- rm -rf conftest*
10668- eval "ac_cv_header_$ac_safe=no"
10669+ echo "$as_me: failed program was:" >&5
10670+sed 's/^/| /' conftest.$ac_ext >&5
10671+
10672+ac_header_compiler=no
10673 fi
10674-rm -f conftest*
10675+rm -f conftest.$ac_objext conftest.$ac_ext
10676+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10677+echo "${ECHO_T}$ac_header_compiler" >&6
10678+
10679+# Is the header present?
10680+echo "$as_me:$LINENO: checking $ac_header presence" >&5
10681+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10682+cat >conftest.$ac_ext <<_ACEOF
10683+#line $LINENO "configure"
10684+/* confdefs.h. */
10685+_ACEOF
10686+cat confdefs.h >>conftest.$ac_ext
10687+cat >>conftest.$ac_ext <<_ACEOF
10688+/* end confdefs.h. */
10689+#include <$ac_header>
10690+_ACEOF
10691+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10692+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10693+ ac_status=$?
10694+ grep -v '^ *+' conftest.er1 >conftest.err
10695+ rm -f conftest.er1
10696+ cat conftest.err >&5
10697+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698+ (exit $ac_status); } >/dev/null; then
10699+ if test -s conftest.err; then
10700+ ac_cpp_err=$ac_c_preproc_warn_flag
10701+ else
10702+ ac_cpp_err=
10703+ fi
10704+else
10705+ ac_cpp_err=yes
10706 fi
10707-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10708- echo "$ac_t""yes" 1>&6
10709- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10710- cat >> confdefs.h <<EOF
10711-#define $ac_tr_hdr 1
10712-EOF
10713-
10714+if test -z "$ac_cpp_err"; then
10715+ ac_header_preproc=yes
10716 else
10717- echo "$ac_t""no" 1>&6
10718+ echo "$as_me: failed program was:" >&5
10719+sed 's/^/| /' conftest.$ac_ext >&5
10720+
10721+ ac_header_preproc=no
10722+fi
10723+rm -f conftest.err conftest.$ac_ext
10724+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10725+echo "${ECHO_T}$ac_header_preproc" >&6
10726+
10727+# So? What about this header?
10728+case $ac_header_compiler:$ac_header_preproc in
10729+ yes:no )
10730+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10731+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10732+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10733+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10734+ (
10735+ cat <<\_ASBOX
10736+## ------------------------------------ ##
10737+## Report this to bug-autoconf@gnu.org. ##
10738+## ------------------------------------ ##
10739+_ASBOX
10740+ ) |
10741+ sed "s/^/$as_me: WARNING: /" >&2
10742+ ;;
10743+ no:yes )
10744+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10745+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10746+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10747+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10748+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10749+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10750+ (
10751+ cat <<\_ASBOX
10752+## ------------------------------------ ##
10753+## Report this to bug-autoconf@gnu.org. ##
10754+## ------------------------------------ ##
10755+_ASBOX
10756+ ) |
10757+ sed "s/^/$as_me: WARNING: /" >&2
10758+ ;;
10759+esac
10760+echo "$as_me:$LINENO: checking for $ac_header" >&5
10761+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10762+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10763+ echo $ECHO_N "(cached) $ECHO_C" >&6
10764+else
10765+ eval "$as_ac_Header=$ac_header_preproc"
10766+fi
10767+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10768+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10769+
10770+fi
10771+if test `eval echo '${'$as_ac_Header'}'` = yes; then
10772+ cat >>confdefs.h <<_ACEOF
10773+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10774+_ACEOF
10775+
10776 fi
10777+
10778 done
10779
10780+
10781+echo "$as_me:$LINENO: checking for mode_t" >&5
10782+echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
10783+if test "${ac_cv_type_mode_t+set}" = set; then
10784+ echo $ECHO_N "(cached) $ECHO_C" >&6
10785+else
10786+ cat >conftest.$ac_ext <<_ACEOF
10787+#line $LINENO "configure"
10788+/* confdefs.h. */
10789+_ACEOF
10790+cat confdefs.h >>conftest.$ac_ext
10791+cat >>conftest.$ac_ext <<_ACEOF
10792+/* end confdefs.h. */
10793+$ac_includes_default
10794+int
10795+main ()
10796+{
10797+if ((mode_t *) 0)
10798+ return 0;
10799+if (sizeof (mode_t))
10800+ return 0;
10801+ ;
10802+ return 0;
10803+}
10804+_ACEOF
10805+rm -f conftest.$ac_objext
10806+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10807+ (eval $ac_compile) 2>&5
10808+ ac_status=$?
10809+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810+ (exit $ac_status); } &&
10811+ { ac_try='test -s conftest.$ac_objext'
10812+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10813+ (eval $ac_try) 2>&5
10814+ ac_status=$?
10815+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816+ (exit $ac_status); }; }; then
10817+ ac_cv_type_mode_t=yes
10818+else
10819+ echo "$as_me: failed program was:" >&5
10820+sed 's/^/| /' conftest.$ac_ext >&5
10821+
10822+ac_cv_type_mode_t=no
10823 fi
10824+rm -f conftest.$ac_objext conftest.$ac_ext
10825+fi
10826+echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
10827+echo "${ECHO_T}$ac_cv_type_mode_t" >&6
10828+if test $ac_cv_type_mode_t = yes; then
10829+ :
10830+else
10831
10832-echo $ac_n "checking for working const""... $ac_c" 1>&6
10833-echo "configure:1722: checking for working const" >&5
10834-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10835- echo $ac_n "(cached) $ac_c" 1>&6
10836+cat >>confdefs.h <<_ACEOF
10837+#define mode_t int
10838+_ACEOF
10839+
10840+fi
10841+
10842+echo "$as_me:$LINENO: checking for off_t" >&5
10843+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
10844+if test "${ac_cv_type_off_t+set}" = set; then
10845+ echo $ECHO_N "(cached) $ECHO_C" >&6
10846 else
10847- cat > conftest.$ac_ext <<EOF
10848-#line 1727 "configure"
10849-#include "confdefs.h"
10850+ cat >conftest.$ac_ext <<_ACEOF
10851+#line $LINENO "configure"
10852+/* confdefs.h. */
10853+_ACEOF
10854+cat confdefs.h >>conftest.$ac_ext
10855+cat >>conftest.$ac_ext <<_ACEOF
10856+/* end confdefs.h. */
10857+$ac_includes_default
10858+int
10859+main ()
10860+{
10861+if ((off_t *) 0)
10862+ return 0;
10863+if (sizeof (off_t))
10864+ return 0;
10865+ ;
10866+ return 0;
10867+}
10868+_ACEOF
10869+rm -f conftest.$ac_objext
10870+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10871+ (eval $ac_compile) 2>&5
10872+ ac_status=$?
10873+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874+ (exit $ac_status); } &&
10875+ { ac_try='test -s conftest.$ac_objext'
10876+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10877+ (eval $ac_try) 2>&5
10878+ ac_status=$?
10879+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880+ (exit $ac_status); }; }; then
10881+ ac_cv_type_off_t=yes
10882+else
10883+ echo "$as_me: failed program was:" >&5
10884+sed 's/^/| /' conftest.$ac_ext >&5
10885
10886-int main() {
10887+ac_cv_type_off_t=no
10888+fi
10889+rm -f conftest.$ac_objext conftest.$ac_ext
10890+fi
10891+echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
10892+echo "${ECHO_T}$ac_cv_type_off_t" >&6
10893+if test $ac_cv_type_off_t = yes; then
10894+ :
10895+else
10896
10897-/* Ultrix mips cc rejects this. */
10898-typedef int charset[2]; const charset x;
10899-/* SunOS 4.1.1 cc rejects this. */
10900-char const *const *ccp;
10901-char **p;
10902-/* NEC SVR4.0.2 mips cc rejects this. */
10903-struct point {int x, y;};
10904-static struct point const zero = {0,0};
10905-/* AIX XL C 1.02.0.0 rejects this.
10906- It does not let you subtract one const X* pointer from another in an arm
10907- of an if-expression whose if-part is not a constant expression */
10908-const char *g = "string";
10909-ccp = &g + (g ? g-g : 0);
10910-/* HPUX 7.0 cc rejects these. */
10911-++ccp;
10912-p = (char**) ccp;
10913-ccp = (char const *const *) p;
10914-{ /* SCO 3.2v4 cc rejects this. */
10915- char *t;
10916- char const *s = 0 ? (char *) 0 : (char const *) 0;
10917+cat >>confdefs.h <<_ACEOF
10918+#define off_t long
10919+_ACEOF
10920
10921- *t++ = 0;
10922+fi
10923+
10924+echo "$as_me:$LINENO: checking for pid_t" >&5
10925+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
10926+if test "${ac_cv_type_pid_t+set}" = set; then
10927+ echo $ECHO_N "(cached) $ECHO_C" >&6
10928+else
10929+ cat >conftest.$ac_ext <<_ACEOF
10930+#line $LINENO "configure"
10931+/* confdefs.h. */
10932+_ACEOF
10933+cat confdefs.h >>conftest.$ac_ext
10934+cat >>conftest.$ac_ext <<_ACEOF
10935+/* end confdefs.h. */
10936+$ac_includes_default
10937+int
10938+main ()
10939+{
10940+if ((pid_t *) 0)
10941+ return 0;
10942+if (sizeof (pid_t))
10943+ return 0;
10944+ ;
10945+ return 0;
10946 }
10947-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10948- int x[] = {25, 17};
10949- const int *foo = &x[0];
10950- ++foo;
10951+_ACEOF
10952+rm -f conftest.$ac_objext
10953+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10954+ (eval $ac_compile) 2>&5
10955+ ac_status=$?
10956+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957+ (exit $ac_status); } &&
10958+ { ac_try='test -s conftest.$ac_objext'
10959+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10960+ (eval $ac_try) 2>&5
10961+ ac_status=$?
10962+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963+ (exit $ac_status); }; }; then
10964+ ac_cv_type_pid_t=yes
10965+else
10966+ echo "$as_me: failed program was:" >&5
10967+sed 's/^/| /' conftest.$ac_ext >&5
10968+
10969+ac_cv_type_pid_t=no
10970+fi
10971+rm -f conftest.$ac_objext conftest.$ac_ext
10972+fi
10973+echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10974+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10975+if test $ac_cv_type_pid_t = yes; then
10976+ :
10977+else
10978+
10979+cat >>confdefs.h <<_ACEOF
10980+#define pid_t int
10981+_ACEOF
10982+
10983+fi
10984+
10985+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
10986+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10987+if test "${ac_cv_type_signal+set}" = set; then
10988+ echo $ECHO_N "(cached) $ECHO_C" >&6
10989+else
10990+ cat >conftest.$ac_ext <<_ACEOF
10991+#line $LINENO "configure"
10992+/* confdefs.h. */
10993+_ACEOF
10994+cat confdefs.h >>conftest.$ac_ext
10995+cat >>conftest.$ac_ext <<_ACEOF
10996+/* end confdefs.h. */
10997+#include <sys/types.h>
10998+#include <signal.h>
10999+#ifdef signal
11000+# undef signal
11001+#endif
11002+#ifdef __cplusplus
11003+extern "C" void (*signal (int, void (*)(int)))(int);
11004+#else
11005+void (*signal ()) ();
11006+#endif
11007+
11008+int
11009+main ()
11010+{
11011+int i;
11012+ ;
11013+ return 0;
11014 }
11015-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11016- typedef const int *iptr;
11017- iptr p = 0;
11018- ++p;
11019+_ACEOF
11020+rm -f conftest.$ac_objext
11021+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11022+ (eval $ac_compile) 2>&5
11023+ ac_status=$?
11024+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025+ (exit $ac_status); } &&
11026+ { ac_try='test -s conftest.$ac_objext'
11027+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11028+ (eval $ac_try) 2>&5
11029+ ac_status=$?
11030+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031+ (exit $ac_status); }; }; then
11032+ ac_cv_type_signal=void
11033+else
11034+ echo "$as_me: failed program was:" >&5
11035+sed 's/^/| /' conftest.$ac_ext >&5
11036+
11037+ac_cv_type_signal=int
11038+fi
11039+rm -f conftest.$ac_objext conftest.$ac_ext
11040+fi
11041+echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
11042+echo "${ECHO_T}$ac_cv_type_signal" >&6
11043+
11044+cat >>confdefs.h <<_ACEOF
11045+#define RETSIGTYPE $ac_cv_type_signal
11046+_ACEOF
11047+
11048+
11049+echo "$as_me:$LINENO: checking for size_t" >&5
11050+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
11051+if test "${ac_cv_type_size_t+set}" = set; then
11052+ echo $ECHO_N "(cached) $ECHO_C" >&6
11053+else
11054+ cat >conftest.$ac_ext <<_ACEOF
11055+#line $LINENO "configure"
11056+/* confdefs.h. */
11057+_ACEOF
11058+cat confdefs.h >>conftest.$ac_ext
11059+cat >>conftest.$ac_ext <<_ACEOF
11060+/* end confdefs.h. */
11061+$ac_includes_default
11062+int
11063+main ()
11064+{
11065+if ((size_t *) 0)
11066+ return 0;
11067+if (sizeof (size_t))
11068+ return 0;
11069+ ;
11070+ return 0;
11071 }
11072-{ /* AIX XL C 1.02.0.0 rejects this saying
11073- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11074- struct s { int j; const int *ap[3]; };
11075- struct s *b; b->j = 5;
11076+_ACEOF
11077+rm -f conftest.$ac_objext
11078+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11079+ (eval $ac_compile) 2>&5
11080+ ac_status=$?
11081+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082+ (exit $ac_status); } &&
11083+ { ac_try='test -s conftest.$ac_objext'
11084+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11085+ (eval $ac_try) 2>&5
11086+ ac_status=$?
11087+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088+ (exit $ac_status); }; }; then
11089+ ac_cv_type_size_t=yes
11090+else
11091+ echo "$as_me: failed program was:" >&5
11092+sed 's/^/| /' conftest.$ac_ext >&5
11093+
11094+ac_cv_type_size_t=no
11095+fi
11096+rm -f conftest.$ac_objext conftest.$ac_ext
11097+fi
11098+echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
11099+echo "${ECHO_T}$ac_cv_type_size_t" >&6
11100+if test $ac_cv_type_size_t = yes; then
11101+ :
11102+else
11103+
11104+cat >>confdefs.h <<_ACEOF
11105+#define size_t unsigned
11106+_ACEOF
11107+
11108+fi
11109+
11110+echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
11111+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
11112+if test "${ac_cv_header_stdbool_h+set}" = set; then
11113+ echo $ECHO_N "(cached) $ECHO_C" >&6
11114+else
11115+ cat >conftest.$ac_ext <<_ACEOF
11116+#line $LINENO "configure"
11117+/* confdefs.h. */
11118+_ACEOF
11119+cat confdefs.h >>conftest.$ac_ext
11120+cat >>conftest.$ac_ext <<_ACEOF
11121+/* end confdefs.h. */
11122+
11123+ #include <stdbool.h>
11124+ #ifndef bool
11125+ "error: bool is not defined"
11126+ #endif
11127+ #ifndef false
11128+ "error: false is not defined"
11129+ #endif
11130+ #if false
11131+ "error: false is not 0"
11132+ #endif
11133+ #ifndef true
11134+ "error: false is not defined"
11135+ #endif
11136+ #if true != 1
11137+ "error: true is not 1"
11138+ #endif
11139+ #ifndef __bool_true_false_are_defined
11140+ "error: __bool_true_false_are_defined is not defined"
11141+ #endif
11142+
11143+ struct s { _Bool s: 1; _Bool t; } s;
11144+
11145+ char a[true == 1 ? 1 : -1];
11146+ char b[false == 0 ? 1 : -1];
11147+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11148+ char d[(bool) -0.5 == true ? 1 : -1];
11149+ bool e = &s;
11150+ char f[(_Bool) -0.0 == false ? 1 : -1];
11151+ char g[true];
11152+ char h[sizeof (_Bool)];
11153+ char i[sizeof s.t];
11154+
11155+int
11156+main ()
11157+{
11158+ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
11159+ ;
11160+ return 0;
11161 }
11162-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11163- const int foo = 10;
11164+_ACEOF
11165+rm -f conftest.$ac_objext
11166+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11167+ (eval $ac_compile) 2>&5
11168+ ac_status=$?
11169+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170+ (exit $ac_status); } &&
11171+ { ac_try='test -s conftest.$ac_objext'
11172+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11173+ (eval $ac_try) 2>&5
11174+ ac_status=$?
11175+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176+ (exit $ac_status); }; }; then
11177+ ac_cv_header_stdbool_h=yes
11178+else
11179+ echo "$as_me: failed program was:" >&5
11180+sed 's/^/| /' conftest.$ac_ext >&5
11181+
11182+ac_cv_header_stdbool_h=no
11183+fi
11184+rm -f conftest.$ac_objext conftest.$ac_ext
11185+fi
11186+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
11187+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
11188+ echo "$as_me:$LINENO: checking for _Bool" >&5
11189+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
11190+if test "${ac_cv_type__Bool+set}" = set; then
11191+ echo $ECHO_N "(cached) $ECHO_C" >&6
11192+else
11193+ cat >conftest.$ac_ext <<_ACEOF
11194+#line $LINENO "configure"
11195+/* confdefs.h. */
11196+_ACEOF
11197+cat confdefs.h >>conftest.$ac_ext
11198+cat >>conftest.$ac_ext <<_ACEOF
11199+/* end confdefs.h. */
11200+$ac_includes_default
11201+int
11202+main ()
11203+{
11204+if ((_Bool *) 0)
11205+ return 0;
11206+if (sizeof (_Bool))
11207+ return 0;
11208+ ;
11209+ return 0;
11210 }
11211+_ACEOF
11212+rm -f conftest.$ac_objext
11213+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11214+ (eval $ac_compile) 2>&5
11215+ ac_status=$?
11216+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217+ (exit $ac_status); } &&
11218+ { ac_try='test -s conftest.$ac_objext'
11219+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11220+ (eval $ac_try) 2>&5
11221+ ac_status=$?
11222+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223+ (exit $ac_status); }; }; then
11224+ ac_cv_type__Bool=yes
11225+else
11226+ echo "$as_me: failed program was:" >&5
11227+sed 's/^/| /' conftest.$ac_ext >&5
11228
11229-; return 0; }
11230-EOF
11231-if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11232- rm -rf conftest*
11233- ac_cv_c_const=yes
11234+ac_cv_type__Bool=no
11235+fi
11236+rm -f conftest.$ac_objext conftest.$ac_ext
11237+fi
11238+echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11239+echo "${ECHO_T}$ac_cv_type__Bool" >&6
11240+if test $ac_cv_type__Bool = yes; then
11241+
11242+cat >>confdefs.h <<_ACEOF
11243+#define HAVE__BOOL 1
11244+_ACEOF
11245+
11246+
11247+fi
11248+
11249+ if test $ac_cv_header_stdbool_h = yes; then
11250+
11251+cat >>confdefs.h <<\_ACEOF
11252+#define HAVE_STDBOOL_H 1
11253+_ACEOF
11254+
11255+ fi
11256+
11257+
11258+
11259+ # Define two additional variables used in the Makefile substitution.
11260+
11261+ if test "$ac_cv_header_stdbool_h" = yes; then
11262+ STDBOOL_H=''
11263+ else
11264+ STDBOOL_H='stdbool.h'
11265+ fi
11266+
11267+
11268+ if test "$ac_cv_type__Bool" = yes; then
11269+ HAVE__BOOL=1
11270+ else
11271+ HAVE__BOOL=0
11272+ fi
11273+
11274+
11275+
11276+
11277+for ac_header in sys/time.h
11278+do
11279+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11280+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11281+ echo "$as_me:$LINENO: checking for $ac_header" >&5
11282+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11283+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11284+ echo $ECHO_N "(cached) $ECHO_C" >&6
11285+fi
11286+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11287+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11288 else
11289- echo "configure: failed program was:" >&5
11290- cat conftest.$ac_ext >&5
11291- rm -rf conftest*
11292- ac_cv_c_const=no
11293+ # Is the header compilable?
11294+echo "$as_me:$LINENO: checking $ac_header usability" >&5
11295+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11296+cat >conftest.$ac_ext <<_ACEOF
11297+#line $LINENO "configure"
11298+/* confdefs.h. */
11299+_ACEOF
11300+cat confdefs.h >>conftest.$ac_ext
11301+cat >>conftest.$ac_ext <<_ACEOF
11302+/* end confdefs.h. */
11303+$ac_includes_default
11304+#include <$ac_header>
11305+_ACEOF
11306+rm -f conftest.$ac_objext
11307+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11308+ (eval $ac_compile) 2>&5
11309+ ac_status=$?
11310+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311+ (exit $ac_status); } &&
11312+ { ac_try='test -s conftest.$ac_objext'
11313+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11314+ (eval $ac_try) 2>&5
11315+ ac_status=$?
11316+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317+ (exit $ac_status); }; }; then
11318+ ac_header_compiler=yes
11319+else
11320+ echo "$as_me: failed program was:" >&5
11321+sed 's/^/| /' conftest.$ac_ext >&5
11322+
11323+ac_header_compiler=no
11324 fi
11325-rm -f conftest*
11326+rm -f conftest.$ac_objext conftest.$ac_ext
11327+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11328+echo "${ECHO_T}$ac_header_compiler" >&6
11329+
11330+# Is the header present?
11331+echo "$as_me:$LINENO: checking $ac_header presence" >&5
11332+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11333+cat >conftest.$ac_ext <<_ACEOF
11334+#line $LINENO "configure"
11335+/* confdefs.h. */
11336+_ACEOF
11337+cat confdefs.h >>conftest.$ac_ext
11338+cat >>conftest.$ac_ext <<_ACEOF
11339+/* end confdefs.h. */
11340+#include <$ac_header>
11341+_ACEOF
11342+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11343+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11344+ ac_status=$?
11345+ grep -v '^ *+' conftest.er1 >conftest.err
11346+ rm -f conftest.er1
11347+ cat conftest.err >&5
11348+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349+ (exit $ac_status); } >/dev/null; then
11350+ if test -s conftest.err; then
11351+ ac_cpp_err=$ac_c_preproc_warn_flag
11352+ else
11353+ ac_cpp_err=
11354+ fi
11355+else
11356+ ac_cpp_err=yes
11357 fi
11358+if test -z "$ac_cpp_err"; then
11359+ ac_header_preproc=yes
11360+else
11361+ echo "$as_me: failed program was:" >&5
11362+sed 's/^/| /' conftest.$ac_ext >&5
11363
11364-echo "$ac_t""$ac_cv_c_const" 1>&6
11365-if test $ac_cv_c_const = no; then
11366- cat >> confdefs.h <<\EOF
11367-#define const
11368-EOF
11369+ ac_header_preproc=no
11370+fi
11371+rm -f conftest.err conftest.$ac_ext
11372+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11373+echo "${ECHO_T}$ac_header_preproc" >&6
11374+
11375+# So? What about this header?
11376+case $ac_header_compiler:$ac_header_preproc in
11377+ yes:no )
11378+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11379+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11380+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11381+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11382+ (
11383+ cat <<\_ASBOX
11384+## ------------------------------------ ##
11385+## Report this to bug-autoconf@gnu.org. ##
11386+## ------------------------------------ ##
11387+_ASBOX
11388+ ) |
11389+ sed "s/^/$as_me: WARNING: /" >&2
11390+ ;;
11391+ no:yes )
11392+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11393+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11394+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11395+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11396+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11397+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11398+ (
11399+ cat <<\_ASBOX
11400+## ------------------------------------ ##
11401+## Report this to bug-autoconf@gnu.org. ##
11402+## ------------------------------------ ##
11403+_ASBOX
11404+ ) |
11405+ sed "s/^/$as_me: WARNING: /" >&2
11406+ ;;
11407+esac
11408+echo "$as_me:$LINENO: checking for $ac_header" >&5
11409+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11410+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11411+ echo $ECHO_N "(cached) $ECHO_C" >&6
11412+else
11413+ eval "$as_ac_Header=$ac_header_preproc"
11414+fi
11415+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11416+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11417+
11418+fi
11419+if test `eval echo '${'$as_ac_Header'}'` = yes; then
11420+ cat >>confdefs.h <<_ACEOF
11421+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11422+_ACEOF
11423
11424 fi
11425
11426+done
11427
11428-ac_header_dirent=no
11429-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
11430+
11431+
11432+
11433+for ac_header in utime.h
11434 do
11435-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11436-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
11437-echo "configure:1802: checking for $ac_hdr that defines DIR" >&5
11438-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
11439- echo $ac_n "(cached) $ac_c" 1>&6
11440+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11441+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11442+ echo "$as_me:$LINENO: checking for $ac_header" >&5
11443+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11444+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11445+ echo $ECHO_N "(cached) $ECHO_C" >&6
11446+fi
11447+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11448+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11449 else
11450- cat > conftest.$ac_ext <<EOF
11451-#line 1807 "configure"
11452-#include "confdefs.h"
11453-#include <sys/types.h>
11454-#include <$ac_hdr>
11455-int main() {
11456-DIR *dirp = 0;
11457-; return 0; }
11458-EOF
11459-if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11460- rm -rf conftest*
11461- eval "ac_cv_header_dirent_$ac_safe=yes"
11462+ # Is the header compilable?
11463+echo "$as_me:$LINENO: checking $ac_header usability" >&5
11464+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11465+cat >conftest.$ac_ext <<_ACEOF
11466+#line $LINENO "configure"
11467+/* confdefs.h. */
11468+_ACEOF
11469+cat confdefs.h >>conftest.$ac_ext
11470+cat >>conftest.$ac_ext <<_ACEOF
11471+/* end confdefs.h. */
11472+$ac_includes_default
11473+#include <$ac_header>
11474+_ACEOF
11475+rm -f conftest.$ac_objext
11476+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11477+ (eval $ac_compile) 2>&5
11478+ ac_status=$?
11479+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480+ (exit $ac_status); } &&
11481+ { ac_try='test -s conftest.$ac_objext'
11482+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11483+ (eval $ac_try) 2>&5
11484+ ac_status=$?
11485+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486+ (exit $ac_status); }; }; then
11487+ ac_header_compiler=yes
11488 else
11489- echo "configure: failed program was:" >&5
11490- cat conftest.$ac_ext >&5
11491- rm -rf conftest*
11492- eval "ac_cv_header_dirent_$ac_safe=no"
11493+ echo "$as_me: failed program was:" >&5
11494+sed 's/^/| /' conftest.$ac_ext >&5
11495+
11496+ac_header_compiler=no
11497 fi
11498-rm -f conftest*
11499+rm -f conftest.$ac_objext conftest.$ac_ext
11500+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11501+echo "${ECHO_T}$ac_header_compiler" >&6
11502+
11503+# Is the header present?
11504+echo "$as_me:$LINENO: checking $ac_header presence" >&5
11505+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11506+cat >conftest.$ac_ext <<_ACEOF
11507+#line $LINENO "configure"
11508+/* confdefs.h. */
11509+_ACEOF
11510+cat confdefs.h >>conftest.$ac_ext
11511+cat >>conftest.$ac_ext <<_ACEOF
11512+/* end confdefs.h. */
11513+#include <$ac_header>
11514+_ACEOF
11515+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11516+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11517+ ac_status=$?
11518+ grep -v '^ *+' conftest.er1 >conftest.err
11519+ rm -f conftest.er1
11520+ cat conftest.err >&5
11521+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11522+ (exit $ac_status); } >/dev/null; then
11523+ if test -s conftest.err; then
11524+ ac_cpp_err=$ac_c_preproc_warn_flag
11525+ else
11526+ ac_cpp_err=
11527+ fi
11528+else
11529+ ac_cpp_err=yes
11530 fi
11531-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
11532- echo "$ac_t""yes" 1>&6
11533- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11534- cat >> confdefs.h <<EOF
11535-#define $ac_tr_hdr 1
11536-EOF
11537- ac_header_dirent=$ac_hdr; break
11538+if test -z "$ac_cpp_err"; then
11539+ ac_header_preproc=yes
11540 else
11541- echo "$ac_t""no" 1>&6
11542+ echo "$as_me: failed program was:" >&5
11543+sed 's/^/| /' conftest.$ac_ext >&5
11544+
11545+ ac_header_preproc=no
11546+fi
11547+rm -f conftest.err conftest.$ac_ext
11548+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11549+echo "${ECHO_T}$ac_header_preproc" >&6
11550+
11551+# So? What about this header?
11552+case $ac_header_compiler:$ac_header_preproc in
11553+ yes:no )
11554+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11555+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11556+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11557+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11558+ (
11559+ cat <<\_ASBOX
11560+## ------------------------------------ ##
11561+## Report this to bug-autoconf@gnu.org. ##
11562+## ------------------------------------ ##
11563+_ASBOX
11564+ ) |
11565+ sed "s/^/$as_me: WARNING: /" >&2
11566+ ;;
11567+ no:yes )
11568+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11569+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11570+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11571+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11572+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11573+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11574+ (
11575+ cat <<\_ASBOX
11576+## ------------------------------------ ##
11577+## Report this to bug-autoconf@gnu.org. ##
11578+## ------------------------------------ ##
11579+_ASBOX
11580+ ) |
11581+ sed "s/^/$as_me: WARNING: /" >&2
11582+ ;;
11583+esac
11584+echo "$as_me:$LINENO: checking for $ac_header" >&5
11585+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11586+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11587+ echo $ECHO_N "(cached) $ECHO_C" >&6
11588+else
11589+ eval "$as_ac_Header=$ac_header_preproc"
11590 fi
11591+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11592+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11593+
11594+fi
11595+if test `eval echo '${'$as_ac_Header'}'` = yes; then
11596+ cat >>confdefs.h <<_ACEOF
11597+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11598+_ACEOF
11599+
11600+fi
11601+
11602 done
11603-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11604-if test $ac_header_dirent = dirent.h; then
11605-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
11606-echo "configure:1840: checking for opendir in -ldir" >&5
11607-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
11608-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11609- echo $ac_n "(cached) $ac_c" 1>&6
11610+
11611+
11612+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
11613+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11614+if test "${ac_cv_header_time+set}" = set; then
11615+ echo $ECHO_N "(cached) $ECHO_C" >&6
11616 else
11617- ac_save_LIBS="$LIBS"
11618-LIBS="-ldir $LIBS"
11619-cat > conftest.$ac_ext <<EOF
11620-#line 1848 "configure"
11621-#include "confdefs.h"
11622-/* Override any gcc2 internal prototype to avoid an error. */
11623-/* We use char because int might match the return type of a gcc2
11624- builtin and then its argument prototype would still apply. */
11625-char opendir();
11626+ cat >conftest.$ac_ext <<_ACEOF
11627+#line $LINENO "configure"
11628+/* confdefs.h. */
11629+_ACEOF
11630+cat confdefs.h >>conftest.$ac_ext
11631+cat >>conftest.$ac_ext <<_ACEOF
11632+/* end confdefs.h. */
11633+#include <sys/types.h>
11634+#include <sys/time.h>
11635+#include <time.h>
11636
11637-int main() {
11638-opendir()
11639-; return 0; }
11640-EOF
11641-if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11642- rm -rf conftest*
11643- eval "ac_cv_lib_$ac_lib_var=yes"
11644+int
11645+main ()
11646+{
11647+if ((struct tm *) 0)
11648+return 0;
11649+ ;
11650+ return 0;
11651+}
11652+_ACEOF
11653+rm -f conftest.$ac_objext
11654+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11655+ (eval $ac_compile) 2>&5
11656+ ac_status=$?
11657+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658+ (exit $ac_status); } &&
11659+ { ac_try='test -s conftest.$ac_objext'
11660+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661+ (eval $ac_try) 2>&5
11662+ ac_status=$?
11663+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664+ (exit $ac_status); }; }; then
11665+ ac_cv_header_time=yes
11666 else
11667- echo "configure: failed program was:" >&5
11668- cat conftest.$ac_ext >&5
11669- rm -rf conftest*
11670- eval "ac_cv_lib_$ac_lib_var=no"
11671+ echo "$as_me: failed program was:" >&5
11672+sed 's/^/| /' conftest.$ac_ext >&5
11673+
11674+ac_cv_header_time=no
11675 fi
11676-rm -f conftest*
11677-LIBS="$ac_save_LIBS"
11678+rm -f conftest.$ac_objext conftest.$ac_ext
11679+fi
11680+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
11681+echo "${ECHO_T}$ac_cv_header_time" >&6
11682+if test $ac_cv_header_time = yes; then
11683+
11684+cat >>confdefs.h <<\_ACEOF
11685+#define TIME_WITH_SYS_TIME 1
11686+_ACEOF
11687
11688 fi
11689-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11690- echo "$ac_t""yes" 1>&6
11691- LIBS="$LIBS -ldir"
11692+
11693+
11694+
11695+ :
11696+
11697+
11698+
11699+
11700+
11701+
11702+
11703+
11704+
11705+ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
11706+echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
11707+if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
11708+ echo $ECHO_N "(cached) $ECHO_C" >&6
11709 else
11710- echo "$ac_t""no" 1>&6
11711+ cat >conftest.$ac_ext <<_ACEOF
11712+#line $LINENO "configure"
11713+/* confdefs.h. */
11714+_ACEOF
11715+cat confdefs.h >>conftest.$ac_ext
11716+cat >>conftest.$ac_ext <<_ACEOF
11717+/* end confdefs.h. */
11718+
11719+#ifdef TIME_WITH_SYS_TIME
11720+# include <sys/time.h>
11721+# include <time.h>
11722+#else
11723+# ifdef HAVE_SYS_TIME_H
11724+# include <sys/time.h>
11725+# else
11726+# include <time.h>
11727+# endif
11728+#endif
11729+#ifdef HAVE_UTIME_H
11730+# include <utime.h>
11731+#endif
11732+
11733+int
11734+main ()
11735+{
11736+static struct utimbuf x; x.actime = x.modtime;
11737+ ;
11738+ return 0;
11739+}
11740+_ACEOF
11741+rm -f conftest.$ac_objext
11742+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743+ (eval $ac_compile) 2>&5
11744+ ac_status=$?
11745+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746+ (exit $ac_status); } &&
11747+ { ac_try='test -s conftest.$ac_objext'
11748+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749+ (eval $ac_try) 2>&5
11750+ ac_status=$?
11751+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752+ (exit $ac_status); }; }; then
11753+ fu_cv_sys_struct_utimbuf=yes
11754+else
11755+ echo "$as_me: failed program was:" >&5
11756+sed 's/^/| /' conftest.$ac_ext >&5
11757+
11758+fu_cv_sys_struct_utimbuf=no
11759+fi
11760+rm -f conftest.$ac_objext conftest.$ac_ext
11761+
11762 fi
11763+echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
11764+echo "${ECHO_T}$fu_cv_sys_struct_utimbuf" >&6
11765
11766+ if test $fu_cv_sys_struct_utimbuf = yes; then
11767+
11768+cat >>confdefs.h <<\_ACEOF
11769+#define HAVE_STRUCT_UTIMBUF 1
11770+_ACEOF
11771+
11772+ fi
11773+
11774+
11775+echo "$as_me:$LINENO: checking whether closedir returns void" >&5
11776+echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
11777+if test "${ac_cv_func_closedir_void+set}" = set; then
11778+ echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
11781-echo "configure:1881: checking for opendir in -lx" >&5
11782-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
11783-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11784- echo $ac_n "(cached) $ac_c" 1>&6
11785+ if test "$cross_compiling" = yes; then
11786+ ac_cv_func_closedir_void=yes
11787 else
11788- ac_save_LIBS="$LIBS"
11789-LIBS="-lx $LIBS"
11790-cat > conftest.$ac_ext <<EOF
11791-#line 1889 "configure"
11792-#include "confdefs.h"
11793-/* Override any gcc2 internal prototype to avoid an error. */
11794-/* We use char because int might match the return type of a gcc2
11795- builtin and then its argument prototype would still apply. */
11796-char opendir();
11797+ cat >conftest.$ac_ext <<_ACEOF
11798+#line $LINENO "configure"
11799+/* confdefs.h. */
11800+_ACEOF
11801+cat confdefs.h >>conftest.$ac_ext
11802+cat >>conftest.$ac_ext <<_ACEOF
11803+/* end confdefs.h. */
11804+$ac_includes_default
11805+#include <$ac_header_dirent>
11806+#ifndef __cplusplus
11807+int closedir ();
11808+#endif
11809
11810-int main() {
11811-opendir()
11812-; return 0; }
11813-EOF
11814-if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11815- rm -rf conftest*
11816- eval "ac_cv_lib_$ac_lib_var=yes"
11817+int
11818+main ()
11819+{
11820+exit (closedir (opendir (".")) != 0);
11821+ ;
11822+ return 0;
11823+}
11824+_ACEOF
11825+rm -f conftest$ac_exeext
11826+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11827+ (eval $ac_link) 2>&5
11828+ ac_status=$?
11829+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11831+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11832+ (eval $ac_try) 2>&5
11833+ ac_status=$?
11834+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835+ (exit $ac_status); }; }; then
11836+ ac_cv_func_closedir_void=no
11837 else
11838- echo "configure: failed program was:" >&5
11839- cat conftest.$ac_ext >&5
11840- rm -rf conftest*
11841- eval "ac_cv_lib_$ac_lib_var=no"
11842+ echo "$as_me: program exited with status $ac_status" >&5
11843+echo "$as_me: failed program was:" >&5
11844+sed 's/^/| /' conftest.$ac_ext >&5
11845+
11846+( exit $ac_status )
11847+ac_cv_func_closedir_void=yes
11848 fi
11849-rm -f conftest*
11850-LIBS="$ac_save_LIBS"
11851+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11852+fi
11853+fi
11854+echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
11855+echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
11856+if test $ac_cv_func_closedir_void = yes; then
11857+
11858+cat >>confdefs.h <<\_ACEOF
11859+#define CLOSEDIR_VOID 1
11860+_ACEOF
11861
11862 fi
11863-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864- echo "$ac_t""yes" 1>&6
11865- LIBS="$LIBS -lx"
11866+
11867+
11868+
11869+for ac_header in limits.h
11870+do
11871+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11872+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11873+ echo "$as_me:$LINENO: checking for $ac_header" >&5
11874+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11875+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11876+ echo $ECHO_N "(cached) $ECHO_C" >&6
11877+fi
11878+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11879+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11880 else
11881- echo "$ac_t""no" 1>&6
11882+ # Is the header compilable?
11883+echo "$as_me:$LINENO: checking $ac_header usability" >&5
11884+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11885+cat >conftest.$ac_ext <<_ACEOF
11886+#line $LINENO "configure"
11887+/* confdefs.h. */
11888+_ACEOF
11889+cat confdefs.h >>conftest.$ac_ext
11890+cat >>conftest.$ac_ext <<_ACEOF
11891+/* end confdefs.h. */
11892+$ac_includes_default
11893+#include <$ac_header>
11894+_ACEOF
11895+rm -f conftest.$ac_objext
11896+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11897+ (eval $ac_compile) 2>&5
11898+ ac_status=$?
11899+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11900+ (exit $ac_status); } &&
11901+ { ac_try='test -s conftest.$ac_objext'
11902+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11903+ (eval $ac_try) 2>&5
11904+ ac_status=$?
11905+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11906+ (exit $ac_status); }; }; then
11907+ ac_header_compiler=yes
11908+else
11909+ echo "$as_me: failed program was:" >&5
11910+sed 's/^/| /' conftest.$ac_ext >&5
11911+
11912+ac_header_compiler=no
11913 fi
11914+rm -f conftest.$ac_objext conftest.$ac_ext
11915+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11916+echo "${ECHO_T}$ac_header_compiler" >&6
11917+
11918+# Is the header present?
11919+echo "$as_me:$LINENO: checking $ac_header presence" >&5
11920+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11921+cat >conftest.$ac_ext <<_ACEOF
11922+#line $LINENO "configure"
11923+/* confdefs.h. */
11924+_ACEOF
11925+cat confdefs.h >>conftest.$ac_ext
11926+cat >>conftest.$ac_ext <<_ACEOF
11927+/* end confdefs.h. */
11928+#include <$ac_header>
11929+_ACEOF
11930+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11931+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11932+ ac_status=$?
11933+ grep -v '^ *+' conftest.er1 >conftest.err
11934+ rm -f conftest.er1
11935+ cat conftest.err >&5
11936+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937+ (exit $ac_status); } >/dev/null; then
11938+ if test -s conftest.err; then
11939+ ac_cpp_err=$ac_c_preproc_warn_flag
11940+ else
11941+ ac_cpp_err=
11942+ fi
11943+else
11944+ ac_cpp_err=yes
11945+fi
11946+if test -z "$ac_cpp_err"; then
11947+ ac_header_preproc=yes
11948+else
11949+ echo "$as_me: failed program was:" >&5
11950+sed 's/^/| /' conftest.$ac_ext >&5
11951
11952+ ac_header_preproc=no
11953 fi
11954+rm -f conftest.err conftest.$ac_ext
11955+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11956+echo "${ECHO_T}$ac_header_preproc" >&6
11957
11958-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11959-echo "configure:1923: checking for ANSI C header files" >&5
11960-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
11961- echo $ac_n "(cached) $ac_c" 1>&6
11962+# So? What about this header?
11963+case $ac_header_compiler:$ac_header_preproc in
11964+ yes:no )
11965+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11966+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11967+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11968+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11969+ (
11970+ cat <<\_ASBOX
11971+## ------------------------------------ ##
11972+## Report this to bug-autoconf@gnu.org. ##
11973+## ------------------------------------ ##
11974+_ASBOX
11975+ ) |
11976+ sed "s/^/$as_me: WARNING: /" >&2
11977+ ;;
11978+ no:yes )
11979+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11980+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11981+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11982+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11983+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11984+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11985+ (
11986+ cat <<\_ASBOX
11987+## ------------------------------------ ##
11988+## Report this to bug-autoconf@gnu.org. ##
11989+## ------------------------------------ ##
11990+_ASBOX
11991+ ) |
11992+ sed "s/^/$as_me: WARNING: /" >&2
11993+ ;;
11994+esac
11995+echo "$as_me:$LINENO: checking for $ac_header" >&5
11996+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11997+if eval "test \"\${$as_ac_Header+set}\" = set"; then
11998+ echo $ECHO_N "(cached) $ECHO_C" >&6
11999 else
12000- cat > conftest.$ac_ext <<EOF
12001-#line 1928 "configure"
12002-#include "confdefs.h"
12003-#include <stdlib.h>
12004-#include <stdarg.h>
12005-#include <string.h>
12006-#include <float.h>
12007-EOF
12008-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12009-{ (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12010-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12011-if test -z "$ac_err"; then
12012- rm -rf conftest*
12013- ac_cv_header_stdc=yes
12014+ eval "$as_ac_Header=$ac_header_preproc"
12015+fi
12016+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12017+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12018+
12019+fi
12020+if test `eval echo '${'$as_ac_Header'}'` = yes; then
12021+ cat >>confdefs.h <<_ACEOF
12022+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12023+_ACEOF
12024+
12025+fi
12026+
12027+done
12028+
12029+
12030+
12031+
12032+for ac_header in stdlib.h
12033+do
12034+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12035+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12036+ echo "$as_me:$LINENO: checking for $ac_header" >&5
12037+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12038+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12039+ echo $ECHO_N "(cached) $ECHO_C" >&6
12040+fi
12041+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12042+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12043 else
12044- echo "$ac_err" >&5
12045- echo "configure: failed program was:" >&5
12046- cat conftest.$ac_ext >&5
12047- rm -rf conftest*
12048- ac_cv_header_stdc=no
12049+ # Is the header compilable?
12050+echo "$as_me:$LINENO: checking $ac_header usability" >&5
12051+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12052+cat >conftest.$ac_ext <<_ACEOF
12053+#line $LINENO "configure"
12054+/* confdefs.h. */
12055+_ACEOF
12056+cat confdefs.h >>conftest.$ac_ext
12057+cat >>conftest.$ac_ext <<_ACEOF
12058+/* end confdefs.h. */
12059+$ac_includes_default
12060+#include <$ac_header>
12061+_ACEOF
12062+rm -f conftest.$ac_objext
12063+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12064+ (eval $ac_compile) 2>&5
12065+ ac_status=$?
12066+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067+ (exit $ac_status); } &&
12068+ { ac_try='test -s conftest.$ac_objext'
12069+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12070+ (eval $ac_try) 2>&5
12071+ ac_status=$?
12072+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073+ (exit $ac_status); }; }; then
12074+ ac_header_compiler=yes
12075+else
12076+ echo "$as_me: failed program was:" >&5
12077+sed 's/^/| /' conftest.$ac_ext >&5
12078+
12079+ac_header_compiler=no
12080 fi
12081-rm -f conftest*
12082+rm -f conftest.$ac_objext conftest.$ac_ext
12083+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12084+echo "${ECHO_T}$ac_header_compiler" >&6
12085
12086-if test $ac_cv_header_stdc = yes; then
12087- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12088-cat > conftest.$ac_ext <<EOF
12089-#line 1953 "configure"
12090-#include "confdefs.h"
12091-#include <string.h>
12092-EOF
12093-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12094- egrep "memchr" >/dev/null 2>&1; then
12095- :
12096+# Is the header present?
12097+echo "$as_me:$LINENO: checking $ac_header presence" >&5
12098+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12099+cat >conftest.$ac_ext <<_ACEOF
12100+#line $LINENO "configure"
12101+/* confdefs.h. */
12102+_ACEOF
12103+cat confdefs.h >>conftest.$ac_ext
12104+cat >>conftest.$ac_ext <<_ACEOF
12105+/* end confdefs.h. */
12106+#include <$ac_header>
12107+_ACEOF
12108+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12109+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12110+ ac_status=$?
12111+ grep -v '^ *+' conftest.er1 >conftest.err
12112+ rm -f conftest.er1
12113+ cat conftest.err >&5
12114+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115+ (exit $ac_status); } >/dev/null; then
12116+ if test -s conftest.err; then
12117+ ac_cpp_err=$ac_c_preproc_warn_flag
12118+ else
12119+ ac_cpp_err=
12120+ fi
12121 else
12122- rm -rf conftest*
12123- ac_cv_header_stdc=no
12124+ ac_cpp_err=yes
12125 fi
12126-rm -f conftest*
12127+if test -z "$ac_cpp_err"; then
12128+ ac_header_preproc=yes
12129+else
12130+ echo "$as_me: failed program was:" >&5
12131+sed 's/^/| /' conftest.$ac_ext >&5
12132
12133+ ac_header_preproc=no
12134 fi
12135+rm -f conftest.err conftest.$ac_ext
12136+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12137+echo "${ECHO_T}$ac_header_preproc" >&6
12138
12139-if test $ac_cv_header_stdc = yes; then
12140- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12141-cat > conftest.$ac_ext <<EOF
12142-#line 1971 "configure"
12143-#include "confdefs.h"
12144-#include <stdlib.h>
12145-EOF
12146-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12147- egrep "free" >/dev/null 2>&1; then
12148- :
12149+# So? What about this header?
12150+case $ac_header_compiler:$ac_header_preproc in
12151+ yes:no )
12152+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12153+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12154+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12155+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12156+ (
12157+ cat <<\_ASBOX
12158+## ------------------------------------ ##
12159+## Report this to bug-autoconf@gnu.org. ##
12160+## ------------------------------------ ##
12161+_ASBOX
12162+ ) |
12163+ sed "s/^/$as_me: WARNING: /" >&2
12164+ ;;
12165+ no:yes )
12166+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12167+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12168+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12169+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12170+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12171+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12172+ (
12173+ cat <<\_ASBOX
12174+## ------------------------------------ ##
12175+## Report this to bug-autoconf@gnu.org. ##
12176+## ------------------------------------ ##
12177+_ASBOX
12178+ ) |
12179+ sed "s/^/$as_me: WARNING: /" >&2
12180+ ;;
12181+esac
12182+echo "$as_me:$LINENO: checking for $ac_header" >&5
12183+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12184+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12185+ echo $ECHO_N "(cached) $ECHO_C" >&6
12186 else
12187- rm -rf conftest*
12188- ac_cv_header_stdc=no
12189+ eval "$as_ac_Header=$ac_header_preproc"
12190 fi
12191-rm -f conftest*
12192+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12193+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12194
12195 fi
12196+if test `eval echo '${'$as_ac_Header'}'` = yes; then
12197+ cat >>confdefs.h <<_ACEOF
12198+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12199+_ACEOF
12200
12201-if test $ac_cv_header_stdc = yes; then
12202- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12203-if test "$cross_compiling" = yes; then
12204- :
12205+fi
12206+
12207+done
12208+
12209+
12210+
12211+
12212+for ac_header in string.h
12213+do
12214+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12215+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12216+ echo "$as_me:$LINENO: checking for $ac_header" >&5
12217+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12218+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12219+ echo $ECHO_N "(cached) $ECHO_C" >&6
12220+fi
12221+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12222+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12223 else
12224- cat > conftest.$ac_ext <<EOF
12225-#line 1992 "configure"
12226-#include "confdefs.h"
12227-#include <ctype.h>
12228-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12229-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12230-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12231-int main () { int i; for (i = 0; i < 256; i++)
12232-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12233-exit (0); }
12234+ # Is the header compilable?
12235+echo "$as_me:$LINENO: checking $ac_header usability" >&5
12236+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12237+cat >conftest.$ac_ext <<_ACEOF
12238+#line $LINENO "configure"
12239+/* confdefs.h. */
12240+_ACEOF
12241+cat confdefs.h >>conftest.$ac_ext
12242+cat >>conftest.$ac_ext <<_ACEOF
12243+/* end confdefs.h. */
12244+$ac_includes_default
12245+#include <$ac_header>
12246+_ACEOF
12247+rm -f conftest.$ac_objext
12248+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12249+ (eval $ac_compile) 2>&5
12250+ ac_status=$?
12251+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252+ (exit $ac_status); } &&
12253+ { ac_try='test -s conftest.$ac_objext'
12254+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12255+ (eval $ac_try) 2>&5
12256+ ac_status=$?
12257+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258+ (exit $ac_status); }; }; then
12259+ ac_header_compiler=yes
12260+else
12261+ echo "$as_me: failed program was:" >&5
12262+sed 's/^/| /' conftest.$ac_ext >&5
12263
12264-EOF
12265-if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12266-then
12267- :
12268+ac_header_compiler=no
12269+fi
12270+rm -f conftest.$ac_objext conftest.$ac_ext
12271+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12272+echo "${ECHO_T}$ac_header_compiler" >&6
12273+
12274+# Is the header present?
12275+echo "$as_me:$LINENO: checking $ac_header presence" >&5
12276+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12277+cat >conftest.$ac_ext <<_ACEOF
12278+#line $LINENO "configure"
12279+/* confdefs.h. */
12280+_ACEOF
12281+cat confdefs.h >>conftest.$ac_ext
12282+cat >>conftest.$ac_ext <<_ACEOF
12283+/* end confdefs.h. */
12284+#include <$ac_header>
12285+_ACEOF
12286+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12287+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12288+ ac_status=$?
12289+ grep -v '^ *+' conftest.er1 >conftest.err
12290+ rm -f conftest.er1
12291+ cat conftest.err >&5
12292+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293+ (exit $ac_status); } >/dev/null; then
12294+ if test -s conftest.err; then
12295+ ac_cpp_err=$ac_c_preproc_warn_flag
12296+ else
12297+ ac_cpp_err=
12298+ fi
12299 else
12300- echo "configure: failed program was:" >&5
12301- cat conftest.$ac_ext >&5
12302- rm -fr conftest*
12303- ac_cv_header_stdc=no
12304+ ac_cpp_err=yes
12305 fi
12306-rm -fr conftest*
12307+if test -z "$ac_cpp_err"; then
12308+ ac_header_preproc=yes
12309+else
12310+ echo "$as_me: failed program was:" >&5
12311+sed 's/^/| /' conftest.$ac_ext >&5
12312+
12313+ ac_header_preproc=no
12314 fi
12315+rm -f conftest.err conftest.$ac_ext
12316+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12317+echo "${ECHO_T}$ac_header_preproc" >&6
12318
12319+# So? What about this header?
12320+case $ac_header_compiler:$ac_header_preproc in
12321+ yes:no )
12322+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12323+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12324+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12325+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12326+ (
12327+ cat <<\_ASBOX
12328+## ------------------------------------ ##
12329+## Report this to bug-autoconf@gnu.org. ##
12330+## ------------------------------------ ##
12331+_ASBOX
12332+ ) |
12333+ sed "s/^/$as_me: WARNING: /" >&2
12334+ ;;
12335+ no:yes )
12336+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12337+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12338+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12339+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12340+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12341+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12342+ (
12343+ cat <<\_ASBOX
12344+## ------------------------------------ ##
12345+## Report this to bug-autoconf@gnu.org. ##
12346+## ------------------------------------ ##
12347+_ASBOX
12348+ ) |
12349+ sed "s/^/$as_me: WARNING: /" >&2
12350+ ;;
12351+esac
12352+echo "$as_me:$LINENO: checking for $ac_header" >&5
12353+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12354+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12355+ echo $ECHO_N "(cached) $ECHO_C" >&6
12356+else
12357+ eval "$as_ac_Header=$ac_header_preproc"
12358 fi
12359+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12360+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12361+
12362 fi
12363+if test `eval echo '${'$as_ac_Header'}'` = yes; then
12364+ cat >>confdefs.h <<_ACEOF
12365+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12366+_ACEOF
12367+
12368+fi
12369+
12370+done
12371+
12372
12373-echo "$ac_t""$ac_cv_header_stdc" 1>&6
12374-if test $ac_cv_header_stdc = yes; then
12375- cat >> confdefs.h <<\EOF
12376-#define STDC_HEADERS 1
12377-EOF
12378
12379+ echo "$as_me:$LINENO: checking whether getenv is declared" >&5
12380+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
12381+if test "${ac_cv_have_decl_getenv+set}" = set; then
12382+ echo $ECHO_N "(cached) $ECHO_C" >&6
12383+else
12384+ cat >conftest.$ac_ext <<_ACEOF
12385+#line $LINENO "configure"
12386+/* confdefs.h. */
12387+_ACEOF
12388+cat confdefs.h >>conftest.$ac_ext
12389+cat >>conftest.$ac_ext <<_ACEOF
12390+/* end confdefs.h. */
12391+$ac_includes_default
12392+int
12393+main ()
12394+{
12395+#ifndef getenv
12396+ char *p = (char *) getenv;
12397+#endif
12398+
12399+ ;
12400+ return 0;
12401+}
12402+_ACEOF
12403+rm -f conftest.$ac_objext
12404+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12405+ (eval $ac_compile) 2>&5
12406+ ac_status=$?
12407+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408+ (exit $ac_status); } &&
12409+ { ac_try='test -s conftest.$ac_objext'
12410+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12411+ (eval $ac_try) 2>&5
12412+ ac_status=$?
12413+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12414+ (exit $ac_status); }; }; then
12415+ ac_cv_have_decl_getenv=yes
12416+else
12417+ echo "$as_me: failed program was:" >&5
12418+sed 's/^/| /' conftest.$ac_ext >&5
12419+
12420+ac_cv_have_decl_getenv=no
12421+fi
12422+rm -f conftest.$ac_objext conftest.$ac_ext
12423 fi
12424+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
12425+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
12426+if test $ac_cv_have_decl_getenv = yes; then
12427
12428-for ac_hdr in fcntl.h limits.h string.h unistd.h utime.h varargs.h
12429+cat >>confdefs.h <<_ACEOF
12430+#define HAVE_DECL_GETENV 1
12431+_ACEOF
12432+
12433+
12434+else
12435+ cat >>confdefs.h <<_ACEOF
12436+#define HAVE_DECL_GETENV 0
12437+_ACEOF
12438+
12439+
12440+fi
12441+
12442+
12443+
12444+
12445+ echo "$as_me:$LINENO: checking whether malloc is declared" >&5
12446+echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
12447+if test "${ac_cv_have_decl_malloc+set}" = set; then
12448+ echo $ECHO_N "(cached) $ECHO_C" >&6
12449+else
12450+ cat >conftest.$ac_ext <<_ACEOF
12451+#line $LINENO "configure"
12452+/* confdefs.h. */
12453+_ACEOF
12454+cat confdefs.h >>conftest.$ac_ext
12455+cat >>conftest.$ac_ext <<_ACEOF
12456+/* end confdefs.h. */
12457+$ac_includes_default
12458+int
12459+main ()
12460+{
12461+#ifndef malloc
12462+ char *p = (char *) malloc;
12463+#endif
12464+
12465+ ;
12466+ return 0;
12467+}
12468+_ACEOF
12469+rm -f conftest.$ac_objext
12470+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12471+ (eval $ac_compile) 2>&5
12472+ ac_status=$?
12473+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474+ (exit $ac_status); } &&
12475+ { ac_try='test -s conftest.$ac_objext'
12476+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477+ (eval $ac_try) 2>&5
12478+ ac_status=$?
12479+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480+ (exit $ac_status); }; }; then
12481+ ac_cv_have_decl_malloc=yes
12482+else
12483+ echo "$as_me: failed program was:" >&5
12484+sed 's/^/| /' conftest.$ac_ext >&5
12485+
12486+ac_cv_have_decl_malloc=no
12487+fi
12488+rm -f conftest.$ac_objext conftest.$ac_ext
12489+fi
12490+echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
12491+echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
12492+if test $ac_cv_have_decl_malloc = yes; then
12493+
12494+cat >>confdefs.h <<_ACEOF
12495+#define HAVE_DECL_MALLOC 1
12496+_ACEOF
12497+
12498+
12499+else
12500+ cat >>confdefs.h <<_ACEOF
12501+#define HAVE_DECL_MALLOC 0
12502+_ACEOF
12503+
12504+
12505+fi
12506+
12507+
12508+
12509+
12510+ echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
12511+echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
12512+if test "${ac_cv_win_or_dos+set}" = set; then
12513+ echo $ECHO_N "(cached) $ECHO_C" >&6
12514+else
12515+
12516+ cat >conftest.$ac_ext <<_ACEOF
12517+#line $LINENO "configure"
12518+/* confdefs.h. */
12519+_ACEOF
12520+cat confdefs.h >>conftest.$ac_ext
12521+cat >>conftest.$ac_ext <<_ACEOF
12522+/* end confdefs.h. */
12523+
12524+int
12525+main ()
12526+{
12527+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
12528+neither MSDOS nor Windows
12529+#endif
12530+ ;
12531+ return 0;
12532+}
12533+_ACEOF
12534+rm -f conftest.$ac_objext
12535+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12536+ (eval $ac_compile) 2>&5
12537+ ac_status=$?
12538+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539+ (exit $ac_status); } &&
12540+ { ac_try='test -s conftest.$ac_objext'
12541+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542+ (eval $ac_try) 2>&5
12543+ ac_status=$?
12544+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545+ (exit $ac_status); }; }; then
12546+ ac_cv_win_or_dos=yes
12547+else
12548+ echo "$as_me: failed program was:" >&5
12549+sed 's/^/| /' conftest.$ac_ext >&5
12550+
12551+ac_cv_win_or_dos=no
12552+fi
12553+rm -f conftest.$ac_objext conftest.$ac_ext
12554+
12555+fi
12556+echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
12557+echo "${ECHO_T}$ac_cv_win_or_dos" >&6
12558+
12559+ if test x"$ac_cv_win_or_dos" = xyes; then
12560+ ac_fs_accepts_drive_letter_prefix=1
12561+ ac_fs_backslash_is_file_name_separator=1
12562+ else
12563+ ac_fs_accepts_drive_letter_prefix=0
12564+ ac_fs_backslash_is_file_name_separator=0
12565+ fi
12566+
12567+
12568+
12569+
12570+
12571+cat >>confdefs.h <<_ACEOF
12572+#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
12573+_ACEOF
12574+
12575+
12576+
12577+
12578+
12579+
12580+cat >>confdefs.h <<_ACEOF
12581+#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
12582+_ACEOF
12583+
12584+
12585+
12586+
12587+for ac_header in unistd.h
12588 do
12589-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12590-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12591-echo "configure:2030: checking for $ac_hdr" >&5
12592-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12593- echo $ac_n "(cached) $ac_c" 1>&6
12594+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12595+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12596+ echo "$as_me:$LINENO: checking for $ac_header" >&5
12597+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12598+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12599+ echo $ECHO_N "(cached) $ECHO_C" >&6
12600+fi
12601+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12602+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12603 else
12604- cat > conftest.$ac_ext <<EOF
12605-#line 2035 "configure"
12606-#include "confdefs.h"
12607-#include <$ac_hdr>
12608-EOF
12609-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12610-{ (eval echo configure:2040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12611-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12612-if test -z "$ac_err"; then
12613- rm -rf conftest*
12614- eval "ac_cv_header_$ac_safe=yes"
12615+ # Is the header compilable?
12616+echo "$as_me:$LINENO: checking $ac_header usability" >&5
12617+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12618+cat >conftest.$ac_ext <<_ACEOF
12619+#line $LINENO "configure"
12620+/* confdefs.h. */
12621+_ACEOF
12622+cat confdefs.h >>conftest.$ac_ext
12623+cat >>conftest.$ac_ext <<_ACEOF
12624+/* end confdefs.h. */
12625+$ac_includes_default
12626+#include <$ac_header>
12627+_ACEOF
12628+rm -f conftest.$ac_objext
12629+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630+ (eval $ac_compile) 2>&5
12631+ ac_status=$?
12632+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633+ (exit $ac_status); } &&
12634+ { ac_try='test -s conftest.$ac_objext'
12635+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636+ (eval $ac_try) 2>&5
12637+ ac_status=$?
12638+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639+ (exit $ac_status); }; }; then
12640+ ac_header_compiler=yes
12641 else
12642- echo "$ac_err" >&5
12643- echo "configure: failed program was:" >&5
12644- cat conftest.$ac_ext >&5
12645- rm -rf conftest*
12646- eval "ac_cv_header_$ac_safe=no"
12647+ echo "$as_me: failed program was:" >&5
12648+sed 's/^/| /' conftest.$ac_ext >&5
12649+
12650+ac_header_compiler=no
12651 fi
12652-rm -f conftest*
12653+rm -f conftest.$ac_objext conftest.$ac_ext
12654+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12655+echo "${ECHO_T}$ac_header_compiler" >&6
12656+
12657+# Is the header present?
12658+echo "$as_me:$LINENO: checking $ac_header presence" >&5
12659+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12660+cat >conftest.$ac_ext <<_ACEOF
12661+#line $LINENO "configure"
12662+/* confdefs.h. */
12663+_ACEOF
12664+cat confdefs.h >>conftest.$ac_ext
12665+cat >>conftest.$ac_ext <<_ACEOF
12666+/* end confdefs.h. */
12667+#include <$ac_header>
12668+_ACEOF
12669+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12670+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12671+ ac_status=$?
12672+ grep -v '^ *+' conftest.er1 >conftest.err
12673+ rm -f conftest.er1
12674+ cat conftest.err >&5
12675+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676+ (exit $ac_status); } >/dev/null; then
12677+ if test -s conftest.err; then
12678+ ac_cpp_err=$ac_c_preproc_warn_flag
12679+ else
12680+ ac_cpp_err=
12681+ fi
12682+else
12683+ ac_cpp_err=yes
12684 fi
12685-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12686- echo "$ac_t""yes" 1>&6
12687- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12688- cat >> confdefs.h <<EOF
12689-#define $ac_tr_hdr 1
12690-EOF
12691-
12692+if test -z "$ac_cpp_err"; then
12693+ ac_header_preproc=yes
12694 else
12695- echo "$ac_t""no" 1>&6
12696+ echo "$as_me: failed program was:" >&5
12697+sed 's/^/| /' conftest.$ac_ext >&5
12698+
12699+ ac_header_preproc=no
12700+fi
12701+rm -f conftest.err conftest.$ac_ext
12702+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12703+echo "${ECHO_T}$ac_header_preproc" >&6
12704+
12705+# So? What about this header?
12706+case $ac_header_compiler:$ac_header_preproc in
12707+ yes:no )
12708+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12709+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12710+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12711+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12712+ (
12713+ cat <<\_ASBOX
12714+## ------------------------------------ ##
12715+## Report this to bug-autoconf@gnu.org. ##
12716+## ------------------------------------ ##
12717+_ASBOX
12718+ ) |
12719+ sed "s/^/$as_me: WARNING: /" >&2
12720+ ;;
12721+ no:yes )
12722+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12723+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12724+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12725+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12726+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12727+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12728+ (
12729+ cat <<\_ASBOX
12730+## ------------------------------------ ##
12731+## Report this to bug-autoconf@gnu.org. ##
12732+## ------------------------------------ ##
12733+_ASBOX
12734+ ) |
12735+ sed "s/^/$as_me: WARNING: /" >&2
12736+ ;;
12737+esac
12738+echo "$as_me:$LINENO: checking for $ac_header" >&5
12739+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12740+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12741+ echo $ECHO_N "(cached) $ECHO_C" >&6
12742+else
12743+ eval "$as_ac_Header=$ac_header_preproc"
12744+fi
12745+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12746+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12747+
12748 fi
12749+if test `eval echo '${'$as_ac_Header'}'` = yes; then
12750+ cat >>confdefs.h <<_ACEOF
12751+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12752+_ACEOF
12753+
12754+fi
12755+
12756 done
12757
12758
12759- echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
12760-echo "configure:2068: checking for inttypes.h" >&5
12761-if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
12762- echo $ac_n "(cached) $ac_c" 1>&6
12763+
12764+
12765+
12766+
12767+ :
12768+
12769+
12770+
12771+
12772+
12773+
12774+
12775+
12776+
12777+
12778+
12779+
12780+ :
12781+
12782+
12783+
12784+
12785+
12786+
12787+
12788+
12789+ echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5
12790+echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" >&6
12791+if test "${jm_cv_struct_dirent_d_ino+set}" = set; then
12792+ echo $ECHO_N "(cached) $ECHO_C" >&6
12793 else
12794- cat > conftest.$ac_ext <<EOF
12795-#line 2073 "configure"
12796-#include "confdefs.h"
12797+ cat >conftest.$ac_ext <<_ACEOF
12798+#line $LINENO "configure"
12799+/* confdefs.h. */
12800+_ACEOF
12801+cat confdefs.h >>conftest.$ac_ext
12802+cat >>conftest.$ac_ext <<_ACEOF
12803+/* end confdefs.h. */
12804+
12805 #include <sys/types.h>
12806-#include <inttypes.h>
12807-int main() {
12808-uintmax_t i = (uintmax_t) -1;
12809-; return 0; }
12810-EOF
12811-if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12812- rm -rf conftest*
12813- jm_ac_cv_header_inttypes_h=yes
12814+#ifdef HAVE_DIRENT_H
12815+# include <dirent.h>
12816+#else /* not HAVE_DIRENT_H */
12817+# define dirent direct
12818+# ifdef HAVE_SYS_NDIR_H
12819+# include <sys/ndir.h>
12820+# endif /* HAVE_SYS_NDIR_H */
12821+# ifdef HAVE_SYS_DIR_H
12822+# include <sys/dir.h>
12823+# endif /* HAVE_SYS_DIR_H */
12824+# ifdef HAVE_NDIR_H
12825+# include <ndir.h>
12826+# endif /* HAVE_NDIR_H */
12827+#endif /* HAVE_DIRENT_H */
12828+
12829+int
12830+main ()
12831+{
12832+struct dirent dp; dp.d_ino = 0;
12833+ ;
12834+ return 0;
12835+}
12836+_ACEOF
12837+rm -f conftest.$ac_objext conftest$ac_exeext
12838+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12839+ (eval $ac_link) 2>&5
12840+ ac_status=$?
12841+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842+ (exit $ac_status); } &&
12843+ { ac_try='test -s conftest$ac_exeext'
12844+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12845+ (eval $ac_try) 2>&5
12846+ ac_status=$?
12847+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12848+ (exit $ac_status); }; }; then
12849+ jm_cv_struct_dirent_d_ino=yes
12850 else
12851- echo "configure: failed program was:" >&5
12852- cat conftest.$ac_ext >&5
12853- rm -rf conftest*
12854- jm_ac_cv_header_inttypes_h=no
12855+ echo "$as_me: failed program was:" >&5
12856+sed 's/^/| /' conftest.$ac_ext >&5
12857+
12858+jm_cv_struct_dirent_d_ino=no
12859 fi
12860-rm -f conftest*
12861+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12862+
12863+
12864 fi
12865+echo "$as_me:$LINENO: result: $jm_cv_struct_dirent_d_ino" >&5
12866+echo "${ECHO_T}$jm_cv_struct_dirent_d_ino" >&6
12867+ if test $jm_cv_struct_dirent_d_ino = yes; then
12868
12869-echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
12870- if test $jm_ac_cv_header_inttypes_h = yes; then
12871- cat >> confdefs.h <<EOF
12872-#define HAVE_INTTYPES_H 1
12873-EOF
12874+cat >>confdefs.h <<\_ACEOF
12875+#define D_INO_IN_DIRENT 1
12876+_ACEOF
12877
12878+ fi
12879+
12880+
12881+
12882+
12883+ echo "$as_me:$LINENO: checking for long file names" >&5
12884+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
12885+if test "${ac_cv_sys_long_file_names+set}" = set; then
12886+ echo $ECHO_N "(cached) $ECHO_C" >&6
12887+else
12888+ ac_cv_sys_long_file_names=yes
12889+# Test for long file names in all the places we know might matter:
12890+# . the current directory, where building will happen
12891+# $prefix/lib where we will be installing things
12892+# $exec_prefix/lib likewise
12893+# eval it to expand exec_prefix.
12894+# $TMPDIR if set, where it might want to write temporary files
12895+# if $TMPDIR is not set:
12896+# /tmp where it might want to write temporary files
12897+# /var/tmp likewise
12898+# /usr/tmp likewise
12899+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
12900+ ac_tmpdirs=$TMPDIR
12901+else
12902+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
12903+fi
12904+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
12905+ test -d $ac_dir || continue
12906+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
12907+ ac_xdir=$ac_dir/cf$$
12908+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
12909+ ac_tf1=$ac_xdir/conftest9012345
12910+ ac_tf2=$ac_xdir/conftest9012346
12911+ (echo 1 >$ac_tf1) 2>/dev/null
12912+ (echo 2 >$ac_tf2) 2>/dev/null
12913+ ac_val=`cat $ac_tf1 2>/dev/null`
12914+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
12915+ ac_cv_sys_long_file_names=no
12916+ rm -rf $ac_xdir 2>/dev/null
12917+ break
12918 fi
12919+ rm -rf $ac_xdir 2>/dev/null
12920+done
12921+fi
12922+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
12923+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
12924+if test $ac_cv_sys_long_file_names = yes; then
12925
12926+cat >>confdefs.h <<\_ACEOF
12927+#define HAVE_LONG_FILE_NAMES 1
12928+_ACEOF
12929
12930-echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12931-echo "configure:2103: checking for mode_t" >&5
12932-if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
12933- echo $ac_n "(cached) $ac_c" 1>&6
12934+fi
12935+
12936+
12937+ :
12938+
12939+
12940+
12941+
12942+
12943+
12944+
12945+
12946+
12947+
12948+
12949+
12950+for ac_func in pathconf
12951+do
12952+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12953+echo "$as_me:$LINENO: checking for $ac_func" >&5
12954+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12955+if eval "test \"\${$as_ac_var+set}\" = set"; then
12956+ echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958- cat > conftest.$ac_ext <<EOF
12959-#line 2108 "configure"
12960-#include "confdefs.h"
12961-#include <sys/types.h>
12962-#if STDC_HEADERS
12963-#include <stdlib.h>
12964-#include <stddef.h>
12965+ cat >conftest.$ac_ext <<_ACEOF
12966+#line $LINENO "configure"
12967+/* confdefs.h. */
12968+_ACEOF
12969+cat confdefs.h >>conftest.$ac_ext
12970+cat >>conftest.$ac_ext <<_ACEOF
12971+/* end confdefs.h. */
12972+/* System header to define __stub macros and hopefully few prototypes,
12973+ which can conflict with char $ac_func (); below.
12974+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12975+ <limits.h> exists even on freestanding compilers. */
12976+#ifdef __STDC__
12977+# include <limits.h>
12978+#else
12979+# include <assert.h>
12980 #endif
12981-EOF
12982-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12983- egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12984- rm -rf conftest*
12985- ac_cv_type_mode_t=yes
12986+/* Override any gcc2 internal prototype to avoid an error. */
12987+#ifdef __cplusplus
12988+extern "C"
12989+{
12990+#endif
12991+/* We use char because int might match the return type of a gcc2
12992+ builtin and then its argument prototype would still apply. */
12993+char $ac_func ();
12994+/* The GNU C library defines this for functions which it implements
12995+ to always fail with ENOSYS. Some functions are actually named
12996+ something starting with __ and the normal name is an alias. */
12997+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12998+choke me
12999+#else
13000+char (*f) () = $ac_func;
13001+#endif
13002+#ifdef __cplusplus
13003+}
13004+#endif
13005+
13006+int
13007+main ()
13008+{
13009+return f != $ac_func;
13010+ ;
13011+ return 0;
13012+}
13013+_ACEOF
13014+rm -f conftest.$ac_objext conftest$ac_exeext
13015+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13016+ (eval $ac_link) 2>&5
13017+ ac_status=$?
13018+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019+ (exit $ac_status); } &&
13020+ { ac_try='test -s conftest$ac_exeext'
13021+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13022+ (eval $ac_try) 2>&5
13023+ ac_status=$?
13024+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025+ (exit $ac_status); }; }; then
13026+ eval "$as_ac_var=yes"
13027 else
13028- rm -rf conftest*
13029- ac_cv_type_mode_t=no
13030+ echo "$as_me: failed program was:" >&5
13031+sed 's/^/| /' conftest.$ac_ext >&5
13032+
13033+eval "$as_ac_var=no"
13034 fi
13035-rm -f conftest*
13036+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13037+fi
13038+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13039+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13040+if test `eval echo '${'$as_ac_var'}'` = yes; then
13041+ cat >>confdefs.h <<_ACEOF
13042+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13043+_ACEOF
13044
13045 fi
13046-echo "$ac_t""$ac_cv_type_mode_t" 1>&6
13047-if test $ac_cv_type_mode_t = no; then
13048- cat >> confdefs.h <<\EOF
13049-#define mode_t int
13050-EOF
13051+done
13052+
13053+
13054+
13055+
13056+
13057+
13058+
13059+ :
13060+
13061+
13062+
13063+
13064+
13065+
13066+
13067+
13068+ :
13069+
13070+
13071+
13072+
13073+
13074+
13075+
13076+
13077+ :
13078+
13079+
13080+
13081+
13082+
13083+
13084
13085+for ac_func in vprintf
13086+do
13087+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13088+echo "$as_me:$LINENO: checking for $ac_func" >&5
13089+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13090+if eval "test \"\${$as_ac_var+set}\" = set"; then
13091+ echo $ECHO_N "(cached) $ECHO_C" >&6
13092+else
13093+ cat >conftest.$ac_ext <<_ACEOF
13094+#line $LINENO "configure"
13095+/* confdefs.h. */
13096+_ACEOF
13097+cat confdefs.h >>conftest.$ac_ext
13098+cat >>conftest.$ac_ext <<_ACEOF
13099+/* end confdefs.h. */
13100+/* System header to define __stub macros and hopefully few prototypes,
13101+ which can conflict with char $ac_func (); below.
13102+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13103+ <limits.h> exists even on freestanding compilers. */
13104+#ifdef __STDC__
13105+# include <limits.h>
13106+#else
13107+# include <assert.h>
13108+#endif
13109+/* Override any gcc2 internal prototype to avoid an error. */
13110+#ifdef __cplusplus
13111+extern "C"
13112+{
13113+#endif
13114+/* We use char because int might match the return type of a gcc2
13115+ builtin and then its argument prototype would still apply. */
13116+char $ac_func ();
13117+/* The GNU C library defines this for functions which it implements
13118+ to always fail with ENOSYS. Some functions are actually named
13119+ something starting with __ and the normal name is an alias. */
13120+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13121+choke me
13122+#else
13123+char (*f) () = $ac_func;
13124+#endif
13125+#ifdef __cplusplus
13126+}
13127+#endif
13128+
13129+int
13130+main ()
13131+{
13132+return f != $ac_func;
13133+ ;
13134+ return 0;
13135+}
13136+_ACEOF
13137+rm -f conftest.$ac_objext conftest$ac_exeext
13138+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13139+ (eval $ac_link) 2>&5
13140+ ac_status=$?
13141+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142+ (exit $ac_status); } &&
13143+ { ac_try='test -s conftest$ac_exeext'
13144+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13145+ (eval $ac_try) 2>&5
13146+ ac_status=$?
13147+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13148+ (exit $ac_status); }; }; then
13149+ eval "$as_ac_var=yes"
13150+else
13151+ echo "$as_me: failed program was:" >&5
13152+sed 's/^/| /' conftest.$ac_ext >&5
13153+
13154+eval "$as_ac_var=no"
13155 fi
13156+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13157+fi
13158+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13159+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13160+if test `eval echo '${'$as_ac_var'}'` = yes; then
13161+ cat >>confdefs.h <<_ACEOF
13162+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13163+_ACEOF
13164
13165-echo $ac_n "checking for off_t""... $ac_c" 1>&6
13166-echo "configure:2136: checking for off_t" >&5
13167-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
13168- echo $ac_n "(cached) $ac_c" 1>&6
13169+echo "$as_me:$LINENO: checking for _doprnt" >&5
13170+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
13171+if test "${ac_cv_func__doprnt+set}" = set; then
13172+ echo $ECHO_N "(cached) $ECHO_C" >&6
13173 else
13174- cat > conftest.$ac_ext <<EOF
13175-#line 2141 "configure"
13176-#include "confdefs.h"
13177-#include <sys/types.h>
13178-#if STDC_HEADERS
13179-#include <stdlib.h>
13180-#include <stddef.h>
13181+ cat >conftest.$ac_ext <<_ACEOF
13182+#line $LINENO "configure"
13183+/* confdefs.h. */
13184+_ACEOF
13185+cat confdefs.h >>conftest.$ac_ext
13186+cat >>conftest.$ac_ext <<_ACEOF
13187+/* end confdefs.h. */
13188+/* System header to define __stub macros and hopefully few prototypes,
13189+ which can conflict with char _doprnt (); below.
13190+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13191+ <limits.h> exists even on freestanding compilers. */
13192+#ifdef __STDC__
13193+# include <limits.h>
13194+#else
13195+# include <assert.h>
13196 #endif
13197-EOF
13198-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13199- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13200- rm -rf conftest*
13201- ac_cv_type_off_t=yes
13202+/* Override any gcc2 internal prototype to avoid an error. */
13203+#ifdef __cplusplus
13204+extern "C"
13205+{
13206+#endif
13207+/* We use char because int might match the return type of a gcc2
13208+ builtin and then its argument prototype would still apply. */
13209+char _doprnt ();
13210+/* The GNU C library defines this for functions which it implements
13211+ to always fail with ENOSYS. Some functions are actually named
13212+ something starting with __ and the normal name is an alias. */
13213+#if defined (__stub__doprnt) || defined (__stub____doprnt)
13214+choke me
13215+#else
13216+char (*f) () = _doprnt;
13217+#endif
13218+#ifdef __cplusplus
13219+}
13220+#endif
13221+
13222+int
13223+main ()
13224+{
13225+return f != _doprnt;
13226+ ;
13227+ return 0;
13228+}
13229+_ACEOF
13230+rm -f conftest.$ac_objext conftest$ac_exeext
13231+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13232+ (eval $ac_link) 2>&5
13233+ ac_status=$?
13234+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235+ (exit $ac_status); } &&
13236+ { ac_try='test -s conftest$ac_exeext'
13237+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13238+ (eval $ac_try) 2>&5
13239+ ac_status=$?
13240+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241+ (exit $ac_status); }; }; then
13242+ ac_cv_func__doprnt=yes
13243 else
13244- rm -rf conftest*
13245- ac_cv_type_off_t=no
13246+ echo "$as_me: failed program was:" >&5
13247+sed 's/^/| /' conftest.$ac_ext >&5
13248+
13249+ac_cv_func__doprnt=no
13250 fi
13251-rm -f conftest*
13252+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13253+fi
13254+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
13255+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
13256+if test $ac_cv_func__doprnt = yes; then
13257+
13258+cat >>confdefs.h <<\_ACEOF
13259+#define HAVE_DOPRNT 1
13260+_ACEOF
13261
13262 fi
13263-echo "$ac_t""$ac_cv_type_off_t" 1>&6
13264-if test $ac_cv_type_off_t = no; then
13265- cat >> confdefs.h <<\EOF
13266-#define off_t long
13267-EOF
13268
13269 fi
13270+done
13271
13272-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13273-echo "configure:2169: checking for pid_t" >&5
13274-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
13275- echo $ac_n "(cached) $ac_c" 1>&6
13276+
13277+
13278+ echo "$as_me:$LINENO: checking for error_at_line" >&5
13279+echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
13280+if test "${ac_cv_lib_error_at_line+set}" = set; then
13281+ echo $ECHO_N "(cached) $ECHO_C" >&6
13282 else
13283- cat > conftest.$ac_ext <<EOF
13284-#line 2174 "configure"
13285-#include "confdefs.h"
13286-#include <sys/types.h>
13287-#if STDC_HEADERS
13288-#include <stdlib.h>
13289-#include <stddef.h>
13290+ cat >conftest.$ac_ext <<_ACEOF
13291+#line $LINENO "configure"
13292+/* confdefs.h. */
13293+_ACEOF
13294+cat confdefs.h >>conftest.$ac_ext
13295+cat >>conftest.$ac_ext <<_ACEOF
13296+/* end confdefs.h. */
13297+
13298+int
13299+main ()
13300+{
13301+error_at_line (0, 0, "", 0, "");
13302+ ;
13303+ return 0;
13304+}
13305+_ACEOF
13306+rm -f conftest.$ac_objext conftest$ac_exeext
13307+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13308+ (eval $ac_link) 2>&5
13309+ ac_status=$?
13310+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311+ (exit $ac_status); } &&
13312+ { ac_try='test -s conftest$ac_exeext'
13313+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314+ (eval $ac_try) 2>&5
13315+ ac_status=$?
13316+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317+ (exit $ac_status); }; }; then
13318+ ac_cv_lib_error_at_line=yes
13319+else
13320+ echo "$as_me: failed program was:" >&5
13321+sed 's/^/| /' conftest.$ac_ext >&5
13322+
13323+ac_cv_lib_error_at_line=no
13324+fi
13325+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13326+fi
13327+echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
13328+echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
13329+if test $ac_cv_lib_error_at_line = no; then
13330+ LIBOBJS="$LIBOBJS error.$ac_objext"
13331+fi
13332+
13333+
13334+
13335+
13336+
13337+for ac_func in strerror
13338+do
13339+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13340+echo "$as_me:$LINENO: checking for $ac_func" >&5
13341+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13342+if eval "test \"\${$as_ac_var+set}\" = set"; then
13343+ echo $ECHO_N "(cached) $ECHO_C" >&6
13344+else
13345+ cat >conftest.$ac_ext <<_ACEOF
13346+#line $LINENO "configure"
13347+/* confdefs.h. */
13348+_ACEOF
13349+cat confdefs.h >>conftest.$ac_ext
13350+cat >>conftest.$ac_ext <<_ACEOF
13351+/* end confdefs.h. */
13352+/* System header to define __stub macros and hopefully few prototypes,
13353+ which can conflict with char $ac_func (); below.
13354+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13355+ <limits.h> exists even on freestanding compilers. */
13356+#ifdef __STDC__
13357+# include <limits.h>
13358+#else
13359+# include <assert.h>
13360 #endif
13361-EOF
13362-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13363- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13364- rm -rf conftest*
13365- ac_cv_type_pid_t=yes
13366+/* Override any gcc2 internal prototype to avoid an error. */
13367+#ifdef __cplusplus
13368+extern "C"
13369+{
13370+#endif
13371+/* We use char because int might match the return type of a gcc2
13372+ builtin and then its argument prototype would still apply. */
13373+char $ac_func ();
13374+/* The GNU C library defines this for functions which it implements
13375+ to always fail with ENOSYS. Some functions are actually named
13376+ something starting with __ and the normal name is an alias. */
13377+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13378+choke me
13379+#else
13380+char (*f) () = $ac_func;
13381+#endif
13382+#ifdef __cplusplus
13383+}
13384+#endif
13385+
13386+int
13387+main ()
13388+{
13389+return f != $ac_func;
13390+ ;
13391+ return 0;
13392+}
13393+_ACEOF
13394+rm -f conftest.$ac_objext conftest$ac_exeext
13395+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396+ (eval $ac_link) 2>&5
13397+ ac_status=$?
13398+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399+ (exit $ac_status); } &&
13400+ { ac_try='test -s conftest$ac_exeext'
13401+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402+ (eval $ac_try) 2>&5
13403+ ac_status=$?
13404+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405+ (exit $ac_status); }; }; then
13406+ eval "$as_ac_var=yes"
13407 else
13408- rm -rf conftest*
13409- ac_cv_type_pid_t=no
13410+ echo "$as_me: failed program was:" >&5
13411+sed 's/^/| /' conftest.$ac_ext >&5
13412+
13413+eval "$as_ac_var=no"
13414 fi
13415-rm -f conftest*
13416+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13417+fi
13418+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13419+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13420+if test `eval echo '${'$as_ac_var'}'` = yes; then
13421+ cat >>confdefs.h <<_ACEOF
13422+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13423+_ACEOF
13424
13425 fi
13426-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
13427-if test $ac_cv_type_pid_t = no; then
13428- cat >> confdefs.h <<\EOF
13429-#define pid_t int
13430-EOF
13431+done
13432
13433+ echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13434+echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13435+if test "${ac_cv_have_decl_strerror+set}" = set; then
13436+ echo $ECHO_N "(cached) $ECHO_C" >&6
13437+else
13438+ cat >conftest.$ac_ext <<_ACEOF
13439+#line $LINENO "configure"
13440+/* confdefs.h. */
13441+_ACEOF
13442+cat confdefs.h >>conftest.$ac_ext
13443+cat >>conftest.$ac_ext <<_ACEOF
13444+/* end confdefs.h. */
13445+$ac_includes_default
13446+int
13447+main ()
13448+{
13449+#ifndef strerror
13450+ char *p = (char *) strerror;
13451+#endif
13452+
13453+ ;
13454+ return 0;
13455+}
13456+_ACEOF
13457+rm -f conftest.$ac_objext
13458+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459+ (eval $ac_compile) 2>&5
13460+ ac_status=$?
13461+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462+ (exit $ac_status); } &&
13463+ { ac_try='test -s conftest.$ac_objext'
13464+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465+ (eval $ac_try) 2>&5
13466+ ac_status=$?
13467+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468+ (exit $ac_status); }; }; then
13469+ ac_cv_have_decl_strerror=yes
13470+else
13471+ echo "$as_me: failed program was:" >&5
13472+sed 's/^/| /' conftest.$ac_ext >&5
13473+
13474+ac_cv_have_decl_strerror=no
13475 fi
13476+rm -f conftest.$ac_objext conftest.$ac_ext
13477+fi
13478+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13479+echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13480+if test $ac_cv_have_decl_strerror = yes; then
13481+
13482+cat >>confdefs.h <<_ACEOF
13483+#define HAVE_DECL_STRERROR 1
13484+_ACEOF
13485+
13486
13487-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13488-echo "configure:2202: checking return type of signal handlers" >&5
13489-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
13490- echo $ac_n "(cached) $ac_c" 1>&6
13491 else
13492- cat > conftest.$ac_ext <<EOF
13493-#line 2207 "configure"
13494-#include "confdefs.h"
13495-#include <sys/types.h>
13496-#include <signal.h>
13497-#ifdef signal
13498-#undef signal
13499+ cat >>confdefs.h <<_ACEOF
13500+#define HAVE_DECL_STRERROR 0
13501+_ACEOF
13502+
13503+
13504+fi
13505+
13506+
13507+ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
13508+echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
13509+if test "${ac_cv_have_decl_strerror_r+set}" = set; then
13510+ echo $ECHO_N "(cached) $ECHO_C" >&6
13511+else
13512+ cat >conftest.$ac_ext <<_ACEOF
13513+#line $LINENO "configure"
13514+/* confdefs.h. */
13515+_ACEOF
13516+cat confdefs.h >>conftest.$ac_ext
13517+cat >>conftest.$ac_ext <<_ACEOF
13518+/* end confdefs.h. */
13519+$ac_includes_default
13520+int
13521+main ()
13522+{
13523+#ifndef strerror_r
13524+ char *p = (char *) strerror_r;
13525+#endif
13526+
13527+ ;
13528+ return 0;
13529+}
13530+_ACEOF
13531+rm -f conftest.$ac_objext
13532+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13533+ (eval $ac_compile) 2>&5
13534+ ac_status=$?
13535+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536+ (exit $ac_status); } &&
13537+ { ac_try='test -s conftest.$ac_objext'
13538+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13539+ (eval $ac_try) 2>&5
13540+ ac_status=$?
13541+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13542+ (exit $ac_status); }; }; then
13543+ ac_cv_have_decl_strerror_r=yes
13544+else
13545+ echo "$as_me: failed program was:" >&5
13546+sed 's/^/| /' conftest.$ac_ext >&5
13547+
13548+ac_cv_have_decl_strerror_r=no
13549+fi
13550+rm -f conftest.$ac_objext conftest.$ac_ext
13551+fi
13552+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
13553+echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
13554+if test $ac_cv_have_decl_strerror_r = yes; then
13555+
13556+cat >>confdefs.h <<_ACEOF
13557+#define HAVE_DECL_STRERROR_R 1
13558+_ACEOF
13559+
13560+
13561+else
13562+ cat >>confdefs.h <<_ACEOF
13563+#define HAVE_DECL_STRERROR_R 0
13564+_ACEOF
13565+
13566+
13567+fi
13568+
13569+
13570+
13571+for ac_func in strerror_r
13572+do
13573+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13574+echo "$as_me:$LINENO: checking for $ac_func" >&5
13575+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13576+if eval "test \"\${$as_ac_var+set}\" = set"; then
13577+ echo $ECHO_N "(cached) $ECHO_C" >&6
13578+else
13579+ cat >conftest.$ac_ext <<_ACEOF
13580+#line $LINENO "configure"
13581+/* confdefs.h. */
13582+_ACEOF
13583+cat confdefs.h >>conftest.$ac_ext
13584+cat >>conftest.$ac_ext <<_ACEOF
13585+/* end confdefs.h. */
13586+/* System header to define __stub macros and hopefully few prototypes,
13587+ which can conflict with char $ac_func (); below.
13588+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13589+ <limits.h> exists even on freestanding compilers. */
13590+#ifdef __STDC__
13591+# include <limits.h>
13592+#else
13593+# include <assert.h>
13594 #endif
13595+/* Override any gcc2 internal prototype to avoid an error. */
13596 #ifdef __cplusplus
13597-extern "C" void (*signal (int, void (*)(int)))(int);
13598+extern "C"
13599+{
13600+#endif
13601+/* We use char because int might match the return type of a gcc2
13602+ builtin and then its argument prototype would still apply. */
13603+char $ac_func ();
13604+/* The GNU C library defines this for functions which it implements
13605+ to always fail with ENOSYS. Some functions are actually named
13606+ something starting with __ and the normal name is an alias. */
13607+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13608+choke me
13609 #else
13610-void (*signal ()) ();
13611+char (*f) () = $ac_func;
13612+#endif
13613+#ifdef __cplusplus
13614+}
13615 #endif
13616
13617-int main() {
13618-int i;
13619-; return 0; }
13620-EOF
13621-if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13622- rm -rf conftest*
13623- ac_cv_type_signal=void
13624+int
13625+main ()
13626+{
13627+return f != $ac_func;
13628+ ;
13629+ return 0;
13630+}
13631+_ACEOF
13632+rm -f conftest.$ac_objext conftest$ac_exeext
13633+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13634+ (eval $ac_link) 2>&5
13635+ ac_status=$?
13636+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637+ (exit $ac_status); } &&
13638+ { ac_try='test -s conftest$ac_exeext'
13639+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13640+ (eval $ac_try) 2>&5
13641+ ac_status=$?
13642+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643+ (exit $ac_status); }; }; then
13644+ eval "$as_ac_var=yes"
13645 else
13646- echo "configure: failed program was:" >&5
13647- cat conftest.$ac_ext >&5
13648- rm -rf conftest*
13649- ac_cv_type_signal=int
13650+ echo "$as_me: failed program was:" >&5
13651+sed 's/^/| /' conftest.$ac_ext >&5
13652+
13653+eval "$as_ac_var=no"
13654 fi
13655-rm -f conftest*
13656+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13657 fi
13658+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13659+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13660+if test `eval echo '${'$as_ac_var'}'` = yes; then
13661+ cat >>confdefs.h <<_ACEOF
13662+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13663+_ACEOF
13664
13665-echo "$ac_t""$ac_cv_type_signal" 1>&6
13666-cat >> confdefs.h <<EOF
13667-#define RETSIGTYPE $ac_cv_type_signal
13668-EOF
13669+fi
13670+done
13671+
13672+echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
13673+echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
13674+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
13675+ echo $ECHO_N "(cached) $ECHO_C" >&6
13676+else
13677+
13678+ ac_cv_func_strerror_r_char_p=no
13679+ if test $ac_cv_have_decl_strerror_r = yes; then
13680+ cat >conftest.$ac_ext <<_ACEOF
13681+#line $LINENO "configure"
13682+/* confdefs.h. */
13683+_ACEOF
13684+cat confdefs.h >>conftest.$ac_ext
13685+cat >>conftest.$ac_ext <<_ACEOF
13686+/* end confdefs.h. */
13687+$ac_includes_default
13688+int
13689+main ()
13690+{
13691
13692+ char buf[100];
13693+ char x = *strerror_r (0, buf, sizeof buf);
13694+ char *p = strerror_r (0, buf, sizeof buf);
13695
13696-echo $ac_n "checking for size_t""... $ac_c" 1>&6
13697-echo "configure:2243: checking for size_t" >&5
13698-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
13699- echo $ac_n "(cached) $ac_c" 1>&6
13700+ ;
13701+ return 0;
13702+}
13703+_ACEOF
13704+rm -f conftest.$ac_objext
13705+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13706+ (eval $ac_compile) 2>&5
13707+ ac_status=$?
13708+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709+ (exit $ac_status); } &&
13710+ { ac_try='test -s conftest.$ac_objext'
13711+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712+ (eval $ac_try) 2>&5
13713+ ac_status=$?
13714+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715+ (exit $ac_status); }; }; then
13716+ ac_cv_func_strerror_r_char_p=yes
13717 else
13718- cat > conftest.$ac_ext <<EOF
13719-#line 2248 "configure"
13720-#include "confdefs.h"
13721-#include <sys/types.h>
13722-#if STDC_HEADERS
13723-#include <stdlib.h>
13724-#include <stddef.h>
13725+ echo "$as_me: failed program was:" >&5
13726+sed 's/^/| /' conftest.$ac_ext >&5
13727+
13728+fi
13729+rm -f conftest.$ac_objext conftest.$ac_ext
13730+ else
13731+ # strerror_r is not declared. Choose between
13732+ # systems that have relatively inaccessible declarations for the
13733+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
13734+ # former has a strerror_r that returns char*, while the latter
13735+ # has a strerror_r that returns `int'.
13736+ # This test should segfault on the DEC system.
13737+ if test "$cross_compiling" = yes; then
13738+ :
13739+else
13740+ cat >conftest.$ac_ext <<_ACEOF
13741+#line $LINENO "configure"
13742+/* confdefs.h. */
13743+_ACEOF
13744+cat confdefs.h >>conftest.$ac_ext
13745+cat >>conftest.$ac_ext <<_ACEOF
13746+/* end confdefs.h. */
13747+$ac_includes_default
13748+ extern char *strerror_r ();
13749+int
13750+main ()
13751+{
13752+char buf[100];
13753+ char x = *strerror_r (0, buf, sizeof buf);
13754+ exit (!isalpha (x));
13755+ ;
13756+ return 0;
13757+}
13758+_ACEOF
13759+rm -f conftest$ac_exeext
13760+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13761+ (eval $ac_link) 2>&5
13762+ ac_status=$?
13763+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13765+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13766+ (eval $ac_try) 2>&5
13767+ ac_status=$?
13768+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769+ (exit $ac_status); }; }; then
13770+ ac_cv_func_strerror_r_char_p=yes
13771+else
13772+ echo "$as_me: program exited with status $ac_status" >&5
13773+echo "$as_me: failed program was:" >&5
13774+sed 's/^/| /' conftest.$ac_ext >&5
13775+
13776+fi
13777+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13778+fi
13779+ fi
13780+
13781+fi
13782+echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
13783+echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
13784+if test $ac_cv_func_strerror_r_char_p = yes; then
13785+
13786+cat >>confdefs.h <<\_ACEOF
13787+#define STRERROR_R_CHAR_P 1
13788+_ACEOF
13789+
13790+fi
13791+
13792+
13793+
13794+
13795+
13796+for ac_func in memchr
13797+do
13798+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13799+echo "$as_me:$LINENO: checking for $ac_func" >&5
13800+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13801+if eval "test \"\${$as_ac_var+set}\" = set"; then
13802+ echo $ECHO_N "(cached) $ECHO_C" >&6
13803+else
13804+ cat >conftest.$ac_ext <<_ACEOF
13805+#line $LINENO "configure"
13806+/* confdefs.h. */
13807+_ACEOF
13808+cat confdefs.h >>conftest.$ac_ext
13809+cat >>conftest.$ac_ext <<_ACEOF
13810+/* end confdefs.h. */
13811+/* System header to define __stub macros and hopefully few prototypes,
13812+ which can conflict with char $ac_func (); below.
13813+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13814+ <limits.h> exists even on freestanding compilers. */
13815+#ifdef __STDC__
13816+# include <limits.h>
13817+#else
13818+# include <assert.h>
13819 #endif
13820-EOF
13821-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13822- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13823- rm -rf conftest*
13824- ac_cv_type_size_t=yes
13825+/* Override any gcc2 internal prototype to avoid an error. */
13826+#ifdef __cplusplus
13827+extern "C"
13828+{
13829+#endif
13830+/* We use char because int might match the return type of a gcc2
13831+ builtin and then its argument prototype would still apply. */
13832+char $ac_func ();
13833+/* The GNU C library defines this for functions which it implements
13834+ to always fail with ENOSYS. Some functions are actually named
13835+ something starting with __ and the normal name is an alias. */
13836+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13837+choke me
13838+#else
13839+char (*f) () = $ac_func;
13840+#endif
13841+#ifdef __cplusplus
13842+}
13843+#endif
13844+
13845+int
13846+main ()
13847+{
13848+return f != $ac_func;
13849+ ;
13850+ return 0;
13851+}
13852+_ACEOF
13853+rm -f conftest.$ac_objext conftest$ac_exeext
13854+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13855+ (eval $ac_link) 2>&5
13856+ ac_status=$?
13857+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858+ (exit $ac_status); } &&
13859+ { ac_try='test -s conftest$ac_exeext'
13860+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13861+ (eval $ac_try) 2>&5
13862+ ac_status=$?
13863+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864+ (exit $ac_status); }; }; then
13865+ eval "$as_ac_var=yes"
13866 else
13867- rm -rf conftest*
13868- ac_cv_type_size_t=no
13869+ echo "$as_me: failed program was:" >&5
13870+sed 's/^/| /' conftest.$ac_ext >&5
13871+
13872+eval "$as_ac_var=no"
13873 fi
13874-rm -f conftest*
13875+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13876+fi
13877+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13878+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13879+if test `eval echo '${'$as_ac_var'}'` = yes; then
13880+ cat >>confdefs.h <<_ACEOF
13881+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13882+_ACEOF
13883
13884+else
13885+ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
13886 fi
13887-echo "$ac_t""$ac_cv_type_size_t" 1>&6
13888-if test $ac_cv_type_size_t = no; then
13889- cat >> confdefs.h <<\EOF
13890-#define size_t unsigned
13891-EOF
13892+done
13893+
13894+
13895+ if test $ac_cv_func_memchr = no; then
13896+
13897+
13898+ :
13899+
13900+
13901+
13902+
13903+
13904+
13905+
13906+
13907+
13908+for ac_header in bp-sym.h
13909+do
13910+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13911+if eval "test \"\${$as_ac_Header+set}\" = set"; then
13912+ echo "$as_me:$LINENO: checking for $ac_header" >&5
13913+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13914+if eval "test \"\${$as_ac_Header+set}\" = set"; then
13915+ echo $ECHO_N "(cached) $ECHO_C" >&6
13916+fi
13917+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13918+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13919+else
13920+ # Is the header compilable?
13921+echo "$as_me:$LINENO: checking $ac_header usability" >&5
13922+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13923+cat >conftest.$ac_ext <<_ACEOF
13924+#line $LINENO "configure"
13925+/* confdefs.h. */
13926+_ACEOF
13927+cat confdefs.h >>conftest.$ac_ext
13928+cat >>conftest.$ac_ext <<_ACEOF
13929+/* end confdefs.h. */
13930+$ac_includes_default
13931+#include <$ac_header>
13932+_ACEOF
13933+rm -f conftest.$ac_objext
13934+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13935+ (eval $ac_compile) 2>&5
13936+ ac_status=$?
13937+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938+ (exit $ac_status); } &&
13939+ { ac_try='test -s conftest.$ac_objext'
13940+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941+ (eval $ac_try) 2>&5
13942+ ac_status=$?
13943+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944+ (exit $ac_status); }; }; then
13945+ ac_header_compiler=yes
13946+else
13947+ echo "$as_me: failed program was:" >&5
13948+sed 's/^/| /' conftest.$ac_ext >&5
13949
13950+ac_header_compiler=no
13951 fi
13952+rm -f conftest.$ac_objext conftest.$ac_ext
13953+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13954+echo "${ECHO_T}$ac_header_compiler" >&6
13955
13956-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13957-echo "configure:2276: checking whether time.h and sys/time.h may both be included" >&5
13958-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
13959- echo $ac_n "(cached) $ac_c" 1>&6
13960+# Is the header present?
13961+echo "$as_me:$LINENO: checking $ac_header presence" >&5
13962+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13963+cat >conftest.$ac_ext <<_ACEOF
13964+#line $LINENO "configure"
13965+/* confdefs.h. */
13966+_ACEOF
13967+cat confdefs.h >>conftest.$ac_ext
13968+cat >>conftest.$ac_ext <<_ACEOF
13969+/* end confdefs.h. */
13970+#include <$ac_header>
13971+_ACEOF
13972+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13973+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13974+ ac_status=$?
13975+ grep -v '^ *+' conftest.er1 >conftest.err
13976+ rm -f conftest.er1
13977+ cat conftest.err >&5
13978+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979+ (exit $ac_status); } >/dev/null; then
13980+ if test -s conftest.err; then
13981+ ac_cpp_err=$ac_c_preproc_warn_flag
13982+ else
13983+ ac_cpp_err=
13984+ fi
13985 else
13986- cat > conftest.$ac_ext <<EOF
13987-#line 2281 "configure"
13988-#include "confdefs.h"
13989+ ac_cpp_err=yes
13990+fi
13991+if test -z "$ac_cpp_err"; then
13992+ ac_header_preproc=yes
13993+else
13994+ echo "$as_me: failed program was:" >&5
13995+sed 's/^/| /' conftest.$ac_ext >&5
13996+
13997+ ac_header_preproc=no
13998+fi
13999+rm -f conftest.err conftest.$ac_ext
14000+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14001+echo "${ECHO_T}$ac_header_preproc" >&6
14002+
14003+# So? What about this header?
14004+case $ac_header_compiler:$ac_header_preproc in
14005+ yes:no )
14006+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14007+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14008+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14009+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14010+ (
14011+ cat <<\_ASBOX
14012+## ------------------------------------ ##
14013+## Report this to bug-autoconf@gnu.org. ##
14014+## ------------------------------------ ##
14015+_ASBOX
14016+ ) |
14017+ sed "s/^/$as_me: WARNING: /" >&2
14018+ ;;
14019+ no:yes )
14020+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14021+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14022+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14023+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14024+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14025+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14026+ (
14027+ cat <<\_ASBOX
14028+## ------------------------------------ ##
14029+## Report this to bug-autoconf@gnu.org. ##
14030+## ------------------------------------ ##
14031+_ASBOX
14032+ ) |
14033+ sed "s/^/$as_me: WARNING: /" >&2
14034+ ;;
14035+esac
14036+echo "$as_me:$LINENO: checking for $ac_header" >&5
14037+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14038+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14039+ echo $ECHO_N "(cached) $ECHO_C" >&6
14040+else
14041+ eval "$as_ac_Header=$ac_header_preproc"
14042+fi
14043+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14044+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14045+
14046+fi
14047+if test `eval echo '${'$as_ac_Header'}'` = yes; then
14048+ cat >>confdefs.h <<_ACEOF
14049+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14050+_ACEOF
14051+
14052+fi
14053+
14054+done
14055+
14056+
14057+ fi
14058+
14059+echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
14060+echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
14061+if test "${ac_cv_header_stat_broken+set}" = set; then
14062+ echo $ECHO_N "(cached) $ECHO_C" >&6
14063+else
14064+ cat >conftest.$ac_ext <<_ACEOF
14065+#line $LINENO "configure"
14066+/* confdefs.h. */
14067+_ACEOF
14068+cat confdefs.h >>conftest.$ac_ext
14069+cat >>conftest.$ac_ext <<_ACEOF
14070+/* end confdefs.h. */
14071 #include <sys/types.h>
14072-#include <sys/time.h>
14073-#include <time.h>
14074-int main() {
14075-struct tm *tp;
14076-; return 0; }
14077-EOF
14078-if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14079- rm -rf conftest*
14080- ac_cv_header_time=yes
14081+#include <sys/stat.h>
14082+
14083+#if defined(S_ISBLK) && defined(S_IFDIR)
14084+# if S_ISBLK (S_IFDIR)
14085+You lose.
14086+# endif
14087+#endif
14088+
14089+#if defined(S_ISBLK) && defined(S_IFCHR)
14090+# if S_ISBLK (S_IFCHR)
14091+You lose.
14092+# endif
14093+#endif
14094+
14095+#if defined(S_ISLNK) && defined(S_IFREG)
14096+# if S_ISLNK (S_IFREG)
14097+You lose.
14098+# endif
14099+#endif
14100+
14101+#if defined(S_ISSOCK) && defined(S_IFREG)
14102+# if S_ISSOCK (S_IFREG)
14103+You lose.
14104+# endif
14105+#endif
14106+
14107+_ACEOF
14108+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14109+ $EGREP "You lose" >/dev/null 2>&1; then
14110+ ac_cv_header_stat_broken=yes
14111 else
14112- echo "configure: failed program was:" >&5
14113- cat conftest.$ac_ext >&5
14114- rm -rf conftest*
14115- ac_cv_header_time=no
14116+ ac_cv_header_stat_broken=no
14117 fi
14118 rm -f conftest*
14119+
14120 fi
14121+echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
14122+echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
14123+if test $ac_cv_header_stat_broken = yes; then
14124
14125-echo "$ac_t""$ac_cv_header_time" 1>&6
14126-if test $ac_cv_header_time = yes; then
14127- cat >> confdefs.h <<\EOF
14128-#define TIME_WITH_SYS_TIME 1
14129-EOF
14130+cat >>confdefs.h <<\_ACEOF
14131+#define STAT_MACROS_BROKEN 1
14132+_ACEOF
14133
14134 fi
14135
14136
14137- for ac_hdr in utime.h
14138+
14139+for ac_func in rmdir
14140 do
14141-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14142-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14143-echo "configure:2315: checking for $ac_hdr" >&5
14144-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14145- echo $ac_n "(cached) $ac_c" 1>&6
14146+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14147+echo "$as_me:$LINENO: checking for $ac_func" >&5
14148+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14149+if eval "test \"\${$as_ac_var+set}\" = set"; then
14150+ echo $ECHO_N "(cached) $ECHO_C" >&6
14151 else
14152- cat > conftest.$ac_ext <<EOF
14153-#line 2320 "configure"
14154-#include "confdefs.h"
14155-#include <$ac_hdr>
14156-EOF
14157-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14158-{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14159-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14160-if test -z "$ac_err"; then
14161- rm -rf conftest*
14162- eval "ac_cv_header_$ac_safe=yes"
14163+ cat >conftest.$ac_ext <<_ACEOF
14164+#line $LINENO "configure"
14165+/* confdefs.h. */
14166+_ACEOF
14167+cat confdefs.h >>conftest.$ac_ext
14168+cat >>conftest.$ac_ext <<_ACEOF
14169+/* end confdefs.h. */
14170+/* System header to define __stub macros and hopefully few prototypes,
14171+ which can conflict with char $ac_func (); below.
14172+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14173+ <limits.h> exists even on freestanding compilers. */
14174+#ifdef __STDC__
14175+# include <limits.h>
14176+#else
14177+# include <assert.h>
14178+#endif
14179+/* Override any gcc2 internal prototype to avoid an error. */
14180+#ifdef __cplusplus
14181+extern "C"
14182+{
14183+#endif
14184+/* We use char because int might match the return type of a gcc2
14185+ builtin and then its argument prototype would still apply. */
14186+char $ac_func ();
14187+/* The GNU C library defines this for functions which it implements
14188+ to always fail with ENOSYS. Some functions are actually named
14189+ something starting with __ and the normal name is an alias. */
14190+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14191+choke me
14192+#else
14193+char (*f) () = $ac_func;
14194+#endif
14195+#ifdef __cplusplus
14196+}
14197+#endif
14198+
14199+int
14200+main ()
14201+{
14202+return f != $ac_func;
14203+ ;
14204+ return 0;
14205+}
14206+_ACEOF
14207+rm -f conftest.$ac_objext conftest$ac_exeext
14208+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14209+ (eval $ac_link) 2>&5
14210+ ac_status=$?
14211+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212+ (exit $ac_status); } &&
14213+ { ac_try='test -s conftest$ac_exeext'
14214+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215+ (eval $ac_try) 2>&5
14216+ ac_status=$?
14217+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218+ (exit $ac_status); }; }; then
14219+ eval "$as_ac_var=yes"
14220 else
14221- echo "$ac_err" >&5
14222- echo "configure: failed program was:" >&5
14223- cat conftest.$ac_ext >&5
14224- rm -rf conftest*
14225- eval "ac_cv_header_$ac_safe=no"
14226+ echo "$as_me: failed program was:" >&5
14227+sed 's/^/| /' conftest.$ac_ext >&5
14228+
14229+eval "$as_ac_var=no"
14230 fi
14231-rm -f conftest*
14232+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14233 fi
14234-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14235- echo "$ac_t""yes" 1>&6
14236- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14237- cat >> confdefs.h <<EOF
14238-#define $ac_tr_hdr 1
14239-EOF
14240-
14241+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14242+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14243+if test `eval echo '${'$as_ac_var'}'` = yes; then
14244+ cat >>confdefs.h <<_ACEOF
14245+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14246+_ACEOF
14247+
14248 else
14249- echo "$ac_t""no" 1>&6
14250+ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
14251 fi
14252 done
14253
14254-
14255- echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
14256-echo "configure:2353: checking for struct utimbuf" >&5
14257-if eval "test \"`echo '$''{'fu_cv_sys_struct_utimbuf'+set}'`\" = set"; then
14258- echo $ac_n "(cached) $ac_c" 1>&6
14259+
14260+ if test $ac_cv_func_rmdir = no; then
14261+
14262+
14263+ :
14264+
14265+ fi
14266+
14267+
14268+
14269+ :
14270+
14271+
14272+
14273+
14274+
14275+
14276+
14277+for ac_header in stdlib.h
14278+do
14279+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14280+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14281+ echo "$as_me:$LINENO: checking for $ac_header" >&5
14282+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14283+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14284+ echo $ECHO_N "(cached) $ECHO_C" >&6
14285+fi
14286+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14287+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14288 else
14289- cat > conftest.$ac_ext <<EOF
14290-#line 2358 "configure"
14291-#include "confdefs.h"
14292+ # Is the header compilable?
14293+echo "$as_me:$LINENO: checking $ac_header usability" >&5
14294+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14295+cat >conftest.$ac_ext <<_ACEOF
14296+#line $LINENO "configure"
14297+/* confdefs.h. */
14298+_ACEOF
14299+cat confdefs.h >>conftest.$ac_ext
14300+cat >>conftest.$ac_ext <<_ACEOF
14301+/* end confdefs.h. */
14302+$ac_includes_default
14303+#include <$ac_header>
14304+_ACEOF
14305+rm -f conftest.$ac_objext
14306+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14307+ (eval $ac_compile) 2>&5
14308+ ac_status=$?
14309+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310+ (exit $ac_status); } &&
14311+ { ac_try='test -s conftest.$ac_objext'
14312+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14313+ (eval $ac_try) 2>&5
14314+ ac_status=$?
14315+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316+ (exit $ac_status); }; }; then
14317+ ac_header_compiler=yes
14318+else
14319+ echo "$as_me: failed program was:" >&5
14320+sed 's/^/| /' conftest.$ac_ext >&5
14321
14322-#ifdef TIME_WITH_SYS_TIME
14323-# include <sys/time.h>
14324-# include <time.h>
14325+ac_header_compiler=no
14326+fi
14327+rm -f conftest.$ac_objext conftest.$ac_ext
14328+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14329+echo "${ECHO_T}$ac_header_compiler" >&6
14330+
14331+# Is the header present?
14332+echo "$as_me:$LINENO: checking $ac_header presence" >&5
14333+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14334+cat >conftest.$ac_ext <<_ACEOF
14335+#line $LINENO "configure"
14336+/* confdefs.h. */
14337+_ACEOF
14338+cat confdefs.h >>conftest.$ac_ext
14339+cat >>conftest.$ac_ext <<_ACEOF
14340+/* end confdefs.h. */
14341+#include <$ac_header>
14342+_ACEOF
14343+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14344+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14345+ ac_status=$?
14346+ grep -v '^ *+' conftest.er1 >conftest.err
14347+ rm -f conftest.er1
14348+ cat conftest.err >&5
14349+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350+ (exit $ac_status); } >/dev/null; then
14351+ if test -s conftest.err; then
14352+ ac_cpp_err=$ac_c_preproc_warn_flag
14353+ else
14354+ ac_cpp_err=
14355+ fi
14356+else
14357+ ac_cpp_err=yes
14358+fi
14359+if test -z "$ac_cpp_err"; then
14360+ ac_header_preproc=yes
14361+else
14362+ echo "$as_me: failed program was:" >&5
14363+sed 's/^/| /' conftest.$ac_ext >&5
14364+
14365+ ac_header_preproc=no
14366+fi
14367+rm -f conftest.err conftest.$ac_ext
14368+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14369+echo "${ECHO_T}$ac_header_preproc" >&6
14370+
14371+# So? What about this header?
14372+case $ac_header_compiler:$ac_header_preproc in
14373+ yes:no )
14374+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14375+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14376+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14377+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14378+ (
14379+ cat <<\_ASBOX
14380+## ------------------------------------ ##
14381+## Report this to bug-autoconf@gnu.org. ##
14382+## ------------------------------------ ##
14383+_ASBOX
14384+ ) |
14385+ sed "s/^/$as_me: WARNING: /" >&2
14386+ ;;
14387+ no:yes )
14388+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14389+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14390+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14391+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14392+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14393+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14394+ (
14395+ cat <<\_ASBOX
14396+## ------------------------------------ ##
14397+## Report this to bug-autoconf@gnu.org. ##
14398+## ------------------------------------ ##
14399+_ASBOX
14400+ ) |
14401+ sed "s/^/$as_me: WARNING: /" >&2
14402+ ;;
14403+esac
14404+echo "$as_me:$LINENO: checking for $ac_header" >&5
14405+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14406+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14407+ echo $ECHO_N "(cached) $ECHO_C" >&6
14408+else
14409+ eval "$as_ac_Header=$ac_header_preproc"
14410+fi
14411+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14412+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14413+
14414+fi
14415+if test `eval echo '${'$as_ac_Header'}'` = yes; then
14416+ cat >>confdefs.h <<_ACEOF
14417+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14418+_ACEOF
14419+
14420+fi
14421+
14422+done
14423+
14424+echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
14425+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
14426+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
14427+ echo $ECHO_N "(cached) $ECHO_C" >&6
14428+else
14429+ if test "$cross_compiling" = yes; then
14430+ ac_cv_func_malloc_0_nonnull=no
14431+else
14432+ cat >conftest.$ac_ext <<_ACEOF
14433+#line $LINENO "configure"
14434+/* confdefs.h. */
14435+_ACEOF
14436+cat confdefs.h >>conftest.$ac_ext
14437+cat >>conftest.$ac_ext <<_ACEOF
14438+/* end confdefs.h. */
14439+#if STDC_HEADERS || HAVE_STDLIB_H
14440+# include <stdlib.h>
14441 #else
14442-# ifdef HAVE_SYS_TIME_H
14443-# include <sys/time.h>
14444-# else
14445-# include <time.h>
14446-# endif
14447+char *malloc ();
14448 #endif
14449-#ifdef HAVE_UTIME_H
14450-# include <utime.h>
14451+
14452+int
14453+main ()
14454+{
14455+exit (malloc (0) ? 0 : 1);
14456+ ;
14457+ return 0;
14458+}
14459+_ACEOF
14460+rm -f conftest$ac_exeext
14461+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14462+ (eval $ac_link) 2>&5
14463+ ac_status=$?
14464+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14466+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467+ (eval $ac_try) 2>&5
14468+ ac_status=$?
14469+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470+ (exit $ac_status); }; }; then
14471+ ac_cv_func_malloc_0_nonnull=yes
14472+else
14473+ echo "$as_me: program exited with status $ac_status" >&5
14474+echo "$as_me: failed program was:" >&5
14475+sed 's/^/| /' conftest.$ac_ext >&5
14476+
14477+( exit $ac_status )
14478+ac_cv_func_malloc_0_nonnull=no
14479+fi
14480+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14481+fi
14482+fi
14483+echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
14484+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
14485+if test $ac_cv_func_malloc_0_nonnull = yes; then
14486+
14487+cat >>confdefs.h <<\_ACEOF
14488+#define HAVE_MALLOC 1
14489+_ACEOF
14490+
14491+else
14492+ cat >>confdefs.h <<\_ACEOF
14493+#define HAVE_MALLOC 0
14494+_ACEOF
14495+
14496+ LIBOBJS="$LIBOBJS malloc.$ac_objext"
14497+
14498+cat >>confdefs.h <<\_ACEOF
14499+#define malloc rpl_malloc
14500+_ACEOF
14501+
14502+fi
14503+
14504+
14505+
14506+
14507+
14508+ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
14509+
14510+ :
14511+
14512+ fi
14513+
14514+
14515+for ac_header in stdlib.h
14516+do
14517+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14518+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14519+ echo "$as_me:$LINENO: checking for $ac_header" >&5
14520+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14521+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14522+ echo $ECHO_N "(cached) $ECHO_C" >&6
14523+fi
14524+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14525+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14526+else
14527+ # Is the header compilable?
14528+echo "$as_me:$LINENO: checking $ac_header usability" >&5
14529+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14530+cat >conftest.$ac_ext <<_ACEOF
14531+#line $LINENO "configure"
14532+/* confdefs.h. */
14533+_ACEOF
14534+cat confdefs.h >>conftest.$ac_ext
14535+cat >>conftest.$ac_ext <<_ACEOF
14536+/* end confdefs.h. */
14537+$ac_includes_default
14538+#include <$ac_header>
14539+_ACEOF
14540+rm -f conftest.$ac_objext
14541+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14542+ (eval $ac_compile) 2>&5
14543+ ac_status=$?
14544+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545+ (exit $ac_status); } &&
14546+ { ac_try='test -s conftest.$ac_objext'
14547+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14548+ (eval $ac_try) 2>&5
14549+ ac_status=$?
14550+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551+ (exit $ac_status); }; }; then
14552+ ac_header_compiler=yes
14553+else
14554+ echo "$as_me: failed program was:" >&5
14555+sed 's/^/| /' conftest.$ac_ext >&5
14556+
14557+ac_header_compiler=no
14558+fi
14559+rm -f conftest.$ac_objext conftest.$ac_ext
14560+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14561+echo "${ECHO_T}$ac_header_compiler" >&6
14562+
14563+# Is the header present?
14564+echo "$as_me:$LINENO: checking $ac_header presence" >&5
14565+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14566+cat >conftest.$ac_ext <<_ACEOF
14567+#line $LINENO "configure"
14568+/* confdefs.h. */
14569+_ACEOF
14570+cat confdefs.h >>conftest.$ac_ext
14571+cat >>conftest.$ac_ext <<_ACEOF
14572+/* end confdefs.h. */
14573+#include <$ac_header>
14574+_ACEOF
14575+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14576+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14577+ ac_status=$?
14578+ grep -v '^ *+' conftest.er1 >conftest.err
14579+ rm -f conftest.er1
14580+ cat conftest.err >&5
14581+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582+ (exit $ac_status); } >/dev/null; then
14583+ if test -s conftest.err; then
14584+ ac_cpp_err=$ac_c_preproc_warn_flag
14585+ else
14586+ ac_cpp_err=
14587+ fi
14588+else
14589+ ac_cpp_err=yes
14590+fi
14591+if test -z "$ac_cpp_err"; then
14592+ ac_header_preproc=yes
14593+else
14594+ echo "$as_me: failed program was:" >&5
14595+sed 's/^/| /' conftest.$ac_ext >&5
14596+
14597+ ac_header_preproc=no
14598+fi
14599+rm -f conftest.err conftest.$ac_ext
14600+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14601+echo "${ECHO_T}$ac_header_preproc" >&6
14602+
14603+# So? What about this header?
14604+case $ac_header_compiler:$ac_header_preproc in
14605+ yes:no )
14606+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14607+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14608+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14609+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14610+ (
14611+ cat <<\_ASBOX
14612+## ------------------------------------ ##
14613+## Report this to bug-autoconf@gnu.org. ##
14614+## ------------------------------------ ##
14615+_ASBOX
14616+ ) |
14617+ sed "s/^/$as_me: WARNING: /" >&2
14618+ ;;
14619+ no:yes )
14620+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14621+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14622+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14623+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14624+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14625+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14626+ (
14627+ cat <<\_ASBOX
14628+## ------------------------------------ ##
14629+## Report this to bug-autoconf@gnu.org. ##
14630+## ------------------------------------ ##
14631+_ASBOX
14632+ ) |
14633+ sed "s/^/$as_me: WARNING: /" >&2
14634+ ;;
14635+esac
14636+echo "$as_me:$LINENO: checking for $ac_header" >&5
14637+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14638+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14639+ echo $ECHO_N "(cached) $ECHO_C" >&6
14640+else
14641+ eval "$as_ac_Header=$ac_header_preproc"
14642+fi
14643+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14644+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14645+
14646+fi
14647+if test `eval echo '${'$as_ac_Header'}'` = yes; then
14648+ cat >>confdefs.h <<_ACEOF
14649+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14650+_ACEOF
14651+
14652+fi
14653+
14654+done
14655+
14656+echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
14657+echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
14658+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
14659+ echo $ECHO_N "(cached) $ECHO_C" >&6
14660+else
14661+ if test "$cross_compiling" = yes; then
14662+ ac_cv_func_realloc_0_nonnull=no
14663+else
14664+ cat >conftest.$ac_ext <<_ACEOF
14665+#line $LINENO "configure"
14666+/* confdefs.h. */
14667+_ACEOF
14668+cat confdefs.h >>conftest.$ac_ext
14669+cat >>conftest.$ac_ext <<_ACEOF
14670+/* end confdefs.h. */
14671+#if STDC_HEADERS || HAVE_STDLIB_H
14672+# include <stdlib.h>
14673+#else
14674+char *realloc ();
14675 #endif
14676-
14677-int main() {
14678-static struct utimbuf x; x.actime = x.modtime;
14679-; return 0; }
14680-EOF
14681-if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14682- rm -rf conftest*
14683- fu_cv_sys_struct_utimbuf=yes
14684+
14685+int
14686+main ()
14687+{
14688+exit (realloc (0, 0) ? 0 : 1);
14689+ ;
14690+ return 0;
14691+}
14692+_ACEOF
14693+rm -f conftest$ac_exeext
14694+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14695+ (eval $ac_link) 2>&5
14696+ ac_status=$?
14697+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14699+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14700+ (eval $ac_try) 2>&5
14701+ ac_status=$?
14702+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14703+ (exit $ac_status); }; }; then
14704+ ac_cv_func_realloc_0_nonnull=yes
14705 else
14706- echo "configure: failed program was:" >&5
14707- cat conftest.$ac_ext >&5
14708- rm -rf conftest*
14709- fu_cv_sys_struct_utimbuf=no
14710+ echo "$as_me: program exited with status $ac_status" >&5
14711+echo "$as_me: failed program was:" >&5
14712+sed 's/^/| /' conftest.$ac_ext >&5
14713+
14714+( exit $ac_status )
14715+ac_cv_func_realloc_0_nonnull=no
14716 fi
14717-rm -f conftest*
14718-
14719+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14720+fi
14721+fi
14722+echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
14723+echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
14724+if test $ac_cv_func_realloc_0_nonnull = yes; then
14725+
14726+cat >>confdefs.h <<\_ACEOF
14727+#define HAVE_REALLOC 1
14728+_ACEOF
14729+
14730+else
14731+ cat >>confdefs.h <<\_ACEOF
14732+#define HAVE_REALLOC 0
14733+_ACEOF
14734+
14735+ LIBOBJS="$LIBOBJS realloc.$ac_objext"
14736+
14737+cat >>confdefs.h <<\_ACEOF
14738+#define realloc rpl_realloc
14739+_ACEOF
14740+
14741 fi
14742
14743-echo "$ac_t""$fu_cv_sys_struct_utimbuf" 1>&6
14744
14745- if test $fu_cv_sys_struct_utimbuf = yes; then
14746- cat >> confdefs.h <<EOF
14747-#define HAVE_STRUCT_UTIMBUF 1
14748-EOF
14749+
14750+
14751+
14752+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
14753+
14754+ :
14755
14756 fi
14757
14758
14759-echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
14760-echo "configure:2403: checking for getopt_long" >&5
14761-if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
14762- echo $ac_n "(cached) $ac_c" 1>&6
14763+
14764+
14765+
14766+
14767+
14768+
14769+for ac_header in stddef.h
14770+do
14771+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14772+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14773+ echo "$as_me:$LINENO: checking for $ac_header" >&5
14774+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14775+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14776+ echo $ECHO_N "(cached) $ECHO_C" >&6
14777+fi
14778+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14779+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14780 else
14781- cat > conftest.$ac_ext <<EOF
14782-#line 2408 "configure"
14783-#include "confdefs.h"
14784+ # Is the header compilable?
14785+echo "$as_me:$LINENO: checking $ac_header usability" >&5
14786+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14787+cat >conftest.$ac_ext <<_ACEOF
14788+#line $LINENO "configure"
14789+/* confdefs.h. */
14790+_ACEOF
14791+cat confdefs.h >>conftest.$ac_ext
14792+cat >>conftest.$ac_ext <<_ACEOF
14793+/* end confdefs.h. */
14794+$ac_includes_default
14795+#include <$ac_header>
14796+_ACEOF
14797+rm -f conftest.$ac_objext
14798+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799+ (eval $ac_compile) 2>&5
14800+ ac_status=$?
14801+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802+ (exit $ac_status); } &&
14803+ { ac_try='test -s conftest.$ac_objext'
14804+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805+ (eval $ac_try) 2>&5
14806+ ac_status=$?
14807+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808+ (exit $ac_status); }; }; then
14809+ ac_header_compiler=yes
14810+else
14811+ echo "$as_me: failed program was:" >&5
14812+sed 's/^/| /' conftest.$ac_ext >&5
14813+
14814+ac_header_compiler=no
14815+fi
14816+rm -f conftest.$ac_objext conftest.$ac_ext
14817+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14818+echo "${ECHO_T}$ac_header_compiler" >&6
14819+
14820+# Is the header present?
14821+echo "$as_me:$LINENO: checking $ac_header presence" >&5
14822+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14823+cat >conftest.$ac_ext <<_ACEOF
14824+#line $LINENO "configure"
14825+/* confdefs.h. */
14826+_ACEOF
14827+cat confdefs.h >>conftest.$ac_ext
14828+cat >>conftest.$ac_ext <<_ACEOF
14829+/* end confdefs.h. */
14830+#include <$ac_header>
14831+_ACEOF
14832+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14833+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14834+ ac_status=$?
14835+ grep -v '^ *+' conftest.er1 >conftest.err
14836+ rm -f conftest.er1
14837+ cat conftest.err >&5
14838+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839+ (exit $ac_status); } >/dev/null; then
14840+ if test -s conftest.err; then
14841+ ac_cpp_err=$ac_c_preproc_warn_flag
14842+ else
14843+ ac_cpp_err=
14844+ fi
14845+else
14846+ ac_cpp_err=yes
14847+fi
14848+if test -z "$ac_cpp_err"; then
14849+ ac_header_preproc=yes
14850+else
14851+ echo "$as_me: failed program was:" >&5
14852+sed 's/^/| /' conftest.$ac_ext >&5
14853+
14854+ ac_header_preproc=no
14855+fi
14856+rm -f conftest.err conftest.$ac_ext
14857+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14858+echo "${ECHO_T}$ac_header_preproc" >&6
14859+
14860+# So? What about this header?
14861+case $ac_header_compiler:$ac_header_preproc in
14862+ yes:no )
14863+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14864+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14865+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14866+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14867+ (
14868+ cat <<\_ASBOX
14869+## ------------------------------------ ##
14870+## Report this to bug-autoconf@gnu.org. ##
14871+## ------------------------------------ ##
14872+_ASBOX
14873+ ) |
14874+ sed "s/^/$as_me: WARNING: /" >&2
14875+ ;;
14876+ no:yes )
14877+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14878+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14879+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14880+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14881+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14882+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14883+ (
14884+ cat <<\_ASBOX
14885+## ------------------------------------ ##
14886+## Report this to bug-autoconf@gnu.org. ##
14887+## ------------------------------------ ##
14888+_ASBOX
14889+ ) |
14890+ sed "s/^/$as_me: WARNING: /" >&2
14891+ ;;
14892+esac
14893+echo "$as_me:$LINENO: checking for $ac_header" >&5
14894+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14895+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14896+ echo $ECHO_N "(cached) $ECHO_C" >&6
14897+else
14898+ eval "$as_ac_Header=$ac_header_preproc"
14899+fi
14900+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14901+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14902+
14903+fi
14904+if test `eval echo '${'$as_ac_Header'}'` = yes; then
14905+ cat >>confdefs.h <<_ACEOF
14906+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14907+_ACEOF
14908+
14909+fi
14910+
14911+done
14912+
14913+
14914+
14915+
14916+ :
14917+
14918+
14919+
14920+
14921+
14922+
14923+
14924+
14925+for ac_header in wchar.h
14926+do
14927+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14928+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14929+ echo "$as_me:$LINENO: checking for $ac_header" >&5
14930+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14931+if eval "test \"\${$as_ac_Header+set}\" = set"; then
14932+ echo $ECHO_N "(cached) $ECHO_C" >&6
14933+fi
14934+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14935+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14936+else
14937+ # Is the header compilable?
14938+echo "$as_me:$LINENO: checking $ac_header usability" >&5
14939+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14940+cat >conftest.$ac_ext <<_ACEOF
14941+#line $LINENO "configure"
14942+/* confdefs.h. */
14943+_ACEOF
14944+cat confdefs.h >>conftest.$ac_ext
14945+cat >>conftest.$ac_ext <<_ACEOF
14946+/* end confdefs.h. */
14947+$ac_includes_default
14948+#include <$ac_header>
14949+_ACEOF
14950+rm -f conftest.$ac_objext
14951+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14952+ (eval $ac_compile) 2>&5
14953+ ac_status=$?
14954+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14955+ (exit $ac_status); } &&
14956+ { ac_try='test -s conftest.$ac_objext'
14957+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14958+ (eval $ac_try) 2>&5
14959+ ac_status=$?
14960+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961+ (exit $ac_status); }; }; then
14962+ ac_header_compiler=yes
14963+else
14964+ echo "$as_me: failed program was:" >&5
14965+sed 's/^/| /' conftest.$ac_ext >&5
14966+
14967+ac_header_compiler=no
14968+fi
14969+rm -f conftest.$ac_objext conftest.$ac_ext
14970+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14971+echo "${ECHO_T}$ac_header_compiler" >&6
14972+
14973+# Is the header present?
14974+echo "$as_me:$LINENO: checking $ac_header presence" >&5
14975+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14976+cat >conftest.$ac_ext <<_ACEOF
14977+#line $LINENO "configure"
14978+/* confdefs.h. */
14979+_ACEOF
14980+cat confdefs.h >>conftest.$ac_ext
14981+cat >>conftest.$ac_ext <<_ACEOF
14982+/* end confdefs.h. */
14983+#include <$ac_header>
14984+_ACEOF
14985+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14986+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14987+ ac_status=$?
14988+ grep -v '^ *+' conftest.er1 >conftest.err
14989+ rm -f conftest.er1
14990+ cat conftest.err >&5
14991+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14992+ (exit $ac_status); } >/dev/null; then
14993+ if test -s conftest.err; then
14994+ ac_cpp_err=$ac_c_preproc_warn_flag
14995+ else
14996+ ac_cpp_err=
14997+ fi
14998+else
14999+ ac_cpp_err=yes
15000+fi
15001+if test -z "$ac_cpp_err"; then
15002+ ac_header_preproc=yes
15003+else
15004+ echo "$as_me: failed program was:" >&5
15005+sed 's/^/| /' conftest.$ac_ext >&5
15006+
15007+ ac_header_preproc=no
15008+fi
15009+rm -f conftest.err conftest.$ac_ext
15010+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15011+echo "${ECHO_T}$ac_header_preproc" >&6
15012+
15013+# So? What about this header?
15014+case $ac_header_compiler:$ac_header_preproc in
15015+ yes:no )
15016+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15017+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15018+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15019+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15020+ (
15021+ cat <<\_ASBOX
15022+## ------------------------------------ ##
15023+## Report this to bug-autoconf@gnu.org. ##
15024+## ------------------------------------ ##
15025+_ASBOX
15026+ ) |
15027+ sed "s/^/$as_me: WARNING: /" >&2
15028+ ;;
15029+ no:yes )
15030+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15031+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15032+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15033+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15034+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15035+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15036+ (
15037+ cat <<\_ASBOX
15038+## ------------------------------------ ##
15039+## Report this to bug-autoconf@gnu.org. ##
15040+## ------------------------------------ ##
15041+_ASBOX
15042+ ) |
15043+ sed "s/^/$as_me: WARNING: /" >&2
15044+ ;;
15045+esac
15046+echo "$as_me:$LINENO: checking for $ac_header" >&5
15047+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15048+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15049+ echo $ECHO_N "(cached) $ECHO_C" >&6
15050+else
15051+ eval "$as_ac_Header=$ac_header_preproc"
15052+fi
15053+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15054+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15055+
15056+fi
15057+if test `eval echo '${'$as_ac_Header'}'` = yes; then
15058+ cat >>confdefs.h <<_ACEOF
15059+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15060+_ACEOF
15061+
15062+fi
15063+
15064+done
15065+
15066+
15067+
15068+
15069+for ac_header in wctype.h
15070+do
15071+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15072+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15073+ echo "$as_me:$LINENO: checking for $ac_header" >&5
15074+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15075+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15076+ echo $ECHO_N "(cached) $ECHO_C" >&6
15077+fi
15078+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15079+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15080+else
15081+ # Is the header compilable?
15082+echo "$as_me:$LINENO: checking $ac_header usability" >&5
15083+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15084+cat >conftest.$ac_ext <<_ACEOF
15085+#line $LINENO "configure"
15086+/* confdefs.h. */
15087+_ACEOF
15088+cat confdefs.h >>conftest.$ac_ext
15089+cat >>conftest.$ac_ext <<_ACEOF
15090+/* end confdefs.h. */
15091+$ac_includes_default
15092+#include <$ac_header>
15093+_ACEOF
15094+rm -f conftest.$ac_objext
15095+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15096+ (eval $ac_compile) 2>&5
15097+ ac_status=$?
15098+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099+ (exit $ac_status); } &&
15100+ { ac_try='test -s conftest.$ac_objext'
15101+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15102+ (eval $ac_try) 2>&5
15103+ ac_status=$?
15104+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105+ (exit $ac_status); }; }; then
15106+ ac_header_compiler=yes
15107+else
15108+ echo "$as_me: failed program was:" >&5
15109+sed 's/^/| /' conftest.$ac_ext >&5
15110+
15111+ac_header_compiler=no
15112+fi
15113+rm -f conftest.$ac_objext conftest.$ac_ext
15114+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15115+echo "${ECHO_T}$ac_header_compiler" >&6
15116+
15117+# Is the header present?
15118+echo "$as_me:$LINENO: checking $ac_header presence" >&5
15119+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15120+cat >conftest.$ac_ext <<_ACEOF
15121+#line $LINENO "configure"
15122+/* confdefs.h. */
15123+_ACEOF
15124+cat confdefs.h >>conftest.$ac_ext
15125+cat >>conftest.$ac_ext <<_ACEOF
15126+/* end confdefs.h. */
15127+#include <$ac_header>
15128+_ACEOF
15129+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15130+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15131+ ac_status=$?
15132+ grep -v '^ *+' conftest.er1 >conftest.err
15133+ rm -f conftest.er1
15134+ cat conftest.err >&5
15135+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136+ (exit $ac_status); } >/dev/null; then
15137+ if test -s conftest.err; then
15138+ ac_cpp_err=$ac_c_preproc_warn_flag
15139+ else
15140+ ac_cpp_err=
15141+ fi
15142+else
15143+ ac_cpp_err=yes
15144+fi
15145+if test -z "$ac_cpp_err"; then
15146+ ac_header_preproc=yes
15147+else
15148+ echo "$as_me: failed program was:" >&5
15149+sed 's/^/| /' conftest.$ac_ext >&5
15150+
15151+ ac_header_preproc=no
15152+fi
15153+rm -f conftest.err conftest.$ac_ext
15154+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15155+echo "${ECHO_T}$ac_header_preproc" >&6
15156+
15157+# So? What about this header?
15158+case $ac_header_compiler:$ac_header_preproc in
15159+ yes:no )
15160+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15161+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15162+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15163+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15164+ (
15165+ cat <<\_ASBOX
15166+## ------------------------------------ ##
15167+## Report this to bug-autoconf@gnu.org. ##
15168+## ------------------------------------ ##
15169+_ASBOX
15170+ ) |
15171+ sed "s/^/$as_me: WARNING: /" >&2
15172+ ;;
15173+ no:yes )
15174+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15175+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15176+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15177+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15178+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15179+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15180+ (
15181+ cat <<\_ASBOX
15182+## ------------------------------------ ##
15183+## Report this to bug-autoconf@gnu.org. ##
15184+## ------------------------------------ ##
15185+_ASBOX
15186+ ) |
15187+ sed "s/^/$as_me: WARNING: /" >&2
15188+ ;;
15189+esac
15190+echo "$as_me:$LINENO: checking for $ac_header" >&5
15191+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15192+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15193+ echo $ECHO_N "(cached) $ECHO_C" >&6
15194+else
15195+ eval "$as_ac_Header=$ac_header_preproc"
15196+fi
15197+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15198+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15199+
15200+fi
15201+if test `eval echo '${'$as_ac_Header'}'` = yes; then
15202+ cat >>confdefs.h <<_ACEOF
15203+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15204+_ACEOF
15205+
15206+fi
15207+
15208+done
15209+
15210+
15211+
15212+
15213+for ac_func in iswprint
15214+do
15215+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15216+echo "$as_me:$LINENO: checking for $ac_func" >&5
15217+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15218+if eval "test \"\${$as_ac_var+set}\" = set"; then
15219+ echo $ECHO_N "(cached) $ECHO_C" >&6
15220+else
15221+ cat >conftest.$ac_ext <<_ACEOF
15222+#line $LINENO "configure"
15223+/* confdefs.h. */
15224+_ACEOF
15225+cat confdefs.h >>conftest.$ac_ext
15226+cat >>conftest.$ac_ext <<_ACEOF
15227+/* end confdefs.h. */
15228 /* System header to define __stub macros and hopefully few prototypes,
15229- which can conflict with char getopt_long(); below. */
15230-#include <assert.h>
15231+ which can conflict with char $ac_func (); below.
15232+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15233+ <limits.h> exists even on freestanding compilers. */
15234+#ifdef __STDC__
15235+# include <limits.h>
15236+#else
15237+# include <assert.h>
15238+#endif
15239 /* Override any gcc2 internal prototype to avoid an error. */
15240+#ifdef __cplusplus
15241+extern "C"
15242+{
15243+#endif
15244 /* We use char because int might match the return type of a gcc2
15245- builtin and then its argument prototype would still apply. */
15246-char getopt_long();
15247+ builtin and then its argument prototype would still apply. */
15248+char $ac_func ();
15249+/* The GNU C library defines this for functions which it implements
15250+ to always fail with ENOSYS. Some functions are actually named
15251+ something starting with __ and the normal name is an alias. */
15252+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15253+choke me
15254+#else
15255+char (*f) () = $ac_func;
15256+#endif
15257+#ifdef __cplusplus
15258+}
15259+#endif
15260
15261-int main() {
15262+int
15263+main ()
15264+{
15265+return f != $ac_func;
15266+ ;
15267+ return 0;
15268+}
15269+_ACEOF
15270+rm -f conftest.$ac_objext conftest$ac_exeext
15271+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15272+ (eval $ac_link) 2>&5
15273+ ac_status=$?
15274+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15275+ (exit $ac_status); } &&
15276+ { ac_try='test -s conftest$ac_exeext'
15277+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278+ (eval $ac_try) 2>&5
15279+ ac_status=$?
15280+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281+ (exit $ac_status); }; }; then
15282+ eval "$as_ac_var=yes"
15283+else
15284+ echo "$as_me: failed program was:" >&5
15285+sed 's/^/| /' conftest.$ac_ext >&5
15286
15287+eval "$as_ac_var=no"
15288+fi
15289+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290+fi
15291+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15292+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15293+if test `eval echo '${'$as_ac_var'}'` = yes; then
15294+ cat >>confdefs.h <<_ACEOF
15295+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15296+_ACEOF
15297+
15298+fi
15299+done
15300+
15301+
15302+
15303+
15304+for ac_func in mbsinit
15305+do
15306+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15307+echo "$as_me:$LINENO: checking for $ac_func" >&5
15308+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15309+if eval "test \"\${$as_ac_var+set}\" = set"; then
15310+ echo $ECHO_N "(cached) $ECHO_C" >&6
15311+else
15312+ cat >conftest.$ac_ext <<_ACEOF
15313+#line $LINENO "configure"
15314+/* confdefs.h. */
15315+_ACEOF
15316+cat confdefs.h >>conftest.$ac_ext
15317+cat >>conftest.$ac_ext <<_ACEOF
15318+/* end confdefs.h. */
15319+/* System header to define __stub macros and hopefully few prototypes,
15320+ which can conflict with char $ac_func (); below.
15321+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15322+ <limits.h> exists even on freestanding compilers. */
15323+#ifdef __STDC__
15324+# include <limits.h>
15325+#else
15326+# include <assert.h>
15327+#endif
15328+/* Override any gcc2 internal prototype to avoid an error. */
15329+#ifdef __cplusplus
15330+extern "C"
15331+{
15332+#endif
15333+/* We use char because int might match the return type of a gcc2
15334+ builtin and then its argument prototype would still apply. */
15335+char $ac_func ();
15336 /* The GNU C library defines this for functions which it implements
15337 to always fail with ENOSYS. Some functions are actually named
15338 something starting with __ and the normal name is an alias. */
15339-#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
15340+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15341 choke me
15342 #else
15343-getopt_long();
15344+char (*f) () = $ac_func;
15345+#endif
15346+#ifdef __cplusplus
15347+}
15348 #endif
15349
15350-; return 0; }
15351-EOF
15352-if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15353- rm -rf conftest*
15354- eval "ac_cv_func_getopt_long=yes"
15355+int
15356+main ()
15357+{
15358+return f != $ac_func;
15359+ ;
15360+ return 0;
15361+}
15362+_ACEOF
15363+rm -f conftest.$ac_objext conftest$ac_exeext
15364+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15365+ (eval $ac_link) 2>&5
15366+ ac_status=$?
15367+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368+ (exit $ac_status); } &&
15369+ { ac_try='test -s conftest$ac_exeext'
15370+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15371+ (eval $ac_try) 2>&5
15372+ ac_status=$?
15373+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374+ (exit $ac_status); }; }; then
15375+ eval "$as_ac_var=yes"
15376 else
15377- echo "configure: failed program was:" >&5
15378- cat conftest.$ac_ext >&5
15379- rm -rf conftest*
15380- eval "ac_cv_func_getopt_long=no"
15381+ echo "$as_me: failed program was:" >&5
15382+sed 's/^/| /' conftest.$ac_ext >&5
15383+
15384+eval "$as_ac_var=no"
15385 fi
15386-rm -f conftest*
15387+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15388 fi
15389+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15390+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15391+if test `eval echo '${'$as_ac_var'}'` = yes; then
15392+ cat >>confdefs.h <<_ACEOF
15393+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15394+_ACEOF
15395+
15396+fi
15397+done
15398+
15399+
15400+
15401+
15402+ :
15403+
15404+
15405+
15406+
15407+
15408+
15409+
15410+
15411
15412-if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
15413- echo "$ac_t""yes" 1>&6
15414 :
15415+
15416+
15417+
15418+
15419+
15420+
15421+
15422+
15423+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
15424+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
15425+if test "${ac_cv_type_mbstate_t+set}" = set; then
15426+ echo $ECHO_N "(cached) $ECHO_C" >&6
15427 else
15428- echo "$ac_t""no" 1>&6
15429-LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"
15430+ cat >conftest.$ac_ext <<_ACEOF
15431+#line $LINENO "configure"
15432+/* confdefs.h. */
15433+_ACEOF
15434+cat confdefs.h >>conftest.$ac_ext
15435+cat >>conftest.$ac_ext <<_ACEOF
15436+/* end confdefs.h. */
15437+$ac_includes_default
15438+# include <wchar.h>
15439+int
15440+main ()
15441+{
15442+mbstate_t x; return sizeof x;
15443+ ;
15444+ return 0;
15445+}
15446+_ACEOF
15447+rm -f conftest.$ac_objext
15448+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15449+ (eval $ac_compile) 2>&5
15450+ ac_status=$?
15451+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452+ (exit $ac_status); } &&
15453+ { ac_try='test -s conftest.$ac_objext'
15454+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455+ (eval $ac_try) 2>&5
15456+ ac_status=$?
15457+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458+ (exit $ac_status); }; }; then
15459+ ac_cv_type_mbstate_t=yes
15460+else
15461+ echo "$as_me: failed program was:" >&5
15462+sed 's/^/| /' conftest.$ac_ext >&5
15463+
15464+ac_cv_type_mbstate_t=no
15465+fi
15466+rm -f conftest.$ac_objext conftest.$ac_ext
15467 fi
15468+echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
15469+echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
15470+ if test $ac_cv_type_mbstate_t = yes; then
15471+
15472+cat >>confdefs.h <<\_ACEOF
15473+#define HAVE_MBSTATE_T 1
15474+_ACEOF
15475
15476+ else
15477
15478-for ac_func in _doprintf isascii fseeko memcmp mktemp \
15479- pathconf raise setmode sigaction sigprocmask sigsetmask strerror
15480+cat >>confdefs.h <<\_ACEOF
15481+#define mbstate_t int
15482+_ACEOF
15483+
15484+ fi
15485+
15486+ echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
15487+echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
15488+if test "${jm_cv_func_mbrtowc+set}" = set; then
15489+ echo $ECHO_N "(cached) $ECHO_C" >&6
15490+else
15491+ cat >conftest.$ac_ext <<_ACEOF
15492+#line $LINENO "configure"
15493+/* confdefs.h. */
15494+_ACEOF
15495+cat confdefs.h >>conftest.$ac_ext
15496+cat >>conftest.$ac_ext <<_ACEOF
15497+/* end confdefs.h. */
15498+#include <wchar.h>
15499+int
15500+main ()
15501+{
15502+mbstate_t state; return ! (sizeof state && mbrtowc);
15503+ ;
15504+ return 0;
15505+}
15506+_ACEOF
15507+rm -f conftest.$ac_objext conftest$ac_exeext
15508+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15509+ (eval $ac_link) 2>&5
15510+ ac_status=$?
15511+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512+ (exit $ac_status); } &&
15513+ { ac_try='test -s conftest$ac_exeext'
15514+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15515+ (eval $ac_try) 2>&5
15516+ ac_status=$?
15517+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518+ (exit $ac_status); }; }; then
15519+ jm_cv_func_mbrtowc=yes
15520+else
15521+ echo "$as_me: failed program was:" >&5
15522+sed 's/^/| /' conftest.$ac_ext >&5
15523+
15524+jm_cv_func_mbrtowc=no
15525+fi
15526+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15527+fi
15528+echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
15529+echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
15530+ if test $jm_cv_func_mbrtowc = yes; then
15531+
15532+cat >>confdefs.h <<\_ACEOF
15533+#define HAVE_MBRTOWC 1
15534+_ACEOF
15535+
15536+ fi
15537+
15538+
15539+
15540+
15541+
15542+
15543+
15544+for ac_func in pathconf
15545 do
15546-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15547-echo "configure:2456: checking for $ac_func" >&5
15548-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15549- echo $ac_n "(cached) $ac_c" 1>&6
15550+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15551+echo "$as_me:$LINENO: checking for $ac_func" >&5
15552+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15553+if eval "test \"\${$as_ac_var+set}\" = set"; then
15554+ echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556- cat > conftest.$ac_ext <<EOF
15557-#line 2461 "configure"
15558-#include "confdefs.h"
15559+ cat >conftest.$ac_ext <<_ACEOF
15560+#line $LINENO "configure"
15561+/* confdefs.h. */
15562+_ACEOF
15563+cat confdefs.h >>conftest.$ac_ext
15564+cat >>conftest.$ac_ext <<_ACEOF
15565+/* end confdefs.h. */
15566 /* System header to define __stub macros and hopefully few prototypes,
15567- which can conflict with char $ac_func(); below. */
15568-#include <assert.h>
15569+ which can conflict with char $ac_func (); below.
15570+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15571+ <limits.h> exists even on freestanding compilers. */
15572+#ifdef __STDC__
15573+# include <limits.h>
15574+#else
15575+# include <assert.h>
15576+#endif
15577 /* Override any gcc2 internal prototype to avoid an error. */
15578+#ifdef __cplusplus
15579+extern "C"
15580+{
15581+#endif
15582 /* We use char because int might match the return type of a gcc2
15583- builtin and then its argument prototype would still apply. */
15584-char $ac_func();
15585-
15586-int main() {
15587-
15588+ builtin and then its argument prototype would still apply. */
15589+char $ac_func ();
15590 /* The GNU C library defines this for functions which it implements
15591 to always fail with ENOSYS. Some functions are actually named
15592 something starting with __ and the normal name is an alias. */
15593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15594 choke me
15595 #else
15596-$ac_func();
15597+char (*f) () = $ac_func;
15598+#endif
15599+#ifdef __cplusplus
15600+}
15601 #endif
15602
15603-; return 0; }
15604-EOF
15605-if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15606- rm -rf conftest*
15607- eval "ac_cv_func_$ac_func=yes"
15608+int
15609+main ()
15610+{
15611+return f != $ac_func;
15612+ ;
15613+ return 0;
15614+}
15615+_ACEOF
15616+rm -f conftest.$ac_objext conftest$ac_exeext
15617+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15618+ (eval $ac_link) 2>&5
15619+ ac_status=$?
15620+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621+ (exit $ac_status); } &&
15622+ { ac_try='test -s conftest$ac_exeext'
15623+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624+ (eval $ac_try) 2>&5
15625+ ac_status=$?
15626+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627+ (exit $ac_status); }; }; then
15628+ eval "$as_ac_var=yes"
15629 else
15630- echo "configure: failed program was:" >&5
15631- cat conftest.$ac_ext >&5
15632- rm -rf conftest*
15633- eval "ac_cv_func_$ac_func=no"
15634+ echo "$as_me: failed program was:" >&5
15635+sed 's/^/| /' conftest.$ac_ext >&5
15636+
15637+eval "$as_ac_var=no"
15638 fi
15639-rm -f conftest*
15640+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15641 fi
15642+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15643+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15644+if test `eval echo '${'$as_ac_var'}'` = yes; then
15645+ cat >>confdefs.h <<_ACEOF
15646+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15647+_ACEOF
15648
15649-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15650- echo "$ac_t""yes" 1>&6
15651- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15652- cat >> confdefs.h <<EOF
15653-#define $ac_tr_func 1
15654-EOF
15655-
15656+fi
15657+done
15658+
15659+
15660+
15661+
15662+for ac_header in limits.h string.h unistd.h
15663+do
15664+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15665+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15666+ echo "$as_me:$LINENO: checking for $ac_header" >&5
15667+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15668+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15669+ echo $ECHO_N "(cached) $ECHO_C" >&6
15670+fi
15671+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15672+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15673 else
15674- echo "$ac_t""no" 1>&6
15675+ # Is the header compilable?
15676+echo "$as_me:$LINENO: checking $ac_header usability" >&5
15677+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15678+cat >conftest.$ac_ext <<_ACEOF
15679+#line $LINENO "configure"
15680+/* confdefs.h. */
15681+_ACEOF
15682+cat confdefs.h >>conftest.$ac_ext
15683+cat >>conftest.$ac_ext <<_ACEOF
15684+/* end confdefs.h. */
15685+$ac_includes_default
15686+#include <$ac_header>
15687+_ACEOF
15688+rm -f conftest.$ac_objext
15689+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15690+ (eval $ac_compile) 2>&5
15691+ ac_status=$?
15692+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693+ (exit $ac_status); } &&
15694+ { ac_try='test -s conftest.$ac_objext'
15695+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696+ (eval $ac_try) 2>&5
15697+ ac_status=$?
15698+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699+ (exit $ac_status); }; }; then
15700+ ac_header_compiler=yes
15701+else
15702+ echo "$as_me: failed program was:" >&5
15703+sed 's/^/| /' conftest.$ac_ext >&5
15704+
15705+ac_header_compiler=no
15706 fi
15707+rm -f conftest.$ac_objext conftest.$ac_ext
15708+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15709+echo "${ECHO_T}$ac_header_compiler" >&6
15710+
15711+# Is the header present?
15712+echo "$as_me:$LINENO: checking $ac_header presence" >&5
15713+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15714+cat >conftest.$ac_ext <<_ACEOF
15715+#line $LINENO "configure"
15716+/* confdefs.h. */
15717+_ACEOF
15718+cat confdefs.h >>conftest.$ac_ext
15719+cat >>conftest.$ac_ext <<_ACEOF
15720+/* end confdefs.h. */
15721+#include <$ac_header>
15722+_ACEOF
15723+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15724+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15725+ ac_status=$?
15726+ grep -v '^ *+' conftest.er1 >conftest.err
15727+ rm -f conftest.er1
15728+ cat conftest.err >&5
15729+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730+ (exit $ac_status); } >/dev/null; then
15731+ if test -s conftest.err; then
15732+ ac_cpp_err=$ac_c_preproc_warn_flag
15733+ else
15734+ ac_cpp_err=
15735+ fi
15736+else
15737+ ac_cpp_err=yes
15738+fi
15739+if test -z "$ac_cpp_err"; then
15740+ ac_header_preproc=yes
15741+else
15742+ echo "$as_me: failed program was:" >&5
15743+sed 's/^/| /' conftest.$ac_ext >&5
15744+
15745+ ac_header_preproc=no
15746+fi
15747+rm -f conftest.err conftest.$ac_ext
15748+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15749+echo "${ECHO_T}$ac_header_preproc" >&6
15750+
15751+# So? What about this header?
15752+case $ac_header_compiler:$ac_header_preproc in
15753+ yes:no )
15754+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15755+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15756+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15757+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15758+ (
15759+ cat <<\_ASBOX
15760+## ------------------------------------ ##
15761+## Report this to bug-autoconf@gnu.org. ##
15762+## ------------------------------------ ##
15763+_ASBOX
15764+ ) |
15765+ sed "s/^/$as_me: WARNING: /" >&2
15766+ ;;
15767+ no:yes )
15768+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15769+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15770+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15771+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15772+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15773+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15774+ (
15775+ cat <<\_ASBOX
15776+## ------------------------------------ ##
15777+## Report this to bug-autoconf@gnu.org. ##
15778+## ------------------------------------ ##
15779+_ASBOX
15780+ ) |
15781+ sed "s/^/$as_me: WARNING: /" >&2
15782+ ;;
15783+esac
15784+echo "$as_me:$LINENO: checking for $ac_header" >&5
15785+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15786+if eval "test \"\${$as_ac_Header+set}\" = set"; then
15787+ echo $ECHO_N "(cached) $ECHO_C" >&6
15788+else
15789+ eval "$as_ac_Header=$ac_header_preproc"
15790+fi
15791+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15792+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15793+
15794+fi
15795+if test `eval echo '${'$as_ac_Header'}'` = yes; then
15796+ cat >>confdefs.h <<_ACEOF
15797+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15798+_ACEOF
15799+
15800+fi
15801+
15802 done
15803
15804-for ac_func in memchr mkdir rename rmdir
15805+
15806+
15807+echo "$as_me:$LINENO: checking whether free is declared" >&5
15808+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
15809+if test "${ac_cv_have_decl_free+set}" = set; then
15810+ echo $ECHO_N "(cached) $ECHO_C" >&6
15811+else
15812+ cat >conftest.$ac_ext <<_ACEOF
15813+#line $LINENO "configure"
15814+/* confdefs.h. */
15815+_ACEOF
15816+cat confdefs.h >>conftest.$ac_ext
15817+cat >>conftest.$ac_ext <<_ACEOF
15818+/* end confdefs.h. */
15819+$ac_includes_default
15820+int
15821+main ()
15822+{
15823+#ifndef free
15824+ char *p = (char *) free;
15825+#endif
15826+
15827+ ;
15828+ return 0;
15829+}
15830+_ACEOF
15831+rm -f conftest.$ac_objext
15832+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15833+ (eval $ac_compile) 2>&5
15834+ ac_status=$?
15835+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15836+ (exit $ac_status); } &&
15837+ { ac_try='test -s conftest.$ac_objext'
15838+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15839+ (eval $ac_try) 2>&5
15840+ ac_status=$?
15841+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842+ (exit $ac_status); }; }; then
15843+ ac_cv_have_decl_free=yes
15844+else
15845+ echo "$as_me: failed program was:" >&5
15846+sed 's/^/| /' conftest.$ac_ext >&5
15847+
15848+ac_cv_have_decl_free=no
15849+fi
15850+rm -f conftest.$ac_objext conftest.$ac_ext
15851+fi
15852+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
15853+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
15854+if test $ac_cv_have_decl_free = yes; then
15855+
15856+cat >>confdefs.h <<_ACEOF
15857+#define HAVE_DECL_FREE 1
15858+_ACEOF
15859+
15860+
15861+else
15862+ cat >>confdefs.h <<_ACEOF
15863+#define HAVE_DECL_FREE 0
15864+_ACEOF
15865+
15866+
15867+fi
15868+echo "$as_me:$LINENO: checking whether getenv is declared" >&5
15869+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
15870+if test "${ac_cv_have_decl_getenv+set}" = set; then
15871+ echo $ECHO_N "(cached) $ECHO_C" >&6
15872+else
15873+ cat >conftest.$ac_ext <<_ACEOF
15874+#line $LINENO "configure"
15875+/* confdefs.h. */
15876+_ACEOF
15877+cat confdefs.h >>conftest.$ac_ext
15878+cat >>conftest.$ac_ext <<_ACEOF
15879+/* end confdefs.h. */
15880+$ac_includes_default
15881+int
15882+main ()
15883+{
15884+#ifndef getenv
15885+ char *p = (char *) getenv;
15886+#endif
15887+
15888+ ;
15889+ return 0;
15890+}
15891+_ACEOF
15892+rm -f conftest.$ac_objext
15893+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15894+ (eval $ac_compile) 2>&5
15895+ ac_status=$?
15896+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897+ (exit $ac_status); } &&
15898+ { ac_try='test -s conftest.$ac_objext'
15899+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15900+ (eval $ac_try) 2>&5
15901+ ac_status=$?
15902+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903+ (exit $ac_status); }; }; then
15904+ ac_cv_have_decl_getenv=yes
15905+else
15906+ echo "$as_me: failed program was:" >&5
15907+sed 's/^/| /' conftest.$ac_ext >&5
15908+
15909+ac_cv_have_decl_getenv=no
15910+fi
15911+rm -f conftest.$ac_objext conftest.$ac_ext
15912+fi
15913+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
15914+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
15915+if test $ac_cv_have_decl_getenv = yes; then
15916+
15917+cat >>confdefs.h <<_ACEOF
15918+#define HAVE_DECL_GETENV 1
15919+_ACEOF
15920+
15921+
15922+else
15923+ cat >>confdefs.h <<_ACEOF
15924+#define HAVE_DECL_GETENV 0
15925+_ACEOF
15926+
15927+
15928+fi
15929+echo "$as_me:$LINENO: checking whether malloc is declared" >&5
15930+echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
15931+if test "${ac_cv_have_decl_malloc+set}" = set; then
15932+ echo $ECHO_N "(cached) $ECHO_C" >&6
15933+else
15934+ cat >conftest.$ac_ext <<_ACEOF
15935+#line $LINENO "configure"
15936+/* confdefs.h. */
15937+_ACEOF
15938+cat confdefs.h >>conftest.$ac_ext
15939+cat >>conftest.$ac_ext <<_ACEOF
15940+/* end confdefs.h. */
15941+$ac_includes_default
15942+int
15943+main ()
15944+{
15945+#ifndef malloc
15946+ char *p = (char *) malloc;
15947+#endif
15948+
15949+ ;
15950+ return 0;
15951+}
15952+_ACEOF
15953+rm -f conftest.$ac_objext
15954+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15955+ (eval $ac_compile) 2>&5
15956+ ac_status=$?
15957+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958+ (exit $ac_status); } &&
15959+ { ac_try='test -s conftest.$ac_objext'
15960+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961+ (eval $ac_try) 2>&5
15962+ ac_status=$?
15963+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964+ (exit $ac_status); }; }; then
15965+ ac_cv_have_decl_malloc=yes
15966+else
15967+ echo "$as_me: failed program was:" >&5
15968+sed 's/^/| /' conftest.$ac_ext >&5
15969+
15970+ac_cv_have_decl_malloc=no
15971+fi
15972+rm -f conftest.$ac_objext conftest.$ac_ext
15973+fi
15974+echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
15975+echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
15976+if test $ac_cv_have_decl_malloc = yes; then
15977+
15978+cat >>confdefs.h <<_ACEOF
15979+#define HAVE_DECL_MALLOC 1
15980+_ACEOF
15981+
15982+
15983+else
15984+ cat >>confdefs.h <<_ACEOF
15985+#define HAVE_DECL_MALLOC 0
15986+_ACEOF
15987+
15988+
15989+fi
15990+echo "$as_me:$LINENO: checking whether mktemp is declared" >&5
15991+echo $ECHO_N "checking whether mktemp is declared... $ECHO_C" >&6
15992+if test "${ac_cv_have_decl_mktemp+set}" = set; then
15993+ echo $ECHO_N "(cached) $ECHO_C" >&6
15994+else
15995+ cat >conftest.$ac_ext <<_ACEOF
15996+#line $LINENO "configure"
15997+/* confdefs.h. */
15998+_ACEOF
15999+cat confdefs.h >>conftest.$ac_ext
16000+cat >>conftest.$ac_ext <<_ACEOF
16001+/* end confdefs.h. */
16002+$ac_includes_default
16003+int
16004+main ()
16005+{
16006+#ifndef mktemp
16007+ char *p = (char *) mktemp;
16008+#endif
16009+
16010+ ;
16011+ return 0;
16012+}
16013+_ACEOF
16014+rm -f conftest.$ac_objext
16015+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16016+ (eval $ac_compile) 2>&5
16017+ ac_status=$?
16018+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16019+ (exit $ac_status); } &&
16020+ { ac_try='test -s conftest.$ac_objext'
16021+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16022+ (eval $ac_try) 2>&5
16023+ ac_status=$?
16024+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025+ (exit $ac_status); }; }; then
16026+ ac_cv_have_decl_mktemp=yes
16027+else
16028+ echo "$as_me: failed program was:" >&5
16029+sed 's/^/| /' conftest.$ac_ext >&5
16030+
16031+ac_cv_have_decl_mktemp=no
16032+fi
16033+rm -f conftest.$ac_objext conftest.$ac_ext
16034+fi
16035+echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
16036+echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
16037+if test $ac_cv_have_decl_mktemp = yes; then
16038+
16039+cat >>confdefs.h <<_ACEOF
16040+#define HAVE_DECL_MKTEMP 1
16041+_ACEOF
16042+
16043+
16044+else
16045+ cat >>confdefs.h <<_ACEOF
16046+#define HAVE_DECL_MKTEMP 0
16047+_ACEOF
16048+
16049+
16050+fi
16051+
16052+
16053+
16054+
16055+
16056+
16057+
16058+
16059+
16060+
16061+
16062+
16063+
16064+
16065+for ac_func in _doprintf geteuid getuid isascii memcmp mktemp \
16066+ pathconf raise sigaction sigprocmask sigsetmask strerror
16067 do
16068-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16069-echo "configure:2511: checking for $ac_func" >&5
16070-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16071- echo $ac_n "(cached) $ac_c" 1>&6
16072+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16073+echo "$as_me:$LINENO: checking for $ac_func" >&5
16074+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16075+if eval "test \"\${$as_ac_var+set}\" = set"; then
16076+ echo $ECHO_N "(cached) $ECHO_C" >&6
16077 else
16078- cat > conftest.$ac_ext <<EOF
16079-#line 2516 "configure"
16080-#include "confdefs.h"
16081+ cat >conftest.$ac_ext <<_ACEOF
16082+#line $LINENO "configure"
16083+/* confdefs.h. */
16084+_ACEOF
16085+cat confdefs.h >>conftest.$ac_ext
16086+cat >>conftest.$ac_ext <<_ACEOF
16087+/* end confdefs.h. */
16088 /* System header to define __stub macros and hopefully few prototypes,
16089- which can conflict with char $ac_func(); below. */
16090-#include <assert.h>
16091+ which can conflict with char $ac_func (); below.
16092+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16093+ <limits.h> exists even on freestanding compilers. */
16094+#ifdef __STDC__
16095+# include <limits.h>
16096+#else
16097+# include <assert.h>
16098+#endif
16099 /* Override any gcc2 internal prototype to avoid an error. */
16100+#ifdef __cplusplus
16101+extern "C"
16102+{
16103+#endif
16104 /* We use char because int might match the return type of a gcc2
16105- builtin and then its argument prototype would still apply. */
16106-char $ac_func();
16107+ builtin and then its argument prototype would still apply. */
16108+char $ac_func ();
16109+/* The GNU C library defines this for functions which it implements
16110+ to always fail with ENOSYS. Some functions are actually named
16111+ something starting with __ and the normal name is an alias. */
16112+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16113+choke me
16114+#else
16115+char (*f) () = $ac_func;
16116+#endif
16117+#ifdef __cplusplus
16118+}
16119+#endif
16120
16121-int main() {
16122+int
16123+main ()
16124+{
16125+return f != $ac_func;
16126+ ;
16127+ return 0;
16128+}
16129+_ACEOF
16130+rm -f conftest.$ac_objext conftest$ac_exeext
16131+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16132+ (eval $ac_link) 2>&5
16133+ ac_status=$?
16134+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135+ (exit $ac_status); } &&
16136+ { ac_try='test -s conftest$ac_exeext'
16137+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138+ (eval $ac_try) 2>&5
16139+ ac_status=$?
16140+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141+ (exit $ac_status); }; }; then
16142+ eval "$as_ac_var=yes"
16143+else
16144+ echo "$as_me: failed program was:" >&5
16145+sed 's/^/| /' conftest.$ac_ext >&5
16146
16147+eval "$as_ac_var=no"
16148+fi
16149+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16150+fi
16151+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16152+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16153+if test `eval echo '${'$as_ac_var'}'` = yes; then
16154+ cat >>confdefs.h <<_ACEOF
16155+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16156+_ACEOF
16157+
16158+fi
16159+done
16160+
16161+
16162+
16163+for ac_func in mkdir strncasecmp
16164+do
16165+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16166+echo "$as_me:$LINENO: checking for $ac_func" >&5
16167+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16168+if eval "test \"\${$as_ac_var+set}\" = set"; then
16169+ echo $ECHO_N "(cached) $ECHO_C" >&6
16170+else
16171+ cat >conftest.$ac_ext <<_ACEOF
16172+#line $LINENO "configure"
16173+/* confdefs.h. */
16174+_ACEOF
16175+cat confdefs.h >>conftest.$ac_ext
16176+cat >>conftest.$ac_ext <<_ACEOF
16177+/* end confdefs.h. */
16178+/* System header to define __stub macros and hopefully few prototypes,
16179+ which can conflict with char $ac_func (); below.
16180+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16181+ <limits.h> exists even on freestanding compilers. */
16182+#ifdef __STDC__
16183+# include <limits.h>
16184+#else
16185+# include <assert.h>
16186+#endif
16187+/* Override any gcc2 internal prototype to avoid an error. */
16188+#ifdef __cplusplus
16189+extern "C"
16190+{
16191+#endif
16192+/* We use char because int might match the return type of a gcc2
16193+ builtin and then its argument prototype would still apply. */
16194+char $ac_func ();
16195 /* The GNU C library defines this for functions which it implements
16196 to always fail with ENOSYS. Some functions are actually named
16197 something starting with __ and the normal name is an alias. */
16198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16199 choke me
16200 #else
16201-$ac_func();
16202+char (*f) () = $ac_func;
16203+#endif
16204+#ifdef __cplusplus
16205+}
16206 #endif
16207
16208-; return 0; }
16209-EOF
16210-if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16211- rm -rf conftest*
16212- eval "ac_cv_func_$ac_func=yes"
16213+int
16214+main ()
16215+{
16216+return f != $ac_func;
16217+ ;
16218+ return 0;
16219+}
16220+_ACEOF
16221+rm -f conftest.$ac_objext conftest$ac_exeext
16222+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16223+ (eval $ac_link) 2>&5
16224+ ac_status=$?
16225+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226+ (exit $ac_status); } &&
16227+ { ac_try='test -s conftest$ac_exeext'
16228+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16229+ (eval $ac_try) 2>&5
16230+ ac_status=$?
16231+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16232+ (exit $ac_status); }; }; then
16233+ eval "$as_ac_var=yes"
16234 else
16235- echo "configure: failed program was:" >&5
16236- cat conftest.$ac_ext >&5
16237- rm -rf conftest*
16238- eval "ac_cv_func_$ac_func=no"
16239+ echo "$as_me: failed program was:" >&5
16240+sed 's/^/| /' conftest.$ac_ext >&5
16241+
16242+eval "$as_ac_var=no"
16243 fi
16244-rm -f conftest*
16245+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16246 fi
16247+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16248+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16249+if test `eval echo '${'$as_ac_var'}'` = yes; then
16250+ cat >>confdefs.h <<_ACEOF
16251+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16252+_ACEOF
16253
16254-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16255- echo "$ac_t""yes" 1>&6
16256- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16257- cat >> confdefs.h <<EOF
16258-#define $ac_tr_func 1
16259-EOF
16260-
16261 else
16262- echo "$ac_t""no" 1>&6
16263-LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16264+ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16265 fi
16266 done
16267
16268
16269+echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16270+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16271+if test "${ac_cv_sys_largefile_source+set}" = set; then
16272+ echo $ECHO_N "(cached) $ECHO_C" >&6
16273+else
16274+ while :; do
16275+ ac_cv_sys_largefile_source=no
16276+ cat >conftest.$ac_ext <<_ACEOF
16277+#line $LINENO "configure"
16278+/* confdefs.h. */
16279+_ACEOF
16280+cat confdefs.h >>conftest.$ac_ext
16281+cat >>conftest.$ac_ext <<_ACEOF
16282+/* end confdefs.h. */
16283+#include <stdio.h>
16284+int
16285+main ()
16286+{
16287+return !fseeko;
16288+ ;
16289+ return 0;
16290+}
16291+_ACEOF
16292+rm -f conftest.$ac_objext
16293+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16294+ (eval $ac_compile) 2>&5
16295+ ac_status=$?
16296+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297+ (exit $ac_status); } &&
16298+ { ac_try='test -s conftest.$ac_objext'
16299+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16300+ (eval $ac_try) 2>&5
16301+ ac_status=$?
16302+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303+ (exit $ac_status); }; }; then
16304+ break
16305+else
16306+ echo "$as_me: failed program was:" >&5
16307+sed 's/^/| /' conftest.$ac_ext >&5
16308
16309- cat >> confdefs.h <<EOF
16310-#define HAVE_DONE_WORKING_MALLOC_CHECK 1
16311-EOF
16312+fi
16313+rm -f conftest.$ac_objext conftest.$ac_ext
16314+ cat >conftest.$ac_ext <<_ACEOF
16315+#line $LINENO "configure"
16316+/* confdefs.h. */
16317+_ACEOF
16318+cat confdefs.h >>conftest.$ac_ext
16319+cat >>conftest.$ac_ext <<_ACEOF
16320+/* end confdefs.h. */
16321+#define _LARGEFILE_SOURCE 1
16322+#include <stdio.h>
16323+int
16324+main ()
16325+{
16326+return !fseeko;
16327+ ;
16328+ return 0;
16329+}
16330+_ACEOF
16331+rm -f conftest.$ac_objext
16332+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16333+ (eval $ac_compile) 2>&5
16334+ ac_status=$?
16335+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336+ (exit $ac_status); } &&
16337+ { ac_try='test -s conftest.$ac_objext'
16338+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16339+ (eval $ac_try) 2>&5
16340+ ac_status=$?
16341+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16342+ (exit $ac_status); }; }; then
16343+ ac_cv_sys_largefile_source=1; break
16344+else
16345+ echo "$as_me: failed program was:" >&5
16346+sed 's/^/| /' conftest.$ac_ext >&5
16347
16348+fi
16349+rm -f conftest.$ac_objext conftest.$ac_ext
16350+ break
16351+done
16352+fi
16353+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16354+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16355+if test "$ac_cv_sys_largefile_source" != no; then
16356
16357- echo $ac_n "checking for working malloc""... $ac_c" 1>&6
16358-echo "configure:2572: checking for working malloc" >&5
16359-if eval "test \"`echo '$''{'jm_cv_func_working_malloc'+set}'`\" = set"; then
16360- echo $ac_n "(cached) $ac_c" 1>&6
16361+cat >>confdefs.h <<_ACEOF
16362+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16363+_ACEOF
16364+
16365+fi
16366+rm -f conftest*
16367+
16368+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16369+# in glibc 2.1.3, but that breaks too many other things.
16370+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16371+echo "$as_me:$LINENO: checking for fseeko" >&5
16372+echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16373+if test "${ac_cv_func_fseeko+set}" = set; then
16374+ echo $ECHO_N "(cached) $ECHO_C" >&6
16375 else
16376- if test "$cross_compiling" = yes; then
16377- jm_cv_func_working_malloc=no
16378+ cat >conftest.$ac_ext <<_ACEOF
16379+#line $LINENO "configure"
16380+/* confdefs.h. */
16381+_ACEOF
16382+cat confdefs.h >>conftest.$ac_ext
16383+cat >>conftest.$ac_ext <<_ACEOF
16384+/* end confdefs.h. */
16385+#include <stdio.h>
16386+int
16387+main ()
16388+{
16389+return fseeko && fseeko (stdin, 0, 0);
16390+ ;
16391+ return 0;
16392+}
16393+_ACEOF
16394+rm -f conftest.$ac_objext conftest$ac_exeext
16395+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16396+ (eval $ac_link) 2>&5
16397+ ac_status=$?
16398+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16399+ (exit $ac_status); } &&
16400+ { ac_try='test -s conftest$ac_exeext'
16401+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16402+ (eval $ac_try) 2>&5
16403+ ac_status=$?
16404+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405+ (exit $ac_status); }; }; then
16406+ ac_cv_func_fseeko=yes
16407 else
16408- cat > conftest.$ac_ext <<EOF
16409-#line 2580 "configure"
16410-#include "confdefs.h"
16411+ echo "$as_me: failed program was:" >&5
16412+sed 's/^/| /' conftest.$ac_ext >&5
16413
16414- char *malloc ();
16415- int
16416- main ()
16417- {
16418- exit (malloc (0) ? 0 : 1);
16419- }
16420-
16421-EOF
16422-if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16423-then
16424- jm_cv_func_working_malloc=yes
16425+ac_cv_func_fseeko=no
16426+fi
16427+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16428+fi
16429+echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16430+echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16431+if test $ac_cv_func_fseeko = yes; then
16432+
16433+cat >>confdefs.h <<\_ACEOF
16434+#define HAVE_FSEEKO 1
16435+_ACEOF
16436+
16437+fi
16438+
16439+
16440+ echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
16441+echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
16442+if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
16443+ echo $ECHO_N "(cached) $ECHO_C" >&6
16444 else
16445- echo "configure: failed program was:" >&5
16446- cat conftest.$ac_ext >&5
16447- rm -fr conftest*
16448- jm_cv_func_working_malloc=no
16449+ cat >conftest.$ac_ext <<_ACEOF
16450+#line $LINENO "configure"
16451+/* confdefs.h. */
16452+_ACEOF
16453+cat confdefs.h >>conftest.$ac_ext
16454+cat >>conftest.$ac_ext <<_ACEOF
16455+/* end confdefs.h. */
16456+$ac_includes_default
16457+int
16458+main ()
16459+{
16460+#ifndef clearerr_unlocked
16461+ char *p = (char *) clearerr_unlocked;
16462+#endif
16463+
16464+ ;
16465+ return 0;
16466+}
16467+_ACEOF
16468+rm -f conftest.$ac_objext
16469+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16470+ (eval $ac_compile) 2>&5
16471+ ac_status=$?
16472+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473+ (exit $ac_status); } &&
16474+ { ac_try='test -s conftest.$ac_objext'
16475+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16476+ (eval $ac_try) 2>&5
16477+ ac_status=$?
16478+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479+ (exit $ac_status); }; }; then
16480+ ac_cv_have_decl_clearerr_unlocked=yes
16481+else
16482+ echo "$as_me: failed program was:" >&5
16483+sed 's/^/| /' conftest.$ac_ext >&5
16484+
16485+ac_cv_have_decl_clearerr_unlocked=no
16486 fi
16487-rm -fr conftest*
16488+rm -f conftest.$ac_objext conftest.$ac_ext
16489 fi
16490+echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
16491+echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
16492+if test $ac_cv_have_decl_clearerr_unlocked = yes; then
16493+
16494+cat >>confdefs.h <<_ACEOF
16495+#define HAVE_DECL_CLEARERR_UNLOCKED 1
16496+_ACEOF
16497+
16498+
16499+else
16500+ cat >>confdefs.h <<_ACEOF
16501+#define HAVE_DECL_CLEARERR_UNLOCKED 0
16502+_ACEOF
16503+
16504
16505-
16506 fi
16507
16508-echo "$ac_t""$jm_cv_func_working_malloc" 1>&6
16509- if test $jm_cv_func_working_malloc = no; then
16510-
16511- LIBOBJS="$LIBOBJS malloc.$ac_objext"
16512- cat >> confdefs.h <<EOF
16513-#define malloc rpl_malloc
16514-EOF
16515
16516- fi
16517
16518
16519- cat >> confdefs.h <<EOF
16520-#define HAVE_DONE_WORKING_REALLOC_CHECK 1
16521-EOF
16522+ echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
16523+echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
16524+if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
16525+ echo $ECHO_N "(cached) $ECHO_C" >&6
16526+else
16527+ cat >conftest.$ac_ext <<_ACEOF
16528+#line $LINENO "configure"
16529+/* confdefs.h. */
16530+_ACEOF
16531+cat confdefs.h >>conftest.$ac_ext
16532+cat >>conftest.$ac_ext <<_ACEOF
16533+/* end confdefs.h. */
16534+$ac_includes_default
16535+int
16536+main ()
16537+{
16538+#ifndef feof_unlocked
16539+ char *p = (char *) feof_unlocked;
16540+#endif
16541+
16542+ ;
16543+ return 0;
16544+}
16545+_ACEOF
16546+rm -f conftest.$ac_objext
16547+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16548+ (eval $ac_compile) 2>&5
16549+ ac_status=$?
16550+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551+ (exit $ac_status); } &&
16552+ { ac_try='test -s conftest.$ac_objext'
16553+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554+ (eval $ac_try) 2>&5
16555+ ac_status=$?
16556+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557+ (exit $ac_status); }; }; then
16558+ ac_cv_have_decl_feof_unlocked=yes
16559+else
16560+ echo "$as_me: failed program was:" >&5
16561+sed 's/^/| /' conftest.$ac_ext >&5
16562+
16563+ac_cv_have_decl_feof_unlocked=no
16564+fi
16565+rm -f conftest.$ac_objext conftest.$ac_ext
16566+fi
16567+echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
16568+echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
16569+if test $ac_cv_have_decl_feof_unlocked = yes; then
16570+
16571+cat >>confdefs.h <<_ACEOF
16572+#define HAVE_DECL_FEOF_UNLOCKED 1
16573+_ACEOF
16574
16575
16576- echo $ac_n "checking for working realloc""... $ac_c" 1>&6
16577-echo "configure:2623: checking for working realloc" >&5
16578-if eval "test \"`echo '$''{'jm_cv_func_working_realloc'+set}'`\" = set"; then
16579- echo $ac_n "(cached) $ac_c" 1>&6
16580 else
16581- if test "$cross_compiling" = yes; then
16582- jm_cv_func_working_realloc=no
16583+ cat >>confdefs.h <<_ACEOF
16584+#define HAVE_DECL_FEOF_UNLOCKED 0
16585+_ACEOF
16586+
16587+
16588+fi
16589+
16590+
16591+
16592+
16593+ echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
16594+echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
16595+if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
16596+ echo $ECHO_N "(cached) $ECHO_C" >&6
16597 else
16598- cat > conftest.$ac_ext <<EOF
16599-#line 2631 "configure"
16600-#include "confdefs.h"
16601+ cat >conftest.$ac_ext <<_ACEOF
16602+#line $LINENO "configure"
16603+/* confdefs.h. */
16604+_ACEOF
16605+cat confdefs.h >>conftest.$ac_ext
16606+cat >>conftest.$ac_ext <<_ACEOF
16607+/* end confdefs.h. */
16608+$ac_includes_default
16609+int
16610+main ()
16611+{
16612+#ifndef ferror_unlocked
16613+ char *p = (char *) ferror_unlocked;
16614+#endif
16615
16616- char *realloc ();
16617- int
16618- main ()
16619- {
16620- exit (realloc (0, 0) ? 0 : 1);
16621- }
16622-
16623-EOF
16624-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16625-then
16626- jm_cv_func_working_realloc=yes
16627+ ;
16628+ return 0;
16629+}
16630+_ACEOF
16631+rm -f conftest.$ac_objext
16632+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16633+ (eval $ac_compile) 2>&5
16634+ ac_status=$?
16635+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636+ (exit $ac_status); } &&
16637+ { ac_try='test -s conftest.$ac_objext'
16638+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16639+ (eval $ac_try) 2>&5
16640+ ac_status=$?
16641+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642+ (exit $ac_status); }; }; then
16643+ ac_cv_have_decl_ferror_unlocked=yes
16644 else
16645- echo "configure: failed program was:" >&5
16646- cat conftest.$ac_ext >&5
16647- rm -fr conftest*
16648- jm_cv_func_working_realloc=no
16649+ echo "$as_me: failed program was:" >&5
16650+sed 's/^/| /' conftest.$ac_ext >&5
16651+
16652+ac_cv_have_decl_ferror_unlocked=no
16653 fi
16654-rm -fr conftest*
16655+rm -f conftest.$ac_objext conftest.$ac_ext
16656 fi
16657+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
16658+echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
16659+if test $ac_cv_have_decl_ferror_unlocked = yes; then
16660+
16661+cat >>confdefs.h <<_ACEOF
16662+#define HAVE_DECL_FERROR_UNLOCKED 1
16663+_ACEOF
16664+
16665+
16666+else
16667+ cat >>confdefs.h <<_ACEOF
16668+#define HAVE_DECL_FERROR_UNLOCKED 0
16669+_ACEOF
16670+
16671
16672-
16673 fi
16674
16675-echo "$ac_t""$jm_cv_func_working_realloc" 1>&6
16676- if test $jm_cv_func_working_realloc = no; then
16677-
16678- LIBOBJS="$LIBOBJS realloc.$ac_objext"
16679- cat >> confdefs.h <<EOF
16680-#define realloc rpl_realloc
16681-EOF
16682+
16683+
16684+
16685+ echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
16686+echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
16687+if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
16688+ echo $ECHO_N "(cached) $ECHO_C" >&6
16689+else
16690+ cat >conftest.$ac_ext <<_ACEOF
16691+#line $LINENO "configure"
16692+/* confdefs.h. */
16693+_ACEOF
16694+cat confdefs.h >>conftest.$ac_ext
16695+cat >>conftest.$ac_ext <<_ACEOF
16696+/* end confdefs.h. */
16697+$ac_includes_default
16698+int
16699+main ()
16700+{
16701+#ifndef fflush_unlocked
16702+ char *p = (char *) fflush_unlocked;
16703+#endif
16704+
16705+ ;
16706+ return 0;
16707+}
16708+_ACEOF
16709+rm -f conftest.$ac_objext
16710+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16711+ (eval $ac_compile) 2>&5
16712+ ac_status=$?
16713+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16714+ (exit $ac_status); } &&
16715+ { ac_try='test -s conftest.$ac_objext'
16716+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16717+ (eval $ac_try) 2>&5
16718+ ac_status=$?
16719+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16720+ (exit $ac_status); }; }; then
16721+ ac_cv_have_decl_fflush_unlocked=yes
16722+else
16723+ echo "$as_me: failed program was:" >&5
16724+sed 's/^/| /' conftest.$ac_ext >&5
16725+
16726+ac_cv_have_decl_fflush_unlocked=no
16727+fi
16728+rm -f conftest.$ac_objext conftest.$ac_ext
16729+fi
16730+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
16731+echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
16732+if test $ac_cv_have_decl_fflush_unlocked = yes; then
16733+
16734+cat >>confdefs.h <<_ACEOF
16735+#define HAVE_DECL_FFLUSH_UNLOCKED 1
16736+_ACEOF
16737+
16738+
16739+else
16740+ cat >>confdefs.h <<_ACEOF
16741+#define HAVE_DECL_FFLUSH_UNLOCKED 0
16742+_ACEOF
16743+
16744+
16745+fi
16746+
16747+
16748+
16749+
16750+ echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
16751+echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
16752+if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
16753+ echo $ECHO_N "(cached) $ECHO_C" >&6
16754+else
16755+ cat >conftest.$ac_ext <<_ACEOF
16756+#line $LINENO "configure"
16757+/* confdefs.h. */
16758+_ACEOF
16759+cat confdefs.h >>conftest.$ac_ext
16760+cat >>conftest.$ac_ext <<_ACEOF
16761+/* end confdefs.h. */
16762+$ac_includes_default
16763+int
16764+main ()
16765+{
16766+#ifndef fgets_unlocked
16767+ char *p = (char *) fgets_unlocked;
16768+#endif
16769+
16770+ ;
16771+ return 0;
16772+}
16773+_ACEOF
16774+rm -f conftest.$ac_objext
16775+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16776+ (eval $ac_compile) 2>&5
16777+ ac_status=$?
16778+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779+ (exit $ac_status); } &&
16780+ { ac_try='test -s conftest.$ac_objext'
16781+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782+ (eval $ac_try) 2>&5
16783+ ac_status=$?
16784+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785+ (exit $ac_status); }; }; then
16786+ ac_cv_have_decl_fgets_unlocked=yes
16787+else
16788+ echo "$as_me: failed program was:" >&5
16789+sed 's/^/| /' conftest.$ac_ext >&5
16790+
16791+ac_cv_have_decl_fgets_unlocked=no
16792+fi
16793+rm -f conftest.$ac_objext conftest.$ac_ext
16794+fi
16795+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
16796+echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
16797+if test $ac_cv_have_decl_fgets_unlocked = yes; then
16798+
16799+cat >>confdefs.h <<_ACEOF
16800+#define HAVE_DECL_FGETS_UNLOCKED 1
16801+_ACEOF
16802+
16803+
16804+else
16805+ cat >>confdefs.h <<_ACEOF
16806+#define HAVE_DECL_FGETS_UNLOCKED 0
16807+_ACEOF
16808+
16809+
16810+fi
16811+
16812+
16813+
16814+
16815+ echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
16816+echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
16817+if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
16818+ echo $ECHO_N "(cached) $ECHO_C" >&6
16819+else
16820+ cat >conftest.$ac_ext <<_ACEOF
16821+#line $LINENO "configure"
16822+/* confdefs.h. */
16823+_ACEOF
16824+cat confdefs.h >>conftest.$ac_ext
16825+cat >>conftest.$ac_ext <<_ACEOF
16826+/* end confdefs.h. */
16827+$ac_includes_default
16828+int
16829+main ()
16830+{
16831+#ifndef fputc_unlocked
16832+ char *p = (char *) fputc_unlocked;
16833+#endif
16834+
16835+ ;
16836+ return 0;
16837+}
16838+_ACEOF
16839+rm -f conftest.$ac_objext
16840+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16841+ (eval $ac_compile) 2>&5
16842+ ac_status=$?
16843+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844+ (exit $ac_status); } &&
16845+ { ac_try='test -s conftest.$ac_objext'
16846+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16847+ (eval $ac_try) 2>&5
16848+ ac_status=$?
16849+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850+ (exit $ac_status); }; }; then
16851+ ac_cv_have_decl_fputc_unlocked=yes
16852+else
16853+ echo "$as_me: failed program was:" >&5
16854+sed 's/^/| /' conftest.$ac_ext >&5
16855+
16856+ac_cv_have_decl_fputc_unlocked=no
16857+fi
16858+rm -f conftest.$ac_objext conftest.$ac_ext
16859+fi
16860+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
16861+echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
16862+if test $ac_cv_have_decl_fputc_unlocked = yes; then
16863+
16864+cat >>confdefs.h <<_ACEOF
16865+#define HAVE_DECL_FPUTC_UNLOCKED 1
16866+_ACEOF
16867+
16868+
16869+else
16870+ cat >>confdefs.h <<_ACEOF
16871+#define HAVE_DECL_FPUTC_UNLOCKED 0
16872+_ACEOF
16873+
16874+
16875+fi
16876+
16877+
16878+
16879+
16880+ echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
16881+echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
16882+if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
16883+ echo $ECHO_N "(cached) $ECHO_C" >&6
16884+else
16885+ cat >conftest.$ac_ext <<_ACEOF
16886+#line $LINENO "configure"
16887+/* confdefs.h. */
16888+_ACEOF
16889+cat confdefs.h >>conftest.$ac_ext
16890+cat >>conftest.$ac_ext <<_ACEOF
16891+/* end confdefs.h. */
16892+$ac_includes_default
16893+int
16894+main ()
16895+{
16896+#ifndef fputs_unlocked
16897+ char *p = (char *) fputs_unlocked;
16898+#endif
16899+
16900+ ;
16901+ return 0;
16902+}
16903+_ACEOF
16904+rm -f conftest.$ac_objext
16905+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16906+ (eval $ac_compile) 2>&5
16907+ ac_status=$?
16908+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909+ (exit $ac_status); } &&
16910+ { ac_try='test -s conftest.$ac_objext'
16911+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16912+ (eval $ac_try) 2>&5
16913+ ac_status=$?
16914+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16915+ (exit $ac_status); }; }; then
16916+ ac_cv_have_decl_fputs_unlocked=yes
16917+else
16918+ echo "$as_me: failed program was:" >&5
16919+sed 's/^/| /' conftest.$ac_ext >&5
16920+
16921+ac_cv_have_decl_fputs_unlocked=no
16922+fi
16923+rm -f conftest.$ac_objext conftest.$ac_ext
16924+fi
16925+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
16926+echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
16927+if test $ac_cv_have_decl_fputs_unlocked = yes; then
16928+
16929+cat >>confdefs.h <<_ACEOF
16930+#define HAVE_DECL_FPUTS_UNLOCKED 1
16931+_ACEOF
16932+
16933+
16934+else
16935+ cat >>confdefs.h <<_ACEOF
16936+#define HAVE_DECL_FPUTS_UNLOCKED 0
16937+_ACEOF
16938+
16939+
16940+fi
16941+
16942+
16943+
16944+
16945+ echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
16946+echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
16947+if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
16948+ echo $ECHO_N "(cached) $ECHO_C" >&6
16949+else
16950+ cat >conftest.$ac_ext <<_ACEOF
16951+#line $LINENO "configure"
16952+/* confdefs.h. */
16953+_ACEOF
16954+cat confdefs.h >>conftest.$ac_ext
16955+cat >>conftest.$ac_ext <<_ACEOF
16956+/* end confdefs.h. */
16957+$ac_includes_default
16958+int
16959+main ()
16960+{
16961+#ifndef fread_unlocked
16962+ char *p = (char *) fread_unlocked;
16963+#endif
16964+
16965+ ;
16966+ return 0;
16967+}
16968+_ACEOF
16969+rm -f conftest.$ac_objext
16970+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16971+ (eval $ac_compile) 2>&5
16972+ ac_status=$?
16973+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974+ (exit $ac_status); } &&
16975+ { ac_try='test -s conftest.$ac_objext'
16976+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16977+ (eval $ac_try) 2>&5
16978+ ac_status=$?
16979+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
16980+ (exit $ac_status); }; }; then
16981+ ac_cv_have_decl_fread_unlocked=yes
16982+else
16983+ echo "$as_me: failed program was:" >&5
16984+sed 's/^/| /' conftest.$ac_ext >&5
16985+
16986+ac_cv_have_decl_fread_unlocked=no
16987+fi
16988+rm -f conftest.$ac_objext conftest.$ac_ext
16989+fi
16990+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
16991+echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
16992+if test $ac_cv_have_decl_fread_unlocked = yes; then
16993+
16994+cat >>confdefs.h <<_ACEOF
16995+#define HAVE_DECL_FREAD_UNLOCKED 1
16996+_ACEOF
16997+
16998+
16999+else
17000+ cat >>confdefs.h <<_ACEOF
17001+#define HAVE_DECL_FREAD_UNLOCKED 0
17002+_ACEOF
17003+
17004+
17005+fi
17006+
17007+
17008+
17009+
17010+ echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
17011+echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
17012+if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
17013+ echo $ECHO_N "(cached) $ECHO_C" >&6
17014+else
17015+ cat >conftest.$ac_ext <<_ACEOF
17016+#line $LINENO "configure"
17017+/* confdefs.h. */
17018+_ACEOF
17019+cat confdefs.h >>conftest.$ac_ext
17020+cat >>conftest.$ac_ext <<_ACEOF
17021+/* end confdefs.h. */
17022+$ac_includes_default
17023+int
17024+main ()
17025+{
17026+#ifndef fwrite_unlocked
17027+ char *p = (char *) fwrite_unlocked;
17028+#endif
17029+
17030+ ;
17031+ return 0;
17032+}
17033+_ACEOF
17034+rm -f conftest.$ac_objext
17035+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17036+ (eval $ac_compile) 2>&5
17037+ ac_status=$?
17038+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17039+ (exit $ac_status); } &&
17040+ { ac_try='test -s conftest.$ac_objext'
17041+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17042+ (eval $ac_try) 2>&5
17043+ ac_status=$?
17044+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045+ (exit $ac_status); }; }; then
17046+ ac_cv_have_decl_fwrite_unlocked=yes
17047+else
17048+ echo "$as_me: failed program was:" >&5
17049+sed 's/^/| /' conftest.$ac_ext >&5
17050+
17051+ac_cv_have_decl_fwrite_unlocked=no
17052+fi
17053+rm -f conftest.$ac_objext conftest.$ac_ext
17054+fi
17055+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
17056+echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
17057+if test $ac_cv_have_decl_fwrite_unlocked = yes; then
17058+
17059+cat >>confdefs.h <<_ACEOF
17060+#define HAVE_DECL_FWRITE_UNLOCKED 1
17061+_ACEOF
17062+
17063+
17064+else
17065+ cat >>confdefs.h <<_ACEOF
17066+#define HAVE_DECL_FWRITE_UNLOCKED 0
17067+_ACEOF
17068+
17069+
17070+fi
17071+
17072+
17073+
17074+
17075+ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
17076+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
17077+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
17078+ echo $ECHO_N "(cached) $ECHO_C" >&6
17079+else
17080+ cat >conftest.$ac_ext <<_ACEOF
17081+#line $LINENO "configure"
17082+/* confdefs.h. */
17083+_ACEOF
17084+cat confdefs.h >>conftest.$ac_ext
17085+cat >>conftest.$ac_ext <<_ACEOF
17086+/* end confdefs.h. */
17087+$ac_includes_default
17088+int
17089+main ()
17090+{
17091+#ifndef getc_unlocked
17092+ char *p = (char *) getc_unlocked;
17093+#endif
17094+
17095+ ;
17096+ return 0;
17097+}
17098+_ACEOF
17099+rm -f conftest.$ac_objext
17100+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17101+ (eval $ac_compile) 2>&5
17102+ ac_status=$?
17103+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17104+ (exit $ac_status); } &&
17105+ { ac_try='test -s conftest.$ac_objext'
17106+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17107+ (eval $ac_try) 2>&5
17108+ ac_status=$?
17109+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110+ (exit $ac_status); }; }; then
17111+ ac_cv_have_decl_getc_unlocked=yes
17112+else
17113+ echo "$as_me: failed program was:" >&5
17114+sed 's/^/| /' conftest.$ac_ext >&5
17115+
17116+ac_cv_have_decl_getc_unlocked=no
17117+fi
17118+rm -f conftest.$ac_objext conftest.$ac_ext
17119+fi
17120+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
17121+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
17122+if test $ac_cv_have_decl_getc_unlocked = yes; then
17123+
17124+cat >>confdefs.h <<_ACEOF
17125+#define HAVE_DECL_GETC_UNLOCKED 1
17126+_ACEOF
17127+
17128+
17129+else
17130+ cat >>confdefs.h <<_ACEOF
17131+#define HAVE_DECL_GETC_UNLOCKED 0
17132+_ACEOF
17133+
17134+
17135+fi
17136+
17137+
17138+
17139+
17140+ echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
17141+echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
17142+if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
17143+ echo $ECHO_N "(cached) $ECHO_C" >&6
17144+else
17145+ cat >conftest.$ac_ext <<_ACEOF
17146+#line $LINENO "configure"
17147+/* confdefs.h. */
17148+_ACEOF
17149+cat confdefs.h >>conftest.$ac_ext
17150+cat >>conftest.$ac_ext <<_ACEOF
17151+/* end confdefs.h. */
17152+$ac_includes_default
17153+int
17154+main ()
17155+{
17156+#ifndef getchar_unlocked
17157+ char *p = (char *) getchar_unlocked;
17158+#endif
17159+
17160+ ;
17161+ return 0;
17162+}
17163+_ACEOF
17164+rm -f conftest.$ac_objext
17165+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17166+ (eval $ac_compile) 2>&5
17167+ ac_status=$?
17168+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17169+ (exit $ac_status); } &&
17170+ { ac_try='test -s conftest.$ac_objext'
17171+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17172+ (eval $ac_try) 2>&5
17173+ ac_status=$?
17174+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175+ (exit $ac_status); }; }; then
17176+ ac_cv_have_decl_getchar_unlocked=yes
17177+else
17178+ echo "$as_me: failed program was:" >&5
17179+sed 's/^/| /' conftest.$ac_ext >&5
17180+
17181+ac_cv_have_decl_getchar_unlocked=no
17182+fi
17183+rm -f conftest.$ac_objext conftest.$ac_ext
17184+fi
17185+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
17186+echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
17187+if test $ac_cv_have_decl_getchar_unlocked = yes; then
17188+
17189+cat >>confdefs.h <<_ACEOF
17190+#define HAVE_DECL_GETCHAR_UNLOCKED 1
17191+_ACEOF
17192+
17193+
17194+else
17195+ cat >>confdefs.h <<_ACEOF
17196+#define HAVE_DECL_GETCHAR_UNLOCKED 0
17197+_ACEOF
17198+
17199+
17200+fi
17201+
17202+
17203+
17204+
17205+ echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
17206+echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
17207+if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
17208+ echo $ECHO_N "(cached) $ECHO_C" >&6
17209+else
17210+ cat >conftest.$ac_ext <<_ACEOF
17211+#line $LINENO "configure"
17212+/* confdefs.h. */
17213+_ACEOF
17214+cat confdefs.h >>conftest.$ac_ext
17215+cat >>conftest.$ac_ext <<_ACEOF
17216+/* end confdefs.h. */
17217+$ac_includes_default
17218+int
17219+main ()
17220+{
17221+#ifndef putc_unlocked
17222+ char *p = (char *) putc_unlocked;
17223+#endif
17224+
17225+ ;
17226+ return 0;
17227+}
17228+_ACEOF
17229+rm -f conftest.$ac_objext
17230+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17231+ (eval $ac_compile) 2>&5
17232+ ac_status=$?
17233+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17234+ (exit $ac_status); } &&
17235+ { ac_try='test -s conftest.$ac_objext'
17236+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17237+ (eval $ac_try) 2>&5
17238+ ac_status=$?
17239+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240+ (exit $ac_status); }; }; then
17241+ ac_cv_have_decl_putc_unlocked=yes
17242+else
17243+ echo "$as_me: failed program was:" >&5
17244+sed 's/^/| /' conftest.$ac_ext >&5
17245+
17246+ac_cv_have_decl_putc_unlocked=no
17247+fi
17248+rm -f conftest.$ac_objext conftest.$ac_ext
17249+fi
17250+echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
17251+echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
17252+if test $ac_cv_have_decl_putc_unlocked = yes; then
17253+
17254+cat >>confdefs.h <<_ACEOF
17255+#define HAVE_DECL_PUTC_UNLOCKED 1
17256+_ACEOF
17257+
17258+
17259+else
17260+ cat >>confdefs.h <<_ACEOF
17261+#define HAVE_DECL_PUTC_UNLOCKED 0
17262+_ACEOF
17263+
17264+
17265+fi
17266+
17267+
17268+
17269+
17270+ echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
17271+echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
17272+if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
17273+ echo $ECHO_N "(cached) $ECHO_C" >&6
17274+else
17275+ cat >conftest.$ac_ext <<_ACEOF
17276+#line $LINENO "configure"
17277+/* confdefs.h. */
17278+_ACEOF
17279+cat confdefs.h >>conftest.$ac_ext
17280+cat >>conftest.$ac_ext <<_ACEOF
17281+/* end confdefs.h. */
17282+$ac_includes_default
17283+int
17284+main ()
17285+{
17286+#ifndef putchar_unlocked
17287+ char *p = (char *) putchar_unlocked;
17288+#endif
17289+
17290+ ;
17291+ return 0;
17292+}
17293+_ACEOF
17294+rm -f conftest.$ac_objext
17295+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17296+ (eval $ac_compile) 2>&5
17297+ ac_status=$?
17298+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299+ (exit $ac_status); } &&
17300+ { ac_try='test -s conftest.$ac_objext'
17301+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17302+ (eval $ac_try) 2>&5
17303+ ac_status=$?
17304+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305+ (exit $ac_status); }; }; then
17306+ ac_cv_have_decl_putchar_unlocked=yes
17307+else
17308+ echo "$as_me: failed program was:" >&5
17309+sed 's/^/| /' conftest.$ac_ext >&5
17310+
17311+ac_cv_have_decl_putchar_unlocked=no
17312+fi
17313+rm -f conftest.$ac_objext conftest.$ac_ext
17314+fi
17315+echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
17316+echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
17317+if test $ac_cv_have_decl_putchar_unlocked = yes; then
17318+
17319+cat >>confdefs.h <<_ACEOF
17320+#define HAVE_DECL_PUTCHAR_UNLOCKED 1
17321+_ACEOF
17322+
17323+
17324+else
17325+ cat >>confdefs.h <<_ACEOF
17326+#define HAVE_DECL_PUTCHAR_UNLOCKED 0
17327+_ACEOF
17328+
17329+
17330+fi
17331+
17332+
17333+
17334+
17335+
17336+
17337+
17338+ :
17339+
17340+
17341+
17342+
17343+
17344+
17345+
17346+
17347+
17348+
17349+
17350+
17351+
17352+
17353+
17354+
17355+
17356+
17357+
17358+
17359+
17360+
17361+
17362+
17363+
17364+
17365+
17366+
17367+
17368+
17369+
17370+
17371+
17372+
17373+
17374+
17375+
17376+
17377+
17378+
17379+
17380+
17381+
17382+
17383+ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
17384+
17385+ :
17386
17387 fi
17388
17389-echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
17390-echo "configure:2668: checking whether closedir returns void" >&5
17391-if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
17392- echo $ac_n "(cached) $ac_c" 1>&6
17393+
17394+
17395+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
17396+
17397+ :
17398+
17399+ fi
17400+
17401+echo "$as_me:$LINENO: checking whether closedir returns void" >&5
17402+echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
17403+if test "${ac_cv_func_closedir_void+set}" = set; then
17404+ echo $ECHO_N "(cached) $ECHO_C" >&6
17405 else
17406 if test "$cross_compiling" = yes; then
17407 ac_cv_func_closedir_void=yes
17408 else
17409- cat > conftest.$ac_ext <<EOF
17410-#line 2676 "configure"
17411-#include "confdefs.h"
17412-#include <sys/types.h>
17413+ cat >conftest.$ac_ext <<_ACEOF
17414+#line $LINENO "configure"
17415+/* confdefs.h. */
17416+_ACEOF
17417+cat confdefs.h >>conftest.$ac_ext
17418+cat >>conftest.$ac_ext <<_ACEOF
17419+/* end confdefs.h. */
17420+$ac_includes_default
17421 #include <$ac_header_dirent>
17422-int closedir(); main() { exit(closedir(opendir(".")) != 0); }
17423-EOF
17424-if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
17425-then
17426+#ifndef __cplusplus
17427+int closedir ();
17428+#endif
17429+
17430+int
17431+main ()
17432+{
17433+exit (closedir (opendir (".")) != 0);
17434+ ;
17435+ return 0;
17436+}
17437+_ACEOF
17438+rm -f conftest$ac_exeext
17439+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17440+ (eval $ac_link) 2>&5
17441+ ac_status=$?
17442+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17443+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17444+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17445+ (eval $ac_try) 2>&5
17446+ ac_status=$?
17447+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448+ (exit $ac_status); }; }; then
17449 ac_cv_func_closedir_void=no
17450 else
17451- echo "configure: failed program was:" >&5
17452- cat conftest.$ac_ext >&5
17453- rm -fr conftest*
17454- ac_cv_func_closedir_void=yes
17455+ echo "$as_me: program exited with status $ac_status" >&5
17456+echo "$as_me: failed program was:" >&5
17457+sed 's/^/| /' conftest.$ac_ext >&5
17458+
17459+( exit $ac_status )
17460+ac_cv_func_closedir_void=yes
17461 fi
17462-rm -fr conftest*
17463+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17464 fi
17465-
17466 fi
17467-
17468-echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
17469+echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
17470+echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
17471 if test $ac_cv_func_closedir_void = yes; then
17472- cat >> confdefs.h <<\EOF
17473+
17474+cat >>confdefs.h <<\_ACEOF
17475 #define CLOSEDIR_VOID 1
17476-EOF
17477+_ACEOF
17478
17479 fi
17480
17481-echo $ac_n "checking for vprintf""... $ac_c" 1>&6
17482-echo "configure:2705: checking for vprintf" >&5
17483-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
17484- echo $ac_n "(cached) $ac_c" 1>&6
17485+
17486+
17487+for ac_header in fcntl.h unistd.h
17488+do
17489+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17490+if eval "test \"\${$as_ac_Header+set}\" = set"; then
17491+ echo "$as_me:$LINENO: checking for $ac_header" >&5
17492+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17493+if eval "test \"\${$as_ac_Header+set}\" = set"; then
17494+ echo $ECHO_N "(cached) $ECHO_C" >&6
17495+fi
17496+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17497+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17498 else
17499- cat > conftest.$ac_ext <<EOF
17500-#line 2710 "configure"
17501-#include "confdefs.h"
17502+ # Is the header compilable?
17503+echo "$as_me:$LINENO: checking $ac_header usability" >&5
17504+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17505+cat >conftest.$ac_ext <<_ACEOF
17506+#line $LINENO "configure"
17507+/* confdefs.h. */
17508+_ACEOF
17509+cat confdefs.h >>conftest.$ac_ext
17510+cat >>conftest.$ac_ext <<_ACEOF
17511+/* end confdefs.h. */
17512+$ac_includes_default
17513+#include <$ac_header>
17514+_ACEOF
17515+rm -f conftest.$ac_objext
17516+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17517+ (eval $ac_compile) 2>&5
17518+ ac_status=$?
17519+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520+ (exit $ac_status); } &&
17521+ { ac_try='test -s conftest.$ac_objext'
17522+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17523+ (eval $ac_try) 2>&5
17524+ ac_status=$?
17525+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526+ (exit $ac_status); }; }; then
17527+ ac_header_compiler=yes
17528+else
17529+ echo "$as_me: failed program was:" >&5
17530+sed 's/^/| /' conftest.$ac_ext >&5
17531+
17532+ac_header_compiler=no
17533+fi
17534+rm -f conftest.$ac_objext conftest.$ac_ext
17535+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17536+echo "${ECHO_T}$ac_header_compiler" >&6
17537+
17538+# Is the header present?
17539+echo "$as_me:$LINENO: checking $ac_header presence" >&5
17540+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17541+cat >conftest.$ac_ext <<_ACEOF
17542+#line $LINENO "configure"
17543+/* confdefs.h. */
17544+_ACEOF
17545+cat confdefs.h >>conftest.$ac_ext
17546+cat >>conftest.$ac_ext <<_ACEOF
17547+/* end confdefs.h. */
17548+#include <$ac_header>
17549+_ACEOF
17550+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17551+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17552+ ac_status=$?
17553+ grep -v '^ *+' conftest.er1 >conftest.err
17554+ rm -f conftest.er1
17555+ cat conftest.err >&5
17556+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557+ (exit $ac_status); } >/dev/null; then
17558+ if test -s conftest.err; then
17559+ ac_cpp_err=$ac_c_preproc_warn_flag
17560+ else
17561+ ac_cpp_err=
17562+ fi
17563+else
17564+ ac_cpp_err=yes
17565+fi
17566+if test -z "$ac_cpp_err"; then
17567+ ac_header_preproc=yes
17568+else
17569+ echo "$as_me: failed program was:" >&5
17570+sed 's/^/| /' conftest.$ac_ext >&5
17571+
17572+ ac_header_preproc=no
17573+fi
17574+rm -f conftest.err conftest.$ac_ext
17575+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17576+echo "${ECHO_T}$ac_header_preproc" >&6
17577+
17578+# So? What about this header?
17579+case $ac_header_compiler:$ac_header_preproc in
17580+ yes:no )
17581+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17582+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17583+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17584+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17585+ (
17586+ cat <<\_ASBOX
17587+## ------------------------------------ ##
17588+## Report this to bug-autoconf@gnu.org. ##
17589+## ------------------------------------ ##
17590+_ASBOX
17591+ ) |
17592+ sed "s/^/$as_me: WARNING: /" >&2
17593+ ;;
17594+ no:yes )
17595+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17596+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17597+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17598+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17599+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17600+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17601+ (
17602+ cat <<\_ASBOX
17603+## ------------------------------------ ##
17604+## Report this to bug-autoconf@gnu.org. ##
17605+## ------------------------------------ ##
17606+_ASBOX
17607+ ) |
17608+ sed "s/^/$as_me: WARNING: /" >&2
17609+ ;;
17610+esac
17611+echo "$as_me:$LINENO: checking for $ac_header" >&5
17612+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17613+if eval "test \"\${$as_ac_Header+set}\" = set"; then
17614+ echo $ECHO_N "(cached) $ECHO_C" >&6
17615+else
17616+ eval "$as_ac_Header=$ac_header_preproc"
17617+fi
17618+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17619+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17620+
17621+fi
17622+if test `eval echo '${'$as_ac_Header'}'` = yes; then
17623+ cat >>confdefs.h <<_ACEOF
17624+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17625+_ACEOF
17626+
17627+fi
17628+
17629+done
17630+
17631+ echo "$as_me:$LINENO: checking for DOS-style setmode" >&5
17632+echo $ECHO_N "checking for DOS-style setmode... $ECHO_C" >&6
17633+if test "${ac_cv_func_setmode_dos+set}" = set; then
17634+ echo $ECHO_N "(cached) $ECHO_C" >&6
17635+else
17636+ cat >conftest.$ac_ext <<_ACEOF
17637+#line $LINENO "configure"
17638+/* confdefs.h. */
17639+_ACEOF
17640+cat confdefs.h >>conftest.$ac_ext
17641+cat >>conftest.$ac_ext <<_ACEOF
17642+/* end confdefs.h. */
17643+#include <io.h>
17644+ #if HAVE_FCNTL_H
17645+ # include <fcntl.h>
17646+ #endif
17647+ #if HAVE_UNISTD_H
17648+ # include <unistd.h>
17649+ #endif
17650+int
17651+main ()
17652+{
17653+int ret = setmode && setmode (1, O_BINARY);
17654+ ;
17655+ return 0;
17656+}
17657+_ACEOF
17658+rm -f conftest.$ac_objext conftest$ac_exeext
17659+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17660+ (eval $ac_link) 2>&5
17661+ ac_status=$?
17662+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17663+ (exit $ac_status); } &&
17664+ { ac_try='test -s conftest$ac_exeext'
17665+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17666+ (eval $ac_try) 2>&5
17667+ ac_status=$?
17668+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669+ (exit $ac_status); }; }; then
17670+ ac_cv_func_setmode_dos=yes
17671+else
17672+ echo "$as_me: failed program was:" >&5
17673+sed 's/^/| /' conftest.$ac_ext >&5
17674+
17675+ac_cv_func_setmode_dos=no
17676+fi
17677+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17678+fi
17679+echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
17680+echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
17681+ if test $ac_cv_func_setmode_dos = yes; then
17682+
17683+cat >>confdefs.h <<\_ACEOF
17684+#define HAVE_SETMODE_DOS 1
17685+_ACEOF
17686+
17687+ fi
17688+
17689+for ac_func in vprintf
17690+do
17691+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17692+echo "$as_me:$LINENO: checking for $ac_func" >&5
17693+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17694+if eval "test \"\${$as_ac_var+set}\" = set"; then
17695+ echo $ECHO_N "(cached) $ECHO_C" >&6
17696+else
17697+ cat >conftest.$ac_ext <<_ACEOF
17698+#line $LINENO "configure"
17699+/* confdefs.h. */
17700+_ACEOF
17701+cat confdefs.h >>conftest.$ac_ext
17702+cat >>conftest.$ac_ext <<_ACEOF
17703+/* end confdefs.h. */
17704 /* System header to define __stub macros and hopefully few prototypes,
17705- which can conflict with char vprintf(); below. */
17706-#include <assert.h>
17707+ which can conflict with char $ac_func (); below.
17708+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17709+ <limits.h> exists even on freestanding compilers. */
17710+#ifdef __STDC__
17711+# include <limits.h>
17712+#else
17713+# include <assert.h>
17714+#endif
17715 /* Override any gcc2 internal prototype to avoid an error. */
17716+#ifdef __cplusplus
17717+extern "C"
17718+{
17719+#endif
17720 /* We use char because int might match the return type of a gcc2
17721- builtin and then its argument prototype would still apply. */
17722-char vprintf();
17723+ builtin and then its argument prototype would still apply. */
17724+char $ac_func ();
17725+/* The GNU C library defines this for functions which it implements
17726+ to always fail with ENOSYS. Some functions are actually named
17727+ something starting with __ and the normal name is an alias. */
17728+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17729+choke me
17730+#else
17731+char (*f) () = $ac_func;
17732+#endif
17733+#ifdef __cplusplus
17734+}
17735+#endif
17736
17737-int main() {
17738+int
17739+main ()
17740+{
17741+return f != $ac_func;
17742+ ;
17743+ return 0;
17744+}
17745+_ACEOF
17746+rm -f conftest.$ac_objext conftest$ac_exeext
17747+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17748+ (eval $ac_link) 2>&5
17749+ ac_status=$?
17750+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751+ (exit $ac_status); } &&
17752+ { ac_try='test -s conftest$ac_exeext'
17753+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754+ (eval $ac_try) 2>&5
17755+ ac_status=$?
17756+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757+ (exit $ac_status); }; }; then
17758+ eval "$as_ac_var=yes"
17759+else
17760+ echo "$as_me: failed program was:" >&5
17761+sed 's/^/| /' conftest.$ac_ext >&5
17762
17763+eval "$as_ac_var=no"
17764+fi
17765+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17766+fi
17767+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17768+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17769+if test `eval echo '${'$as_ac_var'}'` = yes; then
17770+ cat >>confdefs.h <<_ACEOF
17771+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17772+_ACEOF
17773+
17774+echo "$as_me:$LINENO: checking for _doprnt" >&5
17775+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
17776+if test "${ac_cv_func__doprnt+set}" = set; then
17777+ echo $ECHO_N "(cached) $ECHO_C" >&6
17778+else
17779+ cat >conftest.$ac_ext <<_ACEOF
17780+#line $LINENO "configure"
17781+/* confdefs.h. */
17782+_ACEOF
17783+cat confdefs.h >>conftest.$ac_ext
17784+cat >>conftest.$ac_ext <<_ACEOF
17785+/* end confdefs.h. */
17786+/* System header to define __stub macros and hopefully few prototypes,
17787+ which can conflict with char _doprnt (); below.
17788+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17789+ <limits.h> exists even on freestanding compilers. */
17790+#ifdef __STDC__
17791+# include <limits.h>
17792+#else
17793+# include <assert.h>
17794+#endif
17795+/* Override any gcc2 internal prototype to avoid an error. */
17796+#ifdef __cplusplus
17797+extern "C"
17798+{
17799+#endif
17800+/* We use char because int might match the return type of a gcc2
17801+ builtin and then its argument prototype would still apply. */
17802+char _doprnt ();
17803 /* The GNU C library defines this for functions which it implements
17804 to always fail with ENOSYS. Some functions are actually named
17805 something starting with __ and the normal name is an alias. */
17806-#if defined (__stub_vprintf) || defined (__stub___vprintf)
17807+#if defined (__stub__doprnt) || defined (__stub____doprnt)
17808 choke me
17809 #else
17810-vprintf();
17811+char (*f) () = _doprnt;
17812+#endif
17813+#ifdef __cplusplus
17814+}
17815 #endif
17816
17817-; return 0; }
17818-EOF
17819-if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17820- rm -rf conftest*
17821- eval "ac_cv_func_vprintf=yes"
17822+int
17823+main ()
17824+{
17825+return f != _doprnt;
17826+ ;
17827+ return 0;
17828+}
17829+_ACEOF
17830+rm -f conftest.$ac_objext conftest$ac_exeext
17831+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17832+ (eval $ac_link) 2>&5
17833+ ac_status=$?
17834+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835+ (exit $ac_status); } &&
17836+ { ac_try='test -s conftest$ac_exeext'
17837+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17838+ (eval $ac_try) 2>&5
17839+ ac_status=$?
17840+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841+ (exit $ac_status); }; }; then
17842+ ac_cv_func__doprnt=yes
17843 else
17844- echo "configure: failed program was:" >&5
17845- cat conftest.$ac_ext >&5
17846- rm -rf conftest*
17847- eval "ac_cv_func_vprintf=no"
17848+ echo "$as_me: failed program was:" >&5
17849+sed 's/^/| /' conftest.$ac_ext >&5
17850+
17851+ac_cv_func__doprnt=no
17852 fi
17853-rm -f conftest*
17854+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17855 fi
17856+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
17857+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
17858+if test $ac_cv_func__doprnt = yes; then
17859
17860-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17861- echo "$ac_t""yes" 1>&6
17862- cat >> confdefs.h <<\EOF
17863-#define HAVE_VPRINTF 1
17864-EOF
17865+cat >>confdefs.h <<\_ACEOF
17866+#define HAVE_DOPRNT 1
17867+_ACEOF
17868
17869-else
17870- echo "$ac_t""no" 1>&6
17871 fi
17872
17873-if test "$ac_cv_func_vprintf" != yes; then
17874-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17875-echo "configure:2757: checking for _doprnt" >&5
17876-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
17877- echo $ac_n "(cached) $ac_c" 1>&6
17878+fi
17879+done
17880+
17881+
17882+
17883+for ac_func in mkdir
17884+do
17885+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17886+echo "$as_me:$LINENO: checking for $ac_func" >&5
17887+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17888+if eval "test \"\${$as_ac_var+set}\" = set"; then
17889+ echo $ECHO_N "(cached) $ECHO_C" >&6
17890 else
17891- cat > conftest.$ac_ext <<EOF
17892-#line 2762 "configure"
17893-#include "confdefs.h"
17894+ cat >conftest.$ac_ext <<_ACEOF
17895+#line $LINENO "configure"
17896+/* confdefs.h. */
17897+_ACEOF
17898+cat confdefs.h >>conftest.$ac_ext
17899+cat >>conftest.$ac_ext <<_ACEOF
17900+/* end confdefs.h. */
17901 /* System header to define __stub macros and hopefully few prototypes,
17902- which can conflict with char _doprnt(); below. */
17903-#include <assert.h>
17904+ which can conflict with char $ac_func (); below.
17905+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17906+ <limits.h> exists even on freestanding compilers. */
17907+#ifdef __STDC__
17908+# include <limits.h>
17909+#else
17910+# include <assert.h>
17911+#endif
17912 /* Override any gcc2 internal prototype to avoid an error. */
17913+#ifdef __cplusplus
17914+extern "C"
17915+{
17916+#endif
17917 /* We use char because int might match the return type of a gcc2
17918- builtin and then its argument prototype would still apply. */
17919-char _doprnt();
17920-
17921-int main() {
17922-
17923+ builtin and then its argument prototype would still apply. */
17924+char $ac_func ();
17925 /* The GNU C library defines this for functions which it implements
17926 to always fail with ENOSYS. Some functions are actually named
17927 something starting with __ and the normal name is an alias. */
17928-#if defined (__stub__doprnt) || defined (__stub____doprnt)
17929+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17930 choke me
17931 #else
17932-_doprnt();
17933+char (*f) () = $ac_func;
17934+#endif
17935+#ifdef __cplusplus
17936+}
17937 #endif
17938
17939-; return 0; }
17940-EOF
17941-if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17942- rm -rf conftest*
17943- eval "ac_cv_func__doprnt=yes"
17944+int
17945+main ()
17946+{
17947+return f != $ac_func;
17948+ ;
17949+ return 0;
17950+}
17951+_ACEOF
17952+rm -f conftest.$ac_objext conftest$ac_exeext
17953+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17954+ (eval $ac_link) 2>&5
17955+ ac_status=$?
17956+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957+ (exit $ac_status); } &&
17958+ { ac_try='test -s conftest$ac_exeext'
17959+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17960+ (eval $ac_try) 2>&5
17961+ ac_status=$?
17962+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17963+ (exit $ac_status); }; }; then
17964+ eval "$as_ac_var=yes"
17965 else
17966- echo "configure: failed program was:" >&5
17967- cat conftest.$ac_ext >&5
17968- rm -rf conftest*
17969- eval "ac_cv_func__doprnt=no"
17970+ echo "$as_me: failed program was:" >&5
17971+sed 's/^/| /' conftest.$ac_ext >&5
17972+
17973+eval "$as_ac_var=no"
17974 fi
17975-rm -f conftest*
17976+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17977 fi
17978+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17979+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17980+if test `eval echo '${'$as_ac_var'}'` = yes; then
17981+ cat >>confdefs.h <<_ACEOF
17982+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17983+_ACEOF
17984
17985-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17986- echo "$ac_t""yes" 1>&6
17987- cat >> confdefs.h <<\EOF
17988-#define HAVE_DOPRNT 1
17989-EOF
17990+fi
17991+done
17992
17993+ echo "$as_me:$LINENO: checking whether mkdir takes only one argument" >&5
17994+echo $ECHO_N "checking whether mkdir takes only one argument... $ECHO_C" >&6
17995+if test "${patch_cv_mkdir_takes_one_arg+set}" = set; then
17996+ echo $ECHO_N "(cached) $ECHO_C" >&6
17997 else
17998- echo "$ac_t""no" 1>&6
17999+ patch_cv_mkdir_takes_one_arg=no
18000+ if test $ac_cv_func_mkdir = yes; then
18001+ cat >conftest.$ac_ext <<_ACEOF
18002+#line $LINENO "configure"
18003+/* confdefs.h. */
18004+_ACEOF
18005+cat confdefs.h >>conftest.$ac_ext
18006+cat >>conftest.$ac_ext <<_ACEOF
18007+/* end confdefs.h. */
18008+
18009+#include <sys/types.h>
18010+#include <sys/stat.h>
18011+
18012+int
18013+main ()
18014+{
18015+mkdir (".", 0);
18016+ ;
18017+ return 0;
18018+}
18019+_ACEOF
18020+rm -f conftest.$ac_objext
18021+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18022+ (eval $ac_compile) 2>&5
18023+ ac_status=$?
18024+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025+ (exit $ac_status); } &&
18026+ { ac_try='test -s conftest.$ac_objext'
18027+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18028+ (eval $ac_try) 2>&5
18029+ ac_status=$?
18030+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031+ (exit $ac_status); }; }; then
18032+ :
18033+else
18034+ echo "$as_me: failed program was:" >&5
18035+sed 's/^/| /' conftest.$ac_ext >&5
18036+
18037+cat >conftest.$ac_ext <<_ACEOF
18038+#line $LINENO "configure"
18039+/* confdefs.h. */
18040+_ACEOF
18041+cat confdefs.h >>conftest.$ac_ext
18042+cat >>conftest.$ac_ext <<_ACEOF
18043+/* end confdefs.h. */
18044+
18045+#include <sys/types.h>
18046+#include <sys/stat.h>
18047+
18048+int
18049+main ()
18050+{
18051+mkdir (".");
18052+ ;
18053+ return 0;
18054+}
18055+_ACEOF
18056+rm -f conftest.$ac_objext
18057+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18058+ (eval $ac_compile) 2>&5
18059+ ac_status=$?
18060+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061+ (exit $ac_status); } &&
18062+ { ac_try='test -s conftest.$ac_objext'
18063+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18064+ (eval $ac_try) 2>&5
18065+ ac_status=$?
18066+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067+ (exit $ac_status); }; }; then
18068+ patch_cv_mkdir_takes_one_arg=yes
18069+
18070+else
18071+ echo "$as_me: failed program was:" >&5
18072+sed 's/^/| /' conftest.$ac_ext >&5
18073+
18074 fi
18075+rm -f conftest.$ac_objext conftest.$ac_ext
18076
18077 fi
18078+rm -f conftest.$ac_objext conftest.$ac_ext
18079+ fi
18080
18081
18082-echo $ac_n "checking for long file names""... $ac_c" 1>&6
18083-echo "configure:2811: checking for long file names" >&5
18084-if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
18085- echo $ac_n "(cached) $ac_c" 1>&6
18086+fi
18087+echo "$as_me:$LINENO: result: $patch_cv_mkdir_takes_one_arg" >&5
18088+echo "${ECHO_T}$patch_cv_mkdir_takes_one_arg" >&6
18089+ if test $patch_cv_mkdir_takes_one_arg = yes; then
18090+
18091+cat >>confdefs.h <<\_ACEOF
18092+#define MKDIR_TAKES_ONE_ARG 1
18093+_ACEOF
18094+
18095+ fi
18096+
18097+
18098+
18099+
18100+ echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
18101+echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
18102+if test "${ac_cv_win_or_dos+set}" = set; then
18103+ echo $ECHO_N "(cached) $ECHO_C" >&6
18104+else
18105+
18106+ cat >conftest.$ac_ext <<_ACEOF
18107+#line $LINENO "configure"
18108+/* confdefs.h. */
18109+_ACEOF
18110+cat confdefs.h >>conftest.$ac_ext
18111+cat >>conftest.$ac_ext <<_ACEOF
18112+/* end confdefs.h. */
18113+
18114+int
18115+main ()
18116+{
18117+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
18118+neither MSDOS nor Windows
18119+#endif
18120+ ;
18121+ return 0;
18122+}
18123+_ACEOF
18124+rm -f conftest.$ac_objext
18125+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18126+ (eval $ac_compile) 2>&5
18127+ ac_status=$?
18128+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18129+ (exit $ac_status); } &&
18130+ { ac_try='test -s conftest.$ac_objext'
18131+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18132+ (eval $ac_try) 2>&5
18133+ ac_status=$?
18134+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135+ (exit $ac_status); }; }; then
18136+ ac_cv_win_or_dos=yes
18137+else
18138+ echo "$as_me: failed program was:" >&5
18139+sed 's/^/| /' conftest.$ac_ext >&5
18140+
18141+ac_cv_win_or_dos=no
18142+fi
18143+rm -f conftest.$ac_objext conftest.$ac_ext
18144+
18145+fi
18146+echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
18147+echo "${ECHO_T}$ac_cv_win_or_dos" >&6
18148+
18149+ if test x"$ac_cv_win_or_dos" = xyes; then
18150+ ac_fs_accepts_drive_letter_prefix=1
18151+ ac_fs_backslash_is_file_name_separator=1
18152+ else
18153+ ac_fs_accepts_drive_letter_prefix=0
18154+ ac_fs_backslash_is_file_name_separator=0
18155+ fi
18156+
18157+
18158+
18159+
18160+
18161+cat >>confdefs.h <<_ACEOF
18162+#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
18163+_ACEOF
18164+
18165+
18166+
18167+
18168+
18169+
18170+cat >>confdefs.h <<_ACEOF
18171+#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
18172+_ACEOF
18173+
18174+
18175+echo "$as_me:$LINENO: checking for long file names" >&5
18176+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
18177+if test "${ac_cv_sys_long_file_names+set}" = set; then
18178+ echo $ECHO_N "(cached) $ECHO_C" >&6
18179 else
18180 ac_cv_sys_long_file_names=yes
18181 # Test for long file names in all the places we know might matter:
18182@@ -2823,459 +10771,1123 @@
18183 # /var/tmp likewise
18184 # /usr/tmp likewise
18185 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
18186- ac_tmpdirs="$TMPDIR"
18187+ ac_tmpdirs=$TMPDIR
18188 else
18189 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
18190 fi
18191 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
18192 test -d $ac_dir || continue
18193 test -w $ac_dir || continue # It is less confusing to not echo anything here.
18194- (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
18195- (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
18196- val=`cat $ac_dir/conftest9012345 2>/dev/null`
18197- if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
18198+ ac_xdir=$ac_dir/cf$$
18199+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
18200+ ac_tf1=$ac_xdir/conftest9012345
18201+ ac_tf2=$ac_xdir/conftest9012346
18202+ (echo 1 >$ac_tf1) 2>/dev/null
18203+ (echo 2 >$ac_tf2) 2>/dev/null
18204+ ac_val=`cat $ac_tf1 2>/dev/null`
18205+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
18206 ac_cv_sys_long_file_names=no
18207- rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
18208+ rm -rf $ac_xdir 2>/dev/null
18209 break
18210 fi
18211- rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
18212+ rm -rf $ac_xdir 2>/dev/null
18213 done
18214 fi
18215-
18216-echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
18217+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
18218+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
18219 if test $ac_cv_sys_long_file_names = yes; then
18220- cat >> confdefs.h <<\EOF
18221+
18222+cat >>confdefs.h <<\_ACEOF
18223 #define HAVE_LONG_FILE_NAMES 1
18224-EOF
18225+_ACEOF
18226
18227 fi
18228
18229- echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6
18230-echo "configure:2855: checking for d_ino member in directory struct" >&5
18231-if eval "test \"`echo '$''{'jm_cv_struct_dirent_d_ino'+set}'`\" = set"; then
18232- echo $ac_n "(cached) $ac_c" 1>&6
18233-else
18234- cat > conftest.$ac_ext <<EOF
18235-#line 2860 "configure"
18236-#include "confdefs.h"
18237-
18238-#include <sys/types.h>
18239-#ifdef HAVE_DIRENT_H
18240-# include <dirent.h>
18241-#else /* not HAVE_DIRENT_H */
18242-# define dirent direct
18243-# ifdef HAVE_SYS_NDIR_H
18244-# include <sys/ndir.h>
18245-# endif /* HAVE_SYS_NDIR_H */
18246-# ifdef HAVE_SYS_DIR_H
18247-# include <sys/dir.h>
18248-# endif /* HAVE_SYS_DIR_H */
18249-# ifdef HAVE_NDIR_H
18250-# include <ndir.h>
18251-# endif /* HAVE_NDIR_H */
18252-#endif /* HAVE_DIRENT_H */
18253-
18254-int main() {
18255-struct dirent dp; dp.d_ino = 0;
18256-; return 0; }
18257-EOF
18258-if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18259- rm -rf conftest*
18260- jm_cv_struct_dirent_d_ino=yes
18261-else
18262- echo "configure: failed program was:" >&5
18263- cat conftest.$ac_ext >&5
18264- rm -rf conftest*
18265- jm_cv_struct_dirent_d_ino=no
18266-fi
18267-rm -f conftest*
18268-
18269-
18270-fi
18271-
18272-echo "$ac_t""$jm_cv_struct_dirent_d_ino" 1>&6
18273- if test $jm_cv_struct_dirent_d_ino = yes; then
18274- cat >> confdefs.h <<\EOF
18275-#define D_INO_IN_DIRENT 1
18276-EOF
18277-
18278- fi
18279-
18280
18281+ ac_config_files="$ac_config_files Makefile"
18282
18283-trap '' 1 2 15
18284-cat > confcache <<\EOF
18285+cat >confcache <<\_ACEOF
18286 # This file is a shell script that caches the results of configure
18287 # tests run on this system so they can be shared between configure
18288-# scripts and configure runs. It is not useful on other systems.
18289-# If it contains results you don't want to keep, you may remove or edit it.
18290+# scripts and configure runs, see configure's option --config-cache.
18291+# It is not useful on other systems. If it contains results you don't
18292+# want to keep, you may remove or edit it.
18293 #
18294-# By default, configure uses ./config.cache as the cache file,
18295-# creating it if it does not exist already. You can give configure
18296-# the --cache-file=FILE option to use a different cache file; that is
18297-# what configure does when it calls configure scripts in
18298-# subdirectories, so they share the cache.
18299-# Giving --cache-file=/dev/null disables caching, for debugging configure.
18300-# config.status only pays attention to the cache file if you give it the
18301-# --recheck option to rerun configure.
18302+# config.status only pays attention to the cache file if you give it
18303+# the --recheck option to rerun configure.
18304 #
18305-EOF
18306+# `ac_cv_env_foo' variables (set or unset) will be overridden when
18307+# loading this file, other *unset* `ac_cv_foo' will be assigned the
18308+# following values.
18309+
18310+_ACEOF
18311+
18312 # The following way of writing the cache mishandles newlines in values,
18313 # but we know of no workaround that is simple, portable, and efficient.
18314 # So, don't put newlines in cache variables' values.
18315 # Ultrix sh set writes to stderr and can't be redirected directly,
18316 # and sets the high bit in the cache file unless we assign to the vars.
18317-(set) 2>&1 |
18318- case `(ac_space=' '; set | grep ac_space) 2>&1` in
18319- *ac_space=\ *)
18320- # `set' does not quote correctly, so add quotes (double-quote substitution
18321- # turns \\\\ into \\, and sed turns \\ into \).
18322- sed -n \
18323- -e "s/'/'\\\\''/g" \
18324- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
18325- ;;
18326- *)
18327- # `set' quotes correctly as required by POSIX, so do not add quotes.
18328- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
18329- ;;
18330- esac >> confcache
18331-if cmp -s $cache_file confcache; then
18332- :
18333-else
18334+{
18335+ (set) 2>&1 |
18336+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
18337+ *ac_space=\ *)
18338+ # `set' does not quote correctly, so add quotes (double-quote
18339+ # substitution turns \\\\ into \\, and sed turns \\ into \).
18340+ sed -n \
18341+ "s/'/'\\\\''/g;
18342+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18343+ ;;
18344+ *)
18345+ # `set' quotes correctly as required by POSIX, so do not add quotes.
18346+ sed -n \
18347+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18348+ ;;
18349+ esac;
18350+} |
18351+ sed '
18352+ t clear
18353+ : clear
18354+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18355+ t end
18356+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18357+ : end' >>confcache
18358+if diff $cache_file confcache >/dev/null 2>&1; then :; else
18359 if test -w $cache_file; then
18360- echo "updating cache $cache_file"
18361- cat confcache > $cache_file
18362+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18363+ cat confcache >$cache_file
18364 else
18365 echo "not updating unwritable cache $cache_file"
18366 fi
18367 fi
18368 rm -f confcache
18369
18370-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18371-
18372 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18373 # Let make expand exec_prefix.
18374 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18375
18376-# Any assignment to VPATH causes Sun make to only execute
18377-# the first set of double-colon rules, so remove it if not needed.
18378-# If there is a colon in the path, we need to keep it.
18379+# VPATH may cause trouble with some makes, so we remove $(srcdir),
18380+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18381+# trailing colons and then remove the whole line if VPATH becomes empty
18382+# (actually we leave an empty line to preserve line numbers).
18383 if test "x$srcdir" = x.; then
18384- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
18385+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
18386+s/:*\$(srcdir):*/:/;
18387+s/:*\${srcdir}:*/:/;
18388+s/:*@srcdir@:*/:/;
18389+s/^\([^=]*=[ ]*\):*/\1/;
18390+s/:*$//;
18391+s/^[^=]*=[ ]*$//;
18392+}'
18393 fi
18394
18395-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18396-
18397 DEFS=-DHAVE_CONFIG_H
18398
18399-# Without the "./", some shells look in PATH for config.status.
18400-: ${CONFIG_STATUS=./config.status}
18401+ac_libobjs=
18402+ac_ltlibobjs=
18403+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18404+ # 1. Remove the extension, and $U if already installed.
18405+ ac_i=`echo "$ac_i" |
18406+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18407+ # 2. Add them.
18408+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18409+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18410+done
18411+LIBOBJS=$ac_libobjs
18412
18413-echo creating $CONFIG_STATUS
18414-rm -f $CONFIG_STATUS
18415-cat > $CONFIG_STATUS <<EOF
18416-#! /bin/sh
18417-# Generated automatically by configure.
18418+LTLIBOBJS=$ac_ltlibobjs
18419+
18420+
18421+
18422+: ${CONFIG_STATUS=./config.status}
18423+ac_clean_files_save=$ac_clean_files
18424+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18425+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18426+echo "$as_me: creating $CONFIG_STATUS" >&6;}
18427+cat >$CONFIG_STATUS <<_ACEOF
18428+#! $SHELL
18429+# Generated by $as_me.
18430 # Run this file to recreate the current configuration.
18431-# This directory was configured as follows,
18432-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18433-#
18434-# $0 $ac_configure_args
18435-#
18436 # Compiler output produced by configure, useful for debugging
18437-# configure, is in ./config.log if it exists.
18438+# configure, is in config.log if it exists.
18439
18440-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18441-for ac_option
18442+debug=false
18443+ac_cs_recheck=false
18444+ac_cs_silent=false
18445+SHELL=\${CONFIG_SHELL-$SHELL}
18446+_ACEOF
18447+
18448+cat >>$CONFIG_STATUS <<\_ACEOF
18449+## --------------------- ##
18450+## M4sh Initialization. ##
18451+## --------------------- ##
18452+
18453+# Be Bourne compatible
18454+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18455+ emulate sh
18456+ NULLCMD=:
18457+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18458+ # is contrary to our usage. Disable this feature.
18459+ alias -g '${1+"$@"}'='"$@"'
18460+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18461+ set -o posix
18462+fi
18463+
18464+# Support unset when possible.
18465+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18466+ as_unset=unset
18467+else
18468+ as_unset=false
18469+fi
18470+
18471+
18472+# Work around bugs in pre-3.0 UWIN ksh.
18473+$as_unset ENV MAIL MAILPATH
18474+PS1='$ '
18475+PS2='> '
18476+PS4='+ '
18477+
18478+# NLS nuisances.
18479+for as_var in \
18480+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18481+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18482+ LC_TELEPHONE LC_TIME
18483 do
18484- case "\$ac_option" in
18485- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18486- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
18487- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
18488- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
18489- echo "$CONFIG_STATUS generated by autoconf version 2.13"
18490- exit 0 ;;
18491- -help | --help | --hel | --he | --h)
18492- echo "\$ac_cs_usage"; exit 0 ;;
18493- *) echo "\$ac_cs_usage"; exit 1 ;;
18494- esac
18495+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18496+ eval $as_var=C; export $as_var
18497+ else
18498+ $as_unset $as_var
18499+ fi
18500 done
18501
18502-ac_given_srcdir=$srcdir
18503-ac_given_INSTALL="$INSTALL"
18504+# Required to use basename.
18505+if expr a : '\(a\)' >/dev/null 2>&1; then
18506+ as_expr=expr
18507+else
18508+ as_expr=false
18509+fi
18510
18511-trap 'rm -fr `echo "Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18512-EOF
18513-cat >> $CONFIG_STATUS <<EOF
18514+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18515+ as_basename=basename
18516+else
18517+ as_basename=false
18518+fi
18519
18520-# Protect against being on the right side of a sed subst in config.status.
18521-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
18522- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
18523-$ac_vpsub
18524-$extrasub
18525-s%@SHELL@%$SHELL%g
18526-s%@CFLAGS@%$CFLAGS%g
18527-s%@CPPFLAGS@%$CPPFLAGS%g
18528-s%@CXXFLAGS@%$CXXFLAGS%g
18529-s%@FFLAGS@%$FFLAGS%g
18530-s%@DEFS@%$DEFS%g
18531-s%@LDFLAGS@%$LDFLAGS%g
18532-s%@LIBS@%$LIBS%g
18533-s%@exec_prefix@%$exec_prefix%g
18534-s%@prefix@%$prefix%g
18535-s%@program_transform_name@%$program_transform_name%g
18536-s%@bindir@%$bindir%g
18537-s%@sbindir@%$sbindir%g
18538-s%@libexecdir@%$libexecdir%g
18539-s%@datadir@%$datadir%g
18540-s%@sysconfdir@%$sysconfdir%g
18541-s%@sharedstatedir@%$sharedstatedir%g
18542-s%@localstatedir@%$localstatedir%g
18543-s%@libdir@%$libdir%g
18544-s%@includedir@%$includedir%g
18545-s%@oldincludedir@%$oldincludedir%g
18546-s%@infodir@%$infodir%g
18547-s%@mandir@%$mandir%g
18548-s%@host@%$host%g
18549-s%@host_alias@%$host_alias%g
18550-s%@host_cpu@%$host_cpu%g
18551-s%@host_vendor@%$host_vendor%g
18552-s%@host_os@%$host_os%g
18553-s%@PACKAGE@%$PACKAGE%g
18554-s%@VERSION@%$VERSION%g
18555-s%@CC@%$CC%g
18556-s%@CPP@%$CPP%g
18557-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
18558-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
18559-s%@INSTALL_DATA@%$INSTALL_DATA%g
18560-s%@SET_MAKE@%$SET_MAKE%g
18561-s%@ed_PROGRAM@%$ed_PROGRAM%g
18562-s%@build@%$build%g
18563-s%@build_alias@%$build_alias%g
18564-s%@build_cpu@%$build_cpu%g
18565-s%@build_vendor@%$build_vendor%g
18566-s%@build_os@%$build_os%g
18567-s%@GETCONF@%$GETCONF%g
18568-s%@EXEEXT@%$EXEEXT%g
18569-s%@U@%$U%g
18570-s%@ANSI2KNR@%$ANSI2KNR%g
18571-s%@LIBOBJS@%$LIBOBJS%g
18572
18573-CEOF
18574-EOF
18575+# Name of the executable.
18576+as_me=`$as_basename "$0" ||
18577+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18578+ X"$0" : 'X\(//\)$' \| \
18579+ X"$0" : 'X\(/\)$' \| \
18580+ . : '\(.\)' 2>/dev/null ||
18581+echo X/"$0" |
18582+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18583+ /^X\/\(\/\/\)$/{ s//\1/; q; }
18584+ /^X\/\(\/\).*/{ s//\1/; q; }
18585+ s/.*/./; q'`
18586
18587-cat >> $CONFIG_STATUS <<\EOF
18588
18589-# Split the substitutions into bite-sized pieces for seds with
18590-# small command number limits, like on Digital OSF/1 and HP-UX.
18591-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18592-ac_file=1 # Number of current file.
18593-ac_beg=1 # First line for current file.
18594-ac_end=$ac_max_sed_cmds # Line after last line for current file.
18595-ac_more_lines=:
18596-ac_sed_cmds=""
18597-while $ac_more_lines; do
18598- if test $ac_beg -gt 1; then
18599- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18600+# PATH needs CR, and LINENO needs CR and PATH.
18601+# Avoid depending upon Character Ranges.
18602+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18603+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18604+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18605+as_cr_digits='0123456789'
18606+as_cr_alnum=$as_cr_Letters$as_cr_digits
18607+
18608+# The user is always right.
18609+if test "${PATH_SEPARATOR+set}" != set; then
18610+ echo "#! /bin/sh" >conf$$.sh
18611+ echo "exit 0" >>conf$$.sh
18612+ chmod +x conf$$.sh
18613+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18614+ PATH_SEPARATOR=';'
18615 else
18616- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18617+ PATH_SEPARATOR=:
18618 fi
18619- if test ! -s conftest.s$ac_file; then
18620- ac_more_lines=false
18621- rm -f conftest.s$ac_file
18622+ rm -f conf$$.sh
18623+fi
18624+
18625+
18626+ as_lineno_1=$LINENO
18627+ as_lineno_2=$LINENO
18628+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18629+ test "x$as_lineno_1" != "x$as_lineno_2" &&
18630+ test "x$as_lineno_3" = "x$as_lineno_2" || {
18631+ # Find who we are. Look in the path if we contain no path at all
18632+ # relative or not.
18633+ case $0 in
18634+ *[\\/]* ) as_myself=$0 ;;
18635+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636+for as_dir in $PATH
18637+do
18638+ IFS=$as_save_IFS
18639+ test -z "$as_dir" && as_dir=.
18640+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18641+done
18642+
18643+ ;;
18644+ esac
18645+ # We did not find ourselves, most probably we were run as `sh COMMAND'
18646+ # in which case we are not to be found in the path.
18647+ if test "x$as_myself" = x; then
18648+ as_myself=$0
18649+ fi
18650+ if test ! -f "$as_myself"; then
18651+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18652+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18653+ { (exit 1); exit 1; }; }
18654+ fi
18655+ case $CONFIG_SHELL in
18656+ '')
18657+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18658+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18659+do
18660+ IFS=$as_save_IFS
18661+ test -z "$as_dir" && as_dir=.
18662+ for as_base in sh bash ksh sh5; do
18663+ case $as_dir in
18664+ /*)
18665+ if ("$as_dir/$as_base" -c '
18666+ as_lineno_1=$LINENO
18667+ as_lineno_2=$LINENO
18668+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18669+ test "x$as_lineno_1" != "x$as_lineno_2" &&
18670+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
18671+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18672+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18673+ CONFIG_SHELL=$as_dir/$as_base
18674+ export CONFIG_SHELL
18675+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18676+ fi;;
18677+ esac
18678+ done
18679+done
18680+;;
18681+ esac
18682+
18683+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18684+ # uniformly replaced by the line number. The first 'sed' inserts a
18685+ # line-number line before each line; the second 'sed' does the real
18686+ # work. The second script uses 'N' to pair each line-number line
18687+ # with the numbered line, and appends trailing '-' during
18688+ # substitution so that $LINENO is not a special case at line end.
18689+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18690+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18691+ sed '=' <$as_myself |
18692+ sed '
18693+ N
18694+ s,$,-,
18695+ : loop
18696+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18697+ t loop
18698+ s,-$,,
18699+ s,^['$as_cr_digits']*\n,,
18700+ ' >$as_me.lineno &&
18701+ chmod +x $as_me.lineno ||
18702+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18703+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18704+ { (exit 1); exit 1; }; }
18705+
18706+ # Don't try to exec as it changes $[0], causing all sort of problems
18707+ # (the dirname of $[0] is not the place where we might find the
18708+ # original and so on. Autoconf is especially sensible to this).
18709+ . ./$as_me.lineno
18710+ # Exit status is that of the last command.
18711+ exit
18712+}
18713+
18714+
18715+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18716+ *c*,-n*) ECHO_N= ECHO_C='
18717+' ECHO_T=' ' ;;
18718+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18719+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18720+esac
18721+
18722+if expr a : '\(a\)' >/dev/null 2>&1; then
18723+ as_expr=expr
18724+else
18725+ as_expr=false
18726+fi
18727+
18728+rm -f conf$$ conf$$.exe conf$$.file
18729+echo >conf$$.file
18730+if ln -s conf$$.file conf$$ 2>/dev/null; then
18731+ # We could just check for DJGPP; but this test a) works b) is more generic
18732+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18733+ if test -f conf$$.exe; then
18734+ # Don't use ln at all; we don't have any links
18735+ as_ln_s='cp -p'
18736 else
18737- if test -z "$ac_sed_cmds"; then
18738- ac_sed_cmds="sed -f conftest.s$ac_file"
18739- else
18740- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18741- fi
18742- ac_file=`expr $ac_file + 1`
18743- ac_beg=$ac_end
18744- ac_end=`expr $ac_end + $ac_max_sed_cmds`
18745+ as_ln_s='ln -s'
18746 fi
18747+elif ln conf$$.file conf$$ 2>/dev/null; then
18748+ as_ln_s=ln
18749+else
18750+ as_ln_s='cp -p'
18751+fi
18752+rm -f conf$$ conf$$.exe conf$$.file
18753+
18754+if mkdir -p . 2>/dev/null; then
18755+ as_mkdir_p=:
18756+else
18757+ as_mkdir_p=false
18758+fi
18759+
18760+as_executable_p="test -f"
18761+
18762+# Sed expression to map a string onto a valid CPP name.
18763+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18764+
18765+# Sed expression to map a string onto a valid variable name.
18766+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18767+
18768+
18769+# IFS
18770+# We need space, tab and new line, in precisely that order.
18771+as_nl='
18772+'
18773+IFS=" $as_nl"
18774+
18775+# CDPATH.
18776+$as_unset CDPATH
18777+
18778+exec 6>&1
18779+
18780+# Open the log real soon, to keep \$[0] and so on meaningful, and to
18781+# report actual input values of CONFIG_FILES etc. instead of their
18782+# values after options handling. Logging --version etc. is OK.
18783+exec 5>>config.log
18784+{
18785+ echo
18786+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18787+## Running $as_me. ##
18788+_ASBOX
18789+} >&5
18790+cat >&5 <<_CSEOF
18791+
18792+This file was extended by patch $as_me 2.5.9, which was
18793+generated by GNU Autoconf 2.57. Invocation command line was
18794+
18795+ CONFIG_FILES = $CONFIG_FILES
18796+ CONFIG_HEADERS = $CONFIG_HEADERS
18797+ CONFIG_LINKS = $CONFIG_LINKS
18798+ CONFIG_COMMANDS = $CONFIG_COMMANDS
18799+ $ $0 $@
18800+
18801+_CSEOF
18802+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18803+echo >&5
18804+_ACEOF
18805+
18806+# Files that config.status was made for.
18807+if test -n "$ac_config_files"; then
18808+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18809+fi
18810+
18811+if test -n "$ac_config_headers"; then
18812+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18813+fi
18814+
18815+if test -n "$ac_config_links"; then
18816+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18817+fi
18818+
18819+if test -n "$ac_config_commands"; then
18820+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18821+fi
18822+
18823+cat >>$CONFIG_STATUS <<\_ACEOF
18824+
18825+ac_cs_usage="\
18826+\`$as_me' instantiates files from templates according to the
18827+current configuration.
18828+
18829+Usage: $0 [OPTIONS] [FILE]...
18830+
18831+ -h, --help print this help, then exit
18832+ -V, --version print version number, then exit
18833+ -q, --quiet do not print progress messages
18834+ -d, --debug don't remove temporary files
18835+ --recheck update $as_me by reconfiguring in the same conditions
18836+ --file=FILE[:TEMPLATE]
18837+ instantiate the configuration file FILE
18838+ --header=FILE[:TEMPLATE]
18839+ instantiate the configuration header FILE
18840+
18841+Configuration files:
18842+$config_files
18843+
18844+Configuration headers:
18845+$config_headers
18846+
18847+Report bugs to <bug-autoconf@gnu.org>."
18848+_ACEOF
18849+
18850+cat >>$CONFIG_STATUS <<_ACEOF
18851+ac_cs_version="\\
18852+patch config.status 2.5.9
18853+configured by $0, generated by GNU Autoconf 2.57,
18854+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18855+
18856+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18857+Free Software Foundation, Inc.
18858+This config.status script is free software; the Free Software Foundation
18859+gives unlimited permission to copy, distribute and modify it."
18860+srcdir=$srcdir
18861+INSTALL="$INSTALL"
18862+_ACEOF
18863+
18864+cat >>$CONFIG_STATUS <<\_ACEOF
18865+# If no file are specified by the user, then we need to provide default
18866+# value. By we need to know if files were specified by the user.
18867+ac_need_defaults=:
18868+while test $# != 0
18869+do
18870+ case $1 in
18871+ --*=*)
18872+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
18873+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18874+ ac_shift=:
18875+ ;;
18876+ -*)
18877+ ac_option=$1
18878+ ac_optarg=$2
18879+ ac_shift=shift
18880+ ;;
18881+ *) # This is not an option, so the user has probably given explicit
18882+ # arguments.
18883+ ac_option=$1
18884+ ac_need_defaults=false;;
18885+ esac
18886+
18887+ case $ac_option in
18888+ # Handling of the options.
18889+_ACEOF
18890+cat >>$CONFIG_STATUS <<\_ACEOF
18891+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18892+ ac_cs_recheck=: ;;
18893+ --version | --vers* | -V )
18894+ echo "$ac_cs_version"; exit 0 ;;
18895+ --he | --h)
18896+ # Conflict between --help and --header
18897+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
18898+Try \`$0 --help' for more information." >&5
18899+echo "$as_me: error: ambiguous option: $1
18900+Try \`$0 --help' for more information." >&2;}
18901+ { (exit 1); exit 1; }; };;
18902+ --help | --hel | -h )
18903+ echo "$ac_cs_usage"; exit 0 ;;
18904+ --debug | --d* | -d )
18905+ debug=: ;;
18906+ --file | --fil | --fi | --f )
18907+ $ac_shift
18908+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
18909+ ac_need_defaults=false;;
18910+ --header | --heade | --head | --hea )
18911+ $ac_shift
18912+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
18913+ ac_need_defaults=false;;
18914+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18915+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
18916+ ac_cs_silent=: ;;
18917+
18918+ # This is an error.
18919+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18920+Try \`$0 --help' for more information." >&5
18921+echo "$as_me: error: unrecognized option: $1
18922+Try \`$0 --help' for more information." >&2;}
18923+ { (exit 1); exit 1; }; } ;;
18924+
18925+ *) ac_config_targets="$ac_config_targets $1" ;;
18926+
18927+ esac
18928+ shift
18929 done
18930-if test -z "$ac_sed_cmds"; then
18931- ac_sed_cmds=cat
18932+
18933+ac_configure_extra_args=
18934+
18935+if $ac_cs_silent; then
18936+ exec 6>/dev/null
18937+ ac_configure_extra_args="$ac_configure_extra_args --silent"
18938 fi
18939-EOF
18940
18941-cat >> $CONFIG_STATUS <<EOF
18942+_ACEOF
18943+cat >>$CONFIG_STATUS <<_ACEOF
18944+if \$ac_cs_recheck; then
18945+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18946+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18947+fi
18948
18949-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
18950-EOF
18951-cat >> $CONFIG_STATUS <<\EOF
18952-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18953- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18954- case "$ac_file" in
18955- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18956- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18957- *) ac_file_in="${ac_file}.in" ;;
18958+_ACEOF
18959+
18960+
18961+
18962+
18963+
18964+cat >>$CONFIG_STATUS <<\_ACEOF
18965+for ac_config_target in $ac_config_targets
18966+do
18967+ case "$ac_config_target" in
18968+ # Handling of arguments.
18969+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18970+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
18971+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18972+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18973+ { (exit 1); exit 1; }; };;
18974 esac
18975+done
18976
18977- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18978+# If the user did not use the arguments to specify the items to instantiate,
18979+# then the envvar interface is used. Set only those that are not.
18980+# We use the long form for the default assignment because of an extremely
18981+# bizarre bug on SunOS 4.1.3.
18982+if $ac_need_defaults; then
18983+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18984+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18985+fi
18986
18987- # Remove last slash and all that follows it. Not all systems have dirname.
18988- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18989- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18990- # The file is in a subdirectory.
18991- test ! -d "$ac_dir" && mkdir "$ac_dir"
18992- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18993- # A "../" for each directory in $ac_dir_suffix.
18994- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18995- else
18996- ac_dir_suffix= ac_dots=
18997+# Have a temporary directory for convenience. Make it in the build tree
18998+# simply because there is no reason to put it here, and in addition,
18999+# creating and moving files from /tmp can sometimes cause problems.
19000+# Create a temporary directory, and hook for its removal unless debugging.
19001+$debug ||
19002+{
19003+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19004+ trap '{ (exit 1); exit 1; }' 1 2 13 15
19005+}
19006+
19007+# Create a (secure) tmp directory for tmp files.
19008+
19009+{
19010+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19011+ test -n "$tmp" && test -d "$tmp"
19012+} ||
19013+{
19014+ tmp=./confstat$$-$RANDOM
19015+ (umask 077 && mkdir $tmp)
19016+} ||
19017+{
19018+ echo "$me: cannot create a temporary directory in ." >&2
19019+ { (exit 1); exit 1; }
19020+}
19021+
19022+_ACEOF
19023+
19024+cat >>$CONFIG_STATUS <<_ACEOF
19025+
19026+#
19027+# CONFIG_FILES section.
19028+#
19029+
19030+# No need to generate the scripts if there are no CONFIG_FILES.
19031+# This happens for instance when ./config.status config.h
19032+if test -n "\$CONFIG_FILES"; then
19033+ # Protect against being on the right side of a sed subst in config.status.
19034+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19035+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19036+s,@SHELL@,$SHELL,;t t
19037+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19038+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19039+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19040+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19041+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19042+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19043+s,@exec_prefix@,$exec_prefix,;t t
19044+s,@prefix@,$prefix,;t t
19045+s,@program_transform_name@,$program_transform_name,;t t
19046+s,@bindir@,$bindir,;t t
19047+s,@sbindir@,$sbindir,;t t
19048+s,@libexecdir@,$libexecdir,;t t
19049+s,@datadir@,$datadir,;t t
19050+s,@sysconfdir@,$sysconfdir,;t t
19051+s,@sharedstatedir@,$sharedstatedir,;t t
19052+s,@localstatedir@,$localstatedir,;t t
19053+s,@libdir@,$libdir,;t t
19054+s,@includedir@,$includedir,;t t
19055+s,@oldincludedir@,$oldincludedir,;t t
19056+s,@infodir@,$infodir,;t t
19057+s,@mandir@,$mandir,;t t
19058+s,@build_alias@,$build_alias,;t t
19059+s,@host_alias@,$host_alias,;t t
19060+s,@target_alias@,$target_alias,;t t
19061+s,@DEFS@,$DEFS,;t t
19062+s,@ECHO_C@,$ECHO_C,;t t
19063+s,@ECHO_N@,$ECHO_N,;t t
19064+s,@ECHO_T@,$ECHO_T,;t t
19065+s,@LIBS@,$LIBS,;t t
19066+s,@CC@,$CC,;t t
19067+s,@CFLAGS@,$CFLAGS,;t t
19068+s,@LDFLAGS@,$LDFLAGS,;t t
19069+s,@CPPFLAGS@,$CPPFLAGS,;t t
19070+s,@ac_ct_CC@,$ac_ct_CC,;t t
19071+s,@EXEEXT@,$EXEEXT,;t t
19072+s,@OBJEXT@,$OBJEXT,;t t
19073+s,@CPP@,$CPP,;t t
19074+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19075+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19076+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19077+s,@SET_MAKE@,$SET_MAKE,;t t
19078+s,@ed_PROGRAM@,$ed_PROGRAM,;t t
19079+s,@EGREP@,$EGREP,;t t
19080+s,@STDBOOL_H@,$STDBOOL_H,;t t
19081+s,@HAVE__BOOL@,$HAVE__BOOL,;t t
19082+s,@LIBOBJS@,$LIBOBJS,;t t
19083+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19084+CEOF
19085+
19086+_ACEOF
19087+
19088+ cat >>$CONFIG_STATUS <<\_ACEOF
19089+ # Split the substitutions into bite-sized pieces for seds with
19090+ # small command number limits, like on Digital OSF/1 and HP-UX.
19091+ ac_max_sed_lines=48
19092+ ac_sed_frag=1 # Number of current file.
19093+ ac_beg=1 # First line for current file.
19094+ ac_end=$ac_max_sed_lines # Line after last line for current file.
19095+ ac_more_lines=:
19096+ ac_sed_cmds=
19097+ while $ac_more_lines; do
19098+ if test $ac_beg -gt 1; then
19099+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19100+ else
19101+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19102+ fi
19103+ if test ! -s $tmp/subs.frag; then
19104+ ac_more_lines=false
19105+ else
19106+ # The purpose of the label and of the branching condition is to
19107+ # speed up the sed processing (if there are no `@' at all, there
19108+ # is no need to browse any of the substitutions).
19109+ # These are the two extra sed commands mentioned above.
19110+ (echo ':t
19111+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19112+ if test -z "$ac_sed_cmds"; then
19113+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19114+ else
19115+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19116+ fi
19117+ ac_sed_frag=`expr $ac_sed_frag + 1`
19118+ ac_beg=$ac_end
19119+ ac_end=`expr $ac_end + $ac_max_sed_lines`
19120+ fi
19121+ done
19122+ if test -z "$ac_sed_cmds"; then
19123+ ac_sed_cmds=cat
19124 fi
19125+fi # test -n "$CONFIG_FILES"
19126
19127- case "$ac_given_srcdir" in
19128- .) srcdir=.
19129- if test -z "$ac_dots"; then top_srcdir=.
19130- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
19131- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
19132- *) # Relative path.
19133- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
19134- top_srcdir="$ac_dots$ac_given_srcdir" ;;
19135+_ACEOF
19136+cat >>$CONFIG_STATUS <<\_ACEOF
19137+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19138+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19139+ case $ac_file in
19140+ - | *:- | *:-:* ) # input from stdin
19141+ cat >$tmp/stdin
19142+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19143+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19144+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19145+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19146+ * ) ac_file_in=$ac_file.in ;;
19147 esac
19148
19149- case "$ac_given_INSTALL" in
19150- [/$]*) INSTALL="$ac_given_INSTALL" ;;
19151- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
19152- esac
19153+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19154+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19155+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19156+ X"$ac_file" : 'X\(//\)[^/]' \| \
19157+ X"$ac_file" : 'X\(//\)$' \| \
19158+ X"$ac_file" : 'X\(/\)' \| \
19159+ . : '\(.\)' 2>/dev/null ||
19160+echo X"$ac_file" |
19161+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19162+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19163+ /^X\(\/\/\)$/{ s//\1/; q; }
19164+ /^X\(\/\).*/{ s//\1/; q; }
19165+ s/.*/./; q'`
19166+ { if $as_mkdir_p; then
19167+ mkdir -p "$ac_dir"
19168+ else
19169+ as_dir="$ac_dir"
19170+ as_dirs=
19171+ while test ! -d "$as_dir"; do
19172+ as_dirs="$as_dir $as_dirs"
19173+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
19174+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19175+ X"$as_dir" : 'X\(//\)[^/]' \| \
19176+ X"$as_dir" : 'X\(//\)$' \| \
19177+ X"$as_dir" : 'X\(/\)' \| \
19178+ . : '\(.\)' 2>/dev/null ||
19179+echo X"$as_dir" |
19180+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19181+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19182+ /^X\(\/\/\)$/{ s//\1/; q; }
19183+ /^X\(\/\).*/{ s//\1/; q; }
19184+ s/.*/./; q'`
19185+ done
19186+ test ! -n "$as_dirs" || mkdir $as_dirs
19187+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19188+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19189+ { (exit 1); exit 1; }; }; }
19190
19191- echo creating "$ac_file"
19192- rm -f "$ac_file"
19193- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
19194- case "$ac_file" in
19195- *Makefile*) ac_comsub="1i\\
19196-# $configure_input" ;;
19197- *) ac_comsub= ;;
19198+ ac_builddir=.
19199+
19200+if test "$ac_dir" != .; then
19201+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19202+ # A "../" for each directory in $ac_dir_suffix.
19203+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19204+else
19205+ ac_dir_suffix= ac_top_builddir=
19206+fi
19207+
19208+case $srcdir in
19209+ .) # No --srcdir option. We are building in place.
19210+ ac_srcdir=.
19211+ if test -z "$ac_top_builddir"; then
19212+ ac_top_srcdir=.
19213+ else
19214+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19215+ fi ;;
19216+ [\\/]* | ?:[\\/]* ) # Absolute path.
19217+ ac_srcdir=$srcdir$ac_dir_suffix;
19218+ ac_top_srcdir=$srcdir ;;
19219+ *) # Relative path.
19220+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19221+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
19222+esac
19223+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19224+# absolute.
19225+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19226+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19227+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19228+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19229+
19230+
19231+ case $INSTALL in
19232+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19233+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19234 esac
19235
19236- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
19237- sed -e "$ac_comsub
19238-s%@configure_input@%$configure_input%g
19239-s%@srcdir@%$srcdir%g
19240-s%@top_srcdir@%$top_srcdir%g
19241-s%@INSTALL@%$INSTALL%g
19242-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
19243-fi; done
19244-rm -f conftest.s*
19245+ if test x"$ac_file" != x-; then
19246+ { echo "$as_me:$LINENO: creating $ac_file" >&5
19247+echo "$as_me: creating $ac_file" >&6;}
19248+ rm -f "$ac_file"
19249+ fi
19250+ # Let's still pretend it is `configure' which instantiates (i.e., don't
19251+ # use $as_me), people would be surprised to read:
19252+ # /* config.h. Generated by config.status. */
19253+ if test x"$ac_file" = x-; then
19254+ configure_input=
19255+ else
19256+ configure_input="$ac_file. "
19257+ fi
19258+ configure_input=$configure_input"Generated from `echo $ac_file_in |
19259+ sed 's,.*/,,'` by configure."
19260+
19261+ # First look for the input files in the build tree, otherwise in the
19262+ # src tree.
19263+ ac_file_inputs=`IFS=:
19264+ for f in $ac_file_in; do
19265+ case $f in
19266+ -) echo $tmp/stdin ;;
19267+ [\\/$]*)
19268+ # Absolute (can't be DOS-style, as IFS=:)
19269+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19270+echo "$as_me: error: cannot find input file: $f" >&2;}
19271+ { (exit 1); exit 1; }; }
19272+ echo $f;;
19273+ *) # Relative
19274+ if test -f "$f"; then
19275+ # Build tree
19276+ echo $f
19277+ elif test -f "$srcdir/$f"; then
19278+ # Source tree
19279+ echo $srcdir/$f
19280+ else
19281+ # /dev/null tree
19282+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19283+echo "$as_me: error: cannot find input file: $f" >&2;}
19284+ { (exit 1); exit 1; }; }
19285+ fi;;
19286+ esac
19287+ done` || { (exit 1); exit 1; }
19288+_ACEOF
19289+cat >>$CONFIG_STATUS <<_ACEOF
19290+ sed "$ac_vpsub
19291+$extrasub
19292+_ACEOF
19293+cat >>$CONFIG_STATUS <<\_ACEOF
19294+:t
19295+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19296+s,@configure_input@,$configure_input,;t t
19297+s,@srcdir@,$ac_srcdir,;t t
19298+s,@abs_srcdir@,$ac_abs_srcdir,;t t
19299+s,@top_srcdir@,$ac_top_srcdir,;t t
19300+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19301+s,@builddir@,$ac_builddir,;t t
19302+s,@abs_builddir@,$ac_abs_builddir,;t t
19303+s,@top_builddir@,$ac_top_builddir,;t t
19304+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19305+s,@INSTALL@,$ac_INSTALL,;t t
19306+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19307+ rm -f $tmp/stdin
19308+ if test x"$ac_file" != x-; then
19309+ mv $tmp/out $ac_file
19310+ else
19311+ cat $tmp/out
19312+ rm -f $tmp/out
19313+ fi
19314+
19315+done
19316+_ACEOF
19317+cat >>$CONFIG_STATUS <<\_ACEOF
19318+
19319+#
19320+# CONFIG_HEADER section.
19321+#
19322
19323 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19324 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19325 #
19326 # ac_d sets the value in "#define NAME VALUE" lines.
19327-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19328-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
19329-ac_dC='\3'
19330-ac_dD='%g'
19331-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19332-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19333-ac_uB='\([ ]\)%\1#\2define\3'
19334+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19335+ac_dB='[ ].*$,\1#\2'
19336+ac_dC=' '
19337+ac_dD=',;t'
19338+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19339+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19340+ac_uB='$,\1#\2define\3'
19341 ac_uC=' '
19342-ac_uD='\4%g'
19343-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19344-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19345-ac_eB='$%\1#\2define\3'
19346-ac_eC=' '
19347-ac_eD='%g'
19348+ac_uD=',;t'
19349
19350-if test "${CONFIG_HEADERS+set}" != set; then
19351-EOF
19352-cat >> $CONFIG_STATUS <<EOF
19353- CONFIG_HEADERS="config.h:config.hin"
19354-EOF
19355-cat >> $CONFIG_STATUS <<\EOF
19356-fi
19357-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
19358+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19359 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19360- case "$ac_file" in
19361- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
19362- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
19363- *) ac_file_in="${ac_file}.in" ;;
19364+ case $ac_file in
19365+ - | *:- | *:-:* ) # input from stdin
19366+ cat >$tmp/stdin
19367+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19368+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19369+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19370+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19371+ * ) ac_file_in=$ac_file.in ;;
19372 esac
19373
19374- echo creating $ac_file
19375+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19376+echo "$as_me: creating $ac_file" >&6;}
19377
19378- rm -f conftest.frag conftest.in conftest.out
19379- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
19380- cat $ac_file_inputs > conftest.in
19381+ # First look for the input files in the build tree, otherwise in the
19382+ # src tree.
19383+ ac_file_inputs=`IFS=:
19384+ for f in $ac_file_in; do
19385+ case $f in
19386+ -) echo $tmp/stdin ;;
19387+ [\\/$]*)
19388+ # Absolute (can't be DOS-style, as IFS=:)
19389+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19390+echo "$as_me: error: cannot find input file: $f" >&2;}
19391+ { (exit 1); exit 1; }; }
19392+ echo $f;;
19393+ *) # Relative
19394+ if test -f "$f"; then
19395+ # Build tree
19396+ echo $f
19397+ elif test -f "$srcdir/$f"; then
19398+ # Source tree
19399+ echo $srcdir/$f
19400+ else
19401+ # /dev/null tree
19402+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19403+echo "$as_me: error: cannot find input file: $f" >&2;}
19404+ { (exit 1); exit 1; }; }
19405+ fi;;
19406+ esac
19407+ done` || { (exit 1); exit 1; }
19408+ # Remove the trailing spaces.
19409+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19410
19411-EOF
19412+_ACEOF
19413
19414-# Transform confdefs.h into a sed script conftest.vals that substitutes
19415-# the proper values into config.h.in to produce config.h. And first:
19416-# Protect against being on the right side of a sed subst in config.status.
19417-# Protect against being in an unquoted here document in config.status.
19418-rm -f conftest.vals
19419-cat > conftest.hdr <<\EOF
19420-s/[\\&%]/\\&/g
19421-s%[\\$`]%\\&%g
19422-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
19423-s%ac_d%ac_u%gp
19424-s%ac_u%ac_e%gp
19425-EOF
19426-sed -n -f conftest.hdr confdefs.h > conftest.vals
19427-rm -f conftest.hdr
19428+# Transform confdefs.h into two sed scripts, `conftest.defines' and
19429+# `conftest.undefs', that substitutes the proper values into
19430+# config.h.in to produce config.h. The first handles `#define'
19431+# templates, and the second `#undef' templates.
19432+# And first: Protect against being on the right side of a sed subst in
19433+# config.status. Protect against being in an unquoted here document
19434+# in config.status.
19435+rm -f conftest.defines conftest.undefs
19436+# Using a here document instead of a string reduces the quoting nightmare.
19437+# Putting comments in sed scripts is not portable.
19438+#
19439+# `end' is used to avoid that the second main sed command (meant for
19440+# 0-ary CPP macros) applies to n-ary macro definitions.
19441+# See the Autoconf documentation for `clear'.
19442+cat >confdef2sed.sed <<\_ACEOF
19443+s/[\\&,]/\\&/g
19444+s,[\\$`],\\&,g
19445+t clear
19446+: clear
19447+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19448+t end
19449+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19450+: end
19451+_ACEOF
19452+# If some macros were called several times there might be several times
19453+# the same #defines, which is useless. Nevertheless, we may not want to
19454+# sort them, since we want the *last* AC-DEFINE to be honored.
19455+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19456+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19457+rm -f confdef2sed.sed
19458
19459 # This sed command replaces #undef with comments. This is necessary, for
19460 # example, in the case of _POSIX_SOURCE, which is predefined and required
19461 # on some systems where configure will not decide to define it.
19462-cat >> conftest.vals <<\EOF
19463-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
19464-EOF
19465+cat >>conftest.undefs <<\_ACEOF
19466+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19467+_ACEOF
19468
19469-# Break up conftest.vals because some shells have a limit on
19470-# the size of here documents, and old seds have small limits too.
19471+# Break up conftest.defines because some shells have a limit on the size
19472+# of here documents, and old seds have small limits too (100 cmds).
19473+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19474+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19475+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19476+echo ' :' >>$CONFIG_STATUS
19477+rm -f conftest.tail
19478+while grep . conftest.defines >/dev/null
19479+do
19480+ # Write a limited-size here document to $tmp/defines.sed.
19481+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19482+ # Speed up: don't consider the non `#define' lines.
19483+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19484+ # Work around the forget-to-reset-the-flag bug.
19485+ echo 't clr' >>$CONFIG_STATUS
19486+ echo ': clr' >>$CONFIG_STATUS
19487+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19488+ echo 'CEOF
19489+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
19490+ rm -f $tmp/in
19491+ mv $tmp/out $tmp/in
19492+' >>$CONFIG_STATUS
19493+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19494+ rm -f conftest.defines
19495+ mv conftest.tail conftest.defines
19496+done
19497+rm -f conftest.defines
19498+echo ' fi # grep' >>$CONFIG_STATUS
19499+echo >>$CONFIG_STATUS
19500
19501+# Break up conftest.undefs because some shells have a limit on the size
19502+# of here documents, and old seds have small limits too (100 cmds).
19503+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19504 rm -f conftest.tail
19505-while :
19506+while grep . conftest.undefs >/dev/null
19507 do
19508- ac_lines=`grep -c . conftest.vals`
19509- # grep -c gives empty output for an empty file on some AIX systems.
19510- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
19511- # Write a limited-size here document to conftest.frag.
19512- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
19513- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
19514+ # Write a limited-size here document to $tmp/undefs.sed.
19515+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19516+ # Speed up: don't consider the non `#undef'
19517+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19518+ # Work around the forget-to-reset-the-flag bug.
19519+ echo 't clr' >>$CONFIG_STATUS
19520+ echo ': clr' >>$CONFIG_STATUS
19521+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19522 echo 'CEOF
19523- sed -f conftest.frag conftest.in > conftest.out
19524- rm -f conftest.in
19525- mv conftest.out conftest.in
19526-' >> $CONFIG_STATUS
19527- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19528- rm -f conftest.vals
19529- mv conftest.tail conftest.vals
19530+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19531+ rm -f $tmp/in
19532+ mv $tmp/out $tmp/in
19533+' >>$CONFIG_STATUS
19534+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19535+ rm -f conftest.undefs
19536+ mv conftest.tail conftest.undefs
19537 done
19538-rm -f conftest.vals
19539+rm -f conftest.undefs
19540
19541-cat >> $CONFIG_STATUS <<\EOF
19542- rm -f conftest.frag conftest.h
19543- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
19544- cat conftest.in >> conftest.h
19545- rm -f conftest.in
19546- if cmp -s $ac_file conftest.h 2>/dev/null; then
19547- echo "$ac_file is unchanged"
19548- rm -f conftest.h
19549+cat >>$CONFIG_STATUS <<\_ACEOF
19550+ # Let's still pretend it is `configure' which instantiates (i.e., don't
19551+ # use $as_me), people would be surprised to read:
19552+ # /* config.h. Generated by config.status. */
19553+ if test x"$ac_file" = x-; then
19554+ echo "/* Generated by configure. */" >$tmp/config.h
19555 else
19556- # Remove last slash and all that follows it. Not all systems have dirname.
19557- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
19558- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19559- # The file is in a subdirectory.
19560- test ! -d "$ac_dir" && mkdir "$ac_dir"
19561- fi
19562- rm -f $ac_file
19563- mv conftest.h $ac_file
19564+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
19565 fi
19566-fi; done
19567+ cat $tmp/in >>$tmp/config.h
19568+ rm -f $tmp/in
19569+ if test x"$ac_file" != x-; then
19570+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19571+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19572+echo "$as_me: $ac_file is unchanged" >&6;}
19573+ else
19574+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19575+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19576+ X"$ac_file" : 'X\(//\)[^/]' \| \
19577+ X"$ac_file" : 'X\(//\)$' \| \
19578+ X"$ac_file" : 'X\(/\)' \| \
19579+ . : '\(.\)' 2>/dev/null ||
19580+echo X"$ac_file" |
19581+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19582+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19583+ /^X\(\/\/\)$/{ s//\1/; q; }
19584+ /^X\(\/\).*/{ s//\1/; q; }
19585+ s/.*/./; q'`
19586+ { if $as_mkdir_p; then
19587+ mkdir -p "$ac_dir"
19588+ else
19589+ as_dir="$ac_dir"
19590+ as_dirs=
19591+ while test ! -d "$as_dir"; do
19592+ as_dirs="$as_dir $as_dirs"
19593+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
19594+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19595+ X"$as_dir" : 'X\(//\)[^/]' \| \
19596+ X"$as_dir" : 'X\(//\)$' \| \
19597+ X"$as_dir" : 'X\(/\)' \| \
19598+ . : '\(.\)' 2>/dev/null ||
19599+echo X"$as_dir" |
19600+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19601+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19602+ /^X\(\/\/\)$/{ s//\1/; q; }
19603+ /^X\(\/\).*/{ s//\1/; q; }
19604+ s/.*/./; q'`
19605+ done
19606+ test ! -n "$as_dirs" || mkdir $as_dirs
19607+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19608+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19609+ { (exit 1); exit 1; }; }; }
19610
19611-EOF
19612-cat >> $CONFIG_STATUS <<EOF
19613+ rm -f $ac_file
19614+ mv $tmp/config.h $ac_file
19615+ fi
19616+ else
19617+ cat $tmp/config.h
19618+ rm -f $tmp/config.h
19619+ fi
19620+done
19621+_ACEOF
19622
19623-EOF
19624-cat >> $CONFIG_STATUS <<\EOF
19625+cat >>$CONFIG_STATUS <<\_ACEOF
19626
19627-exit 0
19628-EOF
19629+{ (exit 0); exit 0; }
19630+_ACEOF
19631 chmod +x $CONFIG_STATUS
19632-rm -fr confdefs* $ac_clean_files
19633-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
19634+ac_clean_files=$ac_clean_files_save
19635+
19636+
19637+# configure is writing to config.log, and then calls config.status.
19638+# config.status does its own redirection, appending to config.log.
19639+# Unfortunately, on DOS this fails, as config.log is still kept open
19640+# by configure, so config.status won't be able to write to it; its
19641+# output is simply discarded. So we exec the FD to /dev/null,
19642+# effectively closing config.log, so it can be properly (re)opened and
19643+# appended to by config.status. When coming back to configure, we
19644+# need to make the FD available again.
19645+if test "$no_create" != yes; then
19646+ ac_cs_success=:
19647+ ac_config_status_args=
19648+ test "$silent" = yes &&
19649+ ac_config_status_args="$ac_config_status_args --quiet"
19650+ exec 5>/dev/null
19651+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19652+ exec 5>>config.log
19653+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19654+ # would make configure fail if this is the last instruction.
19655+ $ac_cs_success || { (exit 1); exit 1; }
19656+fi
19657
19658diff -urNd -urNd patch-2.5.4/configure.ac patch-2.5.9/configure.ac
19659--- patch-2.5.4/configure.ac 1969-12-31 19:00:00.000000000 -0500
19660+++ patch-2.5.9/configure.ac 2003-05-19 02:44:57.000000000 -0400
19661@@ -0,0 +1,95 @@
19662+# Configure `patch'.
19663+
19664+# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003 Free Software
19665+# Foundation, Inc.
19666+
19667+# This program is free software; you can redistribute it and/or modify
19668+# it under the terms of the GNU General Public License as published by
19669+# the Free Software Foundation; either version 2, or (at your option)
19670+# any later version.
19671+
19672+# This program is distributed in the hope that it will be useful,
19673+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19674+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19675+# GNU General Public License for more details.
19676+
19677+# You should have received a copy of the GNU General Public License
19678+# along with this program; if not, write to the Free Software
19679+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19680+# 02111-1307, USA.
19681+
19682+AC_PREREQ(2.57)
19683+AC_INIT(patch, 2.5.9, bug-patch@gnu.org)
19684+AC_CONFIG_SRCDIR(patch.c)
19685+AC_CONFIG_HEADER(config.h:config.hin)
19686+AC_ARG_PROGRAM
19687+
19688+AC_PROG_CC
19689+AC_PROG_CPP
19690+AC_PROG_INSTALL
19691+AC_PROG_MAKE_SET
19692+# Use ed_PROGRAM, not ED_PROGRAM,
19693+# because <errno.h> reserves symbols starting with `E'.
19694+AC_PATH_PROG(ed_PROGRAM, ed, ed)
19695+
19696+AC_GNU_SOURCE
19697+AC_AIX
19698+AC_MINIX
19699+AC_PROG_CC_STDC
19700+AC_ISC_POSIX
19701+AC_SYS_LARGEFILE
19702+AC_EXEEXT
19703+
19704+AC_C_PROTOTYPES
19705+AC_C_CONST
19706+
19707+AC_HEADER_DIRENT
19708+AC_HEADER_STDC
19709+AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19710+
19711+AC_TYPE_MODE_T
19712+AC_TYPE_OFF_T
19713+AC_TYPE_PID_T
19714+AC_TYPE_SIGNAL
19715+AC_TYPE_SIZE_T
19716+AM_STDBOOL_H
19717+jm_CHECK_TYPE_STRUCT_UTIMBUF
19718+
19719+gl_BACKUPFILE
19720+gl_DIRNAME
19721+gl_ERROR
19722+gl_FUNC_MEMCHR
19723+gl_FUNC_RMDIR
19724+gl_GETOPT
19725+gl_PREREQ_XMALLOC
19726+gl_QUOTE
19727+gl_QUOTEARG
19728+
19729+dnl This should be in gnulib, but isn't for some reason.
19730+AC_DEFUN([jm_PREREQ_ADDEXT],
19731+[
19732+ dnl For addext.c.
19733+ AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
19734+ AC_CHECK_FUNCS(pathconf)
19735+ AC_CHECK_HEADERS(limits.h string.h unistd.h)
19736+])
19737+jm_PREREQ_ADDEXT
19738+
19739+AC_CHECK_DECLS([free, getenv, malloc, mktemp])
19740+AC_CHECK_FUNCS(_doprintf geteuid getuid isascii memcmp mktemp \
19741+ pathconf raise sigaction sigprocmask sigsetmask strerror)
19742+AC_REPLACE_FUNCS(mkdir strncasecmp)
19743+AC_FUNC_FSEEKO
19744+jm_FUNC_GLIBC_UNLOCKED_IO
19745+jm_FUNC_MALLOC
19746+jm_FUNC_REALLOC
19747+AC_FUNC_CLOSEDIR_VOID
19748+AC_FUNC_SETMODE_DOS
19749+AC_FUNC_VPRINTF
19750+PATCH_FUNC_MKDIR_TAKES_ONE_ARG
19751+
19752+jm_AC_DOS
19753+AC_SYS_LONG_FILE_NAMES
19754+
19755+AC_CONFIG_FILES([Makefile])
19756+AC_OUTPUT
19757diff -urNd -urNd patch-2.5.4/configure.in patch-2.5.9/configure.in
19758--- patch-2.5.4/configure.in 1999-08-30 02:20:08.000000000 -0400
19759+++ patch-2.5.9/configure.in 1969-12-31 19:00:00.000000000 -0500
19760@@ -1,59 +0,0 @@
19761-# Configure `patch'.
19762-# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
19763-dnl Process this file with autoconf to produce a configure script.
19764-
19765-AC_PREREQ(2.12)
19766-AC_INIT(patch.c)
19767-AC_CONFIG_HEADER(config.h:config.hin)
19768-AC_ARG_PROGRAM
19769-AC_CANONICAL_HOST
19770-
19771-PACKAGE=patch
19772-VERSION=2.5.4
19773-AC_SUBST(PACKAGE)
19774-AC_SUBST(VERSION)
19775-
19776-AC_PROG_CC
19777-AC_PROG_CPP
19778-AC_PROG_INSTALL
19779-AC_PROG_MAKE_SET
19780-# Use ed_PROGRAM, not ED_PROGRAM,
19781-# because <errno.h> reserves symbols starting with `E'.
19782-AC_PATH_PROG(ed_PROGRAM, ed, ed)
19783-
19784-AC_SYS_LARGEFILE
19785-
19786-AC_AIX
19787-AC_MINIX
19788-AC_ISC_POSIX
19789-AC_EXEEXT
19790-
19791-AM_C_PROTOTYPES
19792-AC_C_CONST
19793-
19794-AC_HEADER_DIRENT
19795-AC_HEADER_STDC
19796-AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19797-jm_AC_HEADER_INTTYPES_H
19798-
19799-AC_TYPE_MODE_T
19800-AC_TYPE_OFF_T
19801-AC_TYPE_PID_T
19802-AC_TYPE_SIGNAL
19803-AC_TYPE_SIZE_T
19804-jm_STRUCT_UTIMBUF
19805-
19806-AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"])
19807-AC_SUBST(LIBOBJS)
19808-AC_CHECK_FUNCS(_doprintf isascii fseeko memcmp mktemp \
19809- pathconf raise setmode sigaction sigprocmask sigsetmask strerror)
19810-AC_REPLACE_FUNCS(memchr mkdir rename rmdir)
19811-jm_FUNC_MALLOC
19812-jm_FUNC_REALLOC
19813-AC_FUNC_CLOSEDIR_VOID
19814-AC_FUNC_VPRINTF
19815-
19816-AC_SYS_LONG_FILE_NAMES
19817-jm_STRUCT_DIRENT_D_INO
19818-
19819-AC_OUTPUT(Makefile)
19820diff -urNd -urNd patch-2.5.4/COPYING patch-2.5.9/COPYING
19821--- patch-2.5.4/COPYING 1998-02-28 20:21:09.000000000 -0500
19822+++ patch-2.5.9/COPYING 1999-02-10 00:47:30.000000000 -0500
19823@@ -2,7 +2,7 @@
19824 Version 2, June 1991
19825
19826 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
19827- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19828+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19829 Everyone is permitted to copy and distribute verbatim copies
19830 of this license document, but changing it is not allowed.
19831
19832@@ -291,7 +291,7 @@
19833 the "copyright" line and a pointer to where the full notice is found.
19834
19835 <one line to give the program's name and a brief idea of what it does.>
19836- Copyright (C) 19yy <name of author>
19837+ Copyright (C) <year> <name of author>
19838
19839 This program is free software; you can redistribute it and/or modify
19840 it under the terms of the GNU General Public License as published by
19841@@ -313,7 +313,7 @@
19842 If the program is interactive, make it output a short notice like this
19843 when it starts in an interactive mode:
19844
19845- Gnomovision version 69, Copyright (C) 19yy name of author
19846+ Gnomovision version 69, Copyright (C) year name of author
19847 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
19848 This is free software, and you are welcome to redistribute it
19849 under certain conditions; type `show c' for details.
19850diff -urNd -urNd patch-2.5.4/debian.patch patch-2.5.9/debian.patch
19851diff -urNd -urNd patch-2.5.4/dirname.c patch-2.5.9/dirname.c
19852--- patch-2.5.4/dirname.c 1969-12-31 19:00:00.000000000 -0500
19853+++ patch-2.5.9/dirname.c 2003-04-05 01:49:44.000000000 -0500
19854@@ -0,0 +1,121 @@
19855+/* dirname.c -- return all but the last element in a path
19856+ Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
19857+
19858+ This program is free software; you can redistribute it and/or modify
19859+ it under the terms of the GNU General Public License as published by
19860+ the Free Software Foundation; either version 2, or (at your option)
19861+ any later version.
19862+
19863+ This program is distributed in the hope that it will be useful,
19864+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19865+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19866+ GNU General Public License for more details.
19867+
19868+ You should have received a copy of the GNU General Public License
19869+ along with this program; if not, write to the Free Software Foundation,
19870+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19871+
19872+#if HAVE_CONFIG_H
19873+# include <config.h>
19874+#endif
19875+
19876+#if STDC_HEADERS || HAVE_STRING_H
19877+# include <string.h>
19878+#endif
19879+
19880+#include "dirname.h"
19881+#include "xalloc.h"
19882+
19883+/* Return the length of `dirname (PATH)', or zero if PATH is
19884+ in the working directory. Works properly even if
19885+ there are trailing slashes (by effectively ignoring them). */
19886+size_t
19887+dir_len (char const *path)
19888+{
19889+ size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
19890+ size_t length;
19891+
19892+ /* Strip the basename and any redundant slashes before it. */
19893+ for (length = base_name (path) - path; prefix_length < length; length--)
19894+ if (! ISSLASH (path[length - 1]))
19895+ return length;
19896+
19897+ /* But don't strip the only slash from "/". */
19898+ return prefix_length + ISSLASH (path[prefix_length]);
19899+}
19900+
19901+/* Return the leading directories part of PATH,
19902+ allocated with xmalloc.
19903+ Works properly even if there are trailing slashes
19904+ (by effectively ignoring them). */
19905+
19906+char *
19907+dir_name (char const *path)
19908+{
19909+ size_t length = dir_len (path);
19910+ int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
19911+ char *newpath = xmalloc (length + append_dot + 1);
19912+ memcpy (newpath, path, length);
19913+ if (append_dot)
19914+ newpath[length++] = '.';
19915+ newpath[length] = 0;
19916+ return newpath;
19917+}
19918+
19919+#ifdef TEST_DIRNAME
19920+/*
19921+
19922+Run the test like this (expect no output):
19923+ gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
19924+ basename.c dirname.c xmalloc.c error.c
19925+ sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
19926+
19927+If it's been built on a DOS or Windows platforms, run another test like
19928+this (again, expect no output):
19929+ sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
19930+
19931+BEGIN-DATA
19932+foo//// .
19933+bar/foo//// bar
19934+foo/ .
19935+/ /
19936+. .
19937+a .
19938+END-DATA
19939+
19940+BEGIN-DOS-DATA
19941+c:///// c:/
19942+c:/ c:/
19943+c:/. c:/
19944+c:foo c:.
19945+c:foo/bar c:foo
19946+END-DOS-DATA
19947+
19948+*/
19949+
19950+# define MAX_BUFF_LEN 1024
19951+# include <stdio.h>
19952+
19953+char *program_name;
19954+
19955+int
19956+main (int argc, char *argv[])
19957+{
19958+ char buff[MAX_BUFF_LEN + 1];
19959+
19960+ program_name = argv[0];
19961+
19962+ buff[MAX_BUFF_LEN] = 0;
19963+ while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
19964+ {
19965+ char path[MAX_BUFF_LEN];
19966+ char expected_result[MAX_BUFF_LEN];
19967+ char const *result;
19968+ sscanf (buff, "%s %s", path, expected_result);
19969+ result = dir_name (path);
19970+ if (strcmp (result, expected_result))
19971+ printf ("%s: got %s, expected %s\n", path, result, expected_result);
19972+ }
19973+ return 0;
19974+}
19975+#endif
19976diff -urNd -urNd patch-2.5.4/dirname.h patch-2.5.9/dirname.h
19977--- patch-2.5.4/dirname.h 1969-12-31 19:00:00.000000000 -0500
19978+++ patch-2.5.9/dirname.h 2001-05-12 11:46:36.000000000 -0400
19979@@ -0,0 +1,47 @@
19980+/* Copyright (C) 1998, 2001 Free Software Foundation, Inc.
19981+
19982+ This program is free software; you can redistribute it and/or modify
19983+ it under the terms of the GNU General Public License as published by
19984+ the Free Software Foundation; either version 2, or (at your option)
19985+ any later version.
19986+
19987+ This program is distributed in the hope that it will be useful,
19988+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19989+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19990+ GNU General Public License for more details.
19991+
19992+ You should have received a copy of the GNU General Public License
19993+ along with this program; if not, write to the Free Software Foundation,
19994+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19995+
19996+#ifndef DIRNAME_H_
19997+# define DIRNAME_H_ 1
19998+
19999+# ifndef PARAMS
20000+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
20001+# define PARAMS(Args) Args
20002+# else
20003+# define PARAMS(Args) ()
20004+# endif
20005+# endif
20006+
20007+# ifndef DIRECTORY_SEPARATOR
20008+# define DIRECTORY_SEPARATOR '/'
20009+# endif
20010+
20011+# ifndef ISSLASH
20012+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
20013+# endif
20014+
20015+# ifndef FILESYSTEM_PREFIX_LEN
20016+# define FILESYSTEM_PREFIX_LEN(Filename) 0
20017+# endif
20018+
20019+char *base_name PARAMS ((char const *path));
20020+char *dir_name PARAMS ((char const *path));
20021+size_t base_len PARAMS ((char const *path));
20022+size_t dir_len PARAMS ((char const *path));
20023+
20024+int strip_trailing_slashes PARAMS ((char *path));
20025+
20026+#endif /* not DIRNAME_H_ */
20027diff -urNd -urNd patch-2.5.4/error.c patch-2.5.9/error.c
20028--- patch-2.5.4/error.c 1998-11-15 12:35:34.000000000 -0500
20029+++ patch-2.5.9/error.c 2002-12-06 03:08:13.000000000 -0500
20030@@ -1,23 +1,18 @@
20031 /* Error handler for noninteractive utilities
20032- Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
20033-
20034- This file is part of the GNU C Library. Its master source is NOT part of
20035- the C library, however. The master source lives in /gd/gnu/lib.
20036-
20037- The GNU C Library is free software; you can redistribute it and/or
20038- modify it under the terms of the GNU Library General Public License as
20039- published by the Free Software Foundation; either version 2 of the
20040- License, or (at your option) any later version.
20041+ Copyright (C) 1990-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
20042+ This program is free software; you can redistribute it and/or modify
20043+ it under the terms of the GNU General Public License as published by
20044+ the Free Software Foundation; either version 2, or (at your option)
20045+ any later version.
20046
20047- The GNU C Library is distributed in the hope that it will be useful,
20048+ This program is distributed in the hope that it will be useful,
20049 but WITHOUT ANY WARRANTY; without even the implied warranty of
20050- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20051- Library General Public License for more details.
20052+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20053+ GNU General Public License for more details.
20054
20055- You should have received a copy of the GNU Library General Public
20056- License along with the GNU C Library; see the file COPYING.LIB. If not,
20057- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20058- Boston, MA 02111-1307, USA. */
20059+ You should have received a copy of the GNU General Public License along
20060+ with this program; if not, write to the Free Software Foundation,
20061+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20062
20063 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
20064
20065@@ -27,6 +22,17 @@
20066
20067 #include <stdio.h>
20068
20069+#ifdef _LIBC
20070+# include <libintl.h>
20071+#else
20072+# include "gettext.h"
20073+#endif
20074+
20075+#ifdef _LIBC
20076+# include <wchar.h>
20077+# define mbsrtowcs __mbsrtowcs
20078+#endif
20079+
20080 #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
20081 # if __STDC__
20082 # include <stdarg.h>
20083@@ -49,6 +55,10 @@
20084
20085 #include "error.h"
20086
20087+#if !_LIBC
20088+# include "unlocked-io.h"
20089+#endif
20090+
20091 #ifndef _
20092 # define _(String) String
20093 #endif
20094@@ -70,29 +80,52 @@
20095
20096 # define program_name program_invocation_name
20097 # include <errno.h>
20098+# include <libio/libioP.h>
20099
20100 /* In GNU libc we want do not want to use the common name `error' directly.
20101 Instead make it a weak alias. */
20102+extern void __error (int status, int errnum, const char *message, ...)
20103+ __attribute__ ((__format__ (__printf__, 3, 4)));
20104+extern void __error_at_line (int status, int errnum, const char *file_name,
20105+ unsigned int line_number, const char *message,
20106+ ...)
20107+ __attribute__ ((__format__ (__printf__, 5, 6)));;
20108 # define error __error
20109 # define error_at_line __error_at_line
20110
20111+# ifdef USE_IN_LIBIO
20112+# include <libio/iolibio.h>
20113+# define fflush(s) INTUSE(_IO_fflush) (s)
20114+# undef putc
20115+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
20116+# endif
20117+
20118 #else /* not _LIBC */
20119
20120+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
20121+# ifndef HAVE_DECL_STRERROR_R
20122+"this configure-time declaration test was not run"
20123+# endif
20124+char *strerror_r ();
20125+# endif
20126+
20127 /* The calling program should define program_name and set it to the
20128 name of the executing program. */
20129 extern char *program_name;
20130
20131-# ifdef HAVE_STRERROR_R
20132+# if HAVE_STRERROR_R || defined strerror_r
20133 # define __strerror_r strerror_r
20134 # else
20135 # if HAVE_STRERROR
20136-# ifndef strerror /* On some systems, strerror is a macro */
20137+# ifndef HAVE_DECL_STRERROR
20138+"this configure-time declaration test was not run"
20139+# endif
20140+# if !HAVE_DECL_STRERROR
20141 char *strerror ();
20142 # endif
20143 # else
20144 static char *
20145-private_strerror (errnum)
20146- int errnum;
20147+private_strerror (int errnum)
20148 {
20149 extern char *sys_errlist[];
20150 extern int sys_nerr;
20151@@ -103,15 +136,118 @@
20152 }
20153 # define strerror private_strerror
20154 # endif /* HAVE_STRERROR */
20155-# endif /* HAVE_STRERROR_R */
20156+# endif /* HAVE_STRERROR_R || defined strerror_r */
20157 #endif /* not _LIBC */
20158
20159+static void
20160+print_errno_message (int errnum)
20161+{
20162+ char const *s;
20163+
20164+#if defined HAVE_STRERROR_R || _LIBC
20165+ char errbuf[1024];
20166+# if STRERROR_R_CHAR_P || _LIBC
20167+ s = __strerror_r (errnum, errbuf, sizeof errbuf);
20168+# else
20169+ if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
20170+ s = errbuf;
20171+ else
20172+ s = 0;
20173+# endif
20174+#else
20175+ s = strerror (errnum);
20176+#endif
20177+
20178+#if !_LIBC
20179+ if (! s)
20180+ s = _("Unknown system error");
20181+#endif
20182+
20183+#if _LIBC && USE_IN_LIBIO
20184+ if (_IO_fwide (stderr, 0) > 0)
20185+ {
20186+ __fwprintf (stderr, L": %s", s);
20187+ return;
20188+ }
20189+#endif
20190+
20191+ fprintf (stderr, ": %s", s);
20192+}
20193+
20194+#ifdef VA_START
20195+static void
20196+error_tail (int status, int errnum, const char *message, va_list args)
20197+{
20198+# if HAVE_VPRINTF || _LIBC
20199+# if _LIBC && USE_IN_LIBIO
20200+ if (_IO_fwide (stderr, 0) > 0)
20201+ {
20202+# define ALLOCA_LIMIT 2000
20203+ size_t len = strlen (message) + 1;
20204+ wchar_t *wmessage = NULL;
20205+ mbstate_t st;
20206+ size_t res;
20207+ const char *tmp;
20208+
20209+ do
20210+ {
20211+ if (len < ALLOCA_LIMIT)
20212+ wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
20213+ else
20214+ {
20215+ if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
20216+ wmessage = NULL;
20217+
20218+ wmessage = (wchar_t *) realloc (wmessage,
20219+ len * sizeof (wchar_t));
20220+
20221+ if (wmessage == NULL)
20222+ {
20223+ fputws_unlocked (L"out of memory\n", stderr);
20224+ return;
20225+ }
20226+ }
20227+
20228+ memset (&st, '\0', sizeof (st));
20229+ tmp =message;
20230+ }
20231+ while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
20232+
20233+ if (res == (size_t) -1)
20234+ /* The string cannot be converted. */
20235+ wmessage = (wchar_t *) L"???";
20236+
20237+ __vfwprintf (stderr, wmessage, args);
20238+ }
20239+ else
20240+# endif
20241+ vfprintf (stderr, message, args);
20242+# else
20243+ _doprnt (message, args, stderr);
20244+# endif
20245+ va_end (args);
20246+
20247+ ++error_message_count;
20248+ if (errnum)
20249+ print_errno_message (errnum);
20250+# if _LIBC && USE_IN_LIBIO
20251+ if (_IO_fwide (stderr, 0) > 0)
20252+ putwc (L'\n', stderr);
20253+ else
20254+# endif
20255+ putc ('\n', stderr);
20256+ fflush (stderr);
20257+ if (status)
20258+ exit (status);
20259+}
20260+#endif
20261+
20262+
20263 /* Print the program name and error message MESSAGE, which is a printf-style
20264 format string with optional args.
20265 If ERRNUM is nonzero, print its corresponding system error message.
20266 Exit with status STATUS if it is nonzero. */
20267 /* VARARGS */
20268-
20269 void
20270 #if defined VA_START && __STDC__
20271 error (int status, int errnum, const char *message, ...)
20272@@ -127,43 +263,48 @@
20273 va_list args;
20274 #endif
20275
20276+ fflush (stdout);
20277+#ifdef _LIBC
20278+# ifdef USE_IN_LIBIO
20279+ _IO_flockfile (stderr);
20280+# else
20281+ __flockfile (stderr);
20282+# endif
20283+#endif
20284 if (error_print_progname)
20285 (*error_print_progname) ();
20286 else
20287 {
20288- fflush (stdout);
20289- fprintf (stderr, "%s: ", program_name);
20290+#if _LIBC && USE_IN_LIBIO
20291+ if (_IO_fwide (stderr, 0) > 0)
20292+ __fwprintf (stderr, L"%s: ", program_name);
20293+ else
20294+#endif
20295+ fprintf (stderr, "%s: ", program_name);
20296 }
20297
20298 #ifdef VA_START
20299 VA_START (args, message);
20300-# if HAVE_VPRINTF || _LIBC
20301- vfprintf (stderr, message, args);
20302-# else
20303- _doprnt (message, args, stderr);
20304-# endif
20305- va_end (args);
20306+ error_tail (status, errnum, message, args);
20307 #else
20308 fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20309-#endif
20310
20311 ++error_message_count;
20312 if (errnum)
20313- {
20314-#if defined HAVE_STRERROR_R || defined _LIBC
20315- char errbuf[1024];
20316- /* Don't use __strerror_r's return value because on some systems
20317- (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
20318- __strerror_r (errnum, errbuf, sizeof errbuf);
20319- fprintf (stderr, ": %s", errbuf);
20320-#else
20321- fprintf (stderr, ": %s", strerror (errnum));
20322-#endif
20323- }
20324+ print_errno_message (errnum);
20325 putc ('\n', stderr);
20326 fflush (stderr);
20327 if (status)
20328 exit (status);
20329+#endif
20330+
20331+#ifdef _LIBC
20332+# ifdef USE_IN_LIBIO
20333+ _IO_funlockfile (stderr);
20334+# else
20335+ __funlockfile (stderr);
20336+# endif
20337+#endif
20338 }
20339
20340 /* Sometimes we want to have at most one error per line. This
20341@@ -193,8 +334,9 @@
20342 static const char *old_file_name;
20343 static unsigned int old_line_number;
20344
20345- if (old_line_number == line_number &&
20346- (file_name == old_file_name || !strcmp (old_file_name, file_name)))
20347+ if (old_line_number == line_number
20348+ && (file_name == old_file_name
20349+ || strcmp (old_file_name, file_name) == 0))
20350 /* Simply return and print nothing. */
20351 return;
20352
20353@@ -202,43 +344,58 @@
20354 old_line_number = line_number;
20355 }
20356
20357+ fflush (stdout);
20358+#ifdef _LIBC
20359+# ifdef USE_IN_LIBIO
20360+ _IO_flockfile (stderr);
20361+# else
20362+ __flockfile (stderr);
20363+# endif
20364+#endif
20365 if (error_print_progname)
20366 (*error_print_progname) ();
20367 else
20368 {
20369- fflush (stdout);
20370- fprintf (stderr, "%s:", program_name);
20371+#if _LIBC && USE_IN_LIBIO
20372+ if (_IO_fwide (stderr, 0) > 0)
20373+ __fwprintf (stderr, L"%s: ", program_name);
20374+ else
20375+#endif
20376+ fprintf (stderr, "%s:", program_name);
20377 }
20378
20379 if (file_name != NULL)
20380- fprintf (stderr, "%s:%d: ", file_name, line_number);
20381+ {
20382+#if _LIBC && USE_IN_LIBIO
20383+ if (_IO_fwide (stderr, 0) > 0)
20384+ __fwprintf (stderr, L"%s:%d: ", file_name, line_number);
20385+ else
20386+#endif
20387+ fprintf (stderr, "%s:%d: ", file_name, line_number);
20388+ }
20389
20390 #ifdef VA_START
20391 VA_START (args, message);
20392-# if HAVE_VPRINTF || _LIBC
20393- vfprintf (stderr, message, args);
20394-# else
20395- _doprnt (message, args, stderr);
20396-# endif
20397- va_end (args);
20398+ error_tail (status, errnum, message, args);
20399 #else
20400 fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20401-#endif
20402
20403 ++error_message_count;
20404 if (errnum)
20405- {
20406-#if defined HAVE_STRERROR_R || defined _LIBC
20407- char errbuf[1024];
20408- fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
20409-#else
20410- fprintf (stderr, ": %s", strerror (errnum));
20411-#endif
20412- }
20413+ print_errno_message (errnum);
20414 putc ('\n', stderr);
20415 fflush (stderr);
20416 if (status)
20417 exit (status);
20418+#endif
20419+
20420+#ifdef _LIBC
20421+# ifdef USE_IN_LIBIO
20422+ _IO_funlockfile (stderr);
20423+# else
20424+ __funlockfile (stderr);
20425+# endif
20426+#endif
20427 }
20428
20429 #ifdef _LIBC
20430diff -urNd -urNd patch-2.5.4/error.h patch-2.5.9/error.h
20431--- patch-2.5.4/error.h 1997-06-21 00:29:28.000000000 -0400
20432+++ patch-2.5.9/error.h 2001-08-23 13:25:08.000000000 -0400
20433@@ -25,7 +25,7 @@
20434
20435 #ifndef __attribute__
20436 /* This feature is available in gcc versions 2.5 and later. */
20437-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
20438+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
20439 # define __attribute__(Spec) /* empty */
20440 # endif
20441 /* The __-protected variants of `format' and `printf' attributes
20442diff -urNd -urNd patch-2.5.4/getopt1.c patch-2.5.9/getopt1.c
20443--- patch-2.5.4/getopt1.c 1999-01-13 00:36:45.000000000 -0500
20444+++ patch-2.5.9/getopt1.c 2002-11-24 19:17:33.000000000 -0500
20445@@ -3,26 +3,29 @@
20446 Free Software Foundation, Inc.
20447 This file is part of the GNU C Library.
20448
20449- The GNU C Library is free software; you can redistribute it and/or
20450- modify it under the terms of the GNU Library General Public License as
20451- published by the Free Software Foundation; either version 2 of the
20452- License, or (at your option) any later version.
20453+ This program is free software; you can redistribute it and/or modify
20454+ it under the terms of the GNU General Public License as published by
20455+ the Free Software Foundation; either version 2, or (at your option)
20456+ any later version.
20457
20458- The GNU C Library is distributed in the hope that it will be useful,
20459+ This program is distributed in the hope that it will be useful,
20460 but WITHOUT ANY WARRANTY; without even the implied warranty of
20461- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20462- Library General Public License for more details.
20463+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20464+ GNU General Public License for more details.
20465
20466- You should have received a copy of the GNU Library General Public
20467- License along with the GNU C Library; see the file COPYING.LIB. If not,
20468- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20469- Boston, MA 02111-1307, USA. */
20470+ You should have received a copy of the GNU General Public License along
20471+ with this program; if not, write to the Free Software Foundation,
20472+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20473
20474 #ifdef HAVE_CONFIG_H
20475 #include <config.h>
20476 #endif
20477
20478-#include "getopt.h"
20479+#ifdef _LIBC
20480+# include <getopt.h>
20481+#else
20482+# include "getopt.h"
20483+#endif
20484
20485 #if !defined __STDC__ || !__STDC__
20486 /* This is a separate conditional since some stdc systems
20487@@ -90,6 +93,10 @@
20488 return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
20489 }
20490
20491+# ifdef _LIBC
20492+libc_hidden_def (getopt_long)
20493+libc_hidden_def (getopt_long_only)
20494+# endif
20495
20496 #endif /* Not ELIDE_CODE. */
20497
20498diff -urNd -urNd patch-2.5.4/getopt.c patch-2.5.9/getopt.c
20499--- patch-2.5.4/getopt.c 1999-01-13 00:36:45.000000000 -0500
20500+++ patch-2.5.9/getopt.c 2002-11-24 19:17:33.000000000 -0500
20501@@ -2,24 +2,23 @@
20502 NOTE: getopt is now part of the C library, so if you don't know what
20503 "Keep this file name-space clean" means, talk to drepper@gnu.org
20504 before changing it!
20505-
20506- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
20507+ Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
20508 Free Software Foundation, Inc.
20509+ This file is part of the GNU C Library.
20510
20511- The GNU C Library is free software; you can redistribute it and/or
20512- modify it under the terms of the GNU Library General Public License as
20513- published by the Free Software Foundation; either version 2 of the
20514- License, or (at your option) any later version.
20515+ This program is free software; you can redistribute it and/or modify
20516+ it under the terms of the GNU General Public License as published by
20517+ the Free Software Foundation; either version 2, or (at your option)
20518+ any later version.
20519
20520- The GNU C Library is distributed in the hope that it will be useful,
20521+ This program is distributed in the hope that it will be useful,
20522 but WITHOUT ANY WARRANTY; without even the implied warranty of
20523- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20524- Library General Public License for more details.
20525+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20526+ GNU General Public License for more details.
20527
20528- You should have received a copy of the GNU Library General Public
20529- License along with the GNU C Library; see the file COPYING.LIB. If not,
20530- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20531- Boston, MA 02111-1307, USA. */
20532+ You should have received a copy of the GNU General Public License along
20533+ with this program; if not, write to the Free Software Foundation,
20534+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20535
20536 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
20537 Ditto for AIX 3.2 and <stdlib.h>. */
20538@@ -76,15 +75,20 @@
20539 # endif
20540 #endif
20541
20542-#ifndef _
20543-/* This is for other GNU distributions with internationalized messages.
20544- When compiling libc, the _ macro is predefined. */
20545-# ifdef HAVE_LIBINTL_H
20546-# include <libintl.h>
20547-# define _(msgid) gettext (msgid)
20548-# else
20549-# define _(msgid) (msgid)
20550-# endif
20551+#ifdef _LIBC
20552+# include <libintl.h>
20553+#else
20554+/* This is for other GNU distributions with internationalized messages. */
20555+# include "gettext.h"
20556+#endif
20557+#define _(msgid) gettext (msgid)
20558+
20559+#if defined _LIBC && defined USE_IN_LIBIO
20560+# include <wchar.h>
20561+#endif
20562+
20563+#ifndef attribute_hidden
20564+# define attribute_hidden
20565 #endif
20566
20567 /* This version of `getopt' appears to the caller like standard Unix `getopt'
20568@@ -109,7 +113,7 @@
20569 Also, when `ordering' is RETURN_IN_ORDER,
20570 each non-option ARGV-element is returned here. */
20571
20572-char *optarg = NULL;
20573+char *optarg;
20574
20575 /* Index in ARGV of the next element to be scanned.
20576 This is used for communication to and from the caller
20577@@ -130,7 +134,7 @@
20578 causes problems with re-calling getopt as programs generally don't
20579 know that. */
20580
20581-int __getopt_initialized = 0;
20582+int __getopt_initialized attribute_hidden;
20583
20584 /* The next char to be scanned in the option-element
20585 in which the last option character we returned was found.
20586@@ -249,41 +253,34 @@
20587 static int last_nonopt;
20588
20589 #ifdef _LIBC
20590+/* Stored original parameters.
20591+ XXX This is no good solution. We should rather copy the args so
20592+ that we can compare them later. But we must not use malloc(3). */
20593+extern int __libc_argc;
20594+extern char **__libc_argv;
20595+
20596 /* Bash 2.0 gives us an environment variable containing flags
20597 indicating ARGV elements that should not be considered arguments. */
20598
20599+# ifdef USE_NONOPTION_FLAGS
20600 /* Defined in getopt_init.c */
20601 extern char *__getopt_nonoption_flags;
20602
20603 static int nonoption_flags_max_len;
20604 static int nonoption_flags_len;
20605+# endif
20606
20607-static int original_argc;
20608-static char *const *original_argv;
20609-
20610-/* Make sure the environment variable bash 2.0 puts in the environment
20611- is valid for the getopt call we must make sure that the ARGV passed
20612- to getopt is that one passed to the process. */
20613-static void
20614-__attribute__ ((unused))
20615-store_args_and_env (int argc, char *const *argv)
20616-{
20617- /* XXX This is no good solution. We should rather copy the args so
20618- that we can compare them later. But we must not use malloc(3). */
20619- original_argc = argc;
20620- original_argv = argv;
20621-}
20622-# ifdef text_set_element
20623-text_set_element (__libc_subinit, store_args_and_env);
20624-# endif /* text_set_element */
20625-
20626-# define SWAP_FLAGS(ch1, ch2) \
20627+# ifdef USE_NONOPTION_FLAGS
20628+# define SWAP_FLAGS(ch1, ch2) \
20629 if (nonoption_flags_len > 0) \
20630 { \
20631 char __tmp = __getopt_nonoption_flags[ch1]; \
20632 __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
20633 __getopt_nonoption_flags[ch2] = __tmp; \
20634 }
20635+# else
20636+# define SWAP_FLAGS(ch1, ch2)
20637+# endif
20638 #else /* !_LIBC */
20639 # define SWAP_FLAGS(ch1, ch2)
20640 #endif /* _LIBC */
20641@@ -315,7 +312,7 @@
20642 It leaves the longer segment in the right place overall,
20643 but it consists of two parts that need to be swapped next. */
20644
20645-#ifdef _LIBC
20646+#if defined _LIBC && defined USE_NONOPTION_FLAGS
20647 /* First make sure the handling of the `__getopt_nonoption_flags'
20648 string can work normally. Our top argument must be in the range
20649 of the string. */
20650@@ -419,9 +416,9 @@
20651 else
20652 ordering = PERMUTE;
20653
20654-#ifdef _LIBC
20655+#if defined _LIBC && defined USE_NONOPTION_FLAGS
20656 if (posixly_correct == NULL
20657- && argc == original_argc && argv == original_argv)
20658+ && argc == __libc_argc && argv == __libc_argv)
20659 {
20660 if (nonoption_flags_max_len == 0)
20661 {
20662@@ -517,6 +514,13 @@
20663 int *longind;
20664 int long_only;
20665 {
20666+ int print_errors = opterr;
20667+ if (optstring[0] == ':')
20668+ print_errors = 0;
20669+
20670+ if (argc < 1)
20671+ return -1;
20672+
20673 optarg = NULL;
20674
20675 if (optind == 0 || !__getopt_initialized)
20676@@ -531,7 +535,7 @@
20677 Either it does not have option syntax, or there is an environment flag
20678 from the shell indicating it is not an option. The later information
20679 is only used when the used in the GNU libc. */
20680-#ifdef _LIBC
20681+#if defined _LIBC && defined USE_NONOPTION_FLAGS
20682 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
20683 || (optind < nonoption_flags_len \
20684 && __getopt_nonoption_flags[optind] == '1'))
20685@@ -666,16 +670,37 @@
20686 pfound = p;
20687 indfound = option_index;
20688 }
20689- else
20690+ else if (long_only
20691+ || pfound->has_arg != p->has_arg
20692+ || pfound->flag != p->flag
20693+ || pfound->val != p->val)
20694 /* Second or later nonexact match found. */
20695 ambig = 1;
20696 }
20697
20698 if (ambig && !exact)
20699 {
20700- if (opterr)
20701- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20702- argv[0], argv[optind]);
20703+ if (print_errors)
20704+ {
20705+#if defined _LIBC && defined USE_IN_LIBIO
20706+ char *buf;
20707+
20708+ if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
20709+ argv[0], argv[optind]) >= 0)
20710+ {
20711+
20712+ if (_IO_fwide (stderr, 0) > 0)
20713+ __fwprintf (stderr, L"%s", buf);
20714+ else
20715+ fputs (buf, stderr);
20716+
20717+ free (buf);
20718+ }
20719+#else
20720+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20721+ argv[0], argv[optind]);
20722+#endif
20723+ }
20724 nextchar += strlen (nextchar);
20725 optind++;
20726 optopt = 0;
20727@@ -694,18 +719,52 @@
20728 optarg = nameend + 1;
20729 else
20730 {
20731- if (opterr)
20732+ if (print_errors)
20733 {
20734+#if defined _LIBC && defined USE_IN_LIBIO
20735+ char *buf;
20736+ int n;
20737+#endif
20738+
20739 if (argv[optind - 1][1] == '-')
20740- /* --option */
20741- fprintf (stderr,
20742- _("%s: option `--%s' doesn't allow an argument\n"),
20743- argv[0], pfound->name);
20744+ {
20745+ /* --option */
20746+#if defined _LIBC && defined USE_IN_LIBIO
20747+ n = __asprintf (&buf, _("\
20748+%s: option `--%s' doesn't allow an argument\n"),
20749+ argv[0], pfound->name);
20750+#else
20751+ fprintf (stderr, _("\
20752+%s: option `--%s' doesn't allow an argument\n"),
20753+ argv[0], pfound->name);
20754+#endif
20755+ }
20756 else
20757- /* +option or -option */
20758- fprintf (stderr,
20759- _("%s: option `%c%s' doesn't allow an argument\n"),
20760- argv[0], argv[optind - 1][0], pfound->name);
20761+ {
20762+ /* +option or -option */
20763+#if defined _LIBC && defined USE_IN_LIBIO
20764+ n = __asprintf (&buf, _("\
20765+%s: option `%c%s' doesn't allow an argument\n"),
20766+ argv[0], argv[optind - 1][0],
20767+ pfound->name);
20768+#else
20769+ fprintf (stderr, _("\
20770+%s: option `%c%s' doesn't allow an argument\n"),
20771+ argv[0], argv[optind - 1][0], pfound->name);
20772+#endif
20773+ }
20774+
20775+#if defined _LIBC && defined USE_IN_LIBIO
20776+ if (n >= 0)
20777+ {
20778+ if (_IO_fwide (stderr, 0) > 0)
20779+ __fwprintf (stderr, L"%s", buf);
20780+ else
20781+ fputs (buf, stderr);
20782+
20783+ free (buf);
20784+ }
20785+#endif
20786 }
20787
20788 nextchar += strlen (nextchar);
20789@@ -720,10 +779,28 @@
20790 optarg = argv[optind++];
20791 else
20792 {
20793- if (opterr)
20794- fprintf (stderr,
20795- _("%s: option `%s' requires an argument\n"),
20796- argv[0], argv[optind - 1]);
20797+ if (print_errors)
20798+ {
20799+#if defined _LIBC && defined USE_IN_LIBIO
20800+ char *buf;
20801+
20802+ if (__asprintf (&buf, _("\
20803+%s: option `%s' requires an argument\n"),
20804+ argv[0], argv[optind - 1]) >= 0)
20805+ {
20806+ if (_IO_fwide (stderr, 0) > 0)
20807+ __fwprintf (stderr, L"%s", buf);
20808+ else
20809+ fputs (buf, stderr);
20810+
20811+ free (buf);
20812+ }
20813+#else
20814+ fprintf (stderr,
20815+ _("%s: option `%s' requires an argument\n"),
20816+ argv[0], argv[optind - 1]);
20817+#endif
20818+ }
20819 nextchar += strlen (nextchar);
20820 optopt = pfound->val;
20821 return optstring[0] == ':' ? ':' : '?';
20822@@ -747,16 +824,47 @@
20823 if (!long_only || argv[optind][1] == '-'
20824 || my_index (optstring, *nextchar) == NULL)
20825 {
20826- if (opterr)
20827+ if (print_errors)
20828 {
20829+#if defined _LIBC && defined USE_IN_LIBIO
20830+ char *buf;
20831+ int n;
20832+#endif
20833+
20834 if (argv[optind][1] == '-')
20835- /* --option */
20836- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20837- argv[0], nextchar);
20838+ {
20839+ /* --option */
20840+#if defined _LIBC && defined USE_IN_LIBIO
20841+ n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
20842+ argv[0], nextchar);
20843+#else
20844+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20845+ argv[0], nextchar);
20846+#endif
20847+ }
20848 else
20849- /* +option or -option */
20850- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20851- argv[0], argv[optind][0], nextchar);
20852+ {
20853+ /* +option or -option */
20854+#if defined _LIBC && defined USE_IN_LIBIO
20855+ n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
20856+ argv[0], argv[optind][0], nextchar);
20857+#else
20858+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20859+ argv[0], argv[optind][0], nextchar);
20860+#endif
20861+ }
20862+
20863+#if defined _LIBC && defined USE_IN_LIBIO
20864+ if (n >= 0)
20865+ {
20866+ if (_IO_fwide (stderr, 0) > 0)
20867+ __fwprintf (stderr, L"%s", buf);
20868+ else
20869+ fputs (buf, stderr);
20870+
20871+ free (buf);
20872+ }
20873+#endif
20874 }
20875 nextchar = (char *) "";
20876 optind++;
20877@@ -777,15 +885,44 @@
20878
20879 if (temp == NULL || c == ':')
20880 {
20881- if (opterr)
20882+ if (print_errors)
20883 {
20884+#if defined _LIBC && defined USE_IN_LIBIO
20885+ char *buf;
20886+ int n;
20887+#endif
20888+
20889 if (posixly_correct)
20890- /* 1003.2 specifies the format of this message. */
20891- fprintf (stderr, _("%s: illegal option -- %c\n"),
20892- argv[0], c);
20893+ {
20894+ /* 1003.2 specifies the format of this message. */
20895+#if defined _LIBC && defined USE_IN_LIBIO
20896+ n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
20897+ argv[0], c);
20898+#else
20899+ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
20900+#endif
20901+ }
20902 else
20903- fprintf (stderr, _("%s: invalid option -- %c\n"),
20904- argv[0], c);
20905+ {
20906+#if defined _LIBC && defined USE_IN_LIBIO
20907+ n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
20908+ argv[0], c);
20909+#else
20910+ fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
20911+#endif
20912+ }
20913+
20914+#if defined _LIBC && defined USE_IN_LIBIO
20915+ if (n >= 0)
20916+ {
20917+ if (_IO_fwide (stderr, 0) > 0)
20918+ __fwprintf (stderr, L"%s", buf);
20919+ else
20920+ fputs (buf, stderr);
20921+
20922+ free (buf);
20923+ }
20924+#endif
20925 }
20926 optopt = c;
20927 return '?';
20928@@ -811,11 +948,27 @@
20929 }
20930 else if (optind == argc)
20931 {
20932- if (opterr)
20933+ if (print_errors)
20934 {
20935 /* 1003.2 specifies the format of this message. */
20936+#if defined _LIBC && defined USE_IN_LIBIO
20937+ char *buf;
20938+
20939+ if (__asprintf (&buf,
20940+ _("%s: option requires an argument -- %c\n"),
20941+ argv[0], c) >= 0)
20942+ {
20943+ if (_IO_fwide (stderr, 0) > 0)
20944+ __fwprintf (stderr, L"%s", buf);
20945+ else
20946+ fputs (buf, stderr);
20947+
20948+ free (buf);
20949+ }
20950+#else
20951 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
20952 argv[0], c);
20953+#endif
20954 }
20955 optopt = c;
20956 if (optstring[0] == ':')
20957@@ -860,9 +1013,26 @@
20958 }
20959 if (ambig && !exact)
20960 {
20961- if (opterr)
20962- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20963- argv[0], argv[optind]);
20964+ if (print_errors)
20965+ {
20966+#if defined _LIBC && defined USE_IN_LIBIO
20967+ char *buf;
20968+
20969+ if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
20970+ argv[0], argv[optind]) >= 0)
20971+ {
20972+ if (_IO_fwide (stderr, 0) > 0)
20973+ __fwprintf (stderr, L"%s", buf);
20974+ else
20975+ fputs (buf, stderr);
20976+
20977+ free (buf);
20978+ }
20979+#else
20980+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20981+ argv[0], argv[optind]);
20982+#endif
20983+ }
20984 nextchar += strlen (nextchar);
20985 optind++;
20986 return '?';
20987@@ -878,10 +1048,28 @@
20988 optarg = nameend + 1;
20989 else
20990 {
20991- if (opterr)
20992- fprintf (stderr, _("\
20993+ if (print_errors)
20994+ {
20995+#if defined _LIBC && defined USE_IN_LIBIO
20996+ char *buf;
20997+
20998+ if (__asprintf (&buf, _("\
20999 %s: option `-W %s' doesn't allow an argument\n"),
21000- argv[0], pfound->name);
21001+ argv[0], pfound->name) >= 0)
21002+ {
21003+ if (_IO_fwide (stderr, 0) > 0)
21004+ __fwprintf (stderr, L"%s", buf);
21005+ else
21006+ fputs (buf, stderr);
21007+
21008+ free (buf);
21009+ }
21010+#else
21011+ fprintf (stderr, _("\
21012+%s: option `-W %s' doesn't allow an argument\n"),
21013+ argv[0], pfound->name);
21014+#endif
21015+ }
21016
21017 nextchar += strlen (nextchar);
21018 return '?';
21019@@ -893,10 +1081,28 @@
21020 optarg = argv[optind++];
21021 else
21022 {
21023- if (opterr)
21024- fprintf (stderr,
21025- _("%s: option `%s' requires an argument\n"),
21026- argv[0], argv[optind - 1]);
21027+ if (print_errors)
21028+ {
21029+#if defined _LIBC && defined USE_IN_LIBIO
21030+ char *buf;
21031+
21032+ if (__asprintf (&buf, _("\
21033+%s: option `%s' requires an argument\n"),
21034+ argv[0], argv[optind - 1]) >= 0)
21035+ {
21036+ if (_IO_fwide (stderr, 0) > 0)
21037+ __fwprintf (stderr, L"%s", buf);
21038+ else
21039+ fputs (buf, stderr);
21040+
21041+ free (buf);
21042+ }
21043+#else
21044+ fprintf (stderr,
21045+ _("%s: option `%s' requires an argument\n"),
21046+ argv[0], argv[optind - 1]);
21047+#endif
21048+ }
21049 nextchar += strlen (nextchar);
21050 return optstring[0] == ':' ? ':' : '?';
21051 }
21052@@ -940,12 +1146,28 @@
21053 }
21054 else if (optind == argc)
21055 {
21056- if (opterr)
21057+ if (print_errors)
21058 {
21059 /* 1003.2 specifies the format of this message. */
21060+#if defined _LIBC && defined USE_IN_LIBIO
21061+ char *buf;
21062+
21063+ if (__asprintf (&buf, _("\
21064+%s: option requires an argument -- %c\n"),
21065+ argv[0], c) >= 0)
21066+ {
21067+ if (_IO_fwide (stderr, 0) > 0)
21068+ __fwprintf (stderr, L"%s", buf);
21069+ else
21070+ fputs (buf, stderr);
21071+
21072+ free (buf);
21073+ }
21074+#else
21075 fprintf (stderr,
21076- _("%s: option requires an argument -- %c\n"),
21077- argv[0], c);
21078+ _("%s: option requires an argument -- %c\n"),
21079+ argv[0], c);
21080+#endif
21081 }
21082 optopt = c;
21083 if (optstring[0] == ':')
21084diff -urNd -urNd patch-2.5.4/getopt.h patch-2.5.9/getopt.h
21085--- patch-2.5.4/getopt.h 1999-01-13 00:36:45.000000000 -0500
21086+++ patch-2.5.9/getopt.h 2002-11-24 19:17:33.000000000 -0500
21087@@ -1,21 +1,20 @@
21088 /* Declarations for getopt.
21089- Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
21090+ Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
21091 This file is part of the GNU C Library.
21092
21093- The GNU C Library is free software; you can redistribute it and/or
21094- modify it under the terms of the GNU Library General Public License as
21095- published by the Free Software Foundation; either version 2 of the
21096- License, or (at your option) any later version.
21097+ This program is free software; you can redistribute it and/or modify
21098+ it under the terms of the GNU General Public License as published by
21099+ the Free Software Foundation; either version 2, or (at your option)
21100+ any later version.
21101
21102- The GNU C Library is distributed in the hope that it will be useful,
21103+ This program is distributed in the hope that it will be useful,
21104 but WITHOUT ANY WARRANTY; without even the implied warranty of
21105- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21106- Library General Public License for more details.
21107+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21108+ GNU General Public License for more details.
21109
21110- You should have received a copy of the GNU Library General Public
21111- License along with the GNU C Library; see the file COPYING.LIB. If not,
21112- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21113- Boston, MA 02111-1307, USA. */
21114+ You should have received a copy of the GNU General Public License along
21115+ with this program; if not, write to the Free Software Foundation,
21116+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21117
21118 #ifndef _GETOPT_H
21119
21120@@ -23,6 +22,17 @@
21121 # define _GETOPT_H 1
21122 #endif
21123
21124+/* If __GNU_LIBRARY__ is not already defined, either we are being used
21125+ standalone, or this is the first header included in the source file.
21126+ If we are being used with glibc, we need to include <features.h>, but
21127+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
21128+ not defined, include <ctype.h>, which will pull in <features.h> for us
21129+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
21130+ doesn't flood the namespace with stuff the way some other headers do.) */
21131+#if !defined __GNU_LIBRARY__
21132+# include <ctype.h>
21133+#endif
21134+
21135 #ifdef __cplusplus
21136 extern "C" {
21137 #endif
21138@@ -82,7 +92,7 @@
21139
21140 struct option
21141 {
21142-# if defined __STDC__ && __STDC__
21143+# if (defined __STDC__ && __STDC__) || defined __cplusplus
21144 const char *name;
21145 # else
21146 char *name;
21147@@ -126,25 +136,26 @@
21148 arguments to the option '\0'. This behavior is specific to the GNU
21149 `getopt'. */
21150
21151-#if defined __STDC__ && __STDC__
21152+#if (defined __STDC__ && __STDC__) || defined __cplusplus
21153 # ifdef __GNU_LIBRARY__
21154 /* Many other libraries have conflicting prototypes for getopt, with
21155 differences in the consts, in stdlib.h. To avoid compilation
21156 errors, only prototype getopt for the GNU C library. */
21157-extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
21158+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
21159 # else /* not __GNU_LIBRARY__ */
21160 extern int getopt ();
21161 # endif /* __GNU_LIBRARY__ */
21162
21163 # ifndef __need_getopt
21164-extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
21165+extern int getopt_long (int ___argc, char *const *___argv,
21166+ const char *__shortopts,
21167 const struct option *__longopts, int *__longind);
21168-extern int getopt_long_only (int __argc, char *const *__argv,
21169+extern int getopt_long_only (int ___argc, char *const *___argv,
21170 const char *__shortopts,
21171 const struct option *__longopts, int *__longind);
21172
21173 /* Internal only. Users should not call this directly. */
21174-extern int _getopt_internal (int __argc, char *const *__argv,
21175+extern int _getopt_internal (int ___argc, char *const *___argv,
21176 const char *__shortopts,
21177 const struct option *__longopts, int *__longind,
21178 int __long_only);
21179diff -urNd -urNd patch-2.5.4/gettext.h patch-2.5.9/gettext.h
21180--- patch-2.5.4/gettext.h 1969-12-31 19:00:00.000000000 -0500
21181+++ patch-2.5.9/gettext.h 2002-05-10 07:20:06.000000000 -0400
21182@@ -0,0 +1,69 @@
21183+/* Convenience header for conditional use of GNU <libintl.h>.
21184+ Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
21185+
21186+ This program is free software; you can redistribute it and/or modify it
21187+ under the terms of the GNU Library General Public License as published
21188+ by the Free Software Foundation; either version 2, or (at your option)
21189+ any later version.
21190+
21191+ This program is distributed in the hope that it will be useful,
21192+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21193+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21194+ Library General Public License for more details.
21195+
21196+ You should have received a copy of the GNU Library General Public
21197+ License along with this program; if not, write to the Free Software
21198+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21199+ USA. */
21200+
21201+#ifndef _LIBGETTEXT_H
21202+#define _LIBGETTEXT_H 1
21203+
21204+/* NLS can be disabled through the configure --disable-nls option. */
21205+#if ENABLE_NLS
21206+
21207+/* Get declarations of GNU message catalog functions. */
21208+# include <libintl.h>
21209+
21210+#else
21211+
21212+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
21213+ chokes if dcgettext is defined as a macro. So include it now, to make
21214+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
21215+ as well because people using "gettext.h" will not include <libintl.h>,
21216+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
21217+ is OK. */
21218+#if defined(__sun)
21219+# include <locale.h>
21220+#endif
21221+
21222+/* Disabled NLS.
21223+ The casts to 'const char *' serve the purpose of producing warnings
21224+ for invalid uses of the value returned from these functions.
21225+ On pre-ANSI systems without 'const', the config.h file is supposed to
21226+ contain "#define const". */
21227+# define gettext(Msgid) ((const char *) (Msgid))
21228+# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
21229+# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
21230+# define ngettext(Msgid1, Msgid2, N) \
21231+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21232+# define dngettext(Domainname, Msgid1, Msgid2, N) \
21233+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21234+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
21235+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21236+# define textdomain(Domainname) ((const char *) (Domainname))
21237+# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
21238+# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
21239+
21240+#endif
21241+
21242+/* A pseudo function call that serves as a marker for the automated
21243+ extraction of messages, but does not call gettext(). The run-time
21244+ translation is done at a different place in the code.
21245+ The argument, String, should be a literal string. Concatenated strings
21246+ and other string expressions won't work.
21247+ The macro's expansion is not parenthesized, so that it is suitable as
21248+ initializer for static 'char[]' or 'const char[]' variables. */
21249+#define gettext_noop(String) String
21250+
21251+#endif /* _LIBGETTEXT_H */
21252diff -urNd -urNd patch-2.5.4/inp.c patch-2.5.9/inp.c
21253--- patch-2.5.4/inp.c 1999-08-30 02:20:08.000000000 -0400
21254+++ patch-2.5.9/inp.c 2003-05-20 09:58:02.000000000 -0400
21255@@ -1,9 +1,10 @@
21256 /* inputting files to be patched */
21257
21258-/* $Id: inp.c,v 1.21 1999/08/30 06:20:08 eggert Exp $ */
21259+/* $Id: inp.c,v 1.25 2003/05/20 13:58:02 eggert Exp $ */
21260
21261-/* Copyright 1986, 1988 Larry Wall
21262- Copyright 1991, 1992-1993, 1997-1998, 1999 Free Software Foundation, Inc.
21263+/* Copyright (C) 1986, 1988 Larry Wall
21264+ Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003 Free
21265+ Software Foundation, Inc.
21266
21267 This program is free software; you can redistribute it and/or modify
21268 it under the terms of the GNU General Public License as published by
21269@@ -47,10 +48,10 @@
21270 static size_t tireclen; /* length of records in tmp file */
21271 static size_t last_line_size; /* size of last input line */
21272
21273-static bool plan_a PARAMS ((char const *));/* yield FALSE if memory runs out */
21274-static void plan_b PARAMS ((char const *));
21275-static void report_revision PARAMS ((int));
21276-static void too_many_lines PARAMS ((char const *)) __attribute__((noreturn));
21277+static bool plan_a (char const *); /* yield false if memory runs out */
21278+static void plan_b (char const *);
21279+static void report_revision (bool);
21280+static void too_many_lines (char const *) __attribute__((noreturn));
21281
21282 /* New patch--prepare to edit another file. */
21283
21284@@ -102,28 +103,28 @@
21285 /* Report whether a desired revision was found. */
21286
21287 static void
21288-report_revision (int found_revision)
21289+report_revision (bool found_revision)
21290 {
21291- revision = quotearg (revision);
21292+ char const *rev = quotearg (revision);
21293
21294 if (found_revision)
21295 {
21296 if (verbosity == VERBOSE)
21297- say ("Good. This file appears to be the %s version.\n", revision);
21298+ say ("Good. This file appears to be the %s version.\n", rev);
21299 }
21300 else if (force)
21301 {
21302 if (verbosity != SILENT)
21303 say ("Warning: this file doesn't appear to be the %s version -- patching anyway.\n",
21304- revision);
21305+ rev);
21306 }
21307 else if (batch)
21308 fatal ("This file doesn't appear to be the %s version -- aborting.",
21309- revision);
21310+ rev);
21311 else
21312 {
21313 ask ("This file doesn't appear to be the %s version -- patch anyway? [n] ",
21314- revision);
21315+ rev);
21316 if (*buf != 'y')
21317 fatal ("aborted");
21318 }
21319@@ -140,7 +141,7 @@
21320 void
21321 get_input_file (char const *filename, char const *outname)
21322 {
21323- int elsewhere = strcmp (filename, outname);
21324+ bool elsewhere = strcmp (filename, outname) != 0;
21325 char const *cs;
21326 char *diffbuf;
21327 char *getbuf;
21328@@ -228,7 +229,7 @@
21329 or if storage isn't available. */
21330 if (! (size == instat.st_size
21331 && (buffer = malloc (size ? size : (size_t) 1))))
21332- return FALSE;
21333+ return false;
21334
21335 /* Read the input file, but don't bother reading it if it's empty.
21336 When creating files, the files do not actually exist. */
21337@@ -254,7 +255,7 @@
21338 /* Perhaps size is too large for this host. */
21339 close (ifd);
21340 free (buffer);
21341- return FALSE;
21342+ return false;
21343 }
21344 buffered += n;
21345 }
21346@@ -274,7 +275,7 @@
21347 && (ptr = (char const **) malloc ((size_t) iline * sizeof *ptr))))
21348 {
21349 free (buffer);
21350- return FALSE;
21351+ return false;
21352 }
21353 iline = 0;
21354 for (s = buffer; ; s++)
21355@@ -291,7 +292,7 @@
21356 {
21357 char const *rev = revision;
21358 int rev0 = rev[0];
21359- int found_revision = 0;
21360+ bool found_revision = false;
21361 size_t revlen = strlen (rev);
21362
21363 if (revlen <= size)
21364@@ -303,7 +304,7 @@
21365 && (s == buffer || ISSPACE ((unsigned char) s[-1]))
21366 && (s + 1 == limrev || ISSPACE ((unsigned char) s[revlen])))
21367 {
21368- found_revision = 1;
21369+ found_revision = true;
21370 break;
21371 }
21372 }
21373@@ -314,7 +315,7 @@
21374 /* Plan A will work. */
21375 i_buffer = buffer;
21376 i_ptr = ptr;
21377- return TRUE;
21378+ return true;
21379 }
21380
21381 /* Keep (virtually) nothing in memory. */
21382@@ -326,7 +327,7 @@
21383 register int c;
21384 register size_t len;
21385 register size_t maxlen;
21386- register int found_revision;
21387+ register bool found_revision;
21388 register size_t i;
21389 register char const *rev;
21390 register size_t revlen;
21391@@ -426,7 +427,7 @@
21392 WHICHBUF is ignored when the file is in memory. */
21393
21394 char const *
21395-ifetch (LINENUM line, int whichbuf, size_t *psize)
21396+ifetch (LINENUM line, bool whichbuf, size_t *psize)
21397 {
21398 register char const *q;
21399 register char const *p;
21400@@ -444,9 +445,9 @@
21401 LINENUM baseline = line - offline;
21402
21403 if (tiline[0] == baseline)
21404- whichbuf = 0;
21405+ whichbuf = false;
21406 else if (tiline[1] == baseline)
21407- whichbuf = 1;
21408+ whichbuf = true;
21409 else {
21410 tiline[whichbuf] = baseline;
21411 if (lseek (tifd, (off_t) (baseline/lines_per_buf * tibufsize),
21412diff -urNd -urNd patch-2.5.4/inp.h patch-2.5.9/inp.h
21413--- patch-2.5.4/inp.h 1997-04-06 21:07:00.000000000 -0400
21414+++ patch-2.5.9/inp.h 2003-05-20 10:05:22.000000000 -0400
21415@@ -1,10 +1,29 @@
21416 /* inputting files to be patched */
21417
21418-/* $Id: inp.h,v 1.4 1997/04/07 01:07:00 eggert Exp $ */
21419+/* $Id: inp.h,v 1.7 2003/05/20 14:05:22 eggert Exp $ */
21420+
21421+/* Copyright (C) 1986, 1988 Larry Wall
21422+ Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
21423+ Free Software Foundation, Inc.
21424+
21425+ This program is free software; you can redistribute it and/or modify
21426+ it under the terms of the GNU General Public License as published by
21427+ the Free Software Foundation; either version 2, or (at your option)
21428+ any later version.
21429+
21430+ This program is distributed in the hope that it will be useful,
21431+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21432+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21433+ GNU General Public License for more details.
21434+
21435+ You should have received a copy of the GNU General Public License
21436+ along with this program; see the file COPYING.
21437+ If not, write to the Free Software Foundation,
21438+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21439
21440 XTERN LINENUM input_lines; /* how long is input file in lines */
21441
21442-char const *ifetch PARAMS ((LINENUM, int, size_t *));
21443-void get_input_file PARAMS ((char const *, char const *));
21444-void re_input PARAMS ((void));
21445-void scan_input PARAMS ((char *));
21446+char const *ifetch (LINENUM, bool, size_t *);
21447+void get_input_file (char const *, char const *);
21448+void re_input (void);
21449+void scan_input (char *);
21450diff -urNd -urNd patch-2.5.4/INSTALL patch-2.5.9/INSTALL
21451--- patch-2.5.4/INSTALL 1997-06-23 07:40:27.000000000 -0400
21452+++ patch-2.5.9/INSTALL 2002-03-08 07:48:54.000000000 -0500
21453@@ -1,3 +1,9 @@
21454+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
21455+Foundation, Inc.
21456+
21457+ This file is free documentation; the Free Software Foundation gives
21458+unlimited permission to copy, distribute and modify it.
21459+
21460 Basic Installation
21461 ==================
21462
21463@@ -8,20 +14,27 @@
21464 those values to create a `Makefile' in each directory of the package.
21465 It may also create one or more `.h' files containing system-dependent
21466 definitions. Finally, it creates a shell script `config.status' that
21467-you can run in the future to recreate the current configuration, a file
21468-`config.cache' that saves the results of its tests to speed up
21469-reconfiguring, and a file `config.log' containing compiler output
21470-(useful mainly for debugging `configure').
21471+you can run in the future to recreate the current configuration, and a
21472+file `config.log' containing compiler output (useful mainly for
21473+debugging `configure').
21474+
21475+ It can also use an optional file (typically called `config.cache'
21476+and enabled with `--cache-file=config.cache' or simply `-C') that saves
21477+the results of its tests to speed up reconfiguring. (Caching is
21478+disabled by default to prevent problems with accidental use of stale
21479+cache files.)
21480
21481 If you need to do unusual things to compile the package, please try
21482 to figure out how `configure' could check whether to do them, and mail
21483 diffs or instructions to the address given in the `README' so they can
21484-be considered for the next release. If at some point `config.cache'
21485-contains results you don't want to keep, you may remove or edit it.
21486+be considered for the next release. If you are using the cache, and at
21487+some point `config.cache' contains results you don't want to keep, you
21488+may remove or edit it.
21489
21490- The file `configure.in' is used to create `configure' by a program
21491-called `autoconf'. You only need `configure.in' if you want to change
21492-it or regenerate `configure' using a newer version of `autoconf'.
21493+ The file `configure.ac' (or `configure.in') is used to create
21494+`configure' by a program called `autoconf'. You only need
21495+`configure.ac' if you want to change it or regenerate `configure' using
21496+a newer version of `autoconf'.
21497
21498 The simplest way to compile this package is:
21499
21500@@ -55,14 +68,15 @@
21501 =====================
21502
21503 Some systems require unusual options for compilation or linking that
21504-the `configure' script does not know about. You can give `configure'
21505-initial values for variables by setting them in the environment. Using
21506-a Bourne-compatible shell, you can do that on the command line like
21507-this:
21508- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
21509+the `configure' script does not know about. Run `./configure --help'
21510+for details on some of the pertinent environment variables.
21511
21512-Or on systems that have the `env' program, you can do it like this:
21513- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
21514+ You can give `configure' initial values for variables by setting
21515+them in the environment. You can do that on the command line like this:
21516+
21517+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
21518+
21519+ *Note Defining Variables::, for more details.
21520
21521 Compiling For Multiple Architectures
21522 ====================================
21523@@ -75,11 +89,11 @@
21524 the `configure' script. `configure' automatically checks for the
21525 source code in the directory that `configure' is in and in `..'.
21526
21527- If you have to use a `make' that does not supports the `VPATH'
21528-variable, you have to compile the package for one architecture at a time
21529-in the source code directory. After you have installed the package for
21530-one architecture, use `make distclean' before reconfiguring for another
21531-architecture.
21532+ If you have to use a `make' that does not support the `VPATH'
21533+variable, you have to compile the package for one architecture at a
21534+time in the source code directory. After you have installed the
21535+package for one architecture, use `make distclean' before reconfiguring
21536+for another architecture.
21537
21538 Installation Names
21539 ==================
21540@@ -122,22 +136,32 @@
21541 Specifying the System Type
21542 ==========================
21543
21544- There may be some features `configure' can not figure out
21545-automatically, but needs to determine by the type of host the package
21546-will run on. Usually `configure' can figure that out, but if it prints
21547-a message saying it can not guess the host type, give it the
21548-`--host=TYPE' option. TYPE can either be a short name for the system
21549-type, such as `sun4', or a canonical name with three fields:
21550+ There may be some features `configure' cannot figure out
21551+automatically, but needs to determine by the type of machine the package
21552+will run on. Usually, assuming the package is built to be run on the
21553+_same_ architectures, `configure' can figure that out, but if it prints
21554+a message saying it cannot guess the machine type, give it the
21555+`--build=TYPE' option. TYPE can either be a short name for the system
21556+type, such as `sun4', or a canonical name which has the form:
21557+
21558 CPU-COMPANY-SYSTEM
21559
21560-See the file `config.sub' for the possible values of each field. If
21561+where SYSTEM can have one of these forms:
21562+
21563+ OS KERNEL-OS
21564+
21565+ See the file `config.sub' for the possible values of each field. If
21566 `config.sub' isn't included in this package, then this package doesn't
21567-need to know the host type.
21568+need to know the machine type.
21569
21570- If you are building compiler tools for cross-compiling, you can also
21571+ If you are _building_ compiler tools for cross-compiling, you should
21572 use the `--target=TYPE' option to select the type of system they will
21573-produce code for and the `--build=TYPE' option to select the type of
21574-system on which you are compiling the package.
21575+produce code for.
21576+
21577+ If you want to _use_ a cross compiler, that generates code for a
21578+platform different from the build platform, you should specify the
21579+"host" platform (i.e., that on which the generated programs will
21580+eventually be run) with `--host=TYPE'.
21581
21582 Sharing Defaults
21583 ================
21584@@ -150,20 +174,44 @@
21585 `CONFIG_SITE' environment variable to the location of the site script.
21586 A warning: not all `configure' scripts look for a site script.
21587
21588-Operation Controls
21589+Defining Variables
21590 ==================
21591
21592+ Variables not defined in a site shell script can be set in the
21593+environment passed to `configure'. However, some packages may run
21594+configure again during the build, and the customized values of these
21595+variables may be lost. In order to avoid this problem, you should set
21596+them in the `configure' command line, using `VAR=value'. For example:
21597+
21598+ ./configure CC=/usr/local2/bin/gcc
21599+
21600+will cause the specified gcc to be used as the C compiler (unless it is
21601+overridden in the site shell script).
21602+
21603+`configure' Invocation
21604+======================
21605+
21606 `configure' recognizes the following options to control how it
21607 operates.
21608
21609-`--cache-file=FILE'
21610- Use and save the results of the tests in FILE instead of
21611- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
21612- debugging `configure'.
21613-
21614 `--help'
21615+`-h'
21616 Print a summary of the options to `configure', and exit.
21617
21618+`--version'
21619+`-V'
21620+ Print the version of Autoconf used to generate the `configure'
21621+ script, and exit.
21622+
21623+`--cache-file=FILE'
21624+ Enable the cache: use and save the results of the tests in FILE,
21625+ traditionally `config.cache'. FILE defaults to `/dev/null' to
21626+ disable caching.
21627+
21628+`--config-cache'
21629+`-C'
21630+ Alias for `--cache-file=config.cache'.
21631+
21632 `--quiet'
21633 `--silent'
21634 `-q'
21635@@ -175,8 +223,6 @@
21636 Look for the package's source code in directory DIR. Usually
21637 `configure' can determine that directory automatically.
21638
21639-`--version'
21640- Print the version of Autoconf used to generate the `configure'
21641- script, and exit.
21642+`configure' also accepts some other, not widely useful, options. Run
21643+`configure --help' for more details.
21644
21645-`configure' also accepts some other, not widely useful, options.
21646diff -urNd -urNd patch-2.5.4/install-sh patch-2.5.9/install-sh
21647--- patch-2.5.4/install-sh 1999-03-02 08:44:48.000000000 -0500
21648+++ patch-2.5.9/install-sh 2003-05-09 13:22:21.000000000 -0400
21649@@ -1,19 +1,37 @@
21650 #!/bin/sh
21651 #
21652 # install - install a program, script, or datafile
21653-# This comes from X11R5 (mit/util/scripts/install.sh).
21654 #
21655-# Copyright 1991 by the Massachusetts Institute of Technology
21656+# This originates from X11R5 (mit/util/scripts/install.sh), which was
21657+# later released in X11R6 (xc/config/util/install.sh) with the
21658+# following copyright and license.
21659 #
21660-# Permission to use, copy, modify, distribute, and sell this software and its
21661-# documentation for any purpose is hereby granted without fee, provided that
21662-# the above copyright notice appear in all copies and that both that
21663-# copyright notice and this permission notice appear in supporting
21664-# documentation, and that the name of M.I.T. not be used in advertising or
21665-# publicity pertaining to distribution of the software without specific,
21666-# written prior permission. M.I.T. makes no representations about the
21667-# suitability of this software for any purpose. It is provided "as is"
21668-# without express or implied warranty.
21669+# Copyright (C) 1994 X Consortium
21670+#
21671+# Permission is hereby granted, free of charge, to any person obtaining a copy
21672+# of this software and associated documentation files (the "Software"), to
21673+# deal in the Software without restriction, including without limitation the
21674+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
21675+# sell copies of the Software, and to permit persons to whom the Software is
21676+# furnished to do so, subject to the following conditions:
21677+#
21678+# The above copyright notice and this permission notice shall be included in
21679+# all copies or substantial portions of the Software.
21680+#
21681+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21682+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21683+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21684+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21685+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
21686+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21687+#
21688+# Except as contained in this notice, the name of the X Consortium shall not
21689+# be used in advertising or otherwise to promote the sale, use or other deal-
21690+# ings in this Software without prior written authorization from the X Consor-
21691+# tium.
21692+#
21693+#
21694+# FSF changes to this file are in the public domain.
21695 #
21696 # Calling this script install-sh is preferred over install.sh, to prevent
21697 # `make' implicit rules from creating a file called install from it
21698@@ -56,7 +74,7 @@
21699
21700 while [ x"$1" != x ]; do
21701 case $1 in
21702- -c) instcmd="$cpprog"
21703+ -c) instcmd=$cpprog
21704 shift
21705 continue;;
21706
21707@@ -79,7 +97,7 @@
21708 shift
21709 continue;;
21710
21711- -s) stripcmd="$stripprog"
21712+ -s) stripcmd=$stripprog
21713 shift
21714 continue;;
21715
21716@@ -106,17 +124,17 @@
21717
21718 if [ x"$src" = x ]
21719 then
21720- echo "install: no input file specified"
21721+ echo "$0: no input file specified" >&2
21722 exit 1
21723 else
21724- true
21725+ :
21726 fi
21727
21728 if [ x"$dir_arg" != x ]; then
21729 dst=$src
21730 src=""
21731-
21732- if [ -d $dst ]; then
21733+
21734+ if [ -d "$dst" ]; then
21735 instcmd=:
21736 chmodcmd=""
21737 else
21738@@ -125,38 +143,38 @@
21739 else
21740
21741 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
21742-# might cause directories to be created, which would be especially bad
21743+# might cause directories to be created, which would be especially bad
21744 # if $src (and thus $dsttmp) contains '*'.
21745
21746- if [ -f $src -o -d $src ]
21747+ if [ -f "$src" ] || [ -d "$src" ]
21748 then
21749- true
21750+ :
21751 else
21752- echo "install: $src does not exist"
21753+ echo "$0: $src does not exist" >&2
21754 exit 1
21755 fi
21756-
21757+
21758 if [ x"$dst" = x ]
21759 then
21760- echo "install: no destination specified"
21761+ echo "$0: no destination specified" >&2
21762 exit 1
21763 else
21764- true
21765+ :
21766 fi
21767
21768 # If destination is a directory, append the input filename; if your system
21769 # does not like double slashes in filenames, you may need to add some logic
21770
21771- if [ -d $dst ]
21772+ if [ -d "$dst" ]
21773 then
21774- dst="$dst"/`basename $src`
21775+ dst=$dst/`basename "$src"`
21776 else
21777- true
21778+ :
21779 fi
21780 fi
21781
21782 ## this sed command emulates the dirname command
21783-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
21784+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
21785
21786 # Make sure that the destination directory exists.
21787 # this part is taken from Noah Friedman's mkinstalldirs script
21788@@ -165,69 +183,73 @@
21789 if [ ! -d "$dstdir" ]; then
21790 defaultIFS='
21791 '
21792-IFS="${IFS-${defaultIFS}}"
21793+IFS="${IFS-$defaultIFS}"
21794
21795-oIFS="${IFS}"
21796+oIFS=$IFS
21797 # Some sh's can't handle IFS=/ for some reason.
21798 IFS='%'
21799-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
21800-IFS="${oIFS}"
21801+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
21802+IFS=$oIFS
21803
21804 pathcomp=''
21805
21806 while [ $# -ne 0 ] ; do
21807- pathcomp="${pathcomp}${1}"
21808+ pathcomp=$pathcomp$1
21809 shift
21810
21811- if [ ! -d "${pathcomp}" ] ;
21812+ if [ ! -d "$pathcomp" ] ;
21813 then
21814- $mkdirprog "${pathcomp}"
21815+ $mkdirprog "$pathcomp"
21816 else
21817- true
21818+ :
21819 fi
21820
21821- pathcomp="${pathcomp}/"
21822+ pathcomp=$pathcomp/
21823 done
21824 fi
21825
21826 if [ x"$dir_arg" != x ]
21827 then
21828- $doit $instcmd $dst &&
21829+ $doit $instcmd "$dst" &&
21830
21831- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
21832- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
21833- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
21834- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
21835+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
21836+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
21837+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
21838+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
21839 else
21840
21841 # If we're going to rename the final executable, determine the name now.
21842
21843- if [ x"$transformarg" = x ]
21844+ if [ x"$transformarg" = x ]
21845 then
21846- dstfile=`basename $dst`
21847+ dstfile=`basename "$dst"`
21848 else
21849- dstfile=`basename $dst $transformbasename |
21850+ dstfile=`basename "$dst" $transformbasename |
21851 sed $transformarg`$transformbasename
21852 fi
21853
21854 # don't allow the sed command to completely eliminate the filename
21855
21856- if [ x"$dstfile" = x ]
21857+ if [ x"$dstfile" = x ]
21858 then
21859- dstfile=`basename $dst`
21860+ dstfile=`basename "$dst"`
21861 else
21862- true
21863+ :
21864 fi
21865
21866-# Make a temp file name in the proper directory.
21867+# Make a couple of temp file names in the proper directory.
21868
21869 dsttmp=$dstdir/#inst.$$#
21870+ rmtmp=$dstdir/#rm.$$#
21871
21872-# Move or copy the file name to the temp name
21873+# Trap to clean up temp files at exit.
21874
21875- $doit $instcmd $src $dsttmp &&
21876+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
21877+ trap '(exit $?); exit' 1 2 13 15
21878
21879- trap "rm -f ${dsttmp}" 0 &&
21880+# Move or copy the file name to the temp name
21881+
21882+ $doit $instcmd "$src" "$dsttmp" &&
21883
21884 # and set any options; do chmod last to preserve setuid bits
21885
21886@@ -235,17 +257,38 @@
21887 # ignore errors from any of these, just make sure not to ignore
21888 # errors from the above "$doit $instcmd $src $dsttmp" command.
21889
21890- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
21891- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
21892- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
21893- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
21894+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
21895+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
21896+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
21897+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
21898+
21899+# Now remove or move aside any old file at destination location. We try this
21900+# two ways since rm can't unlink itself on some systems and the destination
21901+# file might be busy for other reasons. In this case, the final cleanup
21902+# might fail but the new file should still install successfully.
21903+
21904+{
21905+ if [ -f "$dstdir/$dstfile" ]
21906+ then
21907+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
21908+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
21909+ {
21910+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
21911+ (exit 1); exit
21912+ }
21913+ else
21914+ :
21915+ fi
21916+} &&
21917
21918 # Now rename the file to the real destination.
21919
21920- $doit $rmcmd -f $dstdir/$dstfile &&
21921- $doit $mvcmd $dsttmp $dstdir/$dstfile
21922+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
21923
21924 fi &&
21925
21926+# The final little trick to "correctly" pass the exit status to the exit trap.
21927
21928-exit 0
21929+{
21930+ (exit 0); exit
21931+}
21932diff -urNd -urNd patch-2.5.4/m4/backupfile.m4 patch-2.5.9/m4/backupfile.m4
21933--- patch-2.5.4/m4/backupfile.m4 1969-12-31 19:00:00.000000000 -0500
21934+++ patch-2.5.9/m4/backupfile.m4 2002-12-31 08:42:06.000000000 -0500
21935@@ -0,0 +1,23 @@
21936+# backupfile.m4 serial 1
21937+dnl Copyright (C) 2002 Free Software Foundation, Inc.
21938+dnl This file is free software, distributed under the terms of the GNU
21939+dnl General Public License. As a special exception to the GNU General
21940+dnl Public License, this file may be distributed as part of a program
21941+dnl that contains a configuration script generated by Autoconf, under
21942+dnl the same distribution terms as the rest of that program.
21943+
21944+AC_DEFUN([gl_BACKUPFILE],
21945+[
21946+ dnl Prerequisites of lib/backupfile.c.
21947+ AC_REQUIRE([AC_HEADER_DIRENT])
21948+ AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
21949+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
21950+ AC_CHECK_DECLS_ONCE(getenv malloc)
21951+ jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
21952+
21953+ dnl Prerequisites of lib/addext.c.
21954+ AC_REQUIRE([jm_AC_DOS])
21955+ AC_SYS_LONG_FILE_NAMES
21956+ AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
21957+ AC_CHECK_FUNCS(pathconf)
21958+])
21959diff -urNd -urNd patch-2.5.4/m4/ccstdc.m4 patch-2.5.9/m4/ccstdc.m4
21960--- patch-2.5.4/m4/ccstdc.m4 1999-06-16 07:11:07.000000000 -0400
21961+++ patch-2.5.9/m4/ccstdc.m4 1969-12-31 19:00:00.000000000 -0500
21962@@ -1,95 +0,0 @@
21963-# The following is taken from automake 1.4,
21964-# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
21965-# because only the former supports 64-bit integral types on HP-UX 10.20.
21966-
21967-## ----------------------------------------- ##
21968-## ANSIfy the C compiler whenever possible. ##
21969-## From Franc,ois Pinard ##
21970-## ----------------------------------------- ##
21971-
21972-# serial 2
21973-
21974-# @defmac AC_PROG_CC_STDC
21975-# @maindex PROG_CC_STDC
21976-# @ovindex CC
21977-# If the C compiler in not in ANSI C mode by default, try to add an option
21978-# to output variable @code{CC} to make it so. This macro tries various
21979-# options that select ANSI C on some system or another. It considers the
21980-# compiler to be in ANSI C mode if it handles function prototypes correctly.
21981-#
21982-# If you use this macro, you should check after calling it whether the C
21983-# compiler has been set to accept ANSI C; if not, the shell variable
21984-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
21985-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
21986-# program @code{ansi2knr}, which comes with Ghostscript.
21987-# @end defmac
21988-
21989-AC_DEFUN(AM_PROG_CC_STDC,
21990-[AC_REQUIRE([AC_PROG_CC])
21991-AC_BEFORE([$0], [AC_C_INLINE])
21992-AC_BEFORE([$0], [AC_C_CONST])
21993-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
21994-dnl a magic option to avoid problems with ANSI preprocessor commands
21995-dnl like #elif.
21996-dnl FIXME: can't do this because then AC_AIX won't work due to a
21997-dnl circular dependency.
21998-dnl AC_BEFORE([$0], [AC_PROG_CPP])
21999-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
22000-AC_CACHE_VAL(am_cv_prog_cc_stdc,
22001-[am_cv_prog_cc_stdc=no
22002-ac_save_CC="$CC"
22003-# Don't try gcc -ansi; that turns off useful extensions and
22004-# breaks some systems' header files.
22005-# AIX -qlanglvl=ansi
22006-# Ultrix and OSF/1 -std1
22007-# HP-UX -Aa -D_HPUX_SOURCE
22008-# SVR4 -Xc -D__EXTENSIONS__
22009-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
22010-do
22011- CC="$ac_save_CC $ac_arg"
22012- AC_TRY_COMPILE(
22013-[#include <stdarg.h>
22014-#include <stdio.h>
22015-#include <sys/types.h>
22016-#include <sys/stat.h>
22017-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
22018-struct buf { int x; };
22019-FILE * (*rcsopen) (struct buf *, struct stat *, int);
22020-static char *e (p, i)
22021- char **p;
22022- int i;
22023-{
22024- return p[i];
22025-}
22026-static char *f (char * (*g) (char **, int), char **p, ...)
22027-{
22028- char *s;
22029- va_list v;
22030- va_start (v,p);
22031- s = g (p, va_arg (v,int));
22032- va_end (v);
22033- return s;
22034-}
22035-int test (int i, double x);
22036-struct s1 {int (*f) (int a);};
22037-struct s2 {int (*f) (double a);};
22038-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
22039-int argc;
22040-char **argv;
22041-], [
22042-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
22043-],
22044-[am_cv_prog_cc_stdc="$ac_arg"; break])
22045-done
22046-CC="$ac_save_CC"
22047-])
22048-if test -z "$am_cv_prog_cc_stdc"; then
22049- AC_MSG_RESULT([none needed])
22050-else
22051- AC_MSG_RESULT($am_cv_prog_cc_stdc)
22052-fi
22053-case "x$am_cv_prog_cc_stdc" in
22054- x|xno) ;;
22055- *) CC="$CC $am_cv_prog_cc_stdc" ;;
22056-esac
22057-])
22058diff -urNd -urNd patch-2.5.4/m4/d-ino.m4 patch-2.5.9/m4/d-ino.m4
22059--- patch-2.5.4/m4/d-ino.m4 1999-01-26 23:51:43.000000000 -0500
22060+++ patch-2.5.9/m4/d-ino.m4 2002-12-31 08:43:06.000000000 -0500
22061@@ -1,11 +1,11 @@
22062-#serial 2
22063+#serial 5
22064
22065 dnl From Jim Meyering.
22066 dnl
22067 dnl Check whether struct dirent has a member named d_ino.
22068 dnl
22069
22070-AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
22071+AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
22072 [AC_REQUIRE([AC_HEADER_DIRENT])dnl
22073 AC_CACHE_CHECK([for d_ino member in directory struct],
22074 jm_cv_struct_dirent_d_ino,
22075@@ -35,8 +35,8 @@
22076 )
22077 if test $jm_cv_struct_dirent_d_ino = yes; then
22078 AC_DEFINE(D_INO_IN_DIRENT, 1,
22079- [Define if there is a member named d_ino in the struct describing
22080- directory headers.])
22081+ [Define if there is a member named d_ino in the struct describing
22082+ directory headers.])
22083 fi
22084 ]
22085 )
22086diff -urNd -urNd patch-2.5.4/m4/dirname.m4 patch-2.5.9/m4/dirname.m4
22087--- patch-2.5.4/m4/dirname.m4 1969-12-31 19:00:00.000000000 -0500
22088+++ patch-2.5.9/m4/dirname.m4 2002-12-31 08:42:06.000000000 -0500
22089@@ -0,0 +1,25 @@
22090+# dirname.m4 serial 1
22091+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22092+dnl This file is free software, distributed under the terms of the GNU
22093+dnl General Public License. As a special exception to the GNU General
22094+dnl Public License, this file may be distributed as part of a program
22095+dnl that contains a configuration script generated by Autoconf, under
22096+dnl the same distribution terms as the rest of that program.
22097+
22098+AC_DEFUN([gl_DIRNAME],
22099+[
22100+ dnl Prerequisites of lib/dirname.h.
22101+ AC_REQUIRE([jm_AC_DOS])
22102+
22103+ dnl Prerequisites of lib/dirname.c.
22104+ AC_REQUIRE([AC_HEADER_STDC])
22105+ AC_CHECK_HEADERS_ONCE(string.h)
22106+
22107+ dnl Prerequisites of lib/basename.c.
22108+ AC_REQUIRE([AC_HEADER_STDC])
22109+ AC_CHECK_HEADERS_ONCE(string.h)
22110+
22111+ dnl Prerequisites of lib/stripslash.c.
22112+ AC_REQUIRE([AC_HEADER_STDC])
22113+ AC_CHECK_HEADERS_ONCE(string.h)
22114+])
22115diff -urNd -urNd patch-2.5.4/m4/dos.m4 patch-2.5.9/m4/dos.m4
22116--- patch-2.5.4/m4/dos.m4 1969-12-31 19:00:00.000000000 -0500
22117+++ patch-2.5.9/m4/dos.m4 2001-08-12 09:26:00.000000000 -0400
22118@@ -0,0 +1,53 @@
22119+#serial 5
22120+
22121+# Define some macros required for proper operation of code in lib/*.c
22122+# on MSDOS/Windows systems.
22123+
22124+# From Jim Meyering.
22125+
22126+AC_DEFUN([jm_AC_DOS],
22127+ [
22128+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
22129+ [
22130+ AC_TRY_COMPILE([],
22131+ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
22132+neither MSDOS nor Windows
22133+#endif],
22134+ [ac_cv_win_or_dos=yes],
22135+ [ac_cv_win_or_dos=no])
22136+ ])
22137+
22138+ if test x"$ac_cv_win_or_dos" = xyes; then
22139+ ac_fs_accepts_drive_letter_prefix=1
22140+ ac_fs_backslash_is_file_name_separator=1
22141+ else
22142+ ac_fs_accepts_drive_letter_prefix=0
22143+ ac_fs_backslash_is_file_name_separator=0
22144+ fi
22145+
22146+ AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
22147+ [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
22148+# define FILESYSTEM_PREFIX_LEN(Filename) \
22149+ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
22150+#else
22151+# define FILESYSTEM_PREFIX_LEN(Filename) 0
22152+#endif])
22153+
22154+ AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
22155+ $ac_fs_accepts_drive_letter_prefix,
22156+ [Define on systems for which file names may have a so-called
22157+ `drive letter' prefix, define this to compute the length of that
22158+ prefix, including the colon.])
22159+
22160+ AH_VERBATIM(ISSLASH,
22161+ [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
22162+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
22163+#else
22164+# define ISSLASH(C) ((C) == '/')
22165+#endif])
22166+
22167+ AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
22168+ $ac_fs_backslash_is_file_name_separator,
22169+ [Define if the backslash character may also serve as a file name
22170+ component separator.])
22171+ ])
22172diff -urNd -urNd patch-2.5.4/m4/error.m4 patch-2.5.9/m4/error.m4
22173--- patch-2.5.4/m4/error.m4 1969-12-31 19:00:00.000000000 -0500
22174+++ patch-2.5.9/m4/error.m4 2003-04-21 23:28:22.000000000 -0400
22175@@ -0,0 +1,18 @@
22176+#serial 7
22177+
22178+AC_DEFUN([gl_ERROR],
22179+[
22180+ AC_FUNC_ERROR_AT_LINE
22181+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
22182+ jm_PREREQ_ERROR
22183+])
22184+
22185+# Prerequisites of lib/error.c.
22186+AC_DEFUN([jm_PREREQ_ERROR],
22187+[
22188+ AC_REQUIRE([AC_HEADER_STDC])
22189+ AC_REQUIRE([AC_FUNC_VPRINTF])
22190+ AC_CHECK_FUNCS(strerror)
22191+ AC_CHECK_DECLS([strerror])
22192+ AC_FUNC_STRERROR_R
22193+])
22194diff -urNd -urNd patch-2.5.4/m4/getopt.m4 patch-2.5.9/m4/getopt.m4
22195--- patch-2.5.4/m4/getopt.m4 1969-12-31 19:00:00.000000000 -0500
22196+++ patch-2.5.9/m4/getopt.m4 2002-12-31 08:42:06.000000000 -0500
22197@@ -0,0 +1,13 @@
22198+# getopt.m4 serial 1
22199+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22200+dnl This file is free software, distributed under the terms of the GNU
22201+dnl General Public License. As a special exception to the GNU General
22202+dnl Public License, this file may be distributed as part of a program
22203+dnl that contains a configuration script generated by Autoconf, under
22204+dnl the same distribution terms as the rest of that program.
22205+
22206+AC_DEFUN([gl_GETOPT],
22207+[
22208+ dnl Prerequisites of lib/getopt.c.
22209+ AC_CHECK_HEADERS_ONCE(string.h)
22210+])
22211diff -urNd -urNd patch-2.5.4/m4/inttypes_h.m4 patch-2.5.9/m4/inttypes_h.m4
22212--- patch-2.5.4/m4/inttypes_h.m4 1999-01-10 17:47:01.000000000 -0500
22213+++ patch-2.5.9/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
22214@@ -1,22 +0,0 @@
22215-#serial 3
22216-
22217-dnl From Paul Eggert.
22218-
22219-# Define HAVE_INTTYPES_H if <inttypes.h> exists,
22220-# doesn't clash with <sys/types.h>, and declares uintmax_t.
22221-
22222-AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
22223-[
22224- AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
22225- [AC_TRY_COMPILE(
22226- [#include <sys/types.h>
22227-#include <inttypes.h>],
22228- [uintmax_t i = (uintmax_t) -1;],
22229- jm_ac_cv_header_inttypes_h=yes,
22230- jm_ac_cv_header_inttypes_h=no)])
22231- if test $jm_ac_cv_header_inttypes_h = yes; then
22232- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
22233-[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
22234- and declares uintmax_t. ])
22235- fi
22236-])
22237diff -urNd -urNd patch-2.5.4/m4/largefile.m4 patch-2.5.9/m4/largefile.m4
22238--- patch-2.5.4/m4/largefile.m4 1999-08-17 15:56:44.000000000 -0400
22239+++ patch-2.5.9/m4/largefile.m4 1969-12-31 19:00:00.000000000 -0500
22240@@ -1,115 +0,0 @@
22241-#serial 5
22242-
22243-dnl By default, many hosts won't let programs access large files;
22244-dnl one must use special compiler options to get large-file access to work.
22245-dnl For more details about this brain damage please see:
22246-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
22247-
22248-dnl Written by Paul Eggert <eggert@twinsun.com>.
22249-
22250-dnl Internal subroutine of AC_SYS_LARGEFILE.
22251-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
22252-AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
22253- [AC_CACHE_CHECK([for $1 value to request large file support],
22254- ac_cv_sys_largefile_$1,
22255- [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
22256- ac_cv_sys_largefile_$1=no
22257- ifelse($1, CFLAGS,
22258- [case "$host_os" in
22259- # IRIX 6.2 and later require cc -n32.
22260-changequote(, )dnl
22261- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
22262-changequote([, ])dnl
22263- if test "$GCC" != yes; then
22264- ac_cv_sys_largefile_CFLAGS=-n32
22265- fi
22266- ac_save_CC="$CC"
22267- CC="$CC $ac_cv_sys_largefile_CFLAGS"
22268- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
22269- CC="$ac_save_CC"
22270- esac])
22271- }])])
22272-
22273-dnl Internal subroutine of AC_SYS_LARGEFILE.
22274-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
22275-AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
22276- [case $2 in
22277- no) ;;
22278- ?*)
22279- case "[$]$1" in
22280- '') $1=$2 ;;
22281- *) $1=[$]$1' '$2 ;;
22282- esac ;;
22283- esac])
22284-
22285-dnl Internal subroutine of AC_SYS_LARGEFILE.
22286-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
22287-AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
22288- [AC_CACHE_CHECK([for $1], $2,
22289- [$2=no
22290-changequote(, )dnl
22291- $4
22292- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22293- case "$ac_flag" in
22294- -D$1)
22295- $2=1 ;;
22296- -D$1=*)
22297- $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
22298- esac
22299- done
22300-changequote([, ])dnl
22301- ])
22302- if test "[$]$2" != no; then
22303- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
22304- fi])
22305-
22306-AC_DEFUN(AC_SYS_LARGEFILE,
22307- [AC_REQUIRE([AC_CANONICAL_HOST])
22308- AC_ARG_ENABLE(largefile,
22309- [ --disable-largefile omit support for large files])
22310- if test "$enable_largefile" != no; then
22311- AC_CHECK_TOOL(GETCONF, getconf)
22312- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
22313- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
22314- AC_SYS_LARGEFILE_FLAGS(LIBS)
22315-
22316- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22317- case "$ac_flag" in
22318- no) ;;
22319- -D_FILE_OFFSET_BITS=*) ;;
22320- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
22321- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
22322- -D?* | -I?*)
22323- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
22324- *)
22325- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
22326- esac
22327- done
22328- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
22329- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
22330- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
22331- ac_cv_sys_file_offset_bits,
22332- [Number of bits in a file offset, on hosts where this is settable.],
22333- [case "$host_os" in
22334- # HP-UX 10.20 and later
22335- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
22336- ac_cv_sys_file_offset_bits=64 ;;
22337- esac])
22338- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
22339- ac_cv_sys_largefile_source,
22340- [Define to make fseeko etc. visible, on some hosts.],
22341- [case "$host_os" in
22342- # HP-UX 10.20 and later
22343- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
22344- ac_cv_sys_largefile_source=1 ;;
22345- esac])
22346- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
22347- ac_cv_sys_large_files,
22348- [Define for large files, on AIX-style hosts.],
22349- [case "$host_os" in
22350- # AIX 4.2 and later
22351- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
22352- ac_cv_sys_large_files=1 ;;
22353- esac])
22354- fi
22355- ])
22356diff -urNd -urNd patch-2.5.4/m4/malloc.m4 patch-2.5.9/m4/malloc.m4
22357--- patch-2.5.4/m4/malloc.m4 1999-02-07 00:35:28.000000000 -0500
22358+++ patch-2.5.9/m4/malloc.m4 2002-12-31 08:43:06.000000000 -0500
22359@@ -1,35 +1,25 @@
22360-#serial 3
22361+# malloc.m4 serial 7
22362+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22363+dnl This file is free software, distributed under the terms of the GNU
22364+dnl General Public License. As a special exception to the GNU General
22365+dnl Public License, this file may be distributed as part of a program
22366+dnl that contains a configuration script generated by Autoconf, under
22367+dnl the same distribution terms as the rest of that program.
22368
22369 dnl From Jim Meyering.
22370 dnl Determine whether malloc accepts 0 as its argument.
22371 dnl If it doesn't, arrange to use the replacement function.
22372-dnl
22373
22374-AC_DEFUN(jm_FUNC_MALLOC,
22375+AC_DEFUN([jm_FUNC_MALLOC],
22376 [
22377- dnl xmalloc.c requires that this symbol be defined so it doesn't
22378- dnl mistakenly use a broken malloc -- as it might if this test were omitted.
22379- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
22380- [Define if the malloc check has been performed. ])
22381-
22382- AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
22383- [AC_TRY_RUN([
22384- char *malloc ();
22385- int
22386- main ()
22387- {
22388- exit (malloc (0) ? 0 : 1);
22389- }
22390- ],
22391- jm_cv_func_working_malloc=yes,
22392- jm_cv_func_working_malloc=no,
22393- dnl When crosscompiling, assume malloc is broken.
22394- jm_cv_func_working_malloc=no)
22395- ])
22396- if test $jm_cv_func_working_malloc = no; then
22397- AC_SUBST(LIBOBJS)
22398- LIBOBJS="$LIBOBJS malloc.$ac_objext"
22399- AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
22400- [Define to rpl_malloc if the replacement function should be used.])
22401+ AC_REQUIRE([AC_FUNC_MALLOC])
22402+ dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
22403+ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
22404+ gl_PREREQ_MALLOC
22405 fi
22406 ])
22407+
22408+# Prerequisites of lib/malloc.c.
22409+AC_DEFUN([gl_PREREQ_MALLOC], [
22410+ :
22411+])
22412diff -urNd -urNd patch-2.5.4/m4/mbrtowc.m4 patch-2.5.9/m4/mbrtowc.m4
22413--- patch-2.5.4/m4/mbrtowc.m4 1969-12-31 19:00:00.000000000 -0500
22414+++ patch-2.5.9/m4/mbrtowc.m4 2002-12-31 08:43:06.000000000 -0500
22415@@ -0,0 +1,27 @@
22416+# mbrtowc.m4 serial 5
22417+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
22418+dnl This file is free software, distributed under the terms of the GNU
22419+dnl General Public License. As a special exception to the GNU General
22420+dnl Public License, this file may be distributed as part of a program
22421+dnl that contains a configuration script generated by Autoconf, under
22422+dnl the same distribution terms as the rest of that program.
22423+
22424+dnl From Paul Eggert
22425+
22426+dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
22427+dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
22428+
22429+AC_DEFUN([jm_FUNC_MBRTOWC],
22430+[
22431+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
22432+ jm_cv_func_mbrtowc,
22433+ [AC_TRY_LINK(
22434+ [#include <wchar.h>],
22435+ [mbstate_t state; return ! (sizeof state && mbrtowc);],
22436+ jm_cv_func_mbrtowc=yes,
22437+ jm_cv_func_mbrtowc=no)])
22438+ if test $jm_cv_func_mbrtowc = yes; then
22439+ AC_DEFINE(HAVE_MBRTOWC, 1,
22440+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
22441+ fi
22442+])
22443diff -urNd -urNd patch-2.5.4/m4/mbstate_t.m4 patch-2.5.9/m4/mbstate_t.m4
22444--- patch-2.5.4/m4/mbstate_t.m4 1969-12-31 19:00:00.000000000 -0500
22445+++ patch-2.5.9/m4/mbstate_t.m4 2002-06-21 13:38:30.000000000 -0400
22446@@ -0,0 +1,32 @@
22447+# mbstate_t.m4 serial 9
22448+dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
22449+dnl This file is free software, distributed under the terms of the GNU
22450+dnl General Public License. As a special exception to the GNU General
22451+dnl Public License, this file may be distributed as part of a program
22452+dnl that contains a configuration script generated by Autoconf, under
22453+dnl the same distribution terms as the rest of that program.
22454+
22455+# From Paul Eggert.
22456+
22457+# BeOS 5 has <wchar.h> but does not define mbstate_t,
22458+# so you can't declare an object of that type.
22459+# Check for this incompatibility with Standard C.
22460+
22461+# AC_TYPE_MBSTATE_T
22462+# -----------------
22463+AC_DEFUN([AC_TYPE_MBSTATE_T],
22464+ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
22465+ [AC_COMPILE_IFELSE(
22466+ [AC_LANG_PROGRAM(
22467+ [AC_INCLUDES_DEFAULT
22468+# include <wchar.h>],
22469+ [mbstate_t x; return sizeof x;])],
22470+ [ac_cv_type_mbstate_t=yes],
22471+ [ac_cv_type_mbstate_t=no])])
22472+ if test $ac_cv_type_mbstate_t = yes; then
22473+ AC_DEFINE([HAVE_MBSTATE_T], 1,
22474+ [Define to 1 if <wchar.h> declares mbstate_t.])
22475+ else
22476+ AC_DEFINE([mbstate_t], int,
22477+ [Define to a type if <wchar.h> does not define.])
22478+ fi])
22479diff -urNd -urNd patch-2.5.4/m4/memchr.m4 patch-2.5.9/m4/memchr.m4
22480--- patch-2.5.4/m4/memchr.m4 1969-12-31 19:00:00.000000000 -0500
22481+++ patch-2.5.9/m4/memchr.m4 2002-12-31 08:42:07.000000000 -0500
22482@@ -0,0 +1,21 @@
22483+# memchr.m4 serial 1
22484+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22485+dnl This file is free software, distributed under the terms of the GNU
22486+dnl General Public License. As a special exception to the GNU General
22487+dnl Public License, this file may be distributed as part of a program
22488+dnl that contains a configuration script generated by Autoconf, under
22489+dnl the same distribution terms as the rest of that program.
22490+
22491+AC_DEFUN([gl_FUNC_MEMCHR],
22492+[
22493+ AC_REPLACE_FUNCS(memchr)
22494+ if test $ac_cv_func_memchr = no; then
22495+ jm_PREREQ_MEMCHR
22496+ fi
22497+])
22498+
22499+# Prerequisites of lib/memchr.c.
22500+AC_DEFUN([jm_PREREQ_MEMCHR], [
22501+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
22502+ AC_CHECK_HEADERS(bp-sym.h)
22503+])
22504diff -urNd -urNd patch-2.5.4/m4/mkdir.m4 patch-2.5.9/m4/mkdir.m4
22505--- patch-2.5.4/m4/mkdir.m4 1969-12-31 19:00:00.000000000 -0500
22506+++ patch-2.5.9/m4/mkdir.m4 2002-05-24 14:47:37.000000000 -0400
22507@@ -0,0 +1,34 @@
22508+#serial 1
22509+
22510+dnl From Mumit Khan and Paul Eggert
22511+dnl Determine whether mkdir accepts only one argument instead of the usual two.
22512+
22513+AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
22514+ [AC_CHECK_FUNCS(mkdir)
22515+ AC_CACHE_CHECK([whether mkdir takes only one argument],
22516+ patch_cv_mkdir_takes_one_arg,
22517+ [patch_cv_mkdir_takes_one_arg=no
22518+ if test $ac_cv_func_mkdir = yes; then
22519+ AC_TRY_COMPILE([
22520+#include <sys/types.h>
22521+#include <sys/stat.h>
22522+ ],
22523+ [mkdir (".", 0);],
22524+ ,
22525+ [AC_TRY_COMPILE([
22526+#include <sys/types.h>
22527+#include <sys/stat.h>
22528+ ],
22529+ [mkdir (".");],
22530+ patch_cv_mkdir_takes_one_arg=yes
22531+ )]
22532+ )
22533+ fi
22534+ ]
22535+ )
22536+ if test $patch_cv_mkdir_takes_one_arg = yes; then
22537+ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
22538+ [Define if mkdir takes only one argument.])
22539+ fi
22540+ ]
22541+)
22542diff -urNd -urNd patch-2.5.4/m4/onceonly.m4 patch-2.5.9/m4/onceonly.m4
22543--- patch-2.5.4/m4/onceonly.m4 1969-12-31 19:00:00.000000000 -0500
22544+++ patch-2.5.9/m4/onceonly.m4 2003-03-18 05:08:34.000000000 -0500
22545@@ -0,0 +1,63 @@
22546+# onceonly.m4 serial 3
22547+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
22548+dnl This file is free software, distributed under the terms of the GNU
22549+dnl General Public License. As a special exception to the GNU General
22550+dnl Public License, this file may be distributed as part of a program
22551+dnl that contains a configuration script generated by Autoconf, under
22552+dnl the same distribution terms as the rest of that program.
22553+
22554+dnl This file defines some "once only" variants of standard autoconf macros.
22555+dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
22556+dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
22557+dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
22558+dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
22559+dnl The advantage is that the check for each of the headers/functions/decls
22560+dnl will be put only once into the 'configure' file. It keeps the size of
22561+dnl the 'configure' file down, and avoids redundant output when 'configure'
22562+dnl is run.
22563+dnl The drawback is that the checks cannot be conditionalized. If you write
22564+dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
22565+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
22566+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
22567+dnl function.
22568+
22569+dnl Autoconf version 2.57 or newer is recommended.
22570+AC_PREREQ(2.54)
22571+
22572+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
22573+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
22574+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
22575+ :
22576+ AC_FOREACH([gl_HEADER_NAME], [$1], [
22577+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
22578+ [-./], [___])), [
22579+ AC_CHECK_HEADERS(gl_HEADER_NAME)
22580+ ])
22581+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
22582+ [-./], [___])))
22583+ ])
22584+])
22585+
22586+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
22587+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
22588+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
22589+ :
22590+ AC_FOREACH([gl_FUNC_NAME], [$1], [
22591+ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
22592+ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
22593+ ])
22594+ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
22595+ ])
22596+])
22597+
22598+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
22599+# AC_CHECK_DECLS(DECL1, DECL2, ...).
22600+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
22601+ :
22602+ AC_FOREACH([gl_DECL_NAME], [$1], [
22603+ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
22604+ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
22605+ ])
22606+ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
22607+ ])
22608+])
22609diff -urNd -urNd patch-2.5.4/m4/protos.m4 patch-2.5.9/m4/protos.m4
22610--- patch-2.5.4/m4/protos.m4 1998-10-05 00:29:36.000000000 -0400
22611+++ patch-2.5.9/m4/protos.m4 1969-12-31 19:00:00.000000000 -0500
22612@@ -1,25 +0,0 @@
22613-## ------------------------------- ##
22614-## Check for function prototypes. ##
22615-## From Franc,ois Pinard ##
22616-## ------------------------------- ##
22617-
22618-# serial 1
22619-
22620-AC_DEFUN(AM_C_PROTOTYPES,
22621-[AC_REQUIRE([AM_PROG_CC_STDC])
22622-AC_REQUIRE([AC_PROG_CPP])
22623-AC_MSG_CHECKING([for function prototypes])
22624-if test "$am_cv_prog_cc_stdc" != no; then
22625- AC_MSG_RESULT(yes)
22626- AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
22627- U= ANSI2KNR=
22628-else
22629- AC_MSG_RESULT(no)
22630- U=_ ANSI2KNR=./ansi2knr
22631- # Ensure some checks needed by ansi2knr itself.
22632- AC_HEADER_STDC
22633- AC_CHECK_HEADERS(string.h)
22634-fi
22635-AC_SUBST(U)dnl
22636-AC_SUBST(ANSI2KNR)dnl
22637-])
22638diff -urNd -urNd patch-2.5.4/m4/quotearg.m4 patch-2.5.9/m4/quotearg.m4
22639--- patch-2.5.4/m4/quotearg.m4 1969-12-31 19:00:00.000000000 -0500
22640+++ patch-2.5.9/m4/quotearg.m4 2002-12-31 08:42:07.000000000 -0500
22641@@ -0,0 +1,16 @@
22642+# quotearg.m4 serial 1
22643+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22644+dnl This file is free software, distributed under the terms of the GNU
22645+dnl General Public License. As a special exception to the GNU General
22646+dnl Public License, this file may be distributed as part of a program
22647+dnl that contains a configuration script generated by Autoconf, under
22648+dnl the same distribution terms as the rest of that program.
22649+
22650+AC_DEFUN([gl_QUOTEARG],
22651+[
22652+ dnl Prerequisites of lib/quotearg.c.
22653+ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
22654+ AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
22655+ AC_TYPE_MBSTATE_T
22656+ jm_FUNC_MBRTOWC
22657+])
22658diff -urNd -urNd patch-2.5.4/m4/quote.m4 patch-2.5.9/m4/quote.m4
22659--- patch-2.5.4/m4/quote.m4 1969-12-31 19:00:00.000000000 -0500
22660+++ patch-2.5.9/m4/quote.m4 2002-12-31 08:42:07.000000000 -0500
22661@@ -0,0 +1,13 @@
22662+# quote.m4 serial 1
22663+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22664+dnl This file is free software, distributed under the terms of the GNU
22665+dnl General Public License. As a special exception to the GNU General
22666+dnl Public License, this file may be distributed as part of a program
22667+dnl that contains a configuration script generated by Autoconf, under
22668+dnl the same distribution terms as the rest of that program.
22669+
22670+AC_DEFUN([gl_QUOTE],
22671+[
22672+ dnl Prerequisites of lib/quote.c.
22673+ AC_CHECK_HEADERS_ONCE(stddef.h)
22674+])
22675diff -urNd -urNd patch-2.5.4/m4/realloc.m4 patch-2.5.9/m4/realloc.m4
22676--- patch-2.5.4/m4/realloc.m4 1999-02-07 00:36:21.000000000 -0500
22677+++ patch-2.5.9/m4/realloc.m4 2002-12-31 08:43:06.000000000 -0500
22678@@ -1,35 +1,25 @@
22679-#serial 3
22680+# realloc.m4 serial 7
22681+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22682+dnl This file is free software, distributed under the terms of the GNU
22683+dnl General Public License. As a special exception to the GNU General
22684+dnl Public License, this file may be distributed as part of a program
22685+dnl that contains a configuration script generated by Autoconf, under
22686+dnl the same distribution terms as the rest of that program.
22687
22688 dnl From Jim Meyering.
22689 dnl Determine whether realloc works when both arguments are 0.
22690 dnl If it doesn't, arrange to use the replacement function.
22691-dnl
22692
22693-AC_DEFUN(jm_FUNC_REALLOC,
22694+AC_DEFUN([jm_FUNC_REALLOC],
22695 [
22696- dnl xmalloc.c requires that this symbol be defined so it doesn't
22697- dnl mistakenly use a broken realloc -- as it might if this test were omitted.
22698- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
22699- [Define if the realloc check has been performed. ])
22700-
22701- AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
22702- [AC_TRY_RUN([
22703- char *realloc ();
22704- int
22705- main ()
22706- {
22707- exit (realloc (0, 0) ? 0 : 1);
22708- }
22709- ],
22710- jm_cv_func_working_realloc=yes,
22711- jm_cv_func_working_realloc=no,
22712- dnl When crosscompiling, assume realloc is broken.
22713- jm_cv_func_working_realloc=no)
22714- ])
22715- if test $jm_cv_func_working_realloc = no; then
22716- AC_SUBST(LIBOBJS)
22717- LIBOBJS="$LIBOBJS realloc.$ac_objext"
22718- AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
22719- [Define to rpl_realloc if the replacement function should be used.])
22720+ AC_REQUIRE([AC_FUNC_REALLOC])
22721+ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
22722+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
22723+ gl_PREREQ_REALLOC
22724 fi
22725 ])
22726+
22727+# Prerequisites of lib/realloc.c.
22728+AC_DEFUN([gl_PREREQ_REALLOC], [
22729+ :
22730+])
22731diff -urNd -urNd patch-2.5.4/m4/rmdir.m4 patch-2.5.9/m4/rmdir.m4
22732--- patch-2.5.4/m4/rmdir.m4 1969-12-31 19:00:00.000000000 -0500
22733+++ patch-2.5.9/m4/rmdir.m4 2002-12-31 08:42:07.000000000 -0500
22734@@ -0,0 +1,22 @@
22735+# rmdir.m4 serial 1
22736+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22737+dnl This file is free software, distributed under the terms of the GNU
22738+dnl General Public License. As a special exception to the GNU General
22739+dnl Public License, this file may be distributed as part of a program
22740+dnl that contains a configuration script generated by Autoconf, under
22741+dnl the same distribution terms as the rest of that program.
22742+
22743+AC_DEFUN([gl_FUNC_RMDIR],
22744+[
22745+ AC_REPLACE_FUNCS(rmdir)
22746+ if test $ac_cv_func_rmdir = no; then
22747+ gl_PREREQ_RMDIR
22748+ fi
22749+])
22750+
22751+# Prerequisites of lib/rmdir.c.
22752+AC_DEFUN([gl_PREREQ_RMDIR], [
22753+ AC_REQUIRE([AC_HEADER_STAT])
22754+ :
22755+])
22756+
22757diff -urNd -urNd patch-2.5.4/m4/setmode.m4 patch-2.5.9/m4/setmode.m4
22758--- patch-2.5.4/m4/setmode.m4 1969-12-31 19:00:00.000000000 -0500
22759+++ patch-2.5.9/m4/setmode.m4 2002-02-27 23:22:13.000000000 -0500
22760@@ -0,0 +1,38 @@
22761+# Check for setmode, DOS style.
22762+
22763+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
22764+
22765+# This program is free software; you can redistribute it and/or modify
22766+# it under the terms of the GNU General Public License as published by
22767+# the Free Software Foundation; either version 2, or (at your option)
22768+# any later version.
22769+
22770+# This program is distributed in the hope that it will be useful,
22771+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22772+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22773+# GNU General Public License for more details.
22774+
22775+# You should have received a copy of the GNU General Public License
22776+# along with this program; if not, write to the Free Software
22777+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22778+# 02111-1307, USA.
22779+
22780+AC_DEFUN([AC_FUNC_SETMODE_DOS],
22781+ [AC_CHECK_HEADERS(fcntl.h unistd.h)
22782+ AC_CACHE_CHECK([for DOS-style setmode],
22783+ [ac_cv_func_setmode_dos],
22784+ [AC_TRY_LINK(
22785+ [#include <io.h>
22786+ #if HAVE_FCNTL_H
22787+ # include <fcntl.h>
22788+ #endif
22789+ #if HAVE_UNISTD_H
22790+ # include <unistd.h>
22791+ #endif],
22792+ [int ret = setmode && setmode (1, O_BINARY);],
22793+ [ac_cv_func_setmode_dos=yes],
22794+ [ac_cv_func_setmode_dos=no])])
22795+ if test $ac_cv_func_setmode_dos = yes; then
22796+ AC_DEFINE(HAVE_SETMODE_DOS, 1,
22797+ [Define to 1 if you have the DOS-style `setmode' function.])
22798+ fi])
22799diff -urNd -urNd patch-2.5.4/m4/stdbool.m4 patch-2.5.9/m4/stdbool.m4
22800--- patch-2.5.4/m4/stdbool.m4 1969-12-31 19:00:00.000000000 -0500
22801+++ patch-2.5.9/m4/stdbool.m4 2003-01-09 08:35:14.000000000 -0500
22802@@ -0,0 +1,89 @@
22803+# Check for stdbool.h that conforms to C99.
22804+
22805+# Copyright (C) 2002-2003 Free Software Foundation, Inc.
22806+
22807+# This program is free software; you can redistribute it and/or modify
22808+# it under the terms of the GNU General Public License as published by
22809+# the Free Software Foundation; either version 2, or (at your option)
22810+# any later version.
22811+
22812+# This program is distributed in the hope that it will be useful,
22813+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22814+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22815+# GNU General Public License for more details.
22816+
22817+# You should have received a copy of the GNU General Public License
22818+# along with this program; if not, write to the Free Software
22819+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22820+# 02111-1307, USA.
22821+
22822+# Prepare for substituting <stdbool.h> if it is not supported.
22823+
22824+AC_DEFUN([AM_STDBOOL_H],
22825+[
22826+ AC_REQUIRE([AC_HEADER_STDBOOL])
22827+
22828+ # Define two additional variables used in the Makefile substitution.
22829+
22830+ if test "$ac_cv_header_stdbool_h" = yes; then
22831+ STDBOOL_H=''
22832+ else
22833+ STDBOOL_H='stdbool.h'
22834+ fi
22835+ AC_SUBST([STDBOOL_H])
22836+
22837+ if test "$ac_cv_type__Bool" = yes; then
22838+ HAVE__BOOL=1
22839+ else
22840+ HAVE__BOOL=0
22841+ fi
22842+ AC_SUBST([HAVE__BOOL])
22843+])
22844+
22845+# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
22846+# have this macro built-in.
22847+
22848+AC_DEFUN([AC_HEADER_STDBOOL],
22849+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
22850+ [ac_cv_header_stdbool_h],
22851+ [AC_TRY_COMPILE(
22852+ [
22853+ #include <stdbool.h>
22854+ #ifndef bool
22855+ "error: bool is not defined"
22856+ #endif
22857+ #ifndef false
22858+ "error: false is not defined"
22859+ #endif
22860+ #if false
22861+ "error: false is not 0"
22862+ #endif
22863+ #ifndef true
22864+ "error: false is not defined"
22865+ #endif
22866+ #if true != 1
22867+ "error: true is not 1"
22868+ #endif
22869+ #ifndef __bool_true_false_are_defined
22870+ "error: __bool_true_false_are_defined is not defined"
22871+ #endif
22872+
22873+ struct s { _Bool s: 1; _Bool t; } s;
22874+
22875+ char a[true == 1 ? 1 : -1];
22876+ char b[false == 0 ? 1 : -1];
22877+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
22878+ char d[(bool) -0.5 == true ? 1 : -1];
22879+ bool e = &s;
22880+ char f[(_Bool) -0.0 == false ? 1 : -1];
22881+ char g[true];
22882+ char h[sizeof (_Bool)];
22883+ char i[sizeof s.t];
22884+ ],
22885+ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
22886+ [ac_cv_header_stdbool_h=yes],
22887+ [ac_cv_header_stdbool_h=no])])
22888+ AC_CHECK_TYPES([_Bool])
22889+ if test $ac_cv_header_stdbool_h = yes; then
22890+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
22891+ fi])
22892diff -urNd -urNd patch-2.5.4/m4/unlocked-io.m4 patch-2.5.9/m4/unlocked-io.m4
22893--- patch-2.5.4/m4/unlocked-io.m4 1969-12-31 19:00:00.000000000 -0500
22894+++ patch-2.5.9/m4/unlocked-io.m4 2002-12-31 08:42:07.000000000 -0500
22895@@ -0,0 +1,22 @@
22896+#serial 7 -*- autoconf -*-
22897+
22898+dnl From Jim Meyering.
22899+dnl
22900+dnl See if the glibc *_unlocked I/O macros or functions are available.
22901+dnl Use only those *_unlocked macros or functions that are declared
22902+dnl (because some of them were declared in Solaris 2.5.1 but were removed
22903+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
22904+dnl on Solaris 2.6).
22905+
22906+AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
22907+[
22908+ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
22909+ dnl etc.
22910+ AC_REQUIRE([AC_GNU_SOURCE])
22911+
22912+ AC_CHECK_DECLS_ONCE(
22913+ [clearerr_unlocked feof_unlocked ferror_unlocked
22914+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
22915+ fread_unlocked fwrite_unlocked getc_unlocked
22916+ getchar_unlocked putc_unlocked putchar_unlocked])
22917+])
22918diff -urNd -urNd patch-2.5.4/m4/utimbuf.m4 patch-2.5.9/m4/utimbuf.m4
22919--- patch-2.5.4/m4/utimbuf.m4 1999-01-10 17:51:01.000000000 -0500
22920+++ patch-2.5.9/m4/utimbuf.m4 2002-12-31 08:43:06.000000000 -0500
22921@@ -1,4 +1,4 @@
22922-#serial 2
22923+#serial 5
22924
22925 dnl From Jim Meyering
22926
22927@@ -6,9 +6,9 @@
22928 dnl usually in <utime.h>.
22929 dnl Some systems have utime.h but don't declare the struct anywhere.
22930
22931-AC_DEFUN(jm_STRUCT_UTIMBUF,
22932+AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
22933 [
22934- AC_CHECK_HEADERS(utime.h)
22935+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
22936 AC_REQUIRE([AC_HEADER_TIME])
22937 AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
22938 [AC_TRY_COMPILE(
22939@@ -33,8 +33,8 @@
22940 ])
22941
22942 if test $fu_cv_sys_struct_utimbuf = yes; then
22943- AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
22944-[Define if struct utimbuf is declared -- usually in <utime.h>.
22945- Some systems have utime.h but don't declare the struct anywhere. ])
22946+ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
22947+ [Define if struct utimbuf is declared -- usually in <utime.h>.
22948+ Some systems have utime.h but don't declare the struct anywhere. ])
22949 fi
22950 ])
22951diff -urNd -urNd patch-2.5.4/m4/xalloc.m4 patch-2.5.9/m4/xalloc.m4
22952--- patch-2.5.4/m4/xalloc.m4 1969-12-31 19:00:00.000000000 -0500
22953+++ patch-2.5.9/m4/xalloc.m4 2002-12-31 08:42:07.000000000 -0500
22954@@ -0,0 +1,26 @@
22955+# xalloc.m4 serial 1
22956+dnl Copyright (C) 2002 Free Software Foundation, Inc.
22957+dnl This file is free software, distributed under the terms of the GNU
22958+dnl General Public License. As a special exception to the GNU General
22959+dnl Public License, this file may be distributed as part of a program
22960+dnl that contains a configuration script generated by Autoconf, under
22961+dnl the same distribution terms as the rest of that program.
22962+
22963+AC_DEFUN([gl_XALLOC],
22964+[
22965+ gl_PREREQ_XMALLOC
22966+ gl_PREREQ_XSTRDUP
22967+])
22968+
22969+# Prerequisites of lib/xmalloc.c.
22970+AC_DEFUN([gl_PREREQ_XMALLOC], [
22971+ AC_REQUIRE([AC_HEADER_STDC])
22972+ AC_REQUIRE([jm_FUNC_MALLOC])
22973+ AC_REQUIRE([jm_FUNC_REALLOC])
22974+])
22975+
22976+# Prerequisites of lib/xstrdup.c.
22977+AC_DEFUN([gl_PREREQ_XSTRDUP], [
22978+ AC_REQUIRE([AC_HEADER_STDC])
22979+ AC_CHECK_HEADERS_ONCE(string.h)
22980+])
22981diff -urNd -urNd patch-2.5.4/Makefile.in patch-2.5.9/Makefile.in
22982--- patch-2.5.4/Makefile.in 1999-08-30 02:37:54.000000000 -0400
22983+++ patch-2.5.9/Makefile.in 2003-05-20 12:15:48.000000000 -0400
22984@@ -1,5 +1,7 @@
22985 # Makefile for GNU patch.
22986-# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
22987+
22988+# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
22989+# Foundation, Inc.
22990
22991 # This program is free software; you can redistribute it and/or modify
22992 # it under the terms of the GNU General Public License as published by
22993@@ -37,9 +39,9 @@
22994 LDFLAGS = @LDFLAGS@
22995 LIBOBJS = @LIBOBJS@
22996 LIBS = @LIBS@
22997-PACKAGE = @PACKAGE@
22998-U = @U@
22999-VERSION = @VERSION@
23000+OBJEXT = @OBJEXT@
23001+PACKAGE_NAME = @PACKAGE_NAME@
23002+PACKAGE_VERSION = @PACKAGE_VERSION@
23003
23004 prefix = @prefix@
23005 exec_prefix = @exec_prefix@
23006@@ -59,20 +61,33 @@
23007
23008 SHELL = /bin/sh
23009
23010-LIBSRCS = getopt.c getopt1.c malloc.c memchr.c realloc.c rename.c
23011-SRCS = addext.c argmatch.c backupfile.c basename.c error.c inp.c maketime.c \
23012- mkdir.c partime.c patch.c pch.c quotearg.c quotesys.c \
23013- rmdir.c util.c version.c xmalloc.c $(LIBSRCS)
23014-OBJS = addext$U.o argmatch$U.o backupfile$U.o basename$U.o error$U.o inp$U.o \
23015- maketime.o partime.o patch$U.o pch$U.o quotearg$U.o quotesys.o \
23016- util$U.o version$U.o xmalloc$U.o $(LIBOBJS)
23017-HDRS = argmatch.h backupfile.h basename.h common.h error.h getopt.h \
23018- inp.h maketime.h partime.h patchlevel.h pch.h quotearg.h quotesys.h \
23019- util.h version.h xalloc.h
23020+LIBSRCS = error.c malloc.c memchr.c mkdir.c \
23021+ realloc.c rmdir.c strcasecmp.c strncasecmp.c
23022+SRCS = $(LIBSRCS) \
23023+ addext.c argmatch.c backupfile.c \
23024+ basename.c dirname.c \
23025+ getopt.c getopt1.c inp.c \
23026+ maketime.c partime.c \
23027+ patch.c pch.c \
23028+ quote.c quotearg.c quotesys.c \
23029+ util.c version.c xmalloc.c
23030+OBJS = $(LIBOBJS) \
23031+ addext.$(OBJEXT) argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
23032+ basename.$(OBJEXT) dirname.$(OBJEXT) \
23033+ getopt.$(OBJEXT) getopt1.$(OBJEXT) inp.$(OBJEXT) \
23034+ maketime.$(OBJEXT) partime.$(OBJEXT) \
23035+ patch.$(OBJEXT) pch.$(OBJEXT) \
23036+ quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
23037+ util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
23038+HDRS = argmatch.h backupfile.h common.h dirname.h \
23039+ error.h getopt.h gettext.h \
23040+ inp.h maketime.h partime.h pch.h \
23041+ quote.h quotearg.h quotesys.h \
23042+ unlocked-io.h util.h version.h xalloc.h
23043 MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
23044- aclocal.m4 ansi2knr.1 ansi2knr.c \
23045- config.guess config.hin config.sub configure configure.in \
23046- install-sh mkinstalldirs patch.man
23047+ aclocal.m4 \
23048+ config.hin configure configure.ac \
23049+ install-sh mkinstalldirs patch.man stdbool.h.in
23050 DISTFILES = $(MISC) $(SRCS) $(HDRS)
23051 DISTFILES_M4 = $(ACINCLUDE_INPUTS)
23052 DISTFILES_PC = pc/chdirsaf.c
23053@@ -90,7 +105,7 @@
23054 COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
23055 -I. -I$(srcdir) $(CFLAGS)
23056
23057-.c.o:
23058+.c.$(OBJEXT):
23059 $(COMPILE) $<
23060
23061 patch$(EXEEXT): $(OBJS)
23062@@ -114,27 +129,46 @@
23063 $(SHELL) $(CONFIG_STATUS)
23064 config.status: configure
23065 $(SHELL) $(CONFIG_STATUS) --recheck
23066-configure: configure.in $(srcdir)/aclocal.m4
23067+configure: configure.ac $(srcdir)/aclocal.m4
23068 cd $(srcdir) && autoconf
23069-config.hin: configure.in
23070+config.hin: configure.ac $(srcdir)/aclocal.m4
23071 cd $(srcdir) && rm -f config.hin && autoheader
23072+stdbool.h: stdbool.h.in
23073+ sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' \
23074+ <$(srcdir)/stdbool.h.in >stdbool.h
23075
23076 M4DIR = $(srcdir)/m4
23077-ACINCLUDE_INPUTS = $(M4DIR)/ccstdc.m4 $(M4DIR)/d-ino.m4 \
23078- $(M4DIR)/inttypes_h.m4 $(M4DIR)/largefile.m4 $(M4DIR)/malloc.m4 \
23079- $(M4DIR)/protos.m4 $(M4DIR)/realloc.m4 $(M4DIR)/utimbuf.m4
23080+ACINCLUDE_INPUTS = \
23081+ $(M4DIR)/backupfile.m4 \
23082+ $(M4DIR)/d-ino.m4 \
23083+ $(M4DIR)/dirname.m4 \
23084+ $(M4DIR)/dos.m4 \
23085+ $(M4DIR)/error.m4 \
23086+ $(M4DIR)/getopt.m4 \
23087+ $(M4DIR)/malloc.m4 \
23088+ $(M4DIR)/mbrtowc.m4 \
23089+ $(M4DIR)/mbstate_t.m4 \
23090+ $(M4DIR)/memchr.m4 \
23091+ $(M4DIR)/mkdir.m4 \
23092+ $(M4DIR)/onceonly.m4 \
23093+ $(M4DIR)/quote.m4 \
23094+ $(M4DIR)/quotearg.m4 \
23095+ $(M4DIR)/realloc.m4 \
23096+ $(M4DIR)/rmdir.m4 \
23097+ $(M4DIR)/setmode.m4 \
23098+ $(M4DIR)/stdbool.m4 \
23099+ $(M4DIR)/unlocked-io.m4 \
23100+ $(M4DIR)/utimbuf.m4 \
23101+ $(M4DIR)/xalloc.m4
23102
23103 $(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
23104 cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
23105
23106-patchlevel.h: configure.in
23107- echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
23108-
23109-TAGS: $(HDRS) patchlevel.h $(SRCS)
23110- etags $(HDRS) patchlevel.h $(SRCS)
23111+TAGS: $(HDRS) $(SRCS)
23112+ etags $(HDRS) $(SRCS)
23113
23114 mostlyclean::
23115- rm -f ansi2knr core* *core *.o *_.c
23116+ rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
23117
23118 clean:: mostlyclean
23119 rm -f patch$(EXEEXT)
23120@@ -148,7 +182,7 @@
23121 $(MAKE) distclean
23122 rm -f TAGS
23123
23124-PV = $(PACKAGE)-$(VERSION)
23125+PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
23126
23127 dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
23128 rm -rf $(PV)
23129@@ -160,31 +194,28 @@
23130 tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
23131 rm -rf $(PV)
23132
23133-ansi2knr.o: config.h
23134-ansi2knr: ansi2knr.o
23135- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) ansi2knr.o $(LIBS)
23136-addext_.c argmatch_.c backupfile_.c basename_.c error_.c \
23137-getopt_.c getopt1_.c inp_.c malloc_.c mkdir_.c patch_.c pch_.c quotearg_.c \
23138-rename_.c util_.c version_.c xmalloc_.c: ansi2knr
23139-.SUFFIXES: _.c
23140-.c_.c:
23141- ./ansi2knr $< $@
23142-
23143 $(OBJS): config.h
23144-addext$U.o: backupfile.h
23145-argmatch$U.o: argmatch.h error.h quotearg.h
23146-backupfile$U.o: argmatch.h backupfile.h
23147-error$U.o: error.h
23148-getopt$U.o getopt1$U.o: getopt.h
23149-inp$U.o: backupfile.h common.h inp.h pch.h quotearg.h util.h xalloc.h
23150-maketime.o: maketime.h partime.h
23151-partime.o: partime.h
23152-patch$U.o: argmatch.h backupfile.h common.h getopt.h inp.h \
23153+COMMON = common.h @STDBOOL_H@
23154+addext.$(OBJEXT): backupfile.h dirname.h
23155+argmatch.$(OBJEXT): argmatch.h gettext.h error.h \
23156+ quote.h quotearg.h unlocked-io.h
23157+backupfile.$(OBJEXT): argmatch.h backupfile.h dirname.h
23158+basename.$(OBJEXT): dirname.h
23159+dirname.$(OBJEXT): dirname.h xalloc.h
23160+error.$(OBJEXT): error.h gettext.h unlocked-io.h
23161+getopt.$(OBJEXT) getopt1.$(OBJEXT): getopt.h
23162+inp.$(OBJEXT): backupfile.h $(COMMON) inp.h pch.h quotearg.h util.h xalloc.h
23163+maketime.$(OBJEXT): maketime.h partime.h
23164+mkdir.$(OBJEXT): dirname.h xalloc.h
23165+partime.$(OBJEXT): partime.h
23166+patch.$(OBJEXT): argmatch.h backupfile.h $(COMMON) getopt.h inp.h \
23167 pch.h quotearg.h util.h version.h xalloc.h
23168-pch$U.o: backupfile.h basename.h common.h inp.h pch.h quotearg.h util.h
23169-quotearg$U.o: quotearg.h xalloc.h
23170-quotesys.o: quotesys.h
23171-util$U.o: backupfile.h basename.h common.h maketime.h \
23172+pch.$(OBJEXT): backupfile.h $(COMMON) dirname.h inp.h pch.h quotearg.h util.h
23173+quote.$(OBJECT): quote.h quotearg.h
23174+quotearg.$(OBJEXT): gettext.h quotearg.h xalloc.h
23175+quotesys.$(OBJEXT): quotesys.h
23176+strncasecmp.$(OBJEXT): strcasecmp.c
23177+util.$(OBJEXT): backupfile.h $(COMMON) dirname.h maketime.h \
23178 partime.h quotearg.h quotesys.h util.h version.h xalloc.h
23179-version$U.o: common.h patchlevel.h util.h version.h
23180-xmalloc$U.o: xalloc.h
23181+version.$(OBJEXT): $(COMMON) version.h
23182+xmalloc.$(OBJEXT): error.h gettext.h xalloc.h
23183diff -urNd -urNd patch-2.5.4/memchr.c patch-2.5.9/memchr.c
23184--- patch-2.5.4/memchr.c 1999-07-10 12:44:10.000000000 -0400
23185+++ patch-2.5.9/memchr.c 2000-10-28 04:22:11.000000000 -0400
23186@@ -1,4 +1,4 @@
23187-/* Copyright (C) 1991, 1993, 1997, 1999 Free Software Foundation, Inc.
23188+/* Copyright (C) 1991,93,96,97,99,2000 Free Software Foundation, Inc.
23189 Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
23190 with help from Dan Sahlin (dan@sics.se) and
23191 commentary by Jim Blandy (jimb@ai.mit.edu);
23192@@ -34,11 +34,18 @@
23193 # define __ptr_t char *
23194 #endif /* C++ or ANSI C. */
23195
23196-#if defined (_LIBC)
23197+#if defined _LIBC
23198 # include <string.h>
23199+# include <memcopy.h>
23200+#else
23201+# define reg_char char
23202 #endif
23203
23204-#if defined (HAVE_LIMITS_H) || defined (_LIBC)
23205+#if HAVE_STDLIB_H || defined _LIBC
23206+# include <stdlib.h>
23207+#endif
23208+
23209+#if HAVE_LIMITS_H || defined _LIBC
23210 # include <limits.h>
23211 #endif
23212
23213@@ -49,21 +56,28 @@
23214 #endif
23215
23216 #include <sys/types.h>
23217+#if HAVE_BP_SYM_H || defined _LIBC
23218+# include <bp-sym.h>
23219+#else
23220+# define BP_SYM(sym) sym
23221+#endif
23222
23223+#undef memchr
23224+#undef __memchr
23225
23226 /* Search no more than N bytes of S for C. */
23227-
23228 __ptr_t
23229-memchr (s, c, n)
23230+__memchr (s, c_in, n)
23231 const __ptr_t s;
23232- int c;
23233+ int c_in;
23234 size_t n;
23235 {
23236 const unsigned char *char_ptr;
23237 const unsigned long int *longword_ptr;
23238 unsigned long int longword, magic_bits, charmask;
23239+ unsigned reg_char c;
23240
23241- c = (unsigned char) c;
23242+ c = (unsigned char) c_in;
23243
23244 /* Handle the first few characters by reading one character at a time.
23245 Do this until CHAR_PTR is aligned on a longword boundary. */
23246@@ -197,3 +211,6 @@
23247
23248 return 0;
23249 }
23250+#ifdef weak_alias
23251+weak_alias (__memchr, BP_SYM (memchr))
23252+#endif
23253diff -urNd -urNd patch-2.5.4/mkdir.c patch-2.5.9/mkdir.c
23254--- patch-2.5.4/mkdir.c 1999-04-26 08:16:14.000000000 -0400
23255+++ patch-2.5.9/mkdir.c 2001-09-16 08:42:14.000000000 -0400
23256@@ -1,5 +1,6 @@
23257-/* BSD compatible make directory function for System V
23258- Copyright (C) 1988, 1990, 1998 Free Software Foundation, Inc.
23259+/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
23260+ slash. On those systems, this wrapper removes the trailing slash.
23261+ Copyright (C) 2001 Free Software Foundation, Inc.
23262
23263 This program is free software; you can redistribute it and/or modify
23264 it under the terms of the GNU General Public License as published by
23265@@ -15,94 +16,61 @@
23266 along with this program; if not, write to the Free Software Foundation,
23267 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23268
23269-#if HAVE_CONFIG_H
23270-# include <config.h>
23271-#endif
23272+/* written by Jim Meyering */
23273+
23274+#include <config.h>
23275+
23276+/* Disable the definition of mkdir to rpl_mkdir (from config.h) in this
23277+ file. Otherwise, we'd get conflicting prototypes for rpl_mkdir on
23278+ most systems. */
23279+#undef mkdir
23280
23281 #include <sys/types.h>
23282 #include <sys/stat.h>
23283-#include <errno.h>
23284-#ifndef errno
23285-extern int errno;
23286+#include <stdio.h>
23287+#if HAVE_STDLIB_H
23288+# include <stdlib.h>
23289 #endif
23290
23291-#if STAT_MACROS_BROKEN
23292-# undef S_ISDIR
23293+#if HAVE_STRING_H
23294+# include <string.h>
23295+#else
23296+# include <strings.h>
23297 #endif
23298
23299-#if !defined(S_ISDIR) && defined(S_IFDIR)
23300-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
23301-#endif
23302+#include "dirname.h"
23303+#include "xalloc.h"
23304
23305-#ifndef S_IRWXU
23306-# define S_IRWXU 0700
23307-#endif
23308-#ifndef S_IRWXG
23309-# define S_IRWXG 0070
23310+#ifndef HAVE_DECL_FREE
23311+"this configure-time declaration test was not run"
23312 #endif
23313-#ifndef S_IRWXO
23314-# define S_IRWXO 0007
23315+#if !HAVE_DECL_FREE
23316+void free ();
23317 #endif
23318
23319-/* mkdir adapted from GNU tar. */
23320-
23321-/* Make directory DPATH, with permission mode DMODE.
23322-
23323- Written by Robert Rother, Mariah Corporation, August 1985
23324- (sdcsvax!rmr or rmr@uscd). If you want it, it's yours.
23325-
23326- Severely hacked over by John Gilmore to make a 4.2BSD compatible
23327- subroutine. 11Mar86; hoptoad!gnu
23328-
23329- Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir,
23330- subroutine didn't return EEXIST. It does now. */
23331+/* This function is required at least for NetBSD 1.5.2. */
23332
23333 int
23334-mkdir (const char *dpath, mode_t dmode)
23335+rpl_mkdir (char const *dir, mode_t mode)
23336 {
23337- pid_t cpid;
23338- mode_t mode;
23339- int status;
23340- struct stat statbuf;
23341+ int ret_val;
23342+ char *tmp_dir;
23343+ size_t len = strlen (dir);
23344
23345- if (stat (dpath, &statbuf) == 0)
23346+ if (len && dir[len - 1] == '/')
23347 {
23348- errno = EEXIST; /* stat worked, so it already exists. */
23349- return -1;
23350+ tmp_dir = xstrdup (dir);
23351+ strip_trailing_slashes (tmp_dir);
23352 }
23353-
23354- /* If stat fails for a reason other than non-existence, return error. */
23355- if (errno != ENOENT)
23356- return -1;
23357-
23358- cpid = fork ();
23359- switch (cpid)
23360+ else
23361 {
23362- case -1: /* Cannot fork. */
23363- return -1; /* errno is already set. */
23364+ tmp_dir = (char *) dir;
23365+ }
23366
23367- case 0: /* Child process. */
23368- /* Cheap hack to set mode of new directory. Since this child
23369- process is going away anyway, we zap its umask.
23370- This won't suffice to set SUID, SGID, etc. on this
23371- directory, so the parent process calls chmod afterward. */
23372- mode = umask (0); /* Get current umask. */
23373- /* Set for mkdir. */
23374- umask (mode | ((S_IRWXU | S_IRWXG | S_IRWXO) & ~dmode));
23375- execl ("/bin/mkdir", "mkdir", dpath, (char *) 0);
23376- _exit (1);
23377+ ret_val = mkdir (tmp_dir, mode);
23378
23379- default: /* Parent process. */
23380- /* Wait for kid to finish. */
23381- while (wait (&status) != cpid)
23382- /* Do nothing. */ ;
23383+ if (tmp_dir != dir)
23384+ free (tmp_dir);
23385
23386- if (status)
23387- {
23388- /* /bin/mkdir failed. */
23389- errno = EIO;
23390- return -1;
23391- }
23392- return chmod (dpath, dmode);
23393- }
23394+ return ret_val;
23395 }
23396diff -urNd -urNd patch-2.5.4/mkinstalldirs patch-2.5.9/mkinstalldirs
23397--- patch-2.5.4/mkinstalldirs 1999-01-05 08:29:06.000000000 -0500
23398+++ patch-2.5.9/mkinstalldirs 2002-09-02 11:10:52.000000000 -0400
23399@@ -4,9 +4,53 @@
23400 # Created: 1993-05-16
23401 # Public domain
23402
23403-# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
23404-
23405 errstatus=0
23406+dirmode=""
23407+
23408+usage="\
23409+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
23410+
23411+# process command line arguments
23412+while test $# -gt 0 ; do
23413+ case "${1}" in
23414+ -h | --help | --h* ) # -h for help
23415+ echo "${usage}" 1>&2; exit 0 ;;
23416+ -m ) # -m PERM arg
23417+ shift
23418+ test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
23419+ dirmode="${1}"
23420+ shift ;;
23421+ -- ) shift; break ;; # stop option processing
23422+ -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
23423+ * ) break ;; # first non-opt arg
23424+ esac
23425+done
23426+
23427+for file
23428+do
23429+ if test -d "$file"; then
23430+ shift
23431+ else
23432+ break
23433+ fi
23434+done
23435+
23436+case $# in
23437+0) exit 0 ;;
23438+esac
23439+
23440+case $dirmode in
23441+'')
23442+ if mkdir -p -- . 2>/dev/null; then
23443+ echo "mkdir -p -- $*"
23444+ exec mkdir -p -- "$@"
23445+ fi ;;
23446+*)
23447+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
23448+ echo "mkdir -m $dirmode -p -- $*"
23449+ exec mkdir -m "$dirmode" -p -- "$@"
23450+ fi ;;
23451+esac
23452
23453 for file
23454 do
23455@@ -22,13 +66,24 @@
23456 esac
23457
23458 if test ! -d "$pathcomp"; then
23459- echo "mkdir $pathcomp"
23460+ echo "mkdir $pathcomp"
23461
23462- mkdir "$pathcomp" || lasterr=$?
23463+ mkdir "$pathcomp" || lasterr=$?
23464
23465- if test ! -d "$pathcomp"; then
23466- errstatus=$lasterr
23467- fi
23468+ if test ! -d "$pathcomp"; then
23469+ errstatus=$lasterr
23470+ else
23471+ if test ! -z "$dirmode"; then
23472+ echo "chmod $dirmode $pathcomp"
23473+
23474+ lasterr=""
23475+ chmod "$dirmode" "$pathcomp" || lasterr=$?
23476+
23477+ if test ! -z "$lasterr"; then
23478+ errstatus=$lasterr
23479+ fi
23480+ fi
23481+ fi
23482 fi
23483
23484 pathcomp="$pathcomp/"
23485@@ -37,4 +92,8 @@
23486
23487 exit $errstatus
23488
23489+# Local Variables:
23490+# mode: shell-script
23491+# sh-indentation: 3
23492+# End:
23493 # mkinstalldirs ends here
23494diff -urNd -urNd patch-2.5.4/NEWS patch-2.5.9/NEWS
23495--- patch-2.5.4/NEWS 1998-03-20 21:51:32.000000000 -0500
23496+++ patch-2.5.9/NEWS 2003-05-18 04:40:54.000000000 -0400
23497@@ -1,9 +1,23 @@
23498-Known problems:
23499+Changes in versions 2.5.8 and 2.5.9: bug fixes only.
23500
23501-* The diffutils 2.7 documentation for `patch' is obsolete; this should be
23502- fixed in diffutils 2.8. Until then, see `patch --help' or `man patch'.
23503-
23504-Changes since version 2.5:
23505+Changes in version 2.5.7:
23506+
23507+* patch -D now outputs preprocessor lines without comments, as required
23508+ by POSIX 1003.1-2001.
23509+
23510+Changes in version 2.5.6:
23511+
23512+* File names in context patches may now contain spaces, so long
23513+ as the context patch headers use a tab to separate the file name
23514+ from the time stamp.
23515+* Perforce is now supported.
23516+* Patch lines beginning with "#" are comments and are ignored.
23517+
23518+Changes in version 2.5.5:
23519+
23520+* The bug reporting address is now <bug-patch@gnu.org>.
23521+
23522+Changes in version 2.5.4:
23523
23524 * A security hole has been closed.
23525 It involved race conditions with temporary files.
23526@@ -19,6 +33,9 @@
23527 * `patch' now ignores trailing carriage returns in lines of context diffs
23528 if the context diff headers end in carriage return.
23529
23530+* `patch' now ignores context diff header file names that have fewer slashes
23531+ than the count specified by the -p or --strip option.
23532+
23533 * New options:
23534 --posix
23535 --quoting-style=WORD
23536@@ -196,3 +213,25 @@
23537 being patched.
23538 * Print the system error message when system calls fail.
23539 * Fixed various bugs and portability problems.
23540+
23541+
23542+
23543+Copyright (C) 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003
23544+Free Software Foundation, Inc.
23545+
23546+This file is part of GNU Patch.
23547+
23548+This program is free software; you can redistribute it and/or modify
23549+it under the terms of the GNU General Public License as published by
23550+the Free Software Foundation; either version 2, or (at your option)
23551+any later version.
23552+
23553+This program is distributed in the hope that they will be useful,
23554+but WITHOUT ANY WARRANTY; without even the implied warranty of
23555+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23556+GNU General Public License for more details.
23557+
23558+You should have received a copy of the GNU General Public License
23559+along with this program; see the file COPYING. If not, write to
23560+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23561+Boston, MA 02111-1307, USA.
23562diff -urNd -urNd patch-2.5.4/partime.c patch-2.5.9/partime.c
23563--- patch-2.5.4/partime.c 1998-03-15 10:48:53.000000000 -0500
23564+++ patch-2.5.9/partime.c 2002-02-18 02:42:58.000000000 -0500
23565@@ -1,6 +1,6 @@
23566 /* Parse a string, yielding a struct partime that describes it. */
23567
23568-/* Copyright 1993, 1994, 1995, 1997 Paul Eggert
23569+/* Copyright (C) 1993, 1994, 1995, 1997, 2002 Paul Eggert
23570 Distributed under license by the Free Software Foundation, Inc.
23571
23572 This file is part of RCS.
23573@@ -75,7 +75,7 @@
23574 #include <partime.h>
23575
23576 char const partime_id[] =
23577- "$Id: partime.c,v 5.18 1998/03/15 15:48:53 eggert Exp $";
23578+ "$Id: partime.c,v 1.2 2002/02/18 07:42:58 eggert Exp $";
23579
23580
23581 /* Lookup tables for names of months, weekdays, time zones. */
23582@@ -791,7 +791,7 @@
23583 return 0;
23584 if (negative)
23585 n = -n;
23586- while (!ISALNUM ((unsigned char) *s))
23587+ while (! ISALNUM ((unsigned char) *s) && *s)
23588 s++;
23589 i = lookup (s, relative_units);
23590 if (!TM_DEFINED (i))
23591diff -urNd -urNd patch-2.5.4/patch.c patch-2.5.9/patch.c
23592--- patch-2.5.4/patch.c 1999-08-30 02:20:08.000000000 -0400
23593+++ patch-2.5.9/patch.c 2003-05-20 09:55:03.000000000 -0400
23594@@ -1,9 +1,11 @@
23595 /* patch - a program to apply diffs to original files */
23596
23597-/* $Id: patch.c,v 1.28 1999/08/30 06:20:08 eggert Exp $ */
23598+/* $Id: patch.c,v 1.44 2003/05/20 13:55:03 eggert Exp $ */
23599
23600-/* Copyright 1984, 1985-1987, 1988 Larry Wall
23601- Copyright 1989, 1990-1993, 1997-1998, 1999 Free Software Foundation, Inc.
23602+/* Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
23603+
23604+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002,
23605+ 2003 Free Software Foundation, Inc.
23606
23607 This program is free software; you can redistribute it and/or modify
23608 it under the terms of the GNU General Public License as published by
23609@@ -50,47 +52,47 @@
23610 struct outstate
23611 {
23612 FILE *ofp;
23613- int after_newline;
23614- int zero_output;
23615+ bool after_newline;
23616+ bool zero_output;
23617 };
23618
23619 /* procedures */
23620
23621-static FILE *create_output_file PARAMS ((char const *, int));
23622-static LINENUM locate_hunk PARAMS ((LINENUM));
23623-static bool apply_hunk PARAMS ((struct outstate *, LINENUM));
23624-static bool copy_till PARAMS ((struct outstate *, LINENUM));
23625-static bool patch_match PARAMS ((LINENUM, LINENUM, LINENUM, LINENUM));
23626-static bool similar PARAMS ((char const *, size_t, char const *, size_t));
23627-static bool spew_output PARAMS ((struct outstate *));
23628-static char const *make_temp PARAMS ((int));
23629-static int numeric_string PARAMS ((char const *, int, char const *));
23630-static void abort_hunk PARAMS ((void));
23631-static void cleanup PARAMS ((void));
23632-static void get_some_switches PARAMS ((void));
23633-static void init_output PARAMS ((char const *, int, struct outstate *));
23634-static void init_reject PARAMS ((void));
23635-static void reinitialize_almost_everything PARAMS ((void));
23636-static void remove_if_needed PARAMS ((char const *, int volatile *));
23637-static void usage PARAMS ((FILE *, int)) __attribute__((noreturn));
23638+static FILE *create_output_file (char const *, int);
23639+static LINENUM locate_hunk (LINENUM);
23640+static bool apply_hunk (struct outstate *, LINENUM);
23641+static bool copy_till (struct outstate *, LINENUM);
23642+static bool patch_match (LINENUM, LINENUM, LINENUM, LINENUM);
23643+static bool similar (char const *, size_t, char const *, size_t);
23644+static bool spew_output (struct outstate *);
23645+static char const *make_temp (char);
23646+static int numeric_string (char const *, bool, char const *);
23647+static void abort_hunk (void);
23648+static void cleanup (void);
23649+static void get_some_switches (void);
23650+static void init_output (char const *, int, struct outstate *);
23651+static void init_reject (void);
23652+static void reinitialize_almost_everything (void);
23653+static void remove_if_needed (char const *, int volatile *);
23654+static void usage (FILE *, int) __attribute__((noreturn));
23655
23656-static int make_backups;
23657-static int backup_if_mismatch;
23658+static bool make_backups;
23659+static bool backup_if_mismatch;
23660 static char const *version_control;
23661 static char const *version_control_context;
23662-static int remove_empty_files;
23663+static bool remove_empty_files;
23664
23665-/* TRUE if -R was specified on command line. */
23666-static int reverse_flag_specified;
23667+/* true if -R was specified on command line. */
23668+static bool reverse_flag_specified;
23669
23670 /* how many input lines have been irretractably output */
23671 static LINENUM last_frozen_line;
23672
23673 static char const *do_defines; /* symbol to patch using ifdef, ifndef, etc. */
23674 static char const if_defined[] = "\n#ifdef %s\n";
23675-static char const not_defined[] = "#ifndef %s\n";
23676+static char const not_defined[] = "\n#ifndef %s\n";
23677 static char const else_defined[] = "\n#else\n";
23678-static char const end_defined[] = "\n#endif /* %s */\n";
23679+static char const end_defined[] = "\n#endif\n";
23680
23681 static int Argc;
23682 static char * const *Argv;
23683@@ -107,20 +109,18 @@
23684
23685 static char serrbuf[BUFSIZ];
23686
23687-char const program_name[] = "patch";
23688-
23689 /* Apply a set of diffs as appropriate. */
23690
23691-int main PARAMS ((int, char **));
23692-
23693 int
23694 main (int argc, char **argv)
23695 {
23696 char const *val;
23697- bool somefailed = FALSE;
23698+ bool somefailed = false;
23699 struct outstate outstate;
23700 char numbuf[LINENUM_LENGTH_BOUND + 1];
23701
23702+ xalloc_exit_failure = 2;
23703+ program_name = argv[0];
23704 init_time ();
23705
23706 setbuf(stderr, serrbuf);
23707@@ -141,12 +141,11 @@
23708 posixly_correct = getenv ("POSIXLY_CORRECT") != 0;
23709 backup_if_mismatch = ! posixly_correct;
23710 patch_get = ((val = getenv ("PATCH_GET"))
23711- ? numeric_string (val, 1, "PATCH_GET value")
23712+ ? numeric_string (val, true, "PATCH_GET value")
23713 : posixly_correct - 1);
23714
23715 val = getenv ("SIMPLE_BACKUP_SUFFIX");
23716- if (val && *val)
23717- simple_backup_suffix = val;
23718+ simple_backup_suffix = val && *val ? val : ".orig";
23719
23720 if ((version_control = getenv ("PATCH_VERSION_CONTROL")))
23721 version_control_context = "$PATCH_VERSION_CONTROL";
23722@@ -171,7 +170,7 @@
23723 init_output (outfile, 0, &outstate);
23724
23725 /* Make sure we clean up in case of disaster. */
23726- set_signals(0);
23727+ set_signals (false);
23728
23729 for (
23730 open_patch_file (patchname);
23731@@ -180,28 +179,26 @@
23732 ) { /* for each patch in patch file */
23733 int hunk = 0;
23734 int failed = 0;
23735- int mismatch = 0;
23736+ bool mismatch = false;
23737 char *outname = outfile ? outfile : inname;
23738
23739 if (!skip_rest_of_patch)
23740 get_input_file (inname, outname);
23741
23742 if (diff_type == ED_DIFF) {
23743- outstate.zero_output = 0;
23744- if (! dry_run)
23745+ outstate.zero_output = false;
23746+ somefailed |= skip_rest_of_patch;
23747+ do_ed_script (outstate.ofp);
23748+ if (! dry_run && ! outfile && ! skip_rest_of_patch)
23749 {
23750- do_ed_script (outstate.ofp);
23751- if (! outfile)
23752- {
23753- struct stat statbuf;
23754- if (stat (TMPOUTNAME, &statbuf) != 0)
23755- pfatal ("%s", TMPOUTNAME);
23756- outstate.zero_output = statbuf.st_size == 0;
23757- }
23758+ struct stat statbuf;
23759+ if (stat (TMPOUTNAME, &statbuf) != 0)
23760+ pfatal ("%s", TMPOUTNAME);
23761+ outstate.zero_output = statbuf.st_size == 0;
23762 }
23763 } else {
23764 int got_hunk;
23765- int apply_anyway = 0;
23766+ bool apply_anyway = false;
23767
23768 /* initialize the patched file */
23769 if (! skip_rest_of_patch && ! outfile)
23770@@ -236,7 +233,7 @@
23771 do {
23772 where = locate_hunk(fuzz);
23773 if (! where || fuzz || last_offset)
23774- mismatch = 1;
23775+ mismatch = true;
23776 if (hunk == 1 && ! where && ! (force | apply_anyway)
23777 && reverse == reverse_flag_specified) {
23778 /* dwim for reversed patch? */
23779@@ -253,7 +250,7 @@
23780 (reverse
23781 ? "Unreversed"
23782 : "Reversed (or previously applied)"))))
23783- reverse ^= 1;
23784+ reverse = ! reverse;
23785 else
23786 {
23787 /* Put it back to normal. */
23788@@ -261,7 +258,7 @@
23789 fatal ("lost hunk on alloc error!");
23790 if (where)
23791 {
23792- apply_anyway = 1;
23793+ apply_anyway = true;
23794 fuzz--; /* Undo `++fuzz' below. */
23795 where = 0;
23796 }
23797@@ -344,7 +341,7 @@
23798 if (! spew_output (&outstate))
23799 {
23800 say ("Skipping patch.\n");
23801- skip_rest_of_patch = TRUE;
23802+ skip_rest_of_patch = true;
23803 }
23804 }
23805 }
23806@@ -354,7 +351,7 @@
23807 if (! skip_rest_of_patch && ! outfile) {
23808 if (outstate.zero_output
23809 && (remove_empty_files
23810- || (pch_says_nonexistent (reverse ^ 1) == 2
23811+ || (pch_says_nonexistent (! reverse) == 2
23812 && ! posixly_correct)))
23813 {
23814 if (verbosity == VERBOSE)
23815@@ -371,9 +368,9 @@
23816 else
23817 {
23818 if (! outstate.zero_output
23819- && pch_says_nonexistent (reverse ^ 1))
23820+ && pch_says_nonexistent (! reverse))
23821 {
23822- mismatch = 1;
23823+ mismatch = true;
23824 if (verbosity != SILENT)
23825 say ("File %s is not empty after patch, as expected\n",
23826 quotearg (outname));
23827@@ -389,7 +386,7 @@
23828 || (backup_if_mismatch && (mismatch | failed))));
23829
23830 if ((set_time | set_utc)
23831- && (t = pch_timestamp (reverse ^ 1)) != (time_t) -1)
23832+ && (t = pch_timestamp (! reverse)) != (time_t) -1)
23833 {
23834 struct utimbuf utimbuf;
23835 utimbuf.actime = utimbuf.modtime = t;
23836@@ -418,7 +415,7 @@
23837 if (fclose (rejfp) != 0)
23838 write_fatal ();
23839 if (failed) {
23840- somefailed = TRUE;
23841+ somefailed = true;
23842 say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
23843 skip_rest_of_patch ? "ignored" : "FAILED");
23844 if (outname) {
23845@@ -432,7 +429,7 @@
23846 if (! dry_run)
23847 {
23848 move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
23849- rej, instat.st_mode, FALSE);
23850+ rej, instat.st_mode, false);
23851 if (! inerrno
23852 && (chmod (rej, (instat.st_mode
23853 & ~(S_IXUSR|S_IXGRP|S_IXOTH)))
23854@@ -446,7 +443,7 @@
23855 say ("\n");
23856 }
23857 }
23858- set_signals (1);
23859+ set_signals (true);
23860 }
23861 if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
23862 write_fatal ();
23863@@ -482,7 +479,7 @@
23864 }
23865
23866 reverse = reverse_flag_specified;
23867- skip_rest_of_patch = FALSE;
23868+ skip_rest_of_patch = false;
23869 }
23870
23871 static char const shortopts[] = "bB:cd:D:eEfF:g:i:lnNo:p:r:RstTuvV:x:Y:z:Z";
23872@@ -585,7 +582,7 @@
23873 " --posix Conform to the POSIX standard.",
23874 "",
23875 " -d DIR --directory=DIR Change the working directory to DIR first.",
23876-#if HAVE_SETMODE
23877+#if HAVE_SETMODE_DOS
23878 " --binary Read and write data in binary mode.",
23879 #else
23880 " --binary Read and write data in binary mode (no effect on this platform).",
23881@@ -594,7 +591,7 @@
23882 " -v --version Output version info.",
23883 " --help Output this help.",
23884 "",
23885-"Report bugs to <bug-gnu-utils@gnu.org>.",
23886+"Report bugs to <" PACKAGE_BUGREPORT ">.",
23887 0
23888 };
23889
23890@@ -635,7 +632,7 @@
23891 != -1) {
23892 switch (optc) {
23893 case 'b':
23894- make_backups = 1;
23895+ make_backups = true;
23896 /* Special hack for backward compatibility with CVS 1.9.
23897 If the last 4 args are `-b SUFFIX ORIGFILE PATCHFILE',
23898 treat `-b' as if it were `-b -z'. */
23899@@ -671,28 +668,28 @@
23900 diff_type = ED_DIFF;
23901 break;
23902 case 'E':
23903- remove_empty_files = TRUE;
23904+ remove_empty_files = true;
23905 break;
23906 case 'f':
23907- force = TRUE;
23908+ force = true;
23909 break;
23910 case 'F':
23911- maxfuzz = numeric_string (optarg, 0, "fuzz factor");
23912+ maxfuzz = numeric_string (optarg, false, "fuzz factor");
23913 break;
23914 case 'g':
23915- patch_get = numeric_string (optarg, 1, "get option value");
23916+ patch_get = numeric_string (optarg, true, "get option value");
23917 break;
23918 case 'i':
23919 patchname = savestr (optarg);
23920 break;
23921 case 'l':
23922- canonicalize = TRUE;
23923+ canonicalize = true;
23924 break;
23925 case 'n':
23926 diff_type = NORMAL_DIFF;
23927 break;
23928 case 'N':
23929- noreverse = TRUE;
23930+ noreverse = true;
23931 break;
23932 case 'o':
23933 if (strcmp (optarg, "-") == 0)
23934@@ -700,23 +697,23 @@
23935 outfile = savestr (optarg);
23936 break;
23937 case 'p':
23938- strippath = numeric_string (optarg, 0, "strip count");
23939+ strippath = numeric_string (optarg, false, "strip count");
23940 break;
23941 case 'r':
23942 rejname = savestr (optarg);
23943 break;
23944 case 'R':
23945- reverse = 1;
23946- reverse_flag_specified = 1;
23947+ reverse = true;
23948+ reverse_flag_specified = true;
23949 break;
23950 case 's':
23951 verbosity = SILENT;
23952 break;
23953 case 't':
23954- batch = TRUE;
23955+ batch = true;
23956 break;
23957 case 'T':
23958- set_time = 1;
23959+ set_time = true;
23960 break;
23961 case 'u':
23962 diff_type = UNI_DIFF;
23963@@ -731,7 +728,7 @@
23964 break;
23965 #if DEBUGGING
23966 case 'x':
23967- debug = numeric_string (optarg, 1, "debugging option");
23968+ debug = numeric_string (optarg, true, "debugging option");
23969 break;
23970 #endif
23971 case 'Y':
23972@@ -746,29 +743,29 @@
23973 simple_backup_suffix = savestr (optarg);
23974 break;
23975 case 'Z':
23976- set_utc = 1;
23977+ set_utc = true;
23978 break;
23979 case CHAR_MAX + 1:
23980- dry_run = TRUE;
23981+ dry_run = true;
23982 break;
23983 case CHAR_MAX + 2:
23984 verbosity = VERBOSE;
23985 break;
23986 case CHAR_MAX + 3:
23987-#if HAVE_SETMODE
23988+#if HAVE_SETMODE_DOS
23989 binary_transput = O_BINARY;
23990 #endif
23991 break;
23992 case CHAR_MAX + 4:
23993 usage (stdout, 0);
23994 case CHAR_MAX + 5:
23995- backup_if_mismatch = 1;
23996+ backup_if_mismatch = true;
23997 break;
23998 case CHAR_MAX + 6:
23999- backup_if_mismatch = 0;
24000+ backup_if_mismatch = false;
24001 break;
24002 case CHAR_MAX + 7:
24003- posixly_correct = 1;
24004+ posixly_correct = true;
24005 break;
24006 case CHAR_MAX + 8:
24007 {
24008@@ -810,7 +807,7 @@
24009 returning the result. */
24010 static int
24011 numeric_string (char const *string,
24012- int negative_allowed,
24013+ bool negative_allowed,
24014 char const *argtype_msgid)
24015 {
24016 int value = 0;
24017@@ -884,7 +881,7 @@
24018 && offset <= max_pos_offset
24019 && patch_match (first_guess, offset, (LINENUM) 0, suffix_fuzz))
24020 {
24021- last_offset = offset;
24022+ last_offset += offset;
24023 return first_guess + offset;
24024 }
24025 else
24026@@ -898,7 +895,7 @@
24027 if (offset <= max_neg_offset
24028 && patch_match (first_guess, -offset, prefix_fuzz, (LINENUM) 0))
24029 {
24030- last_offset = - offset;
24031+ last_offset -= offset;
24032 return first_guess - offset;
24033 }
24034 else
24035@@ -913,8 +910,8 @@
24036 if (debug & 1)
24037 say ("Offset changing from %s to %s\n",
24038 format_linenum (numbuf0, last_offset),
24039- format_linenum (numbuf1, offset));
24040- last_offset = offset;
24041+ format_linenum (numbuf1, last_offset + offset));
24042+ last_offset += offset;
24043 return first_guess+offset;
24044 }
24045 if (0 < offset && offset <= max_neg_offset
24046@@ -922,8 +919,8 @@
24047 if (debug & 1)
24048 say ("Offset changing from %s to %s\n",
24049 format_linenum (numbuf0, last_offset),
24050- format_linenum (numbuf1, -offset));
24051- last_offset = -offset;
24052+ format_linenum (numbuf1, last_offset - offset));
24053+ last_offset -= offset;
24054 return first_guess-offset;
24055 }
24056 }
24057@@ -1009,10 +1006,10 @@
24058 if (pch_char(old) == '-') {
24059 assert (outstate->after_newline);
24060 if (! copy_till (outstate, where + old - 1))
24061- return FALSE;
24062+ return false;
24063 if (R_do_defines) {
24064 if (def_state == OUTSIDE) {
24065- fprintf (fp, outstate->after_newline + if_defined,
24066+ fprintf (fp, outstate->after_newline + not_defined,
24067 R_do_defines);
24068 def_state = IN_IFNDEF;
24069 }
24070@@ -1023,7 +1020,7 @@
24071 if (ferror (fp))
24072 write_fatal ();
24073 outstate->after_newline = pch_write_line (old, fp);
24074- outstate->zero_output = 0;
24075+ outstate->zero_output = false;
24076 }
24077 last_frozen_line++;
24078 old++;
24079@@ -1033,7 +1030,7 @@
24080 }
24081 else if (pch_char(new) == '+') {
24082 if (! copy_till (outstate, where + old - 1))
24083- return FALSE;
24084+ return false;
24085 if (R_do_defines) {
24086 if (def_state == IN_IFNDEF) {
24087 fprintf (fp, outstate->after_newline + else_defined);
24088@@ -1048,7 +1045,7 @@
24089 write_fatal ();
24090 }
24091 outstate->after_newline = pch_write_line (new, fp);
24092- outstate->zero_output = 0;
24093+ outstate->zero_output = false;
24094 new++;
24095 }
24096 else if (pch_char(new) != pch_char(old)) {
24097@@ -1064,10 +1061,10 @@
24098 else if (pch_char(new) == '!') {
24099 assert (outstate->after_newline);
24100 if (! copy_till (outstate, where + old - 1))
24101- return FALSE;
24102+ return false;
24103 assert (outstate->after_newline);
24104 if (R_do_defines) {
24105- fprintf (fp, not_defined, R_do_defines);
24106+ fprintf (fp, 1 + not_defined, R_do_defines);
24107 if (ferror (fp))
24108 write_fatal ();
24109 def_state = IN_IFNDEF;
24110@@ -1096,25 +1093,24 @@
24111 new++;
24112 }
24113 while (pch_char (new) == '!');
24114- outstate->zero_output = 0;
24115+ outstate->zero_output = false;
24116 }
24117 else {
24118 assert(pch_char(new) == ' ');
24119 old++;
24120 new++;
24121 if (R_do_defines && def_state != OUTSIDE) {
24122- fprintf (fp, outstate->after_newline + end_defined,
24123- R_do_defines);
24124+ fprintf (fp, outstate->after_newline + end_defined);
24125 if (ferror (fp))
24126 write_fatal ();
24127- outstate->after_newline = 1;
24128+ outstate->after_newline = true;
24129 def_state = OUTSIDE;
24130 }
24131 }
24132 }
24133 if (new <= pat_end && pch_char(new) == '+') {
24134 if (! copy_till (outstate, where + old - 1))
24135- return FALSE;
24136+ return false;
24137 if (R_do_defines) {
24138 if (def_state == OUTSIDE) {
24139 fprintf (fp, outstate->after_newline + if_defined,
24140@@ -1127,7 +1123,7 @@
24141 }
24142 if (ferror (fp))
24143 write_fatal ();
24144- outstate->zero_output = 0;
24145+ outstate->zero_output = false;
24146 }
24147
24148 do
24149@@ -1135,18 +1131,18 @@
24150 if (! outstate->after_newline && putc ('\n', fp) == EOF)
24151 write_fatal ();
24152 outstate->after_newline = pch_write_line (new, fp);
24153- outstate->zero_output = 0;
24154+ outstate->zero_output = false;
24155 new++;
24156 }
24157 while (new <= pat_end && pch_char (new) == '+');
24158 }
24159 if (R_do_defines && def_state != OUTSIDE) {
24160- fprintf (fp, outstate->after_newline + end_defined, R_do_defines);
24161+ fprintf (fp, outstate->after_newline + end_defined);
24162 if (ferror (fp))
24163 write_fatal ();
24164- outstate->after_newline = 1;
24165+ outstate->after_newline = true;
24166 }
24167- return TRUE;
24168+ return true;
24169 }
24170
24171 /* Create an output file. */
24172@@ -1168,8 +1164,8 @@
24173 init_output (char const *name, int open_flags, struct outstate *outstate)
24174 {
24175 outstate->ofp = name ? create_output_file (name, open_flags) : (FILE *) 0;
24176- outstate->after_newline = 1;
24177- outstate->zero_output = 1;
24178+ outstate->after_newline = true;
24179+ outstate->zero_output = true;
24180 }
24181
24182 /* Open a file to put hunks we can't locate. */
24183@@ -1195,22 +1191,22 @@
24184 if (R_last_frozen_line > lastline)
24185 {
24186 say ("misordered hunks! output would be garbled\n");
24187- return FALSE;
24188+ return false;
24189 }
24190 while (R_last_frozen_line < lastline)
24191 {
24192- s = ifetch (++R_last_frozen_line, 0, &size);
24193+ s = ifetch (++R_last_frozen_line, false, &size);
24194 if (size)
24195 {
24196 if ((! outstate->after_newline && putc ('\n', fp) == EOF)
24197 || ! fwrite (s, sizeof *s, size, fp))
24198 write_fatal ();
24199 outstate->after_newline = s[size - 1] == '\n';
24200- outstate->zero_output = 0;
24201+ outstate->zero_output = false;
24202 }
24203 }
24204 last_frozen_line = R_last_frozen_line;
24205- return TRUE;
24206+ return true;
24207 }
24208
24209 /* Finish copying the input file to the output file. */
24210@@ -1229,7 +1225,7 @@
24211
24212 if (last_frozen_line < input_lines)
24213 if (! copy_till (outstate, input_lines))
24214- return FALSE;
24215+ return false;
24216
24217 if (outstate->ofp && ! outfile)
24218 {
24219@@ -1238,7 +1234,7 @@
24220 outstate->ofp = 0;
24221 }
24222
24223- return TRUE;
24224+ return true;
24225 }
24226
24227 /* Does the patch pattern match at line base+offset? */
24228@@ -1259,13 +1255,13 @@
24229 if (!similar(p, size,
24230 pfetch(pline),
24231 pch_line_len(pline) ))
24232- return FALSE;
24233+ return false;
24234 }
24235 else if (size != pch_line_len (pline)
24236 || memcmp (p, pfetch (pline), size) != 0)
24237- return FALSE;
24238+ return false;
24239 }
24240- return TRUE;
24241+ return true;
24242 }
24243
24244 /* Do two lines match with canonicalized white space? */
24245@@ -1287,7 +1283,7 @@
24246 if (alen)
24247 {
24248 if (!(*a == ' ' || *a == '\t'))
24249- return FALSE;
24250+ return false;
24251 do a++, alen--;
24252 while (alen && (*a == ' ' || *a == '\t'));
24253 }
24254@@ -1295,7 +1291,7 @@
24255 return alen == blen;
24256 }
24257 else if (!alen || *a++ != *b++)
24258- return FALSE;
24259+ return false;
24260 else
24261 alen--, blen--;
24262 }
24263@@ -1303,8 +1299,8 @@
24264
24265 /* Make a temporary file. */
24266
24267-#if HAVE_MKTEMP
24268-char *mktemp PARAMS ((char *));
24269+#if HAVE_MKTEMP && ! HAVE_DECL_MKTEMP && ! defined mktemp
24270+char *mktemp (char *);
24271 #endif
24272
24273 #ifndef TMPDIR
24274@@ -1312,7 +1308,7 @@
24275 #endif
24276
24277 static char const *
24278-make_temp (int letter)
24279+make_temp (char letter)
24280 {
24281 char *r;
24282 #if HAVE_MKTEMP
24283@@ -1322,7 +1318,14 @@
24284 if (!tmpdir) tmpdir = TMPDIR;
24285 r = xmalloc (strlen (tmpdir) + 10);
24286 sprintf (r, "%s/p%cXXXXXX", tmpdir, letter);
24287+
24288+ /* It is OK to use mktemp here, since the rest of the code always
24289+ opens temp files with O_EXCL. It might be better to use mkstemp
24290+ to avoid some DoS problems, but simply substituting mkstemp for
24291+ mktemp here will not fix the DoS problems; a more extensive
24292+ change would be needed. */
24293 mktemp (r);
24294+
24295 if (!*r)
24296 pfatal ("mktemp");
24297 #else
24298diff -urNd -urNd patch-2.5.4/patchlevel.h patch-2.5.9/patchlevel.h
24299--- patch-2.5.4/patchlevel.h 1999-08-30 02:48:14.000000000 -0400
24300+++ patch-2.5.9/patchlevel.h 1969-12-31 19:00:00.000000000 -0500
24301@@ -1 +0,0 @@
24302-#define PATCH_VERSION "2.5.4"
24303diff -urNd -urNd patch-2.5.4/patch.man patch-2.5.9/patch.man
24304--- patch-2.5.4/patch.man 1998-03-21 10:48:43.000000000 -0500
24305+++ patch-2.5.9/patch.man 2002-05-25 06:36:44.000000000 -0400
24306@@ -2,7 +2,7 @@
24307 .de Id
24308 .ds Dt \\$4
24309 ..
24310-.Id $Id: patch.man,v 1.26 1998/03/21 15:48:43 eggert Exp $
24311+.Id $Id: patch.man,v 1.31 2002/05/25 10:36:44 eggert Exp $
24312 .ds = \-\^\-
24313 .de Sp
24314 .if t .sp .3
24315@@ -70,6 +70,10 @@
24316 or is encapsulated one or more times by prepending
24317 "\fB\- \fP" to lines starting with "\fB\-\fP" as specified by Internet RFC 934,
24318 this is taken into account.
24319+After removing indenting or encapsulation,
24320+lines beginning with
24321+.B #
24322+are ignored, as they are considered to be comments.
24323 .PP
24324 With context diffs, and to a lesser extent with normal diffs,
24325 .B patch
24326@@ -185,19 +189,19 @@
24327 .B " \(bu"
24328 If
24329 .B patch
24330-is not ignoring \s-1RCS\s0, ClearCase, and \s-1SCCS\s0 (see the
24331+is not ignoring \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0 (see the
24332 .BI "\-g\ " num
24333 or
24334 .BI \*=get= num
24335 option), and no named files exist
24336-but an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master is found,
24337+but an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master is found,
24338 .B patch
24339 selects the first named file
24340-with an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master.
24341+with an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master.
24342 .TP
24343 .B " \(bu"
24344 If no named files exist,
24345-no \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master was found,
24346+no \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master was found,
24347 some names are given,
24348 .B patch
24349 is not conforming to \s-1POSIX\s0,
24350@@ -362,14 +366,14 @@
24351 .BR patch 's
24352 actions when a file is under \s-1RCS\s0 or \s-1SCCS\s0 control,
24353 and does not exist or is read-only and matches the default version,
24354-or when a file is under ClearCase control and does not exist.
24355+or when a file is under ClearCase or Perforce control and does not exist.
24356 If
24357 .I num
24358 is positive,
24359 .B patch
24360 gets (or checks out) the file from the revision control system; if zero,
24361 .B patch
24362-ignores \s-1RCS\s0, ClearCase, and \s-1SCCS\s0
24363+ignores \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0
24364 and does not get the file; and if negative,
24365 .B patch
24366 asks the user whether to get the file.
24367@@ -411,6 +415,9 @@
24368 Send output to
24369 .I outfile
24370 instead of patching files in place.
24371+Do not use this option if
24372+.I outfile
24373+is one of the files to be patched.
24374 .TP
24375 \fB\-p\fP\fInum\fP or \fB\*=strip\fP\fB=\fP\fInum\fP
24376 Strip the smallest prefix containing
24377@@ -458,7 +465,8 @@
24378 Do not remove files that are empty after patching.
24379 .TP
24380 .B " \(bu"
24381-Do not ask whether to get files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0.
24382+Do not ask whether to get files from \s-1RCS\s0, ClearCase, Perforce,
24383+or \s-1SCCS\s0.
24384 .TP
24385 .B " \(bu"
24386 Require that all options precede the files in the command line.
24387@@ -715,7 +723,8 @@
24388 .B PATCH_GET
24389 This specifies whether
24390 .B patch
24391-gets missing or read-only files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0
24392+gets missing or read-only files from \s-1RCS\s0, ClearCase, Perforce,
24393+or \s-1SCCS\s0
24394 by default; see the
24395 .B \-g
24396 or
24397@@ -1097,7 +1106,7 @@
24398 .fi
24399 .SH BUGS
24400 Please report bugs via email to
24401-.BR <bug-gnu-utils@gnu.org> .
24402+.BR <bug-patch@gnu.org> .
24403 .PP
24404 .B patch
24405 could be smarter about partial matches, excessively deviant offsets and
24406@@ -1115,13 +1124,15 @@
24407 This could be construed as a feature.
24408 .SH COPYING
24409 Copyright
24410-.if t \(co
24411+.ie t \(co
24412+.el (C)
24413 1984, 1985, 1986, 1988 Larry Wall.
24414 .br
24415 Copyright
24416-.if t \(co
24417-1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
24418-Free Software Foundation, Inc.
24419+.ie t \(co
24420+.el (C)
24421+1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
24422+2000, 2001, 2002 Free Software Foundation, Inc.
24423 .PP
24424 Permission is granted to make and distribute verbatim copies of
24425 this manual provided the copyright notice and this permission notice
24426diff -urNd -urNd patch-2.5.4/pch.c patch-2.5.9/pch.c
24427--- patch-2.5.4/pch.c 1999-08-30 02:20:08.000000000 -0400
24428+++ patch-2.5.9/pch.c 2003-05-20 10:03:17.000000000 -0400
24429@@ -1,9 +1,11 @@
24430 /* reading patches */
24431
24432-/* $Id: pch.c,v 1.29 1999/08/30 06:20:08 eggert Exp $ */
24433+/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
24434
24435-/* Copyright 1986, 1987, 1988 Larry Wall
24436- Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
24437+/* Copyright (C) 1986, 1987, 1988 Larry Wall
24438+
24439+ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
24440+ 2002, 2003 Free Software Foundation, Inc.
24441
24442 This program is free software; you can redistribute it and/or modify
24443 it under the terms of the GNU General Public License as published by
24444@@ -23,7 +25,7 @@
24445 #define XTERN extern
24446 #include <common.h>
24447 #include <backupfile.h>
24448-#include <basename.h>
24449+#include <dirname.h>
24450 #include <inp.h>
24451 #include <quotearg.h>
24452 #include <util.h>
24453@@ -57,7 +59,8 @@
24454 static char *p_Char; /* +, -, and ! */
24455 static LINENUM hunkmax = INITHUNKMAX; /* size of above arrays */
24456 static int p_indent; /* indent to patch */
24457-static int p_strip_trailing_cr; /* nonzero if stripping trailing \r */
24458+static bool p_strip_trailing_cr; /* true if stripping trailing \r */
24459+static bool p_pass_comments_through; /* true if not ignoring # lines */
24460 static file_offset p_base; /* where to intuit this time */
24461 static LINENUM p_bline; /* line # of p_base */
24462 static file_offset p_start; /* where intuit found a patch */
24463@@ -68,17 +71,18 @@
24464
24465 enum nametype { OLD, NEW, INDEX, NONE };
24466
24467-static char *scan_linenum PARAMS ((char *, LINENUM *));
24468-static enum diff intuit_diff_type PARAMS ((void));
24469-static enum nametype best_name PARAMS ((char * const *, int const *));
24470-static int prefix_components PARAMS ((char *, int));
24471-static size_t pget_line PARAMS ((int, int, int));
24472-static size_t get_line PARAMS ((void));
24473-static bool incomplete_line PARAMS ((void));
24474-static bool grow_hunkmax PARAMS ((void));
24475-static void malformed PARAMS ((void)) __attribute__ ((noreturn));
24476-static void next_intuit_at PARAMS ((file_offset, LINENUM));
24477-static void skip_to PARAMS ((file_offset, LINENUM));
24478+static char *scan_linenum (char *, LINENUM *);
24479+static enum diff intuit_diff_type (void);
24480+static enum nametype best_name (char * const *, int const *);
24481+static int prefix_components (char *, bool);
24482+static size_t pget_line (int, int, bool, bool);
24483+static size_t get_line (void);
24484+static bool incomplete_line (void);
24485+static bool grow_hunkmax (void);
24486+static void malformed (void) __attribute__ ((noreturn));
24487+static void next_intuit_at (file_offset, LINENUM);
24488+static void skip_to (file_offset, LINENUM);
24489+static char get_ed_command_letter (char const *);
24490
24491 /* Prepare to look for the next patch in the patch file. */
24492
24493@@ -92,7 +96,7 @@
24494 p_end = -1;
24495 p_max = 0;
24496 p_indent = 0;
24497- p_strip_trailing_cr = 0;
24498+ p_strip_trailing_cr = false;
24499 }
24500
24501 /* Open the patch file at the beginning of time. */
24502@@ -105,7 +109,7 @@
24503 if (!filename || !*filename || strEQ (filename, "-"))
24504 {
24505 file_offset stdin_pos;
24506-#if HAVE_SETMODE
24507+#if HAVE_SETMODE_DOS
24508 if (binary_transput)
24509 {
24510 if (isatty (STDIN_FILENO))
24511@@ -181,14 +185,14 @@
24512 if ((p_line = (char **) realloc (p_line, hunkmax * sizeof (*p_line)))
24513 && (p_len = (size_t *) realloc (p_len, hunkmax * sizeof (*p_len)))
24514 && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char))))
24515- return TRUE;
24516+ return true;
24517 if (!using_plan_a)
24518 memory_fatal ();
24519 /* Don't free previous values of p_line etc.,
24520 since some broken implementations free them for us.
24521 Whatever is null will be allocated again from within plan_a (),
24522 of all places. */
24523- return FALSE;
24524+ return false;
24525 }
24526
24527 /* True if the remainder of the patch file contains a diff of some sort. */
24528@@ -199,7 +203,7 @@
24529 if (p_base != 0 && p_base >= p_filesize) {
24530 if (verbosity == VERBOSE)
24531 say ("done\n");
24532- return FALSE;
24533+ return false;
24534 }
24535 if (verbosity == VERBOSE)
24536 say ("Hmm...");
24537@@ -211,13 +215,13 @@
24538 : " I can't seem to find a patch in there anywhere.\n");
24539 if (! p_base && p_filesize)
24540 fatal ("Only garbage was found in the patch input.");
24541- return FALSE;
24542+ return false;
24543 }
24544 if (skip_rest_of_patch)
24545 {
24546 Fseek (pfp, p_start, SEEK_SET);
24547 p_input_line = p_sline - 1;
24548- return TRUE;
24549+ return true;
24550 }
24551 if (verbosity == VERBOSE)
24552 say (" %sooks like %s to me...\n",
24553@@ -239,18 +243,19 @@
24554 char numbuf[LINENUM_LENGTH_BOUND + 1];
24555 say ("can't find file to patch at input line %s\n",
24556 format_linenum (numbuf, p_sline));
24557- say (strippath == -1
24558- ? "Perhaps you should have used the -p or --strip option?\n"
24559- : "Perhaps you used the wrong -p or --strip option?\n");
24560+ if (diff_type != ED_DIFF)
24561+ say (strippath == -1
24562+ ? "Perhaps you should have used the -p or --strip option?\n"
24563+ : "Perhaps you used the wrong -p or --strip option?\n");
24564 }
24565 }
24566
24567 skip_to(p_start,p_sline);
24568 while (!inname) {
24569- if (force || batch) {
24570+ if (force | batch) {
24571 say ("No file to patch. Skipping patch.\n");
24572- skip_rest_of_patch = TRUE;
24573- return TRUE;
24574+ skip_rest_of_patch = true;
24575+ return true;
24576 }
24577 ask ("File to patch: ");
24578 inname = fetchname (buf, 0, (time_t *) 0);
24579@@ -264,6 +269,7 @@
24580 else
24581 {
24582 perror (inname);
24583+ fflush (stderr);
24584 free (inname);
24585 inname = 0;
24586 }
24587@@ -273,12 +279,12 @@
24588 if (*buf != 'n') {
24589 if (verbosity != SILENT)
24590 say ("Skipping patch.\n");
24591- skip_rest_of_patch = TRUE;
24592- return TRUE;
24593+ skip_rest_of_patch = true;
24594+ return true;
24595 }
24596 }
24597 }
24598- return TRUE;
24599+ return true;
24600 }
24601
24602 /* Determine what kind of diff is in the remaining part of the patch file. */
24603@@ -288,9 +294,10 @@
24604 {
24605 register file_offset this_line = 0;
24606 register file_offset first_command_line = -1;
24607+ char first_ed_command_letter = 0;
24608 LINENUM fcl_line = 0; /* Pacify `gcc -W'. */
24609- register bool this_is_a_command = FALSE;
24610- register bool stars_this_line = FALSE;
24611+ register bool this_is_a_command = false;
24612+ register bool stars_this_line = false;
24613 enum nametype i;
24614 char *name[3];
24615 struct stat st[3];
24616@@ -314,15 +321,16 @@
24617 register bool last_line_was_command = this_is_a_command;
24618 register bool stars_last_line = stars_this_line;
24619 register int indent = 0;
24620- int strip_trailing_cr;
24621+ char ed_command_letter;
24622+ bool strip_trailing_cr;
24623 size_t chars_read;
24624
24625 this_line = file_tell (pfp);
24626- chars_read = pget_line (0, 0, 0);
24627+ chars_read = pget_line (0, 0, false, false);
24628 if (chars_read == (size_t) -1)
24629 memory_fatal ();
24630 if (! chars_read) {
24631- if (first_command_line >= 0) {
24632+ if (first_ed_command_letter) {
24633 /* nothing but deletes!? */
24634 p_start = first_command_line;
24635 p_sline = fcl_line;
24636@@ -346,8 +354,11 @@
24637 continue;
24638 this_is_a_command = (ISDIGIT (*s) &&
24639 (*t == 'd' || *t == 'c' || *t == 'a') );
24640- if (first_command_line < 0 && this_is_a_command) {
24641+ if (first_command_line < 0
24642+ && ((ed_command_letter = get_ed_command_letter (s))
24643+ || this_is_a_command)) {
24644 first_command_line = this_line;
24645+ first_ed_command_letter = ed_command_letter;
24646 fcl_line = p_input_line;
24647 p_indent = indent; /* assume this for now */
24648 p_strip_trailing_cr = strip_trailing_cr;
24649@@ -363,8 +374,20 @@
24650 for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
24651 continue;
24652 revision = t;
24653- for (t = revision; *t && !ISSPACE ((unsigned char) *t); t++)
24654- continue;
24655+ for (t = revision; *t; t++)
24656+ if (ISSPACE ((unsigned char) *t))
24657+ {
24658+ char const *u;
24659+ for (u = t + 1; ISSPACE ((unsigned char) *u); u++)
24660+ continue;
24661+ if (*u)
24662+ {
24663+ char numbuf[LINENUM_LENGTH_BOUND + 1];
24664+ say ("Prereq: with multiple words at line %s of patch\n",
24665+ format_linenum (numbuf, this_line));
24666+ }
24667+ break;
24668+ }
24669 if (t == revision)
24670 revision = 0;
24671 else {
24672@@ -391,8 +414,6 @@
24673 if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
24674 first_command_line >= 0 &&
24675 strEQ(s, ".\n") ) {
24676- p_indent = indent;
24677- p_strip_trailing_cr = strip_trailing_cr;
24678 p_start = first_command_line;
24679 p_sline = fcl_line;
24680 retval = ED_DIFF;
24681@@ -419,12 +440,12 @@
24682 if (s[0] == '+' && s[1] == '0' && !ISDIGIT (s[2]))
24683 p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
24684 p_indent = indent;
24685- p_strip_trailing_cr = strip_trailing_cr;
24686 p_start = this_line;
24687 p_sline = p_input_line;
24688 retval = UNI_DIFF;
24689 if (! ((name[OLD] || ! p_timestamp[OLD])
24690- && (name[NEW] || ! p_timestamp[NEW])))
24691+ && (name[NEW] || ! p_timestamp[NEW]))
24692+ && ! name[INDEX])
24693 {
24694 char numbuf[LINENUM_LENGTH_BOUND + 1];
24695 say ("missing header for unified diff at line %s of patch\n",
24696@@ -457,14 +478,15 @@
24697 LINENUM saved_p_bline = p_bline;
24698 Fseek (pfp, previous_line, SEEK_SET);
24699 p_input_line -= 2;
24700- if (another_hunk (retval, 0)
24701+ if (another_hunk (retval, false)
24702 && ! p_repl_lines && p_newfirst == 1)
24703 p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
24704 next_intuit_at (saved_p_base, saved_p_bline);
24705 }
24706
24707 if (! ((name[OLD] || ! p_timestamp[OLD])
24708- && (name[NEW] || ! p_timestamp[NEW])))
24709+ && (name[NEW] || ! p_timestamp[NEW]))
24710+ && ! name[INDEX])
24711 {
24712 char numbuf[LINENUM_LENGTH_BOUND + 1];
24713 say ("missing header for context diff at line %s of patch\n",
24714@@ -487,7 +509,7 @@
24715 scan_exit:
24716
24717 /* To intuit `inname', the name of the file to patch,
24718- use the algorithm specified by POSIX 1003.2b/D11 section 5.22.7.2
24719+ use the algorithm specified by POSIX 1003.1-2001 XCU lines 25680-26599
24720 (with some modifications if posixly_correct is zero):
24721
24722 - Take the old and new names from the context header if present,
24723@@ -542,7 +564,7 @@
24724
24725 if (! posixly_correct)
24726 {
24727- int is_empty;
24728+ bool is_empty;
24729
24730 i = best_name (name, stat_errno);
24731
24732@@ -556,7 +578,8 @@
24733 char const *cs;
24734 char *getbuf;
24735 char *diffbuf;
24736- int readonly = outfile && strcmp (outfile, name[i]) != 0;
24737+ bool readonly = (outfile
24738+ && strcmp (outfile, name[i]) != 0);
24739
24740 if (nope == NONE || strcmp (name[nope], name[i]) != 0)
24741 {
24742@@ -566,7 +589,7 @@
24743 version_controlled[i] = !! cs;
24744 if (cs)
24745 {
24746- if (version_get (name[i], cs, 0, readonly,
24747+ if (version_get (name[i], cs, false, readonly,
24748 getbuf, &st[i]))
24749 stat_errno[i] = 0;
24750 else
24751@@ -589,7 +612,8 @@
24752 if ((! is_empty) < p_says_nonexistent[reverse ^ is_empty])
24753 {
24754 assert (i0 != NONE);
24755- if (ok_to_reverse
24756+ reverse ^=
24757+ ok_to_reverse
24758 ("The next patch%s would %s the file %s,\nwhich %s!",
24759 reverse ? ", when reversed," : "",
24760 (i == NONE ? "delete"
24761@@ -598,8 +622,7 @@
24762 quotearg (name[i == NONE || st[i].st_size == 0 ? i0 : i]),
24763 (i == NONE ? "does not exist"
24764 : st[i].st_size == 0 ? "is already empty"
24765- : "already exists")))
24766- reverse ^= 1;
24767+ : "already exists"));
24768 }
24769
24770 if (i == NONE && p_says_nonexistent[reverse])
24771@@ -611,8 +634,8 @@
24772 for (i = OLD; i <= INDEX; i++)
24773 if (name[i])
24774 {
24775- newdirs[i] = (prefix_components (name[i], 0)
24776- - prefix_components (name[i], 1));
24777+ newdirs[i] = (prefix_components (name[i], false)
24778+ - prefix_components (name[i], true));
24779 if (newdirs[i] < newdirs_min)
24780 newdirs_min = newdirs[i];
24781 }
24782@@ -645,9 +668,9 @@
24783 }
24784
24785 /* Count the path name components in FILENAME's prefix.
24786- If CHECKDIRS is nonzero, count only existing directories. */
24787+ If CHECKDIRS is true, count only existing directories. */
24788 static int
24789-prefix_components (char *filename, int checkdirs)
24790+prefix_components (char *filename, bool checkdirs)
24791 {
24792 int count = 0;
24793 struct stat stat_buf;
24794@@ -691,7 +714,7 @@
24795 if (name[i] && !ignore[i])
24796 {
24797 /* Take the names with the fewest prefix components. */
24798- components[i] = prefix_components (name[i], 0);
24799+ components[i] = prefix_components (name[i], false);
24800 if (components_min < components[i])
24801 continue;
24802 components_min = components[i];
24803@@ -779,7 +802,7 @@
24804 {
24805 char *s;
24806 LINENUM n = 0;
24807- int overflow = 0;
24808+ bool overflow = false;
24809 char numbuf[LINENUM_LENGTH_BOUND + 1];
24810
24811 for (s = s0; ISDIGIT (*s); s++)
24812@@ -788,11 +811,11 @@
24813 overflow |= new_n / 10 != n;
24814 n = new_n;
24815 }
24816-
24817+
24818 if (s == s0)
24819 fatal ("missing line number at line %s: %s",
24820 format_linenum (numbuf, p_input_line), buf);
24821-
24822+
24823 if (overflow)
24824 fatal ("line number %.*s is too large at line %s: %s",
24825 (int) (s - s0), s0, format_linenum (numbuf, p_input_line), buf);
24826@@ -805,7 +828,7 @@
24827 0 if not; -1 if ran out of memory. */
24828
24829 int
24830-another_hunk (enum diff difftype, int rev)
24831+another_hunk (enum diff difftype, bool rev)
24832 {
24833 register char *s;
24834 register LINENUM context = 0;
24835@@ -833,10 +856,11 @@
24836 register LINENUM fillcnt = 0; /* #lines of missing ptrn or repl */
24837 register LINENUM fillsrc; /* index of first line to copy */
24838 register LINENUM filldst; /* index of first missing line */
24839- bool ptrn_spaces_eaten = FALSE; /* ptrn was slightly misformed */
24840- bool some_context = FALSE; /* (perhaps internal) context seen */
24841- register bool repl_could_be_missing = TRUE;
24842- bool repl_missing = FALSE; /* we are now backtracking */
24843+ bool ptrn_spaces_eaten = false; /* ptrn was slightly misformed */
24844+ bool some_context = false; /* (perhaps internal) context seen */
24845+ register bool repl_could_be_missing = true;
24846+ bool ptrn_missing = false; /* The pattern was missing. */
24847+ bool repl_missing = false; /* Likewise for replacement. */
24848 file_offset repl_backtrack_position = 0;
24849 /* file pos of first repl line */
24850 LINENUM repl_patch_line; /* input line number for same */
24851@@ -844,8 +868,8 @@
24852 LINENUM ptrn_prefix_context = -1; /* lines in pattern prefix context */
24853 LINENUM ptrn_suffix_context = -1; /* lines in pattern suffix context */
24854 LINENUM repl_prefix_context = -1; /* lines in replac. prefix context */
24855- register LINENUM ptrn_copiable = 0;
24856- /* # of copiable lines in ptrn */
24857+ LINENUM ptrn_copiable = 0; /* # of copiable lines in ptrn */
24858+ LINENUM repl_copiable = 0; /* Likewise for replacement. */
24859
24860 /* Pacify `gcc -Wall'. */
24861 fillsrc = filldst = repl_patch_line = repl_context = 0;
24862@@ -864,7 +888,7 @@
24863 return -1;
24864 if (!chars_read) {
24865 if (repl_beginning && repl_could_be_missing) {
24866- repl_missing = TRUE;
24867+ repl_missing = true;
24868 goto hunk_done;
24869 }
24870 if (p_max - p_end < 4) {
24871@@ -887,7 +911,7 @@
24872 case '*':
24873 if (strnEQ(buf, "********", 8)) {
24874 if (repl_beginning && repl_could_be_missing) {
24875- repl_missing = TRUE;
24876+ repl_missing = true;
24877 goto hunk_done;
24878 }
24879 else
24880@@ -896,7 +920,7 @@
24881 }
24882 if (p_end != 0) {
24883 if (repl_beginning && repl_could_be_missing) {
24884- repl_missing = TRUE;
24885+ repl_missing = true;
24886 goto hunk_done;
24887 }
24888 fatal ("unexpected `***' at line %s: %s",
24889@@ -945,6 +969,7 @@
24890 {
24891 /* `Old' lines were omitted. Set up to fill
24892 them in from `new' context lines. */
24893+ ptrn_missing = true;
24894 p_end = p_ptrn_lines + 1;
24895 ptrn_prefix_context = ptrn_suffix_context = -1;
24896 fillsrc = p_end + 1;
24897@@ -965,7 +990,7 @@
24898 p_hunk_beg + repl_beginning));
24899 else
24900 {
24901- repl_missing = TRUE;
24902+ repl_missing = true;
24903 goto hunk_done;
24904 }
24905 }
24906@@ -1009,11 +1034,11 @@
24907 && (p_prefix_context != 0
24908 || context != 0
24909 || p_repl_lines != 1))
24910- repl_could_be_missing = FALSE;
24911+ repl_could_be_missing = false;
24912 context = 0;
24913 break;
24914 case '+': case '!':
24915- repl_could_be_missing = FALSE;
24916+ repl_could_be_missing = false;
24917 change_line:
24918 s = buf + 1;
24919 chars_read--;
24920@@ -1025,7 +1050,7 @@
24921 s++;
24922 chars_read--;
24923 } else if (repl_beginning && repl_could_be_missing) {
24924- repl_missing = TRUE;
24925+ repl_missing = true;
24926 goto hunk_done;
24927 }
24928 if (! repl_beginning)
24929@@ -1057,7 +1082,7 @@
24930 }
24931 if (repl_beginning && repl_could_be_missing &&
24932 (!ptrn_spaces_eaten || difftype == NEW_CONTEXT_DIFF) ) {
24933- repl_missing = TRUE;
24934+ repl_missing = true;
24935 goto hunk_done;
24936 }
24937 chars_read -=
24938@@ -1071,9 +1096,11 @@
24939 }
24940 if (p_end != p_ptrn_lines + 1) {
24941 ptrn_spaces_eaten |= (repl_beginning != 0);
24942- some_context = TRUE;
24943+ some_context = true;
24944 context++;
24945- if (!repl_beginning)
24946+ if (repl_beginning)
24947+ repl_copiable++;
24948+ else
24949 ptrn_copiable++;
24950 p_Char[p_end] = ' ';
24951 }
24952@@ -1089,12 +1116,14 @@
24953 s++;
24954 chars_read--;
24955 } else if (repl_beginning && repl_could_be_missing) {
24956- repl_missing = TRUE;
24957+ repl_missing = true;
24958 goto hunk_done;
24959 }
24960- some_context = TRUE;
24961+ some_context = true;
24962 context++;
24963- if (!repl_beginning)
24964+ if (repl_beginning)
24965+ repl_copiable++;
24966+ else
24967 ptrn_copiable++;
24968 chars_read -=
24969 (1 < chars_read
24970@@ -1108,7 +1137,7 @@
24971 break;
24972 default:
24973 if (repl_beginning && repl_could_be_missing) {
24974- repl_missing = TRUE;
24975+ repl_missing = true;
24976 goto hunk_done;
24977 }
24978 malformed ();
24979@@ -1136,6 +1165,9 @@
24980 fillcnt = p_repl_lines;
24981 p_end = p_max;
24982 }
24983+ else if (! ptrn_missing && ptrn_copiable != repl_copiable)
24984+ fatal ("context mangled in hunk at line %s",
24985+ format_linenum (numbuf0, p_hunk_beg));
24986 else if (!some_context && fillcnt == 1) {
24987 /* the first hunk was a null hunk with no context */
24988 /* and we were expecting one line -- fix it up. */
24989@@ -1499,94 +1531,104 @@
24990 static size_t
24991 get_line (void)
24992 {
24993- return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr);
24994+ return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr,
24995+ p_pass_comments_through);
24996 }
24997
24998 /* Input a line from the patch file, worrying about indentation.
24999 Strip up to INDENT characters' worth of leading indentation.
25000 Then remove up to RFC934_NESTING instances of leading "- ".
25001- If STRIP_TRAILING_CR is nonzero, remove any trailing carriage-return.
25002+ If STRIP_TRAILING_CR is true, remove any trailing carriage-return.
25003+ Unless PASS_COMMENTS_THROUGH is true, ignore any resulting lines
25004+ that begin with '#'; they're comments.
25005 Ignore any partial lines at end of input, but warn about them.
25006 Succeed if a line was read; it is terminated by "\n\0" for convenience.
25007 Return the number of characters read, including '\n' but not '\0'.
25008 Return -1 if we ran out of memory. */
25009
25010 static size_t
25011-pget_line (int indent, int rfc934_nesting, int strip_trailing_cr)
25012+pget_line (int indent, int rfc934_nesting, bool strip_trailing_cr,
25013+ bool pass_comments_through)
25014 {
25015 register FILE *fp = pfp;
25016 register int c;
25017- register int i = 0;
25018+ register int i;
25019 register char *b;
25020 register size_t s;
25021
25022- for (;;)
25023+ do
25024 {
25025- c = getc (fp);
25026- if (c == EOF)
25027+ i = 0;
25028+ for (;;)
25029 {
25030- if (ferror (fp))
25031- read_fatal ();
25032- return 0;
25033+ c = getc (fp);
25034+ if (c == EOF)
25035+ {
25036+ if (ferror (fp))
25037+ read_fatal ();
25038+ return 0;
25039+ }
25040+ if (indent <= i)
25041+ break;
25042+ if (c == ' ' || c == 'X')
25043+ i++;
25044+ else if (c == '\t')
25045+ i = (i + 8) & ~7;
25046+ else
25047+ break;
25048 }
25049- if (indent <= i)
25050- break;
25051- if (c == ' ' || c == 'X')
25052- i++;
25053- else if (c == '\t')
25054- i = (i + 8) & ~7;
25055- else
25056- break;
25057- }
25058
25059- i = 0;
25060- b = buf;
25061+ i = 0;
25062+ b = buf;
25063
25064- while (c == '-' && 0 <= --rfc934_nesting)
25065- {
25066- c = getc (fp);
25067- if (c == EOF)
25068- goto patch_ends_in_middle_of_line;
25069- if (c != ' ')
25070+ while (c == '-' && 0 <= --rfc934_nesting)
25071 {
25072- i = 1;
25073- b[0] = '-';
25074- break;
25075+ c = getc (fp);
25076+ if (c == EOF)
25077+ goto patch_ends_in_middle_of_line;
25078+ if (c != ' ')
25079+ {
25080+ i = 1;
25081+ b[0] = '-';
25082+ break;
25083+ }
25084+ c = getc (fp);
25085+ if (c == EOF)
25086+ goto patch_ends_in_middle_of_line;
25087 }
25088- c = getc (fp);
25089- if (c == EOF)
25090- goto patch_ends_in_middle_of_line;
25091- }
25092
25093- s = bufsize;
25094+ s = bufsize;
25095
25096- for (;;)
25097- {
25098- if (i == s - 1)
25099+ for (;;)
25100 {
25101- s *= 2;
25102- b = realloc (b, s);
25103- if (!b)
25104+ if (i == s - 1)
25105 {
25106- if (!using_plan_a)
25107- memory_fatal ();
25108- return (size_t) -1;
25109+ s *= 2;
25110+ b = realloc (b, s);
25111+ if (!b)
25112+ {
25113+ if (!using_plan_a)
25114+ memory_fatal ();
25115+ return (size_t) -1;
25116+ }
25117+ buf = b;
25118+ bufsize = s;
25119 }
25120- buf = b;
25121- bufsize = s;
25122+ b[i++] = c;
25123+ if (c == '\n')
25124+ break;
25125+ c = getc (fp);
25126+ if (c == EOF)
25127+ goto patch_ends_in_middle_of_line;
25128 }
25129- b[i++] = c;
25130- if (c == '\n')
25131- break;
25132- c = getc (fp);
25133- if (c == EOF)
25134- goto patch_ends_in_middle_of_line;
25135+
25136+ p_input_line++;
25137 }
25138+ while (*b == '#' && !pass_comments_through);
25139
25140 if (strip_trailing_cr && 2 <= i && b[i - 2] == '\r')
25141 b[i-- - 2] = '\n';
25142 b[i] = '\0';
25143- p_input_line++;
25144 return i;
25145
25146 patch_ends_in_middle_of_line:
25147@@ -1607,13 +1649,13 @@
25148 {
25149 while ((c = getc (fp)) != '\n' && c != EOF)
25150 continue;
25151- return TRUE;
25152+ return true;
25153 }
25154 else
25155 {
25156 /* We don't trust ungetc. */
25157 Fseek (pfp, line_beginning, SEEK_SET);
25158- return FALSE;
25159+ return false;
25160 }
25161 }
25162
25163@@ -1627,7 +1669,7 @@
25164 char *tp_char; /* +, -, and ! */
25165 register LINENUM i;
25166 register LINENUM n;
25167- bool blankline = FALSE;
25168+ bool blankline = false;
25169 register char *s;
25170
25171 i = p_first;
25172@@ -1653,14 +1695,14 @@
25173 if (p_Char)
25174 free (p_Char);
25175 p_Char = tp_char;
25176- return FALSE; /* not enough memory to swap hunk! */
25177+ return false; /* not enough memory to swap hunk! */
25178 }
25179
25180 /* now turn the new into the old */
25181
25182 i = p_ptrn_lines + 1;
25183 if (tp_char[i] == '\n') { /* account for possible blank line */
25184- blankline = TRUE;
25185+ blankline = true;
25186 i++;
25187 }
25188 if (p_efake >= 0) { /* fix non-freeable ptr range */
25189@@ -1715,23 +1757,23 @@
25190 free (tp_len);
25191 if (tp_char)
25192 free (tp_char);
25193- return TRUE;
25194+ return true;
25195 }
25196
25197-/* Return whether file WHICH (0 = old, 1 = new) appears to nonexistent.
25198+/* Return whether file WHICH (false = old, true = new) appears to nonexistent.
25199 Return 1 for empty, 2 for nonexistent. */
25200
25201-bool
25202-pch_says_nonexistent (int which)
25203+int
25204+pch_says_nonexistent (bool which)
25205 {
25206 return p_says_nonexistent[which];
25207 }
25208
25209-/* Return timestamp of patch header for file WHICH (0 = old, 1 = new),
25210+/* Return timestamp of patch header for file WHICH (false = old, true = new),
25211 or -1 if there was no timestamp or an error in the timestamp. */
25212
25213 time_t
25214-pch_timestamp (int which)
25215+pch_timestamp (bool which)
25216 {
25217 return p_timestamp[which];
25218 }
25219@@ -1835,6 +1877,60 @@
25220 return p_hunk_beg;
25221 }
25222
25223+/* Is the newline-terminated line a valid `ed' command for patch
25224+ input? If so, return the command character; if not, return 0.
25225+ This accepts accepts just a subset of the valid commands, but it's
25226+ good enough in practice. */
25227+
25228+static char
25229+get_ed_command_letter (char const *line)
25230+{
25231+ char const *p = line;
25232+ char letter;
25233+ bool pair = false;
25234+ if (! ISDIGIT (*p))
25235+ return 0;
25236+ while (ISDIGIT (*++p))
25237+ continue;
25238+ if (*p == ',')
25239+ {
25240+ if (! ISDIGIT (*++p))
25241+ return 0;
25242+ while (ISDIGIT (*++p))
25243+ continue;
25244+ pair = true;
25245+ }
25246+ letter = *p++;
25247+
25248+ switch (letter)
25249+ {
25250+ case 'a':
25251+ case 'i':
25252+ if (pair)
25253+ return 0;
25254+ break;
25255+
25256+ case 'c':
25257+ case 'd':
25258+ break;
25259+
25260+ case 's':
25261+ if (strncmp (p, "/.//", 4) != 0)
25262+ return 0;
25263+ p += 4;
25264+ break;
25265+
25266+ default:
25267+ return 0;
25268+ }
25269+
25270+ while (*p == ' ' || *p == '\t')
25271+ p++;
25272+ if (*p == '\n')
25273+ return letter;
25274+ return 0;
25275+}
25276+
25277 /* Apply an ed script by feeding ed itself. */
25278
25279 void
25280@@ -1842,13 +1938,11 @@
25281 {
25282 static char const ed_program[] = ed_PROGRAM;
25283
25284- register char *t;
25285 register file_offset beginning_of_this_line;
25286- register bool this_line_is_command = FALSE;
25287 register FILE *pipefp = 0;
25288 register size_t chars_read;
25289
25290- if (!skip_rest_of_patch) {
25291+ if (! dry_run && ! skip_rest_of_patch) {
25292 int exclusive = TMPOUTNAME_needs_removal ? 0 : O_EXCL;
25293 assert (! inerrno);
25294 TMPOUTNAME_needs_removal = 1;
25295@@ -1861,21 +1955,20 @@
25296 pfatal ("Can't open pipe to %s", quotearg (buf));
25297 }
25298 for (;;) {
25299+ char ed_command_letter;
25300 beginning_of_this_line = file_tell (pfp);
25301 chars_read = get_line ();
25302 if (! chars_read) {
25303 next_intuit_at(beginning_of_this_line,p_input_line);
25304 break;
25305 }
25306- for (t = buf; ISDIGIT (*t) || *t == ','; t++)
25307- continue;
25308- this_line_is_command = (ISDIGIT (*buf) &&
25309- (*t == 'd' || *t == 'c' || *t == 'a' || *t == 'i' || *t == 's') );
25310- if (this_line_is_command) {
25311+ ed_command_letter = get_ed_command_letter (buf);
25312+ if (ed_command_letter) {
25313 if (pipefp)
25314 if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
25315 write_fatal ();
25316- if (*t != 'd' && *t != 's') {
25317+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
25318+ p_pass_comments_through = true;
25319 while ((chars_read = get_line ()) != 0) {
25320 if (pipefp)
25321 if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
25322@@ -1883,6 +1976,7 @@
25323 if (chars_read == 2 && strEQ (buf, ".\n"))
25324 break;
25325 }
25326+ p_pass_comments_through = false;
25327 }
25328 }
25329 else {
25330diff -urNd -urNd patch-2.5.4/pch.h patch-2.5.9/pch.h
25331--- patch-2.5.4/pch.h 1997-06-13 02:28:37.000000000 -0400
25332+++ patch-2.5.9/pch.h 2003-05-20 09:56:02.000000000 -0400
25333@@ -1,25 +1,45 @@
25334 /* reading patches */
25335
25336-/* $Id: pch.h,v 1.8 1997/06/13 06:28:37 eggert Exp $ */
25337+/* $Id: pch.h,v 1.11 2003/05/20 13:56:03 eggert Exp $ */
25338
25339-LINENUM pch_end PARAMS ((void));
25340-LINENUM pch_first PARAMS ((void));
25341-LINENUM pch_hunk_beg PARAMS ((void));
25342-LINENUM pch_newfirst PARAMS ((void));
25343-LINENUM pch_prefix_context PARAMS ((void));
25344-LINENUM pch_ptrn_lines PARAMS ((void));
25345-LINENUM pch_repl_lines PARAMS ((void));
25346-LINENUM pch_suffix_context PARAMS ((void));
25347-bool pch_swap PARAMS ((void));
25348-bool pch_write_line PARAMS ((LINENUM, FILE *));
25349-bool there_is_another_patch PARAMS ((void));
25350-char *pfetch PARAMS ((LINENUM));
25351-char pch_char PARAMS ((LINENUM));
25352-int another_hunk PARAMS ((enum diff, int));
25353-int pch_says_nonexistent PARAMS ((int));
25354-size_t pch_line_len PARAMS ((LINENUM));
25355-time_t pch_timestamp PARAMS ((int));
25356-void do_ed_script PARAMS ((FILE *));
25357-void open_patch_file PARAMS ((char const *));
25358-void re_patch PARAMS ((void));
25359-void set_hunkmax PARAMS ((void));
25360+/* Copyright (C) 1986, 1987, 1988 Larry Wall
25361+
25362+ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
25363+ 2002, 2003 Free Software Foundation, Inc.
25364+
25365+ This program is free software; you can redistribute it and/or modify
25366+ it under the terms of the GNU General Public License as published by
25367+ the Free Software Foundation; either version 2, or (at your option)
25368+ any later version.
25369+
25370+ This program is distributed in the hope that it will be useful,
25371+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25372+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25373+ GNU General Public License for more details.
25374+
25375+ You should have received a copy of the GNU General Public License
25376+ along with this program; see the file COPYING.
25377+ If not, write to the Free Software Foundation,
25378+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25379+
25380+LINENUM pch_end (void);
25381+LINENUM pch_first (void);
25382+LINENUM pch_hunk_beg (void);
25383+LINENUM pch_newfirst (void);
25384+LINENUM pch_prefix_context (void);
25385+LINENUM pch_ptrn_lines (void);
25386+LINENUM pch_repl_lines (void);
25387+LINENUM pch_suffix_context (void);
25388+bool pch_swap (void);
25389+bool pch_write_line (LINENUM, FILE *);
25390+bool there_is_another_patch (void);
25391+char *pfetch (LINENUM);
25392+char pch_char (LINENUM);
25393+int another_hunk (enum diff, bool);
25394+int pch_says_nonexistent (bool);
25395+size_t pch_line_len (LINENUM);
25396+time_t pch_timestamp (bool);
25397+void do_ed_script (FILE *);
25398+void open_patch_file (char const *);
25399+void re_patch (void);
25400+void set_hunkmax (void);
25401diff -urNd -urNd patch-2.5.4/quotearg.c patch-2.5.9/quotearg.c
25402--- patch-2.5.4/quotearg.c 1999-08-23 05:55:55.000000000 -0400
25403+++ patch-2.5.9/quotearg.c 2002-11-23 01:45:49.000000000 -0500
25404@@ -1,5 +1,5 @@
25405 /* quotearg.c - quote arguments for output
25406- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
25407+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
25408
25409 This program is free software; you can redistribute it and/or modify
25410 it under the terms of the GNU General Public License as published by
25411@@ -17,51 +17,59 @@
25412
25413 /* Written by Paul Eggert <eggert@twinsun.com> */
25414
25415-/* FIXME: Multibyte characters are not supported yet. */
25416-
25417 #if HAVE_CONFIG_H
25418 # include <config.h>
25419 #endif
25420
25421-#include <sys/types.h>
25422-#include <quotearg.h>
25423-#include <xalloc.h>
25424+#include "quotearg.h"
25425+
25426+#include "xalloc.h"
25427
25428 #include <ctype.h>
25429-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
25430-# define ISASCII(c) 1
25431-#else
25432-# define ISASCII(c) isascii (c)
25433-#endif
25434-#ifdef isgraph
25435-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
25436-#else
25437-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
25438-#endif
25439+#include <errno.h>
25440+#include <limits.h>
25441+#include <stdlib.h>
25442+#include <string.h>
25443
25444-#if ENABLE_NLS
25445-# include <libintl.h>
25446-# define _(text) gettext (text)
25447-#else
25448-# define _(text) text
25449-#endif
25450+#include "gettext.h"
25451+#define _(msgid) gettext (msgid)
25452+#define N_(msgid) msgid
25453
25454-#if HAVE_LIMITS_H
25455-# include <limits.h>
25456+#if HAVE_WCHAR_H
25457+
25458+/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
25459+# include <stdio.h>
25460+# include <time.h>
25461+
25462+# include <wchar.h>
25463 #endif
25464-#ifndef CHAR_BIT
25465-# define CHAR_BIT 8
25466+
25467+#if !HAVE_MBRTOWC
25468+/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
25469+ other macros are defined only for documentation and to satisfy C
25470+ syntax. */
25471+# undef MB_CUR_MAX
25472+# define MB_CUR_MAX 1
25473+# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
25474+# define iswprint(wc) isprint ((unsigned char) (wc))
25475+# undef HAVE_MBSINIT
25476 #endif
25477-#ifndef UCHAR_MAX
25478-# define UCHAR_MAX ((unsigned char) -1)
25479+
25480+#if !defined mbsinit && !HAVE_MBSINIT
25481+# define mbsinit(ps) 1
25482 #endif
25483
25484-#if HAVE_STDLIB_H
25485-# include <stdlib.h>
25486+#ifndef iswprint
25487+# if HAVE_WCTYPE_H
25488+# include <wctype.h>
25489+# endif
25490+# if !defined iswprint && !HAVE_ISWPRINT
25491+# define iswprint(wc) 1
25492+# endif
25493 #endif
25494
25495-#if HAVE_STRING_H
25496-# include <string.h>
25497+#ifndef SIZE_MAX
25498+# define SIZE_MAX ((size_t) -1)
25499 #endif
25500
25501 #define INT_BITS (sizeof (int) * CHAR_BIT)
25502@@ -73,8 +81,7 @@
25503
25504 /* Quote the characters indicated by this bit vector even if the
25505 quoting style would not normally require them to be quoted. */
25506- int quote_these_too[((UCHAR_MAX + 1) / INT_BITS
25507- + ((UCHAR_MAX + 1) % INT_BITS != 0))];
25508+ int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
25509 };
25510
25511 /* Names of quoting styles. */
25512@@ -86,6 +93,7 @@
25513 "c",
25514 "escape",
25515 "locale",
25516+ "clocale",
25517 0
25518 };
25519
25520@@ -97,7 +105,8 @@
25521 shell_always_quoting_style,
25522 c_quoting_style,
25523 escape_quoting_style,
25524- locale_quoting_style
25525+ locale_quoting_style,
25526+ clocale_quoting_style
25527 };
25528
25529 /* The default quoting options. */
25530@@ -109,9 +118,10 @@
25531 struct quoting_options *
25532 clone_quoting_options (struct quoting_options *o)
25533 {
25534- struct quoting_options *p
25535- = (struct quoting_options *) xmalloc (sizeof (struct quoting_options));
25536+ int e = errno;
25537+ struct quoting_options *p = xmalloc (sizeof *p);
25538 *p = *(o ? o : &default_quoting_options);
25539+ errno = e;
25540 return p;
25541 }
25542
25543@@ -146,77 +156,92 @@
25544 return r;
25545 }
25546
25547+/* MSGID approximates a quotation mark. Return its translation if it
25548+ has one; otherwise, return either it or "\"", depending on S. */
25549+static char const *
25550+gettext_quote (char const *msgid, enum quoting_style s)
25551+{
25552+ char const *translation = _(msgid);
25553+ if (translation == msgid && s == clocale_quoting_style)
25554+ translation = "\"";
25555+ return translation;
25556+}
25557+
25558 /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
25559- argument ARG (of size ARGSIZE), using O to control quoting.
25560- If O is null, use the default.
25561+ argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
25562+ non-quoting-style part of O to control quoting.
25563 Terminate the output with a null character, and return the written
25564 size of the output, not counting the terminating null.
25565 If BUFFERSIZE is too small to store the output string, return the
25566 value that would have been returned had BUFFERSIZE been large enough.
25567- If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
25568-size_t
25569-quotearg_buffer (char *buffer, size_t buffersize,
25570- char const *arg, size_t argsize,
25571- struct quoting_options const *o)
25572+ If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
25573+
25574+ This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
25575+ ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
25576+ style specified by O, and O may not be null. */
25577+
25578+static size_t
25579+quotearg_buffer_restyled (char *buffer, size_t buffersize,
25580+ char const *arg, size_t argsize,
25581+ enum quoting_style quoting_style,
25582+ struct quoting_options const *o)
25583 {
25584- unsigned char c;
25585 size_t i;
25586 size_t len = 0;
25587- char const *quote_string;
25588- size_t quote_string_len;
25589- struct quoting_options const *p = o ? o : &default_quoting_options;
25590- enum quoting_style quoting_style = p->style;
25591+ char const *quote_string = 0;
25592+ size_t quote_string_len = 0;
25593+ int backslash_escapes = 0;
25594+ int unibyte_locale = MB_CUR_MAX == 1;
25595+
25596 #define STORE(c) \
25597 do \
25598 { \
25599 if (len < buffersize) \
25600 buffer[len] = (c); \
25601- len++; \
25602+ len++; \
25603 } \
25604 while (0)
25605
25606 switch (quoting_style)
25607 {
25608- case shell_quoting_style:
25609- if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
25610- {
25611- switch (arg[0])
25612- {
25613- case '#': case '~':
25614- break;
25615-
25616- default:
25617- for (i = 0; ; i++)
25618- {
25619- if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
25620- goto done;
25621+ case c_quoting_style:
25622+ STORE ('"');
25623+ backslash_escapes = 1;
25624+ quote_string = "\"";
25625+ quote_string_len = 1;
25626+ break;
25627
25628- c = arg[i];
25629+ case escape_quoting_style:
25630+ backslash_escapes = 1;
25631+ break;
25632
25633- switch (c)
25634- {
25635- case '\t': case '\n': case ' ':
25636- case '!': /* special in csh */
25637- case '"': case '$': case '&': case '\'':
25638- case '(': case ')': case '*': case ';':
25639- case '<': case '>': case '?': case '[': case '\\':
25640- case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
25641- case '`': case '|':
25642- goto needs_quoting;
25643- }
25644+ case locale_quoting_style:
25645+ case clocale_quoting_style:
25646+ {
25647+ /* Get translations for open and closing quotation marks.
25648
25649- if (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
25650- goto needs_quoting;
25651+ The message catalog should translate "`" to a left
25652+ quotation mark suitable for the locale, and similarly for
25653+ "'". If the catalog has no translation,
25654+ locale_quoting_style quotes `like this', and
25655+ clocale_quoting_style quotes "like this".
25656
25657- STORE (c);
25658- }
25659- needs_quoting:;
25660+ For example, an American English Unicode locale should
25661+ translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
25662+ should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
25663+ MARK). A British English Unicode locale should instead
25664+ translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
25665+ U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. */
25666
25667- len = 0;
25668- break;
25669- }
25670- }
25671- /* Fall through. */
25672+ char const *left = gettext_quote (N_("`"), quoting_style);
25673+ char const *right = gettext_quote (N_("'"), quoting_style);
25674+ for (quote_string = left; *quote_string; quote_string++)
25675+ STORE (*quote_string);
25676+ backslash_escapes = 1;
25677+ quote_string = right;
25678+ quote_string_len = strlen (quote_string);
25679+ }
25680+ break;
25681
25682 case shell_always_quoting_style:
25683 STORE ('\'');
25684@@ -224,84 +249,225 @@
25685 quote_string_len = 1;
25686 break;
25687
25688- case c_quoting_style:
25689- STORE ('"');
25690- quote_string = "\"";
25691- quote_string_len = 1;
25692- break;
25693-
25694- case locale_quoting_style:
25695- for (quote_string = _("`"); *quote_string; quote_string++)
25696- STORE (*quote_string);
25697- quote_string = _("'");
25698- quote_string_len = strlen (quote_string);
25699- break;
25700-
25701 default:
25702- quote_string = 0;
25703- quote_string_len = 0;
25704 break;
25705 }
25706
25707- for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
25708+ for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++)
25709 {
25710- c = arg[i];
25711+ unsigned char c;
25712+ unsigned char esc;
25713
25714- switch (quoting_style)
25715+ if (backslash_escapes
25716+ && quote_string_len
25717+ && i + quote_string_len <= argsize
25718+ && memcmp (arg + i, quote_string, quote_string_len) == 0)
25719+ STORE ('\\');
25720+
25721+ c = arg[i];
25722+ switch (c)
25723 {
25724- case literal_quoting_style:
25725+ case '\0':
25726+ if (backslash_escapes)
25727+ {
25728+ STORE ('\\');
25729+ STORE ('0');
25730+ STORE ('0');
25731+ c = '0';
25732+ }
25733 break;
25734
25735- case shell_quoting_style:
25736- case shell_always_quoting_style:
25737- if (c == '\'')
25738+ case '?':
25739+ switch (quoting_style)
25740 {
25741- STORE ('\'');
25742- STORE ('\\');
25743- STORE ('\'');
25744+ case shell_quoting_style:
25745+ goto use_shell_always_quoting_style;
25746+
25747+ case c_quoting_style:
25748+ if (i + 2 < argsize && arg[i + 1] == '?')
25749+ switch (arg[i + 2])
25750+ {
25751+ case '!': case '\'':
25752+ case '(': case ')': case '-': case '/':
25753+ case '<': case '=': case '>':
25754+ /* Escape the second '?' in what would otherwise be
25755+ a trigraph. */
25756+ c = arg[i + 2];
25757+ i += 2;
25758+ STORE ('?');
25759+ STORE ('\\');
25760+ STORE ('?');
25761+ break;
25762+ }
25763+ break;
25764+
25765+ default:
25766+ break;
25767 }
25768 break;
25769
25770- case c_quoting_style:
25771- case escape_quoting_style:
25772- case locale_quoting_style:
25773- switch (c)
25774+ case '\a': esc = 'a'; goto c_escape;
25775+ case '\b': esc = 'b'; goto c_escape;
25776+ case '\f': esc = 'f'; goto c_escape;
25777+ case '\n': esc = 'n'; goto c_and_shell_escape;
25778+ case '\r': esc = 'r'; goto c_and_shell_escape;
25779+ case '\t': esc = 't'; goto c_and_shell_escape;
25780+ case '\v': esc = 'v'; goto c_escape;
25781+ case '\\': esc = c; goto c_and_shell_escape;
25782+
25783+ c_and_shell_escape:
25784+ if (quoting_style == shell_quoting_style)
25785+ goto use_shell_always_quoting_style;
25786+ c_escape:
25787+ if (backslash_escapes)
25788 {
25789- case '?': /* Do not generate trigraphs. */
25790- case '\\': goto store_escape;
25791- /* Not all C compilers know what \a means. */
25792- case 7 : c = 'a'; goto store_escape;
25793- case '\b': c = 'b'; goto store_escape;
25794- case '\f': c = 'f'; goto store_escape;
25795- case '\n': c = 'n'; goto store_escape;
25796- case '\r': c = 'r'; goto store_escape;
25797- case '\t': c = 't'; goto store_escape;
25798- case '\v': c = 'v'; goto store_escape;
25799+ c = esc;
25800+ goto store_escape;
25801+ }
25802+ break;
25803
25804- case ' ': break;
25805+ case '#': case '~':
25806+ if (i != 0)
25807+ break;
25808+ /* Fall through. */
25809+ case ' ':
25810+ case '!': /* special in bash */
25811+ case '"': case '$': case '&':
25812+ case '(': case ')': case '*': case ';':
25813+ case '<': case '>': case '[':
25814+ case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
25815+ case '`': case '|':
25816+ /* A shell special character. In theory, '$' and '`' could
25817+ be the first bytes of multibyte characters, which means
25818+ we should check them with mbrtowc, but in practice this
25819+ doesn't happen so it's not worth worrying about. */
25820+ if (quoting_style == shell_quoting_style)
25821+ goto use_shell_always_quoting_style;
25822+ break;
25823+
25824+ case '\'':
25825+ switch (quoting_style)
25826+ {
25827+ case shell_quoting_style:
25828+ goto use_shell_always_quoting_style;
25829+
25830+ case shell_always_quoting_style:
25831+ STORE ('\'');
25832+ STORE ('\\');
25833+ STORE ('\'');
25834+ break;
25835
25836 default:
25837- if (quote_string_len
25838- && strncmp (arg + i, quote_string, quote_string_len) == 0)
25839- goto store_escape;
25840- if (!ISGRAPH (c))
25841- {
25842- STORE ('\\');
25843- STORE ('0' + (c >> 6));
25844- STORE ('0' + ((c >> 3) & 7));
25845- c = '0' + (c & 7);
25846- goto store_c;
25847- }
25848 break;
25849 }
25850+ break;
25851
25852- if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
25853- goto store_c;
25854+ case '%': case '+': case ',': case '-': case '.': case '/':
25855+ case '0': case '1': case '2': case '3': case '4': case '5':
25856+ case '6': case '7': case '8': case '9': case ':': case '=':
25857+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
25858+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
25859+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
25860+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
25861+ case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
25862+ case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
25863+ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
25864+ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
25865+ case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
25866+ case '{': case '}':
25867+ /* These characters don't cause problems, no matter what the
25868+ quoting style is. They cannot start multibyte sequences. */
25869+ break;
25870
25871- store_escape:
25872- STORE ('\\');
25873+ default:
25874+ /* If we have a multibyte sequence, copy it until we reach
25875+ its end, find an error, or come back to the initial shift
25876+ state. For C-like styles, if the sequence has
25877+ unprintable characters, escape the whole sequence, since
25878+ we can't easily escape single characters within it. */
25879+ {
25880+ /* Length of multibyte sequence found so far. */
25881+ size_t m;
25882+
25883+ int printable;
25884+
25885+ if (unibyte_locale)
25886+ {
25887+ m = 1;
25888+ printable = isprint (c);
25889+ }
25890+ else
25891+ {
25892+ mbstate_t mbstate;
25893+ memset (&mbstate, 0, sizeof mbstate);
25894+
25895+ m = 0;
25896+ printable = 1;
25897+ if (argsize == SIZE_MAX)
25898+ argsize = strlen (arg);
25899+
25900+ do
25901+ {
25902+ wchar_t w;
25903+ size_t bytes = mbrtowc (&w, &arg[i + m],
25904+ argsize - (i + m), &mbstate);
25905+ if (bytes == 0)
25906+ break;
25907+ else if (bytes == (size_t) -1)
25908+ {
25909+ printable = 0;
25910+ break;
25911+ }
25912+ else if (bytes == (size_t) -2)
25913+ {
25914+ printable = 0;
25915+ while (i + m < argsize && arg[i + m])
25916+ m++;
25917+ break;
25918+ }
25919+ else
25920+ {
25921+ if (! iswprint (w))
25922+ printable = 0;
25923+ m += bytes;
25924+ }
25925+ }
25926+ while (! mbsinit (&mbstate));
25927+ }
25928+
25929+ if (1 < m || (backslash_escapes && ! printable))
25930+ {
25931+ /* Output a multibyte sequence, or an escaped
25932+ unprintable unibyte character. */
25933+ size_t ilim = i + m;
25934+
25935+ for (;;)
25936+ {
25937+ if (backslash_escapes && ! printable)
25938+ {
25939+ STORE ('\\');
25940+ STORE ('0' + (c >> 6));
25941+ STORE ('0' + ((c >> 3) & 7));
25942+ c = '0' + (c & 7);
25943+ }
25944+ if (ilim <= i + 1)
25945+ break;
25946+ STORE (c);
25947+ c = arg[++i];
25948+ }
25949+
25950+ goto store_c;
25951+ }
25952+ }
25953 }
25954
25955+ if (! (backslash_escapes
25956+ && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
25957+ goto store_c;
25958+
25959+ store_escape:
25960+ STORE ('\\');
25961+
25962 store_c:
25963 STORE (c);
25964 }
25965@@ -310,60 +476,105 @@
25966 for (; *quote_string; quote_string++)
25967 STORE (*quote_string);
25968
25969- done:
25970 if (len < buffersize)
25971 buffer[len] = '\0';
25972 return len;
25973+
25974+ use_shell_always_quoting_style:
25975+ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
25976+ shell_always_quoting_style, o);
25977 }
25978
25979-/* Use storage slot N to return a quoted version of the string ARG.
25980+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
25981+ argument ARG (of size ARGSIZE), using O to control quoting.
25982+ If O is null, use the default.
25983+ Terminate the output with a null character, and return the written
25984+ size of the output, not counting the terminating null.
25985+ If BUFFERSIZE is too small to store the output string, return the
25986+ value that would have been returned had BUFFERSIZE been large enough.
25987+ If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
25988+size_t
25989+quotearg_buffer (char *buffer, size_t buffersize,
25990+ char const *arg, size_t argsize,
25991+ struct quoting_options const *o)
25992+{
25993+ struct quoting_options const *p = o ? o : &default_quoting_options;
25994+ int e = errno;
25995+ size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
25996+ p->style, p);
25997+ errno = e;
25998+ return r;
25999+}
26000+
26001+/* Use storage slot N to return a quoted version of argument ARG.
26002+ ARG is of size ARGSIZE, but if that is -1, ARG is a null-terminated string.
26003 OPTIONS specifies the quoting options.
26004 The returned value points to static storage that can be
26005 reused by the next call to this function with the same value of N.
26006- N must be nonnegative. N is deliberately declared with type `int'
26007+ N must be nonnegative. N is deliberately declared with type "int"
26008 to allow for future extensions (using negative values). */
26009 static char *
26010-quotearg_n_options (int n, char const *arg,
26011+quotearg_n_options (int n, char const *arg, size_t argsize,
26012 struct quoting_options const *options)
26013 {
26014- static unsigned int nslots;
26015- static struct slotvec
26016+ int e = errno;
26017+
26018+ /* Preallocate a slot 0 buffer, so that the caller can always quote
26019+ one small component of a "memory exhausted" message in slot 0. */
26020+ static char slot0[256];
26021+ static unsigned int nslots = 1;
26022+ unsigned int n0 = n;
26023+ struct slotvec
26024 {
26025 size_t size;
26026 char *val;
26027- } *slotvec;
26028+ };
26029+ static struct slotvec slotvec0 = {sizeof slot0, slot0};
26030+ static struct slotvec *slotvec = &slotvec0;
26031
26032- if (nslots <= n)
26033+ if (n < 0)
26034+ abort ();
26035+
26036+ if (nslots <= n0)
26037 {
26038- int n1 = n + 1;
26039- size_t s = n1 * sizeof (struct slotvec);
26040- if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
26041- abort ();
26042- slotvec = (struct slotvec *) xrealloc (slotvec, s);
26043- memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
26044- nslots = n;
26045+ unsigned int n1 = n0 + 1;
26046+ size_t s = n1 * sizeof *slotvec;
26047+
26048+ if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
26049+ && n1 != s / sizeof *slotvec)
26050+ xalloc_die ();
26051+
26052+ if (slotvec == &slotvec0)
26053+ {
26054+ slotvec = xmalloc (sizeof *slotvec);
26055+ *slotvec = slotvec0;
26056+ }
26057+ slotvec = xrealloc (slotvec, s);
26058+ memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
26059+ nslots = n1;
26060 }
26061
26062 {
26063 size_t size = slotvec[n].size;
26064 char *val = slotvec[n].val;
26065- size_t qsize = quotearg_buffer (val, size, arg, (size_t) -1, options);
26066+ size_t qsize = quotearg_buffer (val, size, arg, argsize, options);
26067
26068 if (size <= qsize)
26069 {
26070 slotvec[n].size = size = qsize + 1;
26071- slotvec[n].val = val = xrealloc (val, size);
26072- quotearg_buffer (val, size, arg, (size_t) -1, options);
26073+ slotvec[n].val = val = xrealloc (val == slot0 ? 0 : val, size);
26074+ quotearg_buffer (val, size, arg, argsize, options);
26075 }
26076
26077+ errno = e;
26078 return val;
26079 }
26080 }
26081
26082 char *
26083-quotearg_n (unsigned int n, char const *arg)
26084+quotearg_n (int n, char const *arg)
26085 {
26086- return quotearg_n_options (n, arg, &default_quoting_options);
26087+ return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
26088 }
26089
26090 char *
26091@@ -372,13 +583,29 @@
26092 return quotearg_n (0, arg);
26093 }
26094
26095-char *
26096-quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
26097+/* Return quoting options for STYLE, with no extra quoting. */
26098+static struct quoting_options
26099+quoting_options_from_style (enum quoting_style style)
26100 {
26101 struct quoting_options o;
26102- o.style = s;
26103+ o.style = style;
26104 memset (o.quote_these_too, 0, sizeof o.quote_these_too);
26105- return quotearg_n_options (n, arg, &o);
26106+ return o;
26107+}
26108+
26109+char *
26110+quotearg_n_style (int n, enum quoting_style s, char const *arg)
26111+{
26112+ struct quoting_options const o = quoting_options_from_style (s);
26113+ return quotearg_n_options (n, arg, SIZE_MAX, &o);
26114+}
26115+
26116+char *
26117+quotearg_n_style_mem (int n, enum quoting_style s,
26118+ char const *arg, size_t argsize)
26119+{
26120+ struct quoting_options const o = quoting_options_from_style (s);
26121+ return quotearg_n_options (n, arg, argsize, &o);
26122 }
26123
26124 char *
26125@@ -393,7 +620,7 @@
26126 struct quoting_options options;
26127 options = default_quoting_options;
26128 set_char_quoting (&options, ch, 1);
26129- return quotearg_n_options (0, arg, &options);
26130+ return quotearg_n_options (0, arg, SIZE_MAX, &options);
26131 }
26132
26133 char *
26134diff -urNd -urNd patch-2.5.4/quotearg.h patch-2.5.9/quotearg.h
26135--- patch-2.5.4/quotearg.h 1999-08-09 19:09:13.000000000 -0400
26136+++ patch-2.5.9/quotearg.h 2002-11-23 01:45:22.000000000 -0500
26137@@ -1,5 +1,7 @@
26138 /* quotearg.h - quote arguments for output
26139- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
26140+
26141+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software
26142+ Foundation, Inc.
26143
26144 This program is free software; you can redistribute it and/or modify
26145 it under the terms of the GNU General Public License as published by
26146@@ -17,6 +19,11 @@
26147
26148 /* Written by Paul Eggert <eggert@twinsun.com> */
26149
26150+#ifndef QUOTEARG_H_
26151+# define QUOTEARG_H_ 1
26152+
26153+# include <stddef.h>
26154+
26155 /* Basic quoting styles. */
26156 enum quoting_style
26157 {
26158@@ -25,13 +32,14 @@
26159 shell_always_quoting_style, /* --quoting-style=shell-always */
26160 c_quoting_style, /* --quoting-style=c */
26161 escape_quoting_style, /* --quoting-style=escape */
26162- locale_quoting_style /* --quoting-style=locale */
26163+ locale_quoting_style, /* --quoting-style=locale */
26164+ clocale_quoting_style /* --quoting-style=clocale */
26165 };
26166
26167 /* For now, --quoting-style=literal is the default, but this may change. */
26168-#ifndef DEFAULT_QUOTING_STYLE
26169-# define DEFAULT_QUOTING_STYLE literal_quoting_style
26170-#endif
26171+# ifndef DEFAULT_QUOTING_STYLE
26172+# define DEFAULT_QUOTING_STYLE literal_quoting_style
26173+# endif
26174
26175 /* Names of quoting styles and their corresponding values. */
26176 extern char const *const quoting_style_args[];
26177@@ -39,37 +47,27 @@
26178
26179 struct quoting_options;
26180
26181-#ifndef PARAMS
26182-# if defined PROTOTYPES || defined __STDC__
26183-# define PARAMS(Args) Args
26184-# else
26185-# define PARAMS(Args) ()
26186-# endif
26187-#endif
26188-
26189 /* The functions listed below set and use a hidden variable
26190 that contains the default quoting style options. */
26191
26192 /* Allocate a new set of quoting options, with contents initially identical
26193 to O if O is not null, or to the default if O is null.
26194 It is the caller's responsibility to free the result. */
26195-struct quoting_options *clone_quoting_options
26196- PARAMS ((struct quoting_options *o));
26197+struct quoting_options *clone_quoting_options (struct quoting_options *o);
26198
26199 /* Get the value of O's quoting style. If O is null, use the default. */
26200-enum quoting_style get_quoting_style PARAMS ((struct quoting_options *o));
26201+enum quoting_style get_quoting_style (struct quoting_options *o);
26202
26203 /* In O (or in the default if O is null),
26204 set the value of the quoting style to S. */
26205-void set_quoting_style PARAMS ((struct quoting_options *o,
26206- enum quoting_style s));
26207+void set_quoting_style (struct quoting_options *o, enum quoting_style s);
26208
26209 /* In O (or in the default if O is null),
26210 set the value of the quoting options for character C to I.
26211 Return the old value. Currently, the only values defined for I are
26212 0 (the default) and 1 (which means to quote the character even if
26213 it would not otherwise be quoted). */
26214-int set_char_quoting PARAMS ((struct quoting_options *o, char c, int i));
26215+int set_char_quoting (struct quoting_options *o, char c, int i);
26216
26217 /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
26218 argument ARG (of size ARGSIZE), using O to control quoting.
26219@@ -79,31 +77,38 @@
26220 If BUFFERSIZE is too small to store the output string, return the
26221 value that would have been returned had BUFFERSIZE been large enough.
26222 If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
26223-size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
26224- char const *arg, size_t argsize,
26225- struct quoting_options const *o));
26226+size_t quotearg_buffer (char *buffer, size_t buffersize,
26227+ char const *arg, size_t argsize,
26228+ struct quoting_options const *o);
26229
26230 /* Use storage slot N to return a quoted version of the string ARG.
26231 Use the default quoting options.
26232 The returned value points to static storage that can be
26233 reused by the next call to this function with the same value of N.
26234 N must be nonnegative. */
26235-char *quotearg_n PARAMS ((unsigned int n, char const *arg));
26236+char *quotearg_n (int n, char const *arg);
26237
26238 /* Equivalent to quotearg_n (0, ARG). */
26239-char *quotearg PARAMS ((char const *arg));
26240+char *quotearg (char const *arg);
26241
26242 /* Use style S and storage slot N to return a quoted version of the string ARG.
26243 This is like quotearg_n (N, ARG), except that it uses S with no other
26244 options to specify the quoting method. */
26245-char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
26246- char const *arg));
26247+char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
26248+
26249+/* Use style S and storage slot N to return a quoted version of the
26250+ argument ARG of size ARGSIZE. This is like quotearg_n_style
26251+ (N, S, ARG), except it can quote null bytes. */
26252+char *quotearg_n_style_mem (int n, enum quoting_style s,
26253+ char const *arg, size_t argsize);
26254
26255 /* Equivalent to quotearg_n_style (0, S, ARG). */
26256-char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
26257+char *quotearg_style (enum quoting_style s, char const *arg);
26258
26259 /* Like quotearg (ARG), except also quote any instances of CH. */
26260-char *quotearg_char PARAMS ((char const *arg, char ch));
26261+char *quotearg_char (char const *arg, char ch);
26262
26263 /* Equivalent to quotearg_char (ARG, ':'). */
26264-char *quotearg_colon PARAMS ((char const *arg));
26265+char *quotearg_colon (char const *arg);
26266+
26267+#endif /* !QUOTEARG_H_ */
26268diff -urNd -urNd patch-2.5.4/quote.c patch-2.5.9/quote.c
26269--- patch-2.5.4/quote.c 1969-12-31 19:00:00.000000000 -0500
26270+++ patch-2.5.9/quote.c 2003-03-18 03:50:56.000000000 -0500
26271@@ -0,0 +1,45 @@
26272+/* quote.c - quote arguments for output
26273+ Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
26274+
26275+ This program is free software; you can redistribute it and/or modify
26276+ it under the terms of the GNU General Public License as published by
26277+ the Free Software Foundation; either version 2, or (at your option)
26278+ any later version.
26279+
26280+ This program is distributed in the hope that it will be useful,
26281+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26282+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26283+ GNU General Public License for more details.
26284+
26285+ You should have received a copy of the GNU General Public License
26286+ along with this program; if not, write to the Free Software Foundation,
26287+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26288+
26289+/* Written by Paul Eggert <eggert@twinsun.com> */
26290+
26291+#if HAVE_CONFIG_H
26292+# include <config.h>
26293+#endif
26294+
26295+#if HAVE_STDDEF_H
26296+# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
26297+#endif
26298+#include <sys/types.h>
26299+#include "quotearg.h"
26300+#include "quote.h"
26301+
26302+/* Return an unambiguous printable representation of NAME,
26303+ allocated in slot N, suitable for diagnostics. */
26304+char const *
26305+quote_n (int n, char const *name)
26306+{
26307+ return quotearg_n_style (n, locale_quoting_style, name);
26308+}
26309+
26310+/* Return an unambiguous printable representation of NAME,
26311+ suitable for diagnostics. */
26312+char const *
26313+quote (char const *name)
26314+{
26315+ return quote_n (0, name);
26316+}
26317diff -urNd -urNd patch-2.5.4/quote.h patch-2.5.9/quote.h
26318--- patch-2.5.4/quote.h 1969-12-31 19:00:00.000000000 -0500
26319+++ patch-2.5.9/quote.h 2002-11-23 02:23:50.000000000 -0500
26320@@ -0,0 +1,28 @@
26321+/* quote.h - prototypes for quote.c
26322+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
26323+
26324+ This program is free software; you can redistribute it and/or modify
26325+ it under the terms of the GNU General Public License as published by
26326+ the Free Software Foundation; either version 2, or (at your option)
26327+ any later version.
26328+
26329+ This program is distributed in the hope that it will be useful,
26330+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26331+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26332+ GNU General Public License for more details.
26333+
26334+ You should have received a copy of the GNU General Public License
26335+ along with this program; if not, write to the Free Software Foundation,
26336+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26337+
26338+
26339+#ifndef PARAMS
26340+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
26341+# define PARAMS(Args) Args
26342+# else
26343+# define PARAMS(Args) ()
26344+# endif
26345+#endif
26346+
26347+char const *quote_n PARAMS ((int n, char const *name));
26348+char const *quote PARAMS ((char const *name));
26349diff -urNd -urNd patch-2.5.4/README patch-2.5.9/README
26350--- patch-2.5.4/README 1997-05-26 01:34:43.000000000 -0400
26351+++ patch-2.5.9/README 2002-06-03 00:51:09.000000000 -0400
26352@@ -5,16 +5,16 @@
26353 * making GNU Emacs-style backup files
26354 * improved interaction with RCS and SCCS
26355 * the GNU conventions for option parsing and configuring and compilation.
26356- * better POSIX.2 compliance
26357+ * better POSIX compliance
26358 They also fix some bugs. See the NEWS and ChangeLog files for details.
26359
26360 Tutorial-style documentation for patch is included in the GNU
26361-diffutils package. Unfortunately, the diffutils 2.7 documentation
26362-for `patch' is obsolete; this should be fixed in diffutils 2.8.
26363-In the mean time, see `patch --help', or consult the man page
26364-in this distribution.
26365+Diffutils package; get GNU Diffutils 2.8 or later for up-to-date
26366+documentation for patch.
26367
26368 For GNU and Unix build and installation instructions, see the file INSTALL.
26369+Use `configure --disable-largefile' to disable large file support;
26370+this is reportedly necessary on Red Hat GNU/Linux 6.0 to avoid a C library bug.
26371 For MS-DOS using DJGPP tools, see the file pc/djgpp/README.
26372 For other systems, copy config.hin to config.h and change
26373 #undef statements in it to #define as appropriate for your system,
26374@@ -22,7 +22,7 @@
26375 enclosed in @ signs as appropriate for your system.
26376
26377 Please send bug reports for this version of patch to
26378-bug-gnu-utils@prep.ai.mit.edu.
26379+<bug-patch@gnu.org>.
26380
26381 The Free Software Foundation is distributing this version of patch
26382 independently because as of this writing, Larry Wall has not released a
26383@@ -33,8 +33,10 @@
26384
26385 ------
26386
26387-Copyright 1984, 1985, 1986, 1987, 1988 Larry Wall
26388-Copyright 1989, 1990, 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
26389+Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
26390+
26391+Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1999, 2002 Free
26392+Software Foundation, Inc.
26393
26394 This program is free software: you can redistribute it and/or modify
26395 it under the terms of the GNU General Public License as published by
26396diff -urNd -urNd patch-2.5.4/rename.c patch-2.5.9/rename.c
26397--- patch-2.5.4/rename.c 1999-03-29 18:56:19.000000000 -0500
26398+++ patch-2.5.9/rename.c 1969-12-31 19:00:00.000000000 -0500
26399@@ -1,113 +0,0 @@
26400-/* BSD compatible rename and directory rename function for System V.
26401- Copyright (C) 1988, 1990 Free Software Foundation, Inc.
26402-
26403- This program is free software; you can redistribute it and/or modify
26404- it under the terms of the GNU General Public License as published by
26405- the Free Software Foundation; either version 2, or (at your option)
26406- any later version.
26407-
26408- This program is distributed in the hope that it will be useful,
26409- but WITHOUT ANY WARRANTY; without even the implied warranty of
26410- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26411- GNU General Public License for more details.
26412-
26413- You should have received a copy of the GNU General Public License
26414- along with this program; if not, write to the Free Software Foundation,
26415- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26416-
26417-#if HAVE_CONFIG_H
26418-# include <config.h>
26419-#endif
26420-
26421-#include <sys/types.h>
26422-#include <sys/stat.h>
26423-#include <errno.h>
26424-#ifndef errno
26425-extern int errno;
26426-#endif
26427-
26428-#if STAT_MACROS_BROKEN
26429-# undef S_ISDIR
26430-#endif
26431-
26432-#if !defined(S_ISDIR) && defined(S_IFDIR)
26433-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
26434-#endif
26435-
26436-/* Rename file FROM to file TO.
26437- Return 0 if successful, -1 if not. */
26438-
26439-int
26440-rename (char *from, char *to)
26441-{
26442- struct stat from_stats, to_stats;
26443-
26444- if (stat (from, &from_stats))
26445- return -1;
26446-
26447- /* Be careful not to unlink `from' if it happens to be equal to `to' or
26448- (on filesystems that silently truncate filenames after 14 characters)
26449- if `from' and `to' share the significant characters. */
26450- if (stat (to, &to_stats))
26451- {
26452- if (errno != ENOENT)
26453- return -1;
26454- }
26455- else
26456- {
26457- if ((from_stats.st_dev == to_stats.st_dev)
26458- && (from_stats.st_ino == to_stats.st_ino))
26459- /* `from' and `to' designate the same file on that filesystem. */
26460- return 0;
26461-
26462- if (unlink (to) && errno != ENOENT)
26463- return -1;
26464- }
26465-
26466-#ifdef MVDIR
26467-
26468-/* If MVDIR is defined, it should be the full filename of a setuid root
26469- program able to link and unlink directories. If MVDIR is not defined,
26470- then the capability of renaming directories may be missing. */
26471-
26472- if (S_ISDIR (from_stats.st_mode))
26473- {
26474- /* Need a setuid root process to link and unlink directories. */
26475- int status;
26476- pid_t pid = fork ();
26477- switch (pid)
26478- {
26479- case -1: /* Error. */
26480- return -1; /* errno already set */
26481-
26482- case 0: /* Child. */
26483- execl (MVDIR, "mvdir", from, to, (char *) 0);
26484- _exit (1);
26485-
26486- default: /* Parent. */
26487- while (wait (&status) != pid)
26488- /* Do nothing. */ ;
26489-
26490- if (status)
26491- {
26492- /* MVDIR failed. */
26493- errno = EIO;
26494- return -1;
26495- }
26496- }
26497- }
26498- else
26499-
26500-#endif /* MVDIR */
26501-
26502- {
26503- if (link (from, to))
26504- return -1;
26505- if (unlink (from) && errno != ENOENT)
26506- {
26507- unlink (to);
26508- return -1;
26509- }
26510- }
26511- return 0;
26512-}
26513diff -urNd -urNd patch-2.5.4/stdbool.h.in patch-2.5.9/stdbool.h.in
26514--- patch-2.5.4/stdbool.h.in 1969-12-31 19:00:00.000000000 -0500
26515+++ patch-2.5.9/stdbool.h.in 2003-01-09 08:35:14.000000000 -0500
26516@@ -0,0 +1,47 @@
26517+/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
26518+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
26519+
26520+ This program is free software; you can redistribute it and/or modify
26521+ it under the terms of the GNU General Public License as published by
26522+ the Free Software Foundation; either version 2, or (at your option)
26523+ any later version.
26524+
26525+ This program is distributed in the hope that it will be useful,
26526+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26527+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26528+ GNU General Public License for more details.
26529+
26530+ You should have received a copy of the GNU General Public License
26531+ along with this program; if not, write to the Free Software Foundation,
26532+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26533+
26534+#ifndef _STDBOOL_H
26535+#define _STDBOOL_H
26536+
26537+/* ISO C 99 <stdbool.h> for platforms that lack it. */
26538+
26539+/* 7.16. Boolean type and values */
26540+
26541+/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
26542+ definitions below, but temporarily we have to #undef them. */
26543+#ifdef __BEOS__
26544+# undef false
26545+# undef true
26546+#endif
26547+
26548+/* For the sake of symbolic names in gdb, define _Bool as an enum type. */
26549+#ifndef __cplusplus
26550+# if !@HAVE__BOOL@
26551+typedef enum { false = 0, true = 1 } _Bool;
26552+# endif
26553+#else
26554+typedef bool _Bool;
26555+#endif
26556+#define bool _Bool
26557+
26558+/* The other macros must be usable in preprocessor directives. */
26559+#define false 0
26560+#define true 1
26561+#define __bool_true_false_are_defined 1
26562+
26563+#endif /* _STDBOOL_H */
26564diff -urNd -urNd patch-2.5.4/strcasecmp.c patch-2.5.9/strcasecmp.c
26565--- patch-2.5.4/strcasecmp.c 1969-12-31 19:00:00.000000000 -0500
26566+++ patch-2.5.9/strcasecmp.c 2000-08-07 11:48:18.000000000 -0400
26567@@ -0,0 +1,66 @@
26568+/* strcasecmp.c -- case insensitive string comparator
26569+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
26570+
26571+ This program is free software; you can redistribute it and/or modify
26572+ it under the terms of the GNU General Public License as published by
26573+ the Free Software Foundation; either version 2, or (at your option)
26574+ any later version.
26575+
26576+ This program is distributed in the hope that it will be useful,
26577+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26578+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26579+ GNU General Public License for more details.
26580+
26581+ You should have received a copy of the GNU General Public License
26582+ along with this program; if not, write to the Free Software Foundation,
26583+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26584+
26585+#if HAVE_CONFIG_H
26586+# include <config.h>
26587+#endif
26588+
26589+#ifdef LENGTH_LIMIT
26590+# define STRXCASECMP_FUNCTION strncasecmp
26591+# define STRXCASECMP_DECLARE_N , size_t n
26592+# define LENGTH_LIMIT_EXPR(Expr) Expr
26593+#else
26594+# define STRXCASECMP_FUNCTION strcasecmp
26595+# define STRXCASECMP_DECLARE_N /* empty */
26596+# define LENGTH_LIMIT_EXPR(Expr) 0
26597+#endif
26598+
26599+#include <sys/types.h>
26600+#include <ctype.h>
26601+
26602+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
26603+
26604+/* Compare {{no more than N characters of }}strings S1 and S2,
26605+ ignoring case, returning less than, equal to or
26606+ greater than zero if S1 is lexicographically less
26607+ than, equal to or greater than S2. */
26608+
26609+int
26610+STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
26611+{
26612+ register const unsigned char *p1 = (const unsigned char *) s1;
26613+ register const unsigned char *p2 = (const unsigned char *) s2;
26614+ unsigned char c1, c2;
26615+
26616+ if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
26617+ return 0;
26618+
26619+ do
26620+ {
26621+ c1 = TOLOWER (*p1);
26622+ c2 = TOLOWER (*p2);
26623+
26624+ if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
26625+ break;
26626+
26627+ ++p1;
26628+ ++p2;
26629+ }
26630+ while (c1 == c2);
26631+
26632+ return c1 - c2;
26633+}
26634diff -urNd -urNd patch-2.5.4/strncasecmp.c patch-2.5.9/strncasecmp.c
26635--- patch-2.5.4/strncasecmp.c 1969-12-31 19:00:00.000000000 -0500
26636+++ patch-2.5.9/strncasecmp.c 1999-01-02 10:55:44.000000000 -0500
26637@@ -0,0 +1,2 @@
26638+#define LENGTH_LIMIT
26639+#include "strcasecmp.c"
26640diff -urNd -urNd patch-2.5.4/unlocked-io.h patch-2.5.9/unlocked-io.h
26641--- patch-2.5.4/unlocked-io.h 1969-12-31 19:00:00.000000000 -0500
26642+++ patch-2.5.9/unlocked-io.h 2002-12-04 15:51:07.000000000 -0500
26643@@ -0,0 +1,90 @@
26644+/* Prefer faster, non-thread-safe stdio functions if available.
26645+
26646+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
26647+
26648+ This program is free software; you can redistribute it and/or modify it
26649+ under the terms of the GNU Library General Public License as published
26650+ by the Free Software Foundation; either version 2, or (at your option)
26651+ any later version.
26652+
26653+ This program is distributed in the hope that it will be useful,
26654+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26655+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26656+ Library General Public License for more details.
26657+
26658+ You should have received a copy of the GNU Library General Public
26659+ License along with this program; if not, write to the Free Software
26660+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
26661+ USA. */
26662+
26663+/* Written by Jim Meyering. */
26664+
26665+#ifndef UNLOCKED_IO_H
26666+# define UNLOCKED_IO_H 1
26667+
26668+# ifndef USE_UNLOCKED_IO
26669+# define USE_UNLOCKED_IO 1
26670+# endif
26671+
26672+# if USE_UNLOCKED_IO
26673+
26674+/* These are wrappers for functions/macros from GNU libc.
26675+ The standard I/O functions are thread-safe. These *_unlocked ones are
26676+ more efficient but not thread-safe. That they're not thread-safe is
26677+ fine since all of the applications in this package are single threaded. */
26678+
26679+# if HAVE_DECL_CLEARERR_UNLOCKED
26680+# undef clearerr
26681+# define clearerr(x) clearerr_unlocked (x)
26682+# endif
26683+# if HAVE_DECL_FEOF_UNLOCKED
26684+# undef feof
26685+# define feof(x) feof_unlocked (x)
26686+# endif
26687+# if HAVE_DECL_FERROR_UNLOCKED
26688+# undef ferror
26689+# define ferror(x) ferror_unlocked (x)
26690+# endif
26691+# if HAVE_DECL_FFLUSH_UNLOCKED
26692+# undef fflush
26693+# define fflush(x) fflush_unlocked (x)
26694+# endif
26695+# if HAVE_DECL_FGETS_UNLOCKED
26696+# undef fgets
26697+# define fgets(x,y,z) fgets_unlocked (x,y,z)
26698+# endif
26699+# if HAVE_DECL_FPUTC_UNLOCKED
26700+# undef fputc
26701+# define fputc(x,y) fputc_unlocked (x,y)
26702+# endif
26703+# if HAVE_DECL_FPUTS_UNLOCKED
26704+# undef fputs
26705+# define fputs(x,y) fputs_unlocked (x,y)
26706+# endif
26707+# if HAVE_DECL_FREAD_UNLOCKED
26708+# undef fread
26709+# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
26710+# endif
26711+# if HAVE_DECL_FWRITE_UNLOCKED
26712+# undef fwrite
26713+# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
26714+# endif
26715+# if HAVE_DECL_GETC_UNLOCKED
26716+# undef getc
26717+# define getc(x) getc_unlocked (x)
26718+# endif
26719+# if HAVE_DECL_GETCHAR_UNLOCKED
26720+# undef getchar
26721+# define getchar() getchar_unlocked ()
26722+# endif
26723+# if HAVE_DECL_PUTC_UNLOCKED
26724+# undef putc
26725+# define putc(x,y) putc_unlocked (x,y)
26726+# endif
26727+# if HAVE_DECL_PUTCHAR_UNLOCKED
26728+# undef putchar
26729+# define putchar(x) putchar_unlocked (x)
26730+# endif
26731+
26732+# endif /* USE_UNLOCKED_IO */
26733+#endif /* UNLOCKED_IO_H */
26734diff -urNd -urNd patch-2.5.4/util.c patch-2.5.9/util.c
26735--- patch-2.5.4/util.c 1999-08-30 02:20:08.000000000 -0400
26736+++ patch-2.5.9/util.c 2003-05-20 10:04:53.000000000 -0400
26737@@ -1,9 +1,11 @@
26738 /* utility functions for `patch' */
26739
26740-/* $Id: util.c,v 1.27 1999/08/30 06:20:08 eggert Exp $ */
26741+/* $Id: util.c,v 1.36 2003/05/20 14:04:53 eggert Exp $ */
26742
26743-/* Copyright 1986 Larry Wall
26744- Copyright 1992, 1993, 1997-1998, 1999 Free Software Foundation, Inc.
26745+/* Copyright (C) 1986 Larry Wall
26746+
26747+ Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
26748+ Software Foundation, Inc.
26749
26750 This program is free software; you can redistribute it and/or modify
26751 it under the terms of the GNU General Public License as published by
26752@@ -23,7 +25,7 @@
26753 #define XTERN extern
26754 #include <common.h>
26755 #include <backupfile.h>
26756-#include <basename.h>
26757+#include <dirname.h>
26758 #include <quotearg.h>
26759 #include <quotesys.h>
26760 #include <version.h>
26761@@ -43,23 +45,9 @@
26762 # define raise(sig) kill (getpid (), sig)
26763 #endif
26764
26765-#ifdef __STDC__
26766-# include <stdarg.h>
26767-# define vararg_start va_start
26768-#else
26769-# define vararg_start(ap,p) va_start (ap)
26770-# if HAVE_VARARGS_H
26771-# include <varargs.h>
26772-# else
26773- typedef char *va_list;
26774-# define va_dcl int va_alist;
26775-# define va_start(ap) ((ap) = (va_list) &va_alist)
26776-# define va_arg(ap, t) (((t *) ((ap) += sizeof (t))) [-1])
26777-# define va_end(ap)
26778-# endif
26779-#endif
26780+#include <stdarg.h>
26781
26782-static void makedirs PARAMS ((char *));
26783+static void makedirs (char *);
26784
26785 /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
26786 needs removal when cleaning up at the end of execution)
26787@@ -67,11 +55,11 @@
26788 If we must create TO, use MODE to create it.
26789 If FROM is null, remove TO (ignoring FROMSTAT).
26790 FROM_NEEDS_REMOVAL must be nonnull if FROM is nonnull.
26791- Back up TO if BACKUP is nonzero. */
26792+ Back up TO if BACKUP is true. */
26793
26794 void
26795 move_file (char const *from, int volatile *from_needs_removal,
26796- char *to, mode_t mode, int backup)
26797+ char *to, mode_t mode, bool backup)
26798 {
26799 struct stat to_st;
26800 int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
26801@@ -152,11 +140,9 @@
26802 say ("Renaming file %s to %s\n",
26803 quotearg_n (0, from), quotearg_n (1, to));
26804
26805- if (rename (from, to) == 0)
26806- *from_needs_removal = 0;
26807- else
26808+ if (rename (from, to) != 0)
26809 {
26810- int to_dir_known_to_exist = 0;
26811+ bool to_dir_known_to_exist = false;
26812
26813 if (errno == ENOENT
26814 && (to_errno == -1 || to_errno == ENOENT))
26815@@ -164,10 +150,7 @@
26816 makedirs (to);
26817 to_dir_known_to_exist = 1;
26818 if (rename (from, to) == 0)
26819- {
26820- *from_needs_removal = 0;
26821- return;
26822- }
26823+ goto rename_succeeded;
26824 }
26825
26826 if (errno == EXDEV)
26827@@ -175,7 +158,7 @@
26828 if (! backup)
26829 {
26830 if (unlink (to) == 0)
26831- to_dir_known_to_exist = 1;
26832+ to_dir_known_to_exist = true;
26833 else if (errno != ENOENT)
26834 pfatal ("Can't remove file %s", quotearg (to));
26835 }
26836@@ -188,6 +171,14 @@
26837 pfatal ("Can't rename file %s to %s",
26838 quotearg_n (0, from), quotearg_n (1, to));
26839 }
26840+
26841+ rename_succeeded:
26842+ /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
26843+ rename returned zero because FROM and TO are hard links to
26844+ the same file. */
26845+ if (0 < to_errno
26846+ || (to_errno == 0 && to_st.st_nlink <= 1))
26847+ *from_needs_removal = 0;
26848 }
26849 else if (! backup)
26850 {
26851@@ -255,23 +246,27 @@
26852
26853 static char const CLEARTOOL_CO[] = "cleartool co -unr -nc ";
26854
26855+static char const PERFORCE_CO[] = "p4 edit ";
26856+
26857 /* Return "RCS" if FILENAME is controlled by RCS,
26858 "SCCS" if it is controlled by SCCS,
26859- "ClearCase" if it is controlled by Clearcase, and 0 otherwise.
26860- READONLY is nonzero if we desire only readonly access to FILENAME.
26861+ "ClearCase" if it is controlled by Clearcase,
26862+ "Perforce" if it is controlled by Perforce,
26863+ and 0 otherwise.
26864+ READONLY is true if we desire only readonly access to FILENAME.
26865 FILESTAT describes FILENAME's status or is 0 if FILENAME does not exist.
26866 If successful and if GETBUF is nonzero, set *GETBUF to a command
26867 that gets the file; similarly for DIFFBUF and a command to diff the file
26868 (but set *DIFFBUF to 0 if the diff operation is meaningless).
26869 *GETBUF and *DIFFBUF must be freed by the caller. */
26870 char const *
26871-version_controller (char const *filename, int readonly,
26872+version_controller (char const *filename, bool readonly,
26873 struct stat const *filestat, char **getbuf, char **diffbuf)
26874 {
26875 struct stat cstat;
26876 char const *filebase = base_name (filename);
26877 char const *dotslash = *filename == '-' ? "./" : "";
26878- size_t dir_len = filebase - filename;
26879+ size_t dirlen = filebase - filename;
26880 size_t filenamelen = strlen (filename);
26881 size_t maxfixlen = sizeof "SCCS/" - 1 + sizeof SCCSPREFIX - 1;
26882 size_t maxtrysize = filenamelen + maxfixlen + 1;
26883@@ -285,8 +280,8 @@
26884
26885 strcpy (trybuf, filename);
26886
26887-#define try1(f,a1) (sprintf (trybuf + dir_len, f, a1), stat (trybuf, &cstat) == 0)
26888-#define try2(f,a1,a2) (sprintf (trybuf + dir_len, f, a1,a2), stat (trybuf, &cstat) == 0)
26889+#define try1(f,a1) (sprintf (trybuf + dirlen, f, a1), stat (trybuf, &cstat) == 0)
26890+#define try2(f,a1,a2) (sprintf (trybuf + dirlen, f, a1,a2), stat (trybuf, &cstat) == 0)
26891
26892 /* Check that RCS file is not working file.
26893 Some hosts don't report file name length errors. */
26894@@ -362,6 +357,23 @@
26895 *diffbuf = 0;
26896
26897 r = "ClearCase";
26898+ }
26899+ else if (!readonly && filestat &&
26900+ (getenv("P4PORT") || getenv("P4USER") || getenv("P4CONFIG")))
26901+ {
26902+ if (getbuf)
26903+ {
26904+ char *p = *getbuf = xmalloc (maxgetsize);
26905+ strcpy (p, PERFORCE_CO);
26906+ p += sizeof PERFORCE_CO - 1;
26907+ p += quote_system_arg (p, filename);
26908+ *p = '\0';
26909+ }
26910+
26911+ if (diffbuf)
26912+ *diffbuf = 0;
26913+
26914+ r = "Perforce";
26915 }
26916
26917 free (trybuf);
26918@@ -369,12 +381,12 @@
26919 }
26920
26921 /* Get FILENAME from version control system CS. The file already exists if
26922- EXISTS is nonzero. Only readonly access is needed if READONLY is nonzero.
26923+ EXISTS. Only readonly access is needed if READONLY.
26924 Use the command GETBUF to actually get the named file.
26925 Store the resulting file status into *FILESTAT.
26926- Return nonzero if successful. */
26927-int
26928-version_get (char const *filename, char const *cs, int exists, int readonly,
26929+ Return true if successful. */
26930+bool
26931+version_get (char const *filename, char const *cs, bool exists, bool readonly,
26932 char const *getbuf, struct stat *filestat)
26933 {
26934 if (patch_get < 0)
26935@@ -460,7 +472,7 @@
26936 *--p = '0' + (int) (n % 10);
26937 while ((n /= 10) != 0);
26938 }
26939-
26940+
26941 return p;
26942 }
26943
26944@@ -490,7 +502,7 @@
26945 {
26946 va_list args;
26947 fprintf (stderr, "%s: **** ", program_name);
26948- vararg_start (args, format);
26949+ va_start (args, format);
26950 vfprintf (stderr, format, args);
26951 va_end (args);
26952 putc ('\n', stderr);
26953@@ -524,7 +536,7 @@
26954 int errnum = errno;
26955 va_list args;
26956 fprintf (stderr, "%s: **** ", program_name);
26957- vararg_start (args, format);
26958+ va_start (args, format);
26959 vfprintf (stderr, format, args);
26960 va_end (args);
26961 fflush (stderr); /* perror bypasses stdio on some hosts. */
26962@@ -540,7 +552,7 @@
26963 say (char const *format, ...)
26964 {
26965 va_list args;
26966- vararg_start (args, format);
26967+ va_start (args, format);
26968 vfprintf (stdout, format, args);
26969 va_end (args);
26970 fflush (stdout);
26971@@ -555,7 +567,7 @@
26972 int r;
26973 va_list args;
26974
26975- vararg_start (args, format);
26976+ va_start (args, format);
26977 vfprintf (stdout, format, args);
26978 va_end (args);
26979 fflush (stdout);
26980@@ -566,7 +578,8 @@
26981 since it's unlikely that stdout will be seen by the tty user.
26982 The isatty test also works around a bug in GNU Emacs 19.34 under Linux
26983 which makes a call-process `patch' hang when it reads from /dev/tty.
26984- POSIX.2 requires that we read /dev/tty, though. */
26985+ POSIX.1-2001 XCU line 26599 requires that we read /dev/tty,
26986+ though. */
26987 ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
26988 ? open (TTY_DEVICE, O_RDONLY)
26989 : -1);
26990@@ -607,15 +620,15 @@
26991
26992 /* Return nonzero if it OK to reverse a patch. */
26993
26994-int
26995+bool
26996 ok_to_reverse (char const *format, ...)
26997 {
26998- int r = 0;
26999+ bool r = false;
27000
27001 if (noreverse || ! (force && verbosity == SILENT))
27002 {
27003 va_list args;
27004- vararg_start (args, format);
27005+ va_start (args, format);
27006 vfprintf (stdout, format, args);
27007 va_end (args);
27008 }
27009@@ -623,19 +636,17 @@
27010 if (noreverse)
27011 {
27012 printf (" Skipping patch.\n");
27013- skip_rest_of_patch = TRUE;
27014- r = 0;
27015+ skip_rest_of_patch = true;
27016 }
27017 else if (force)
27018 {
27019 if (verbosity != SILENT)
27020 printf (" Applying it anyway.\n");
27021- r = 0;
27022 }
27023 else if (batch)
27024 {
27025 say (reverse ? " Ignoring -R.\n" : " Assuming -R.\n");
27026- r = 1;
27027+ r = true;
27028 }
27029 else
27030 {
27031@@ -648,7 +659,7 @@
27032 {
27033 if (verbosity != SILENT)
27034 say ("Skipping patch.\n");
27035- skip_rest_of_patch = TRUE;
27036+ skip_rest_of_patch = true;
27037 }
27038 }
27039 }
27040@@ -711,7 +722,7 @@
27041 static sigset_t signals_to_block;
27042
27043 #if ! HAVE_SIGACTION
27044-static RETSIGTYPE fatal_exit_handler PARAMS ((int)) __attribute__ ((noreturn));
27045+static RETSIGTYPE fatal_exit_handler (int) __attribute__ ((noreturn));
27046 static RETSIGTYPE
27047 fatal_exit_handler (int sig)
27048 {
27049@@ -721,7 +732,7 @@
27050 #endif
27051
27052 void
27053-set_signals (int reset)
27054+set_signals (bool reset)
27055 {
27056 int i;
27057 #if HAVE_SIGACTION
27058@@ -743,7 +754,7 @@
27059 sigemptyset (&signals_to_block);
27060 for (i = 0; i < NUM_SIGS; i++)
27061 {
27062- int ignoring_signal;
27063+ bool ignoring_signal;
27064 #if HAVE_SIGACTION
27065 if (sigaction (sigs[i], (struct sigaction *) 0, &initial_act) != 0)
27066 continue;
27067@@ -939,7 +950,13 @@
27068 }
27069 else if (ISSPACE ((unsigned char) *t))
27070 {
27071+ /* Allow file names with internal spaces,
27072+ but only if a tab separates the file name from the date. */
27073 char const *u = t;
27074+ while (*u != '\t' && ISSPACE ((unsigned char) u[1]))
27075+ u++;
27076+ if (*u != '\t' && strchr (u + 1, '\t'))
27077+ continue;
27078
27079 if (set_time | set_utc)
27080 stamp = str2time (&u, initial_time,
27081diff -urNd -urNd patch-2.5.4/util.h patch-2.5.9/util.h
27082--- patch-2.5.4/util.h 1999-08-30 02:20:08.000000000 -0400
27083+++ patch-2.5.9/util.h 2003-05-20 09:56:48.000000000 -0400
27084@@ -1,6 +1,26 @@
27085 /* utility functions for `patch' */
27086
27087-/* $Id: util.h,v 1.17 1999/08/30 06:20:08 eggert Exp $ */
27088+/* $Id: util.h,v 1.20 2003/05/20 13:56:48 eggert Exp $ */
27089+
27090+/* Copyright (C) 1986 Larry Wall
27091+
27092+ Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
27093+ Software Foundation, Inc.
27094+
27095+ This program is free software; you can redistribute it and/or modify
27096+ it under the terms of the GNU General Public License as published by
27097+ the Free Software Foundation; either version 2, or (at your option)
27098+ any later version.
27099+
27100+ This program is distributed in the hope that it will be useful,
27101+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27102+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27103+ GNU General Public License for more details.
27104+
27105+ You should have received a copy of the GNU General Public License
27106+ along with this program; see the file COPYING.
27107+ If not, write to the Free Software Foundation,
27108+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
27109
27110 /* An upper bound on the print length of a signed decimal line number.
27111 Add one for the sign. */
27112@@ -8,32 +28,32 @@
27113
27114 XTERN enum backup_type backup_type;
27115
27116-int ok_to_reverse PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27117-void ask PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27118-void say PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27119+bool ok_to_reverse (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27120+void ask (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27121+void say (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27122
27123-void fatal PARAMS ((char const *, ...))
27124+void fatal (char const *, ...)
27125 __attribute__ ((noreturn, format (printf, 1, 2)));
27126-void pfatal PARAMS ((char const *, ...))
27127+void pfatal (char const *, ...)
27128 __attribute__ ((noreturn, format (printf, 1, 2)));
27129
27130-char *fetchname PARAMS ((char *, int, time_t *));
27131-char *savebuf PARAMS ((char const *, size_t));
27132-char *savestr PARAMS ((char const *));
27133-char const *version_controller PARAMS ((char const *, int, struct stat const *, char **, char **));
27134-int version_get PARAMS ((char const *, char const *, int, int, char const *, struct stat *));
27135-int create_file PARAMS ((char const *, int, mode_t));
27136-int systemic PARAMS ((char const *));
27137-char *format_linenum PARAMS ((char[LINENUM_LENGTH_BOUND + 1], LINENUM));
27138-void Fseek PARAMS ((FILE *, file_offset, int));
27139-void copy_file PARAMS ((char const *, char const *, int, mode_t));
27140-void exit_with_signal PARAMS ((int)) __attribute__ ((noreturn));
27141-void ignore_signals PARAMS ((void));
27142-void init_time PARAMS ((void));
27143-void memory_fatal PARAMS ((void)) __attribute__ ((noreturn));
27144-void move_file PARAMS ((char const *, int volatile *, char *, mode_t, int));
27145-void read_fatal PARAMS ((void)) __attribute__ ((noreturn));
27146-void remove_prefix PARAMS ((char *, size_t));
27147-void removedirs PARAMS ((char *));
27148-void set_signals PARAMS ((int));
27149-void write_fatal PARAMS ((void)) __attribute__ ((noreturn));
27150+char *fetchname (char *, int, time_t *);
27151+char *savebuf (char const *, size_t);
27152+char *savestr (char const *);
27153+char const *version_controller (char const *, bool, struct stat const *, char **, char **);
27154+bool version_get (char const *, char const *, bool, bool, char const *, struct stat *);
27155+int create_file (char const *, int, mode_t);
27156+int systemic (char const *);
27157+char *format_linenum (char[LINENUM_LENGTH_BOUND + 1], LINENUM);
27158+void Fseek (FILE *, file_offset, int);
27159+void copy_file (char const *, char const *, int, mode_t);
27160+void exit_with_signal (int) __attribute__ ((noreturn));
27161+void ignore_signals (void);
27162+void init_time (void);
27163+void memory_fatal (void) __attribute__ ((noreturn));
27164+void move_file (char const *, int volatile *, char *, mode_t, bool);
27165+void read_fatal (void) __attribute__ ((noreturn));
27166+void remove_prefix (char *, size_t);
27167+void removedirs (char *);
27168+void set_signals (bool);
27169+void write_fatal (void) __attribute__ ((noreturn));
27170diff -urNd -urNd patch-2.5.4/version.c patch-2.5.9/version.c
27171--- patch-2.5.4/version.c 1999-08-30 02:20:08.000000000 -0400
27172+++ patch-2.5.9/version.c 2003-05-18 04:25:17.000000000 -0400
27173@@ -1,17 +1,16 @@
27174 /* Print the version number. */
27175
27176-/* $Id: version.c,v 1.7 1999/08/30 06:20:08 eggert Exp $ */
27177+/* $Id: version.c,v 1.13 2003/05/18 08:25:17 eggert Exp $ */
27178
27179 #define XTERN extern
27180 #include <common.h>
27181 #undef XTERN
27182 #define XTERN
27183-#include <patchlevel.h>
27184 #include <version.h>
27185
27186 static char const copyright_string[] = "\
27187-Copyright 1984-1988 Larry Wall\n\
27188-Copyright 1989-1999 Free Software Foundation, Inc.";
27189+Copyright (C) 1988 Larry Wall\n\
27190+Copyright (C) 2003 Free Software Foundation, Inc.";
27191
27192 static char const free_software_msgid[] = "\
27193 This program comes with NO WARRANTY, to the extent permitted by law.\n\
27194@@ -25,6 +24,6 @@
27195 void
27196 version (void)
27197 {
27198- printf ("%s %s\n%s\n\n%s\n\n%s\n", program_name, PATCH_VERSION,
27199+ printf ("%s %s\n%s\n\n%s\n\n%s\n", PACKAGE_NAME, PACKAGE_VERSION,
27200 copyright_string, free_software_msgid, authorship_msgid);
27201 }
27202diff -urNd -urNd patch-2.5.4/version.h patch-2.5.9/version.h
27203--- patch-2.5.4/version.h 1997-04-06 21:07:00.000000000 -0400
27204+++ patch-2.5.9/version.h 2002-05-28 03:24:05.000000000 -0400
27205@@ -1,5 +1,5 @@
27206 /* Print the version number. */
27207
27208-/* $Id: version.h,v 1.3 1997/04/07 01:07:00 eggert Exp $ */
27209+/* $Id: version.h,v 1.5 2002/05/28 07:24:05 eggert Exp $ */
27210
27211-void version PARAMS ((void));
27212+void version (void);
27213diff -urNd -urNd patch-2.5.4/xalloc.h patch-2.5.9/xalloc.h
27214--- patch-2.5.4/xalloc.h 1999-01-01 12:36:43.000000000 -0500
27215+++ patch-2.5.9/xalloc.h 2000-10-31 02:09:56.000000000 -0500
27216@@ -1,5 +1,5 @@
27217 /* xalloc.h -- malloc with out-of-memory checking
27218- Copyright (C) 1990-1998, 1999 Free Software Foundation, Inc.
27219+ Copyright (C) 1990-1998, 1999, 2000 Free Software Foundation, Inc.
27220
27221 This program is free software; you can redistribute it and/or modify
27222 it under the terms of the GNU General Public License as published by
27223@@ -26,6 +26,16 @@
27224 # endif
27225 # endif
27226
27227+# ifndef __attribute__
27228+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
27229+# define __attribute__(x)
27230+# endif
27231+# endif
27232+
27233+# ifndef ATTRIBUTE_NORETURN
27234+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
27235+# endif
27236+
27237 /* Exit value when the requested amount of memory is not available.
27238 It is initialized to EXIT_FAILURE, but the caller may set it to
27239 some other value. */
27240@@ -33,20 +43,45 @@
27241
27242 /* If this pointer is non-zero, run the specified function upon each
27243 allocation failure. It is initialized to zero. */
27244-extern void (*xalloc_fail_func) ();
27245+extern void (*xalloc_fail_func) PARAMS ((void));
27246
27247 /* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
27248- message must be non-NULL. It is translated via gettext.
27249- The default value is "Memory exhausted". */
27250-extern char *const xalloc_msg_memory_exhausted;
27251+ message is output. It is translated via gettext.
27252+ Its value is "memory exhausted". */
27253+extern char const xalloc_msg_memory_exhausted[];
27254+
27255+/* This function is always triggered when memory is exhausted. It is
27256+ in charge of honoring the three previous items. This is the
27257+ function to call when one wants the program to die because of a
27258+ memory allocation failure. */
27259+extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
27260
27261 void *xmalloc PARAMS ((size_t n));
27262 void *xcalloc PARAMS ((size_t n, size_t s));
27263 void *xrealloc PARAMS ((void *p, size_t n));
27264+char *xstrdup PARAMS ((const char *str));
27265+
27266+# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
27267+# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
27268+# define XREALLOC(Ptr, Type, N_items) \
27269+ ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
27270+
27271+/* Declare and alloc memory for VAR of type TYPE. */
27272+# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
27273+
27274+/* Free VAR only if non NULL. */
27275+# define XFREE(Var) \
27276+ do { \
27277+ if (Var) \
27278+ free (Var); \
27279+ } while (0)
27280+
27281+/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
27282+# define CCLONE(Src, Num) \
27283+ (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
27284+
27285+/* Return a malloc'ed copy of SRC. */
27286+# define CLONE(Src) CCLONE (Src, 1)
27287
27288-# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
27289-# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
27290-# define XREALLOC(Ptr, Type, N_bytes) \
27291- ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
27292
27293 #endif /* !XALLOC_H_ */
27294diff -urNd -urNd patch-2.5.4/xmalloc.c patch-2.5.9/xmalloc.c
27295--- patch-2.5.4/xmalloc.c 1999-04-18 22:43:16.000000000 -0400
27296+++ patch-2.5.9/xmalloc.c 2002-11-21 14:16:29.000000000 -0500
27297@@ -1,5 +1,5 @@
27298 /* xmalloc.c -- malloc with out of memory checking
27299- Copyright (C) 1990-1997, 98, 99 Free Software Foundation, Inc.
27300+ Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
27301
27302 This program is free software; you can redistribute it and/or modify
27303 it under the terms of the GNU General Public License as published by
27304@@ -30,14 +30,9 @@
27305 void free ();
27306 #endif
27307
27308-#if ENABLE_NLS
27309-# include <libintl.h>
27310-# define _(Text) gettext (Text)
27311-#else
27312-# define textdomain(Domain)
27313-# define _(Text) Text
27314-#endif
27315-#define N_(Text) Text
27316+#include "gettext.h"
27317+#define _(msgid) gettext (msgid)
27318+#define N_(msgid) msgid
27319
27320 #include "error.h"
27321 #include "xalloc.h"
27322@@ -46,12 +41,14 @@
27323 # define EXIT_FAILURE 1
27324 #endif
27325
27326-#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
27327-you must run the autoconf test for a properly working malloc -- see malloc.m4
27328+/* The following tests require AC_PREREQ(2.54). */
27329+
27330+#ifndef HAVE_MALLOC
27331+"you must run the autoconf test for a GNU libc compatible malloc"
27332 #endif
27333
27334-#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
27335-you must run the autoconf test for a properly working realloc -- see realloc.m4
27336+#ifndef HAVE_REALLOC
27337+"you must run the autoconf test for a GNU libc compatible realloc"
27338 #endif
27339
27340 /* Exit value when the requested amount of memory is not available.
27341@@ -59,18 +56,22 @@
27342 int xalloc_exit_failure = EXIT_FAILURE;
27343
27344 /* If non NULL, call this function when memory is exhausted. */
27345-void (*xalloc_fail_func) () = 0;
27346+void (*xalloc_fail_func) PARAMS ((void)) = 0;
27347
27348 /* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
27349 before exiting when memory is exhausted. Goes through gettext. */
27350-char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
27351+char const xalloc_msg_memory_exhausted[] = N_("memory exhausted");
27352
27353-static void
27354-xalloc_fail (void)
27355+void
27356+xalloc_die (void)
27357 {
27358 if (xalloc_fail_func)
27359 (*xalloc_fail_func) ();
27360 error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
27361+ /* The `noreturn' cannot be given to error, since it may return if
27362+ its first argument is 0. To help compilers understand the
27363+ xalloc_die does terminate, call exit. */
27364+ exit (EXIT_FAILURE);
27365 }
27366
27367 /* Allocate N bytes of memory dynamically, with error checking. */
27368@@ -82,20 +83,19 @@
27369
27370 p = malloc (n);
27371 if (p == 0)
27372- xalloc_fail ();
27373+ xalloc_die ();
27374 return p;
27375 }
27376
27377 /* Change the size of an allocated block of memory P to N bytes,
27378- with error checking.
27379- If P is NULL, run xmalloc. */
27380+ with error checking. */
27381
27382 void *
27383 xrealloc (void *p, size_t n)
27384 {
27385 p = realloc (p, n);
27386 if (p == 0)
27387- xalloc_fail ();
27388+ xalloc_die ();
27389 return p;
27390 }
27391
27392@@ -108,6 +108,6 @@
27393
27394 p = calloc (n, s);
27395 if (p == 0)
27396- xalloc_fail ();
27397+ xalloc_die ();
27398 return p;
27399 }
diff --git a/meta/recipes-devtools/patch/patch-2.5.9/debian.patch b/meta/recipes-devtools/patch/patch-2.5.9/debian.patch
new file mode 100644
index 0000000000..460185827e
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/debian.patch
@@ -0,0 +1,10424 @@
1--- patch-2.5.9.orig/m4/hash.m4
2+++ patch-2.5.9/m4/hash.m4
3@@ -0,0 +1,15 @@
4+# hash.m4 serial 1
5+dnl Copyright (C) 2002 Free Software Foundation, Inc.
6+dnl This file is free software, distributed under the terms of the GNU
7+dnl General Public License. As a special exception to the GNU General
8+dnl Public License, this file may be distributed as part of a program
9+dnl that contains a configuration script generated by Autoconf, under
10+dnl the same distribution terms as the rest of that program.
11+
12+AC_DEFUN([gl_HASH],
13+[
14+ dnl Prerequisites of lib/hash.c.
15+ AC_CHECK_HEADERS_ONCE(stdlib.h)
16+ AC_HEADER_STDBOOL
17+ AC_CHECK_DECLS_ONCE(free malloc)
18+])
19--- patch-2.5.9.orig/m4/nanosecond_stat.m4
20+++ patch-2.5.9/m4/nanosecond_stat.m4
21@@ -0,0 +1,35 @@
22+AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
23+ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
24+ [ac_cv_stat_nsec],
25+ [AC_TRY_COMPILE(
26+ [
27+ #include <sys/types.h>
28+ #include <sys/stat.h>
29+ #include <unistd.h>
30+ struct stat st;
31+ ],
32+ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
33+ [ac_cv_stat_nsec=yes],
34+ [ac_cv_stat_nsec=no])
35+ ])
36+ if test $ac_cv_stat_nsec = yes; then
37+ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
38+ fi
39+
40+ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
41+ [ac_cv_stat_timeval],
42+ [AC_TRY_COMPILE(
43+ [
44+ #include <time.h>
45+ #include <sys/types.h>
46+ #include <sys/stat.h>
47+ #include <unistd.h>
48+ struct stat st;
49+ ],
50+ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
51+ [ac_cv_stat_timeval=yes],
52+ [ac_cv_stat_timeval=no])
53+ ])
54+ if test $ac_cv_stat_timeval = yes; then
55+ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
56+ fi])
57--- patch-2.5.9.orig/Makefile.in
58+++ patch-2.5.9/Makefile.in
59@@ -62,7 +62,7 @@
60 SHELL = /bin/sh
61
62 LIBSRCS = error.c malloc.c memchr.c mkdir.c \
63- realloc.c rmdir.c strcasecmp.c strncasecmp.c
64+ realloc.c rmdir.c strcasecmp.c strncasecmp.c hash.c
65 SRCS = $(LIBSRCS) \
66 addext.c argmatch.c backupfile.c \
67 basename.c dirname.c \
68@@ -78,12 +78,12 @@
69 maketime.$(OBJEXT) partime.$(OBJEXT) \
70 patch.$(OBJEXT) pch.$(OBJEXT) \
71 quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
72- util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
73+ util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT) hash.$(OBJEXT)
74 HDRS = argmatch.h backupfile.h common.h dirname.h \
75 error.h getopt.h gettext.h \
76 inp.h maketime.h partime.h pch.h \
77 quote.h quotearg.h quotesys.h \
78- unlocked-io.h util.h version.h xalloc.h
79+ unlocked-io.h util.h version.h xalloc.h hash.h
80 MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
81 aclocal.m4 \
82 config.hin configure configure.ac \
83--- patch-2.5.9.orig/aclocal.m4
84+++ patch-2.5.9/aclocal.m4
85@@ -1,3 +1,1058 @@
86+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
87+
88+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
89+dnl This file is free software; the Free Software Foundation
90+dnl gives unlimited permission to copy and/or distribute it,
91+dnl with or without modifications, as long as this notice is preserved.
92+
93+dnl This program is distributed in the hope that it will be useful,
94+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
95+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
96+dnl PARTICULAR PURPOSE.
97+
98+# lib-prefix.m4 serial 3 (gettext-0.13)
99+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
100+dnl This file is free software, distributed under the terms of the GNU
101+dnl General Public License. As a special exception to the GNU General
102+dnl Public License, this file may be distributed as part of a program
103+dnl that contains a configuration script generated by Autoconf, under
104+dnl the same distribution terms as the rest of that program.
105+
106+dnl From Bruno Haible.
107+
108+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
109+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
110+dnl require excessive bracketing.
111+ifdef([AC_HELP_STRING],
112+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
113+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
114+
115+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
116+dnl to access previously installed libraries. The basic assumption is that
117+dnl a user will want packages to use other packages he previously installed
118+dnl with the same --prefix option.
119+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
120+dnl libraries, but is otherwise very convenient.
121+AC_DEFUN([AC_LIB_PREFIX],
122+[
123+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
124+ AC_REQUIRE([AC_PROG_CC])
125+ AC_REQUIRE([AC_CANONICAL_HOST])
126+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
127+ dnl By default, look in $includedir and $libdir.
128+ use_additional=yes
129+ AC_LIB_WITH_FINAL_PREFIX([
130+ eval additional_includedir=\"$includedir\"
131+ eval additional_libdir=\"$libdir\"
132+ ])
133+ AC_LIB_ARG_WITH([lib-prefix],
134+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
135+ --without-lib-prefix don't search for libraries in includedir and libdir],
136+[
137+ if test "X$withval" = "Xno"; then
138+ use_additional=no
139+ else
140+ if test "X$withval" = "X"; then
141+ AC_LIB_WITH_FINAL_PREFIX([
142+ eval additional_includedir=\"$includedir\"
143+ eval additional_libdir=\"$libdir\"
144+ ])
145+ else
146+ additional_includedir="$withval/include"
147+ additional_libdir="$withval/lib"
148+ fi
149+ fi
150+])
151+ if test $use_additional = yes; then
152+ dnl Potentially add $additional_includedir to $CPPFLAGS.
153+ dnl But don't add it
154+ dnl 1. if it's the standard /usr/include,
155+ dnl 2. if it's already present in $CPPFLAGS,
156+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
157+ dnl 4. if it doesn't exist as a directory.
158+ if test "X$additional_includedir" != "X/usr/include"; then
159+ haveit=
160+ for x in $CPPFLAGS; do
161+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
162+ if test "X$x" = "X-I$additional_includedir"; then
163+ haveit=yes
164+ break
165+ fi
166+ done
167+ if test -z "$haveit"; then
168+ if test "X$additional_includedir" = "X/usr/local/include"; then
169+ if test -n "$GCC"; then
170+ case $host_os in
171+ linux*) haveit=yes;;
172+ esac
173+ fi
174+ fi
175+ if test -z "$haveit"; then
176+ if test -d "$additional_includedir"; then
177+ dnl Really add $additional_includedir to $CPPFLAGS.
178+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
179+ fi
180+ fi
181+ fi
182+ fi
183+ dnl Potentially add $additional_libdir to $LDFLAGS.
184+ dnl But don't add it
185+ dnl 1. if it's the standard /usr/lib,
186+ dnl 2. if it's already present in $LDFLAGS,
187+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
188+ dnl 4. if it doesn't exist as a directory.
189+ if test "X$additional_libdir" != "X/usr/lib"; then
190+ haveit=
191+ for x in $LDFLAGS; do
192+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
193+ if test "X$x" = "X-L$additional_libdir"; then
194+ haveit=yes
195+ break
196+ fi
197+ done
198+ if test -z "$haveit"; then
199+ if test "X$additional_libdir" = "X/usr/local/lib"; then
200+ if test -n "$GCC"; then
201+ case $host_os in
202+ linux*) haveit=yes;;
203+ esac
204+ fi
205+ fi
206+ if test -z "$haveit"; then
207+ if test -d "$additional_libdir"; then
208+ dnl Really add $additional_libdir to $LDFLAGS.
209+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
210+ fi
211+ fi
212+ fi
213+ fi
214+ fi
215+])
216+
217+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
218+dnl acl_final_exec_prefix, containing the values to which $prefix and
219+dnl $exec_prefix will expand at the end of the configure script.
220+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
221+[
222+ dnl Unfortunately, prefix and exec_prefix get only finally determined
223+ dnl at the end of configure.
224+ if test "X$prefix" = "XNONE"; then
225+ acl_final_prefix="$ac_default_prefix"
226+ else
227+ acl_final_prefix="$prefix"
228+ fi
229+ if test "X$exec_prefix" = "XNONE"; then
230+ acl_final_exec_prefix='${prefix}'
231+ else
232+ acl_final_exec_prefix="$exec_prefix"
233+ fi
234+ acl_save_prefix="$prefix"
235+ prefix="$acl_final_prefix"
236+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
237+ prefix="$acl_save_prefix"
238+])
239+
240+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
241+dnl variables prefix and exec_prefix bound to the values they will have
242+dnl at the end of the configure script.
243+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
244+[
245+ acl_save_prefix="$prefix"
246+ prefix="$acl_final_prefix"
247+ acl_save_exec_prefix="$exec_prefix"
248+ exec_prefix="$acl_final_exec_prefix"
249+ $1
250+ exec_prefix="$acl_save_exec_prefix"
251+ prefix="$acl_save_prefix"
252+])
253+
254+# lib-link.m4 serial 4 (gettext-0.12)
255+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
256+dnl This file is free software, distributed under the terms of the GNU
257+dnl General Public License. As a special exception to the GNU General
258+dnl Public License, this file may be distributed as part of a program
259+dnl that contains a configuration script generated by Autoconf, under
260+dnl the same distribution terms as the rest of that program.
261+
262+dnl From Bruno Haible.
263+
264+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
265+dnl the libraries corresponding to explicit and implicit dependencies.
266+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
267+dnl augments the CPPFLAGS variable.
268+AC_DEFUN([AC_LIB_LINKFLAGS],
269+[
270+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
271+ AC_REQUIRE([AC_LIB_RPATH])
272+ define([Name],[translit([$1],[./-], [___])])
273+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
274+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
275+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
276+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
277+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
278+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
279+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
280+ ])
281+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
282+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
283+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
284+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
285+ AC_SUBST([LIB]NAME)
286+ AC_SUBST([LTLIB]NAME)
287+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
288+ dnl results of this search when this library appears as a dependency.
289+ HAVE_LIB[]NAME=yes
290+ undefine([Name])
291+ undefine([NAME])
292+])
293+
294+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
295+dnl searches for libname and the libraries corresponding to explicit and
296+dnl implicit dependencies, together with the specified include files and
297+dnl the ability to compile and link the specified testcode. If found, it
298+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
299+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
300+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
301+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
302+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
303+[
304+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
305+ AC_REQUIRE([AC_LIB_RPATH])
306+ define([Name],[translit([$1],[./-], [___])])
307+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
308+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
309+
310+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
311+ dnl accordingly.
312+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
313+
314+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
315+ dnl because if the user has installed lib[]Name and not disabled its use
316+ dnl via --without-lib[]Name-prefix, he wants to use it.
317+ ac_save_CPPFLAGS="$CPPFLAGS"
318+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
319+
320+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
321+ ac_save_LIBS="$LIBS"
322+ LIBS="$LIBS $LIB[]NAME"
323+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
324+ LIBS="$ac_save_LIBS"
325+ ])
326+ if test "$ac_cv_lib[]Name" = yes; then
327+ HAVE_LIB[]NAME=yes
328+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
329+ AC_MSG_CHECKING([how to link with lib[]$1])
330+ AC_MSG_RESULT([$LIB[]NAME])
331+ else
332+ HAVE_LIB[]NAME=no
333+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
334+ dnl $INC[]NAME either.
335+ CPPFLAGS="$ac_save_CPPFLAGS"
336+ LIB[]NAME=
337+ LTLIB[]NAME=
338+ fi
339+ AC_SUBST([HAVE_LIB]NAME)
340+ AC_SUBST([LIB]NAME)
341+ AC_SUBST([LTLIB]NAME)
342+ undefine([Name])
343+ undefine([NAME])
344+])
345+
346+dnl Determine the platform dependent parameters needed to use rpath:
347+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
348+dnl hardcode_direct, hardcode_minus_L.
349+AC_DEFUN([AC_LIB_RPATH],
350+[
351+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
352+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
353+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
354+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
355+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
356+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
357+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
358+ . ./conftest.sh
359+ rm -f ./conftest.sh
360+ acl_cv_rpath=done
361+ ])
362+ wl="$acl_cv_wl"
363+ libext="$acl_cv_libext"
364+ shlibext="$acl_cv_shlibext"
365+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
366+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
367+ hardcode_direct="$acl_cv_hardcode_direct"
368+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
369+ dnl Determine whether the user wants rpath handling at all.
370+ AC_ARG_ENABLE(rpath,
371+ [ --disable-rpath do not hardcode runtime library paths],
372+ :, enable_rpath=yes)
373+])
374+
375+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
376+dnl the libraries corresponding to explicit and implicit dependencies.
377+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
378+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
379+[
380+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
381+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
382+ dnl By default, look in $includedir and $libdir.
383+ use_additional=yes
384+ AC_LIB_WITH_FINAL_PREFIX([
385+ eval additional_includedir=\"$includedir\"
386+ eval additional_libdir=\"$libdir\"
387+ ])
388+ AC_LIB_ARG_WITH([lib$1-prefix],
389+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
390+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
391+[
392+ if test "X$withval" = "Xno"; then
393+ use_additional=no
394+ else
395+ if test "X$withval" = "X"; then
396+ AC_LIB_WITH_FINAL_PREFIX([
397+ eval additional_includedir=\"$includedir\"
398+ eval additional_libdir=\"$libdir\"
399+ ])
400+ else
401+ additional_includedir="$withval/include"
402+ additional_libdir="$withval/lib"
403+ fi
404+ fi
405+])
406+ dnl Search the library and its dependencies in $additional_libdir and
407+ dnl $LDFLAGS. Using breadth-first-seach.
408+ LIB[]NAME=
409+ LTLIB[]NAME=
410+ INC[]NAME=
411+ rpathdirs=
412+ ltrpathdirs=
413+ names_already_handled=
414+ names_next_round='$1 $2'
415+ while test -n "$names_next_round"; do
416+ names_this_round="$names_next_round"
417+ names_next_round=
418+ for name in $names_this_round; do
419+ already_handled=
420+ for n in $names_already_handled; do
421+ if test "$n" = "$name"; then
422+ already_handled=yes
423+ break
424+ fi
425+ done
426+ if test -z "$already_handled"; then
427+ names_already_handled="$names_already_handled $name"
428+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
429+ dnl or AC_LIB_HAVE_LINKFLAGS call.
430+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
431+ eval value=\"\$HAVE_LIB$uppername\"
432+ if test -n "$value"; then
433+ if test "$value" = yes; then
434+ eval value=\"\$LIB$uppername\"
435+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
436+ eval value=\"\$LTLIB$uppername\"
437+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
438+ else
439+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
440+ dnl that this library doesn't exist. So just drop it.
441+ :
442+ fi
443+ else
444+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
445+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
446+ found_dir=
447+ found_la=
448+ found_so=
449+ found_a=
450+ if test $use_additional = yes; then
451+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
452+ found_dir="$additional_libdir"
453+ found_so="$additional_libdir/lib$name.$shlibext"
454+ if test -f "$additional_libdir/lib$name.la"; then
455+ found_la="$additional_libdir/lib$name.la"
456+ fi
457+ else
458+ if test -f "$additional_libdir/lib$name.$libext"; then
459+ found_dir="$additional_libdir"
460+ found_a="$additional_libdir/lib$name.$libext"
461+ if test -f "$additional_libdir/lib$name.la"; then
462+ found_la="$additional_libdir/lib$name.la"
463+ fi
464+ fi
465+ fi
466+ fi
467+ if test "X$found_dir" = "X"; then
468+ for x in $LDFLAGS $LTLIB[]NAME; do
469+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
470+ case "$x" in
471+ -L*)
472+ dir=`echo "X$x" | sed -e 's/^X-L//'`
473+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
474+ found_dir="$dir"
475+ found_so="$dir/lib$name.$shlibext"
476+ if test -f "$dir/lib$name.la"; then
477+ found_la="$dir/lib$name.la"
478+ fi
479+ else
480+ if test -f "$dir/lib$name.$libext"; then
481+ found_dir="$dir"
482+ found_a="$dir/lib$name.$libext"
483+ if test -f "$dir/lib$name.la"; then
484+ found_la="$dir/lib$name.la"
485+ fi
486+ fi
487+ fi
488+ ;;
489+ esac
490+ if test "X$found_dir" != "X"; then
491+ break
492+ fi
493+ done
494+ fi
495+ if test "X$found_dir" != "X"; then
496+ dnl Found the library.
497+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
498+ if test "X$found_so" != "X"; then
499+ dnl Linking with a shared library. We attempt to hardcode its
500+ dnl directory into the executable's runpath, unless it's the
501+ dnl standard /usr/lib.
502+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
503+ dnl No hardcoding is needed.
504+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
505+ else
506+ dnl Use an explicit option to hardcode DIR into the resulting
507+ dnl binary.
508+ dnl Potentially add DIR to ltrpathdirs.
509+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
510+ haveit=
511+ for x in $ltrpathdirs; do
512+ if test "X$x" = "X$found_dir"; then
513+ haveit=yes
514+ break
515+ fi
516+ done
517+ if test -z "$haveit"; then
518+ ltrpathdirs="$ltrpathdirs $found_dir"
519+ fi
520+ dnl The hardcoding into $LIBNAME is system dependent.
521+ if test "$hardcode_direct" = yes; then
522+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
523+ dnl resulting binary.
524+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
525+ else
526+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
527+ dnl Use an explicit option to hardcode DIR into the resulting
528+ dnl binary.
529+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
530+ dnl Potentially add DIR to rpathdirs.
531+ dnl The rpathdirs will be appended to $LIBNAME at the end.
532+ haveit=
533+ for x in $rpathdirs; do
534+ if test "X$x" = "X$found_dir"; then
535+ haveit=yes
536+ break
537+ fi
538+ done
539+ if test -z "$haveit"; then
540+ rpathdirs="$rpathdirs $found_dir"
541+ fi
542+ else
543+ dnl Rely on "-L$found_dir".
544+ dnl But don't add it if it's already contained in the LDFLAGS
545+ dnl or the already constructed $LIBNAME
546+ haveit=
547+ for x in $LDFLAGS $LIB[]NAME; do
548+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
549+ if test "X$x" = "X-L$found_dir"; then
550+ haveit=yes
551+ break
552+ fi
553+ done
554+ if test -z "$haveit"; then
555+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
556+ fi
557+ if test "$hardcode_minus_L" != no; then
558+ dnl FIXME: Not sure whether we should use
559+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
560+ dnl here.
561+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
562+ else
563+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
564+ dnl here, because this doesn't fit in flags passed to the
565+ dnl compiler. So give up. No hardcoding. This affects only
566+ dnl very old systems.
567+ dnl FIXME: Not sure whether we should use
568+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
569+ dnl here.
570+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
571+ fi
572+ fi
573+ fi
574+ fi
575+ else
576+ if test "X$found_a" != "X"; then
577+ dnl Linking with a static library.
578+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
579+ else
580+ dnl We shouldn't come here, but anyway it's good to have a
581+ dnl fallback.
582+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
583+ fi
584+ fi
585+ dnl Assume the include files are nearby.
586+ additional_includedir=
587+ case "$found_dir" in
588+ */lib | */lib/)
589+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
590+ additional_includedir="$basedir/include"
591+ ;;
592+ esac
593+ if test "X$additional_includedir" != "X"; then
594+ dnl Potentially add $additional_includedir to $INCNAME.
595+ dnl But don't add it
596+ dnl 1. if it's the standard /usr/include,
597+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
598+ dnl 3. if it's already present in $CPPFLAGS or the already
599+ dnl constructed $INCNAME,
600+ dnl 4. if it doesn't exist as a directory.
601+ if test "X$additional_includedir" != "X/usr/include"; then
602+ haveit=
603+ if test "X$additional_includedir" = "X/usr/local/include"; then
604+ if test -n "$GCC"; then
605+ case $host_os in
606+ linux*) haveit=yes;;
607+ esac
608+ fi
609+ fi
610+ if test -z "$haveit"; then
611+ for x in $CPPFLAGS $INC[]NAME; do
612+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
613+ if test "X$x" = "X-I$additional_includedir"; then
614+ haveit=yes
615+ break
616+ fi
617+ done
618+ if test -z "$haveit"; then
619+ if test -d "$additional_includedir"; then
620+ dnl Really add $additional_includedir to $INCNAME.
621+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
622+ fi
623+ fi
624+ fi
625+ fi
626+ fi
627+ dnl Look for dependencies.
628+ if test -n "$found_la"; then
629+ dnl Read the .la file. It defines the variables
630+ dnl dlname, library_names, old_library, dependency_libs, current,
631+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
632+ save_libdir="$libdir"
633+ case "$found_la" in
634+ */* | *\\*) . "$found_la" ;;
635+ *) . "./$found_la" ;;
636+ esac
637+ libdir="$save_libdir"
638+ dnl We use only dependency_libs.
639+ for dep in $dependency_libs; do
640+ case "$dep" in
641+ -L*)
642+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
643+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
644+ dnl But don't add it
645+ dnl 1. if it's the standard /usr/lib,
646+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
647+ dnl 3. if it's already present in $LDFLAGS or the already
648+ dnl constructed $LIBNAME,
649+ dnl 4. if it doesn't exist as a directory.
650+ if test "X$additional_libdir" != "X/usr/lib"; then
651+ haveit=
652+ if test "X$additional_libdir" = "X/usr/local/lib"; then
653+ if test -n "$GCC"; then
654+ case $host_os in
655+ linux*) haveit=yes;;
656+ esac
657+ fi
658+ fi
659+ if test -z "$haveit"; then
660+ haveit=
661+ for x in $LDFLAGS $LIB[]NAME; do
662+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
663+ if test "X$x" = "X-L$additional_libdir"; then
664+ haveit=yes
665+ break
666+ fi
667+ done
668+ if test -z "$haveit"; then
669+ if test -d "$additional_libdir"; then
670+ dnl Really add $additional_libdir to $LIBNAME.
671+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
672+ fi
673+ fi
674+ haveit=
675+ for x in $LDFLAGS $LTLIB[]NAME; do
676+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
677+ if test "X$x" = "X-L$additional_libdir"; then
678+ haveit=yes
679+ break
680+ fi
681+ done
682+ if test -z "$haveit"; then
683+ if test -d "$additional_libdir"; then
684+ dnl Really add $additional_libdir to $LTLIBNAME.
685+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
686+ fi
687+ fi
688+ fi
689+ fi
690+ ;;
691+ -R*)
692+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
693+ if test "$enable_rpath" != no; then
694+ dnl Potentially add DIR to rpathdirs.
695+ dnl The rpathdirs will be appended to $LIBNAME at the end.
696+ haveit=
697+ for x in $rpathdirs; do
698+ if test "X$x" = "X$dir"; then
699+ haveit=yes
700+ break
701+ fi
702+ done
703+ if test -z "$haveit"; then
704+ rpathdirs="$rpathdirs $dir"
705+ fi
706+ dnl Potentially add DIR to ltrpathdirs.
707+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
708+ haveit=
709+ for x in $ltrpathdirs; do
710+ if test "X$x" = "X$dir"; then
711+ haveit=yes
712+ break
713+ fi
714+ done
715+ if test -z "$haveit"; then
716+ ltrpathdirs="$ltrpathdirs $dir"
717+ fi
718+ fi
719+ ;;
720+ -l*)
721+ dnl Handle this in the next round.
722+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
723+ ;;
724+ *.la)
725+ dnl Handle this in the next round. Throw away the .la's
726+ dnl directory; it is already contained in a preceding -L
727+ dnl option.
728+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
729+ ;;
730+ *)
731+ dnl Most likely an immediate library name.
732+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
733+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
734+ ;;
735+ esac
736+ done
737+ fi
738+ else
739+ dnl Didn't find the library; assume it is in the system directories
740+ dnl known to the linker and runtime loader. (All the system
741+ dnl directories known to the linker should also be known to the
742+ dnl runtime loader, otherwise the system is severely misconfigured.)
743+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
744+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
745+ fi
746+ fi
747+ fi
748+ done
749+ done
750+ if test "X$rpathdirs" != "X"; then
751+ if test -n "$hardcode_libdir_separator"; then
752+ dnl Weird platform: only the last -rpath option counts, the user must
753+ dnl pass all path elements in one option. We can arrange that for a
754+ dnl single library, but not when more than one $LIBNAMEs are used.
755+ alldirs=
756+ for found_dir in $rpathdirs; do
757+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
758+ done
759+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
760+ acl_save_libdir="$libdir"
761+ libdir="$alldirs"
762+ eval flag=\"$hardcode_libdir_flag_spec\"
763+ libdir="$acl_save_libdir"
764+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
765+ else
766+ dnl The -rpath options are cumulative.
767+ for found_dir in $rpathdirs; do
768+ acl_save_libdir="$libdir"
769+ libdir="$found_dir"
770+ eval flag=\"$hardcode_libdir_flag_spec\"
771+ libdir="$acl_save_libdir"
772+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
773+ done
774+ fi
775+ fi
776+ if test "X$ltrpathdirs" != "X"; then
777+ dnl When using libtool, the option that works for both libraries and
778+ dnl executables is -R. The -R options are cumulative.
779+ for found_dir in $ltrpathdirs; do
780+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
781+ done
782+ fi
783+])
784+
785+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
786+dnl unless already present in VAR.
787+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
788+dnl contains two or three consecutive elements that belong together.
789+AC_DEFUN([AC_LIB_APPENDTOVAR],
790+[
791+ for element in [$2]; do
792+ haveit=
793+ for x in $[$1]; do
794+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
795+ if test "X$x" = "X$element"; then
796+ haveit=yes
797+ break
798+ fi
799+ done
800+ if test -z "$haveit"; then
801+ [$1]="${[$1]}${[$1]:+ }$element"
802+ fi
803+ done
804+])
805+
806+# lib-ld.m4 serial 3 (gettext-0.13)
807+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
808+dnl This file is free software, distributed under the terms of the GNU
809+dnl General Public License. As a special exception to the GNU General
810+dnl Public License, this file may be distributed as part of a program
811+dnl that contains a configuration script generated by Autoconf, under
812+dnl the same distribution terms as the rest of that program.
813+
814+dnl Subroutines of libtool.m4,
815+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
816+dnl with libtool.m4.
817+
818+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
819+AC_DEFUN([AC_LIB_PROG_LD_GNU],
820+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
821+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
822+case `$LD -v 2>&1 </dev/null` in
823+*GNU* | *'with BFD'*)
824+ acl_cv_prog_gnu_ld=yes ;;
825+*)
826+ acl_cv_prog_gnu_ld=no ;;
827+esac])
828+with_gnu_ld=$acl_cv_prog_gnu_ld
829+])
830+
831+dnl From libtool-1.4. Sets the variable LD.
832+AC_DEFUN([AC_LIB_PROG_LD],
833+[AC_ARG_WITH(gnu-ld,
834+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
835+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
836+AC_REQUIRE([AC_PROG_CC])dnl
837+AC_REQUIRE([AC_CANONICAL_HOST])dnl
838+# Prepare PATH_SEPARATOR.
839+# The user is always right.
840+if test "${PATH_SEPARATOR+set}" != set; then
841+ echo "#! /bin/sh" >conf$$.sh
842+ echo "exit 0" >>conf$$.sh
843+ chmod +x conf$$.sh
844+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
845+ PATH_SEPARATOR=';'
846+ else
847+ PATH_SEPARATOR=:
848+ fi
849+ rm -f conf$$.sh
850+fi
851+ac_prog=ld
852+if test "$GCC" = yes; then
853+ # Check if gcc -print-prog-name=ld gives a path.
854+ AC_MSG_CHECKING([for ld used by GCC])
855+ case $host in
856+ *-*-mingw*)
857+ # gcc leaves a trailing carriage return which upsets mingw
858+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
859+ *)
860+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
861+ esac
862+ case $ac_prog in
863+ # Accept absolute paths.
864+ [[\\/]* | [A-Za-z]:[\\/]*)]
865+ [re_direlt='/[^/][^/]*/\.\./']
866+ # Canonicalize the path of ld
867+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
868+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
869+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
870+ done
871+ test -z "$LD" && LD="$ac_prog"
872+ ;;
873+ "")
874+ # If it fails, then pretend we aren't using GCC.
875+ ac_prog=ld
876+ ;;
877+ *)
878+ # If it is relative, then search for the first ld in PATH.
879+ with_gnu_ld=unknown
880+ ;;
881+ esac
882+elif test "$with_gnu_ld" = yes; then
883+ AC_MSG_CHECKING([for GNU ld])
884+else
885+ AC_MSG_CHECKING([for non-GNU ld])
886+fi
887+AC_CACHE_VAL(acl_cv_path_LD,
888+[if test -z "$LD"; then
889+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
890+ for ac_dir in $PATH; do
891+ test -z "$ac_dir" && ac_dir=.
892+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
893+ acl_cv_path_LD="$ac_dir/$ac_prog"
894+ # Check to see if the program is GNU ld. I'd rather use --version,
895+ # but apparently some GNU ld's only accept -v.
896+ # Break only if it was the GNU/non-GNU ld that we prefer.
897+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
898+ *GNU* | *'with BFD'*)
899+ test "$with_gnu_ld" != no && break ;;
900+ *)
901+ test "$with_gnu_ld" != yes && break ;;
902+ esac
903+ fi
904+ done
905+ IFS="$ac_save_ifs"
906+else
907+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
908+fi])
909+LD="$acl_cv_path_LD"
910+if test -n "$LD"; then
911+ AC_MSG_RESULT($LD)
912+else
913+ AC_MSG_RESULT(no)
914+fi
915+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
916+AC_LIB_PROG_LD_GNU
917+])
918+
919+# isc-posix.m4 serial 2 (gettext-0.11.2)
920+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
921+dnl This file is free software, distributed under the terms of the GNU
922+dnl General Public License. As a special exception to the GNU General
923+dnl Public License, this file may be distributed as part of a program
924+dnl that contains a configuration script generated by Autoconf, under
925+dnl the same distribution terms as the rest of that program.
926+
927+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
928+
929+# This test replaces the one in autoconf.
930+# Currently this macro should have the same name as the autoconf macro
931+# because gettext's gettext.m4 (distributed in the automake package)
932+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
933+# give these diagnostics:
934+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
935+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
936+
937+undefine([AC_ISC_POSIX])
938+
939+AC_DEFUN([AC_ISC_POSIX],
940+ [
941+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
942+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
943+ ]
944+)
945+
946+# Check for stdbool.h that conforms to C99.
947+
948+# Copyright (C) 2002-2003 Free Software Foundation, Inc.
949+
950+# This program is free software; you can redistribute it and/or modify
951+# it under the terms of the GNU General Public License as published by
952+# the Free Software Foundation; either version 2, or (at your option)
953+# any later version.
954+
955+# This program is distributed in the hope that it will be useful,
956+# but WITHOUT ANY WARRANTY; without even the implied warranty of
957+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
958+# GNU General Public License for more details.
959+
960+# You should have received a copy of the GNU General Public License
961+# along with this program; if not, write to the Free Software
962+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
963+# 02111-1307, USA.
964+
965+# Prepare for substituting <stdbool.h> if it is not supported.
966+
967+AC_DEFUN([AM_STDBOOL_H],
968+[
969+ AC_REQUIRE([AC_HEADER_STDBOOL])
970+
971+ # Define two additional variables used in the Makefile substitution.
972+
973+ if test "$ac_cv_header_stdbool_h" = yes; then
974+ STDBOOL_H=''
975+ else
976+ STDBOOL_H='stdbool.h'
977+ fi
978+ AC_SUBST([STDBOOL_H])
979+
980+ if test "$ac_cv_type__Bool" = yes; then
981+ HAVE__BOOL=1
982+ else
983+ HAVE__BOOL=0
984+ fi
985+ AC_SUBST([HAVE__BOOL])
986+])
987+
988+# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
989+# have this macro built-in.
990+
991+AC_DEFUN([AC_HEADER_STDBOOL],
992+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
993+ [ac_cv_header_stdbool_h],
994+ [AC_TRY_COMPILE(
995+ [
996+ #include <stdbool.h>
997+ #ifndef bool
998+ "error: bool is not defined"
999+ #endif
1000+ #ifndef false
1001+ "error: false is not defined"
1002+ #endif
1003+ #if false
1004+ "error: false is not 0"
1005+ #endif
1006+ #ifndef true
1007+ "error: false is not defined"
1008+ #endif
1009+ #if true != 1
1010+ "error: true is not 1"
1011+ #endif
1012+ #ifndef __bool_true_false_are_defined
1013+ "error: __bool_true_false_are_defined is not defined"
1014+ #endif
1015+
1016+ struct s { _Bool s: 1; _Bool t; } s;
1017+
1018+ char a[true == 1 ? 1 : -1];
1019+ char b[false == 0 ? 1 : -1];
1020+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
1021+ char d[(bool) -0.5 == true ? 1 : -1];
1022+ bool e = &s;
1023+ char f[(_Bool) -0.0 == false ? 1 : -1];
1024+ char g[true];
1025+ char h[sizeof (_Bool)];
1026+ char i[sizeof s.t];
1027+ ],
1028+ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
1029+ [ac_cv_header_stdbool_h=yes],
1030+ [ac_cv_header_stdbool_h=no])])
1031+ AC_CHECK_TYPES([_Bool])
1032+ if test $ac_cv_header_stdbool_h = yes; then
1033+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
1034+ fi])
1035+
1036+#serial 5
1037+
1038+dnl From Jim Meyering
1039+
1040+dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
1041+dnl usually in <utime.h>.
1042+dnl Some systems have utime.h but don't declare the struct anywhere.
1043+
1044+AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
1045+[
1046+ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
1047+ AC_REQUIRE([AC_HEADER_TIME])
1048+ AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
1049+ [AC_TRY_COMPILE(
1050+ [
1051+#ifdef TIME_WITH_SYS_TIME
1052+# include <sys/time.h>
1053+# include <time.h>
1054+#else
1055+# ifdef HAVE_SYS_TIME_H
1056+# include <sys/time.h>
1057+# else
1058+# include <time.h>
1059+# endif
1060+#endif
1061+#ifdef HAVE_UTIME_H
1062+# include <utime.h>
1063+#endif
1064+ ],
1065+ [static struct utimbuf x; x.actime = x.modtime;],
1066+ fu_cv_sys_struct_utimbuf=yes,
1067+ fu_cv_sys_struct_utimbuf=no)
1068+ ])
1069+
1070+ if test $fu_cv_sys_struct_utimbuf = yes; then
1071+ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
1072+ [Define if struct utimbuf is declared -- usually in <utime.h>.
1073+ Some systems have utime.h but don't declare the struct anywhere. ])
1074+ fi
1075+])
1076+
1077+# onceonly.m4 serial 3
1078+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
1079+dnl This file is free software, distributed under the terms of the GNU
1080+dnl General Public License. As a special exception to the GNU General
1081+dnl Public License, this file may be distributed as part of a program
1082+dnl that contains a configuration script generated by Autoconf, under
1083+dnl the same distribution terms as the rest of that program.
1084+
1085+dnl This file defines some "once only" variants of standard autoconf macros.
1086+dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
1087+dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
1088+dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
1089+dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
1090+dnl The advantage is that the check for each of the headers/functions/decls
1091+dnl will be put only once into the 'configure' file. It keeps the size of
1092+dnl the 'configure' file down, and avoids redundant output when 'configure'
1093+dnl is run.
1094+dnl The drawback is that the checks cannot be conditionalized. If you write
1095+dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
1096+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
1097+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
1098+dnl function.
1099+
1100+dnl Autoconf version 2.57 or newer is recommended.
1101+AC_PREREQ(2.54)
1102+
1103+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
1104+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
1105+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
1106+ :
1107+ AC_FOREACH([gl_HEADER_NAME], [$1], [
1108+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
1109+ [-./], [___])), [
1110+ AC_CHECK_HEADERS(gl_HEADER_NAME)
1111+ ])
1112+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
1113+ [-./], [___])))
1114+ ])
1115+])
1116+
1117+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
1118+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
1119+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
1120+ :
1121+ AC_FOREACH([gl_FUNC_NAME], [$1], [
1122+ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
1123+ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
1124+ ])
1125+ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
1126+ ])
1127+])
1128+
1129+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
1130+# AC_CHECK_DECLS(DECL1, DECL2, ...).
1131+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
1132+ :
1133+ AC_FOREACH([gl_DECL_NAME], [$1], [
1134+ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
1135+ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
1136+ ])
1137+ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
1138+ ])
1139+])
1140+
1141 # backupfile.m4 serial 1
1142 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1143 dnl This file is free software, distributed under the terms of the GNU
1144@@ -21,6 +1076,7 @@
1145 AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
1146 AC_CHECK_FUNCS(pathconf)
1147 ])
1148+
1149 #serial 5
1150
1151 dnl From Jim Meyering.
1152@@ -63,31 +1119,7 @@
1153 fi
1154 ]
1155 )
1156-# dirname.m4 serial 1
1157-dnl Copyright (C) 2002 Free Software Foundation, Inc.
1158-dnl This file is free software, distributed under the terms of the GNU
1159-dnl General Public License. As a special exception to the GNU General
1160-dnl Public License, this file may be distributed as part of a program
1161-dnl that contains a configuration script generated by Autoconf, under
1162-dnl the same distribution terms as the rest of that program.
1163
1164-AC_DEFUN([gl_DIRNAME],
1165-[
1166- dnl Prerequisites of lib/dirname.h.
1167- AC_REQUIRE([jm_AC_DOS])
1168-
1169- dnl Prerequisites of lib/dirname.c.
1170- AC_REQUIRE([AC_HEADER_STDC])
1171- AC_CHECK_HEADERS_ONCE(string.h)
1172-
1173- dnl Prerequisites of lib/basename.c.
1174- AC_REQUIRE([AC_HEADER_STDC])
1175- AC_CHECK_HEADERS_ONCE(string.h)
1176-
1177- dnl Prerequisites of lib/stripslash.c.
1178- AC_REQUIRE([AC_HEADER_STDC])
1179- AC_CHECK_HEADERS_ONCE(string.h)
1180-])
1181 #serial 5
1182
1183 # Define some macros required for proper operation of code in lib/*.c
1184@@ -141,6 +1173,33 @@
1185 [Define if the backslash character may also serve as a file name
1186 component separator.])
1187 ])
1188+
1189+# dirname.m4 serial 1
1190+dnl Copyright (C) 2002 Free Software Foundation, Inc.
1191+dnl This file is free software, distributed under the terms of the GNU
1192+dnl General Public License. As a special exception to the GNU General
1193+dnl Public License, this file may be distributed as part of a program
1194+dnl that contains a configuration script generated by Autoconf, under
1195+dnl the same distribution terms as the rest of that program.
1196+
1197+AC_DEFUN([gl_DIRNAME],
1198+[
1199+ dnl Prerequisites of lib/dirname.h.
1200+ AC_REQUIRE([jm_AC_DOS])
1201+
1202+ dnl Prerequisites of lib/dirname.c.
1203+ AC_REQUIRE([AC_HEADER_STDC])
1204+ AC_CHECK_HEADERS_ONCE(string.h)
1205+
1206+ dnl Prerequisites of lib/basename.c.
1207+ AC_REQUIRE([AC_HEADER_STDC])
1208+ AC_CHECK_HEADERS_ONCE(string.h)
1209+
1210+ dnl Prerequisites of lib/stripslash.c.
1211+ AC_REQUIRE([AC_HEADER_STDC])
1212+ AC_CHECK_HEADERS_ONCE(string.h)
1213+])
1214+
1215 #serial 7
1216
1217 AC_DEFUN([gl_ERROR],
1218@@ -159,7 +1218,67 @@
1219 AC_CHECK_DECLS([strerror])
1220 AC_FUNC_STRERROR_R
1221 ])
1222-# getopt.m4 serial 1
1223+
1224+# memchr.m4 serial 1
1225+dnl Copyright (C) 2002 Free Software Foundation, Inc.
1226+dnl This file is free software, distributed under the terms of the GNU
1227+dnl General Public License. As a special exception to the GNU General
1228+dnl Public License, this file may be distributed as part of a program
1229+dnl that contains a configuration script generated by Autoconf, under
1230+dnl the same distribution terms as the rest of that program.
1231+
1232+AC_DEFUN([gl_FUNC_MEMCHR],
1233+[
1234+ AC_REPLACE_FUNCS(memchr)
1235+ if test $ac_cv_func_memchr = no; then
1236+ jm_PREREQ_MEMCHR
1237+ fi
1238+])
1239+
1240+# Prerequisites of lib/memchr.c.
1241+AC_DEFUN([jm_PREREQ_MEMCHR], [
1242+ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
1243+ AC_CHECK_HEADERS(bp-sym.h)
1244+])
1245+
1246+# rmdir.m4 serial 1
1247+dnl Copyright (C) 2002 Free Software Foundation, Inc.
1248+dnl This file is free software, distributed under the terms of the GNU
1249+dnl General Public License. As a special exception to the GNU General
1250+dnl Public License, this file may be distributed as part of a program
1251+dnl that contains a configuration script generated by Autoconf, under
1252+dnl the same distribution terms as the rest of that program.
1253+
1254+AC_DEFUN([gl_FUNC_RMDIR],
1255+[
1256+ AC_REPLACE_FUNCS(rmdir)
1257+ if test $ac_cv_func_rmdir = no; then
1258+ gl_PREREQ_RMDIR
1259+ fi
1260+])
1261+
1262+# Prerequisites of lib/rmdir.c.
1263+AC_DEFUN([gl_PREREQ_RMDIR], [
1264+ AC_REQUIRE([AC_HEADER_STAT])
1265+ :
1266+])
1267+
1268+
1269+# getopt.m4 serial 1
1270+dnl Copyright (C) 2002 Free Software Foundation, Inc.
1271+dnl This file is free software, distributed under the terms of the GNU
1272+dnl General Public License. As a special exception to the GNU General
1273+dnl Public License, this file may be distributed as part of a program
1274+dnl that contains a configuration script generated by Autoconf, under
1275+dnl the same distribution terms as the rest of that program.
1276+
1277+AC_DEFUN([gl_GETOPT],
1278+[
1279+ dnl Prerequisites of lib/getopt.c.
1280+ AC_CHECK_HEADERS_ONCE(string.h)
1281+])
1282+
1283+# xalloc.m4 serial 1
1284 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1285 dnl This file is free software, distributed under the terms of the GNU
1286 dnl General Public License. As a special exception to the GNU General
1287@@ -167,11 +1286,25 @@
1288 dnl that contains a configuration script generated by Autoconf, under
1289 dnl the same distribution terms as the rest of that program.
1290
1291-AC_DEFUN([gl_GETOPT],
1292+AC_DEFUN([gl_XALLOC],
1293 [
1294- dnl Prerequisites of lib/getopt.c.
1295+ gl_PREREQ_XMALLOC
1296+ gl_PREREQ_XSTRDUP
1297+])
1298+
1299+# Prerequisites of lib/xmalloc.c.
1300+AC_DEFUN([gl_PREREQ_XMALLOC], [
1301+ AC_REQUIRE([AC_HEADER_STDC])
1302+ AC_REQUIRE([jm_FUNC_MALLOC])
1303+ AC_REQUIRE([jm_FUNC_REALLOC])
1304+])
1305+
1306+# Prerequisites of lib/xstrdup.c.
1307+AC_DEFUN([gl_PREREQ_XSTRDUP], [
1308+ AC_REQUIRE([AC_HEADER_STDC])
1309 AC_CHECK_HEADERS_ONCE(string.h)
1310 ])
1311+
1312 # malloc.m4 serial 7
1313 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1314 dnl This file is free software, distributed under the terms of the GNU
1315@@ -197,66 +1330,8 @@
1316 AC_DEFUN([gl_PREREQ_MALLOC], [
1317 :
1318 ])
1319-# mbrtowc.m4 serial 5
1320-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1321-dnl This file is free software, distributed under the terms of the GNU
1322-dnl General Public License. As a special exception to the GNU General
1323-dnl Public License, this file may be distributed as part of a program
1324-dnl that contains a configuration script generated by Autoconf, under
1325-dnl the same distribution terms as the rest of that program.
1326-
1327-dnl From Paul Eggert
1328-
1329-dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
1330-dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
1331-
1332-AC_DEFUN([jm_FUNC_MBRTOWC],
1333-[
1334- AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
1335- jm_cv_func_mbrtowc,
1336- [AC_TRY_LINK(
1337- [#include <wchar.h>],
1338- [mbstate_t state; return ! (sizeof state && mbrtowc);],
1339- jm_cv_func_mbrtowc=yes,
1340- jm_cv_func_mbrtowc=no)])
1341- if test $jm_cv_func_mbrtowc = yes; then
1342- AC_DEFINE(HAVE_MBRTOWC, 1,
1343- [Define to 1 if mbrtowc and mbstate_t are properly declared.])
1344- fi
1345-])
1346-# mbstate_t.m4 serial 9
1347-dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
1348-dnl This file is free software, distributed under the terms of the GNU
1349-dnl General Public License. As a special exception to the GNU General
1350-dnl Public License, this file may be distributed as part of a program
1351-dnl that contains a configuration script generated by Autoconf, under
1352-dnl the same distribution terms as the rest of that program.
1353-
1354-# From Paul Eggert.
1355-
1356-# BeOS 5 has <wchar.h> but does not define mbstate_t,
1357-# so you can't declare an object of that type.
1358-# Check for this incompatibility with Standard C.
1359
1360-# AC_TYPE_MBSTATE_T
1361-# -----------------
1362-AC_DEFUN([AC_TYPE_MBSTATE_T],
1363- [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
1364- [AC_COMPILE_IFELSE(
1365- [AC_LANG_PROGRAM(
1366- [AC_INCLUDES_DEFAULT
1367-# include <wchar.h>],
1368- [mbstate_t x; return sizeof x;])],
1369- [ac_cv_type_mbstate_t=yes],
1370- [ac_cv_type_mbstate_t=no])])
1371- if test $ac_cv_type_mbstate_t = yes; then
1372- AC_DEFINE([HAVE_MBSTATE_T], 1,
1373- [Define to 1 if <wchar.h> declares mbstate_t.])
1374- else
1375- AC_DEFINE([mbstate_t], int,
1376- [Define to a type if <wchar.h> does not define.])
1377- fi])
1378-# memchr.m4 serial 1
1379+# realloc.m4 serial 7
1380 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1381 dnl This file is free software, distributed under the terms of the GNU
1382 dnl General Public License. As a special exception to the GNU General
1383@@ -264,116 +1339,24 @@
1384 dnl that contains a configuration script generated by Autoconf, under
1385 dnl the same distribution terms as the rest of that program.
1386
1387-AC_DEFUN([gl_FUNC_MEMCHR],
1388+dnl From Jim Meyering.
1389+dnl Determine whether realloc works when both arguments are 0.
1390+dnl If it doesn't, arrange to use the replacement function.
1391+
1392+AC_DEFUN([jm_FUNC_REALLOC],
1393 [
1394- AC_REPLACE_FUNCS(memchr)
1395- if test $ac_cv_func_memchr = no; then
1396- jm_PREREQ_MEMCHR
1397+ AC_REQUIRE([AC_FUNC_REALLOC])
1398+ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
1399+ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
1400+ gl_PREREQ_REALLOC
1401 fi
1402 ])
1403
1404-# Prerequisites of lib/memchr.c.
1405-AC_DEFUN([jm_PREREQ_MEMCHR], [
1406- AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
1407- AC_CHECK_HEADERS(bp-sym.h)
1408-])
1409-#serial 1
1410-
1411-dnl From Mumit Khan and Paul Eggert
1412-dnl Determine whether mkdir accepts only one argument instead of the usual two.
1413-
1414-AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
1415- [AC_CHECK_FUNCS(mkdir)
1416- AC_CACHE_CHECK([whether mkdir takes only one argument],
1417- patch_cv_mkdir_takes_one_arg,
1418- [patch_cv_mkdir_takes_one_arg=no
1419- if test $ac_cv_func_mkdir = yes; then
1420- AC_TRY_COMPILE([
1421-#include <sys/types.h>
1422-#include <sys/stat.h>
1423- ],
1424- [mkdir (".", 0);],
1425- ,
1426- [AC_TRY_COMPILE([
1427-#include <sys/types.h>
1428-#include <sys/stat.h>
1429- ],
1430- [mkdir (".");],
1431- patch_cv_mkdir_takes_one_arg=yes
1432- )]
1433- )
1434- fi
1435- ]
1436- )
1437- if test $patch_cv_mkdir_takes_one_arg = yes; then
1438- AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
1439- [Define if mkdir takes only one argument.])
1440- fi
1441- ]
1442-)
1443-# onceonly.m4 serial 3
1444-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
1445-dnl This file is free software, distributed under the terms of the GNU
1446-dnl General Public License. As a special exception to the GNU General
1447-dnl Public License, this file may be distributed as part of a program
1448-dnl that contains a configuration script generated by Autoconf, under
1449-dnl the same distribution terms as the rest of that program.
1450-
1451-dnl This file defines some "once only" variants of standard autoconf macros.
1452-dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
1453-dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
1454-dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
1455-dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
1456-dnl The advantage is that the check for each of the headers/functions/decls
1457-dnl will be put only once into the 'configure' file. It keeps the size of
1458-dnl the 'configure' file down, and avoids redundant output when 'configure'
1459-dnl is run.
1460-dnl The drawback is that the checks cannot be conditionalized. If you write
1461-dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
1462-dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
1463-dnl empty, and the check will be inserted before the body of the AC_DEFUNed
1464-dnl function.
1465-
1466-dnl Autoconf version 2.57 or newer is recommended.
1467-AC_PREREQ(2.54)
1468-
1469-# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
1470-# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
1471-AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
1472- :
1473- AC_FOREACH([gl_HEADER_NAME], [$1], [
1474- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
1475- [-./], [___])), [
1476- AC_CHECK_HEADERS(gl_HEADER_NAME)
1477- ])
1478- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
1479- [-./], [___])))
1480- ])
1481-])
1482-
1483-# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
1484-# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
1485-AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
1486+# Prerequisites of lib/realloc.c.
1487+AC_DEFUN([gl_PREREQ_REALLOC], [
1488 :
1489- AC_FOREACH([gl_FUNC_NAME], [$1], [
1490- AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
1491- AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
1492- ])
1493- AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
1494- ])
1495 ])
1496
1497-# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
1498-# AC_CHECK_DECLS(DECL1, DECL2, ...).
1499-AC_DEFUN([AC_CHECK_DECLS_ONCE], [
1500- :
1501- AC_FOREACH([gl_DECL_NAME], [$1], [
1502- AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
1503- AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
1504- ])
1505- AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
1506- ])
1507-])
1508 # quote.m4 serial 1
1509 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1510 dnl This file is free software, distributed under the terms of the GNU
1511@@ -387,6 +1370,7 @@
1512 dnl Prerequisites of lib/quote.c.
1513 AC_CHECK_HEADERS_ONCE(stddef.h)
1514 ])
1515+
1516 # quotearg.m4 serial 1
1517 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1518 dnl This file is free software, distributed under the terms of the GNU
1519@@ -403,32 +1387,69 @@
1520 AC_TYPE_MBSTATE_T
1521 jm_FUNC_MBRTOWC
1522 ])
1523-# realloc.m4 serial 7
1524-dnl Copyright (C) 2002 Free Software Foundation, Inc.
1525+
1526+# mbstate_t.m4 serial 9
1527+dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
1528 dnl This file is free software, distributed under the terms of the GNU
1529 dnl General Public License. As a special exception to the GNU General
1530 dnl Public License, this file may be distributed as part of a program
1531 dnl that contains a configuration script generated by Autoconf, under
1532 dnl the same distribution terms as the rest of that program.
1533
1534-dnl From Jim Meyering.
1535-dnl Determine whether realloc works when both arguments are 0.
1536-dnl If it doesn't, arrange to use the replacement function.
1537+# From Paul Eggert.
1538
1539-AC_DEFUN([jm_FUNC_REALLOC],
1540+# BeOS 5 has <wchar.h> but does not define mbstate_t,
1541+# so you can't declare an object of that type.
1542+# Check for this incompatibility with Standard C.
1543+
1544+# AC_TYPE_MBSTATE_T
1545+# -----------------
1546+AC_DEFUN([AC_TYPE_MBSTATE_T],
1547+ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
1548+ [AC_COMPILE_IFELSE(
1549+ [AC_LANG_PROGRAM(
1550+ [AC_INCLUDES_DEFAULT
1551+# include <wchar.h>],
1552+ [mbstate_t x; return sizeof x;])],
1553+ [ac_cv_type_mbstate_t=yes],
1554+ [ac_cv_type_mbstate_t=no])])
1555+ if test $ac_cv_type_mbstate_t = yes; then
1556+ AC_DEFINE([HAVE_MBSTATE_T], 1,
1557+ [Define to 1 if <wchar.h> declares mbstate_t.])
1558+ else
1559+ AC_DEFINE([mbstate_t], int,
1560+ [Define to a type if <wchar.h> does not define.])
1561+ fi])
1562+
1563+# mbrtowc.m4 serial 5
1564+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1565+dnl This file is free software, distributed under the terms of the GNU
1566+dnl General Public License. As a special exception to the GNU General
1567+dnl Public License, this file may be distributed as part of a program
1568+dnl that contains a configuration script generated by Autoconf, under
1569+dnl the same distribution terms as the rest of that program.
1570+
1571+dnl From Paul Eggert
1572+
1573+dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
1574+dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
1575+
1576+AC_DEFUN([jm_FUNC_MBRTOWC],
1577 [
1578- AC_REQUIRE([AC_FUNC_REALLOC])
1579- dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
1580- if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
1581- gl_PREREQ_REALLOC
1582+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
1583+ jm_cv_func_mbrtowc,
1584+ [AC_TRY_LINK(
1585+ [#include <wchar.h>],
1586+ [mbstate_t state; return ! (sizeof state && mbrtowc);],
1587+ jm_cv_func_mbrtowc=yes,
1588+ jm_cv_func_mbrtowc=no)])
1589+ if test $jm_cv_func_mbrtowc = yes; then
1590+ AC_DEFINE(HAVE_MBRTOWC, 1,
1591+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
1592 fi
1593 ])
1594
1595-# Prerequisites of lib/realloc.c.
1596-AC_DEFUN([gl_PREREQ_REALLOC], [
1597- :
1598-])
1599-# rmdir.m4 serial 1
1600+# hash.m4 serial 1
1601 dnl Copyright (C) 2002 Free Software Foundation, Inc.
1602 dnl This file is free software, distributed under the terms of the GNU
1603 dnl General Public License. As a special exception to the GNU General
1604@@ -436,18 +1457,71 @@
1605 dnl that contains a configuration script generated by Autoconf, under
1606 dnl the same distribution terms as the rest of that program.
1607
1608-AC_DEFUN([gl_FUNC_RMDIR],
1609+AC_DEFUN([gl_HASH],
1610 [
1611- AC_REPLACE_FUNCS(rmdir)
1612- if test $ac_cv_func_rmdir = no; then
1613- gl_PREREQ_RMDIR
1614- fi
1615+ dnl Prerequisites of lib/hash.c.
1616+ AC_CHECK_HEADERS_ONCE(stdlib.h)
1617+ AC_HEADER_STDBOOL
1618+ AC_CHECK_DECLS_ONCE(free malloc)
1619 ])
1620
1621-# Prerequisites of lib/rmdir.c.
1622-AC_DEFUN([gl_PREREQ_RMDIR], [
1623- AC_REQUIRE([AC_HEADER_STAT])
1624- :
1625+AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
1626+ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
1627+ [ac_cv_stat_nsec],
1628+ [AC_TRY_COMPILE(
1629+ [
1630+ #include <sys/types.h>
1631+ #include <sys/stat.h>
1632+ #include <unistd.h>
1633+ struct stat st;
1634+ ],
1635+ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
1636+ [ac_cv_stat_nsec=yes],
1637+ [ac_cv_stat_nsec=no])
1638+ ])
1639+ if test $ac_cv_stat_nsec = yes; then
1640+ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
1641+ fi
1642+
1643+ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
1644+ [ac_cv_stat_timeval],
1645+ [AC_TRY_COMPILE(
1646+ [
1647+ #include <time.h>
1648+ #include <sys/types.h>
1649+ #include <sys/stat.h>
1650+ #include <unistd.h>
1651+ struct stat st;
1652+ ],
1653+ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
1654+ [ac_cv_stat_timeval=yes],
1655+ [ac_cv_stat_timeval=no])
1656+ ])
1657+ if test $ac_cv_stat_timeval = yes; then
1658+ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
1659+ fi])
1660+
1661+#serial 7 -*- autoconf -*-
1662+
1663+dnl From Jim Meyering.
1664+dnl
1665+dnl See if the glibc *_unlocked I/O macros or functions are available.
1666+dnl Use only those *_unlocked macros or functions that are declared
1667+dnl (because some of them were declared in Solaris 2.5.1 but were removed
1668+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
1669+dnl on Solaris 2.6).
1670+
1671+AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
1672+[
1673+ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
1674+ dnl etc.
1675+ AC_REQUIRE([AC_GNU_SOURCE])
1676+
1677+ AC_CHECK_DECLS_ONCE(
1678+ [clearerr_unlocked feof_unlocked ferror_unlocked
1679+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
1680+ fread_unlocked fwrite_unlocked getc_unlocked
1681+ getchar_unlocked putc_unlocked putchar_unlocked])
1682 ])
1683
1684 # Check for setmode, DOS style.
1685@@ -488,180 +1562,39 @@
1686 AC_DEFINE(HAVE_SETMODE_DOS, 1,
1687 [Define to 1 if you have the DOS-style `setmode' function.])
1688 fi])
1689-# Check for stdbool.h that conforms to C99.
1690-
1691-# Copyright (C) 2002-2003 Free Software Foundation, Inc.
1692-
1693-# This program is free software; you can redistribute it and/or modify
1694-# it under the terms of the GNU General Public License as published by
1695-# the Free Software Foundation; either version 2, or (at your option)
1696-# any later version.
1697-
1698-# This program is distributed in the hope that it will be useful,
1699-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1700-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1701-# GNU General Public License for more details.
1702-
1703-# You should have received a copy of the GNU General Public License
1704-# along with this program; if not, write to the Free Software
1705-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1706-# 02111-1307, USA.
1707-
1708-# Prepare for substituting <stdbool.h> if it is not supported.
1709-
1710-AC_DEFUN([AM_STDBOOL_H],
1711-[
1712- AC_REQUIRE([AC_HEADER_STDBOOL])
1713-
1714- # Define two additional variables used in the Makefile substitution.
1715-
1716- if test "$ac_cv_header_stdbool_h" = yes; then
1717- STDBOOL_H=''
1718- else
1719- STDBOOL_H='stdbool.h'
1720- fi
1721- AC_SUBST([STDBOOL_H])
1722-
1723- if test "$ac_cv_type__Bool" = yes; then
1724- HAVE__BOOL=1
1725- else
1726- HAVE__BOOL=0
1727- fi
1728- AC_SUBST([HAVE__BOOL])
1729-])
1730-
1731-# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
1732-# have this macro built-in.
1733-
1734-AC_DEFUN([AC_HEADER_STDBOOL],
1735- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
1736- [ac_cv_header_stdbool_h],
1737- [AC_TRY_COMPILE(
1738- [
1739- #include <stdbool.h>
1740- #ifndef bool
1741- "error: bool is not defined"
1742- #endif
1743- #ifndef false
1744- "error: false is not defined"
1745- #endif
1746- #if false
1747- "error: false is not 0"
1748- #endif
1749- #ifndef true
1750- "error: false is not defined"
1751- #endif
1752- #if true != 1
1753- "error: true is not 1"
1754- #endif
1755- #ifndef __bool_true_false_are_defined
1756- "error: __bool_true_false_are_defined is not defined"
1757- #endif
1758-
1759- struct s { _Bool s: 1; _Bool t; } s;
1760-
1761- char a[true == 1 ? 1 : -1];
1762- char b[false == 0 ? 1 : -1];
1763- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
1764- char d[(bool) -0.5 == true ? 1 : -1];
1765- bool e = &s;
1766- char f[(_Bool) -0.0 == false ? 1 : -1];
1767- char g[true];
1768- char h[sizeof (_Bool)];
1769- char i[sizeof s.t];
1770- ],
1771- [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
1772- [ac_cv_header_stdbool_h=yes],
1773- [ac_cv_header_stdbool_h=no])])
1774- AC_CHECK_TYPES([_Bool])
1775- if test $ac_cv_header_stdbool_h = yes; then
1776- AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
1777- fi])
1778-#serial 7 -*- autoconf -*-
1779-
1780-dnl From Jim Meyering.
1781-dnl
1782-dnl See if the glibc *_unlocked I/O macros or functions are available.
1783-dnl Use only those *_unlocked macros or functions that are declared
1784-dnl (because some of them were declared in Solaris 2.5.1 but were removed
1785-dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
1786-dnl on Solaris 2.6).
1787-
1788-AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
1789-[
1790- dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
1791- dnl etc.
1792- AC_REQUIRE([AC_GNU_SOURCE])
1793-
1794- AC_CHECK_DECLS_ONCE(
1795- [clearerr_unlocked feof_unlocked ferror_unlocked
1796- fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
1797- fread_unlocked fwrite_unlocked getc_unlocked
1798- getchar_unlocked putc_unlocked putchar_unlocked])
1799-])
1800-#serial 5
1801-
1802-dnl From Jim Meyering
1803-
1804-dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
1805-dnl usually in <utime.h>.
1806-dnl Some systems have utime.h but don't declare the struct anywhere.
1807-
1808-AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
1809-[
1810- AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
1811- AC_REQUIRE([AC_HEADER_TIME])
1812- AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
1813- [AC_TRY_COMPILE(
1814- [
1815-#ifdef TIME_WITH_SYS_TIME
1816-# include <sys/time.h>
1817-# include <time.h>
1818-#else
1819-# ifdef HAVE_SYS_TIME_H
1820-# include <sys/time.h>
1821-# else
1822-# include <time.h>
1823-# endif
1824-#endif
1825-#ifdef HAVE_UTIME_H
1826-# include <utime.h>
1827-#endif
1828- ],
1829- [static struct utimbuf x; x.actime = x.modtime;],
1830- fu_cv_sys_struct_utimbuf=yes,
1831- fu_cv_sys_struct_utimbuf=no)
1832- ])
1833
1834- if test $fu_cv_sys_struct_utimbuf = yes; then
1835- AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
1836- [Define if struct utimbuf is declared -- usually in <utime.h>.
1837- Some systems have utime.h but don't declare the struct anywhere. ])
1838- fi
1839-])
1840-# xalloc.m4 serial 1
1841-dnl Copyright (C) 2002 Free Software Foundation, Inc.
1842-dnl This file is free software, distributed under the terms of the GNU
1843-dnl General Public License. As a special exception to the GNU General
1844-dnl Public License, this file may be distributed as part of a program
1845-dnl that contains a configuration script generated by Autoconf, under
1846-dnl the same distribution terms as the rest of that program.
1847+#serial 1
1848
1849-AC_DEFUN([gl_XALLOC],
1850-[
1851- gl_PREREQ_XMALLOC
1852- gl_PREREQ_XSTRDUP
1853-])
1854+dnl From Mumit Khan and Paul Eggert
1855+dnl Determine whether mkdir accepts only one argument instead of the usual two.
1856
1857-# Prerequisites of lib/xmalloc.c.
1858-AC_DEFUN([gl_PREREQ_XMALLOC], [
1859- AC_REQUIRE([AC_HEADER_STDC])
1860- AC_REQUIRE([jm_FUNC_MALLOC])
1861- AC_REQUIRE([jm_FUNC_REALLOC])
1862-])
1863+AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
1864+ [AC_CHECK_FUNCS(mkdir)
1865+ AC_CACHE_CHECK([whether mkdir takes only one argument],
1866+ patch_cv_mkdir_takes_one_arg,
1867+ [patch_cv_mkdir_takes_one_arg=no
1868+ if test $ac_cv_func_mkdir = yes; then
1869+ AC_TRY_COMPILE([
1870+#include <sys/types.h>
1871+#include <sys/stat.h>
1872+ ],
1873+ [mkdir (".", 0);],
1874+ ,
1875+ [AC_TRY_COMPILE([
1876+#include <sys/types.h>
1877+#include <sys/stat.h>
1878+ ],
1879+ [mkdir (".");],
1880+ patch_cv_mkdir_takes_one_arg=yes
1881+ )]
1882+ )
1883+ fi
1884+ ]
1885+ )
1886+ if test $patch_cv_mkdir_takes_one_arg = yes; then
1887+ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
1888+ [Define if mkdir takes only one argument.])
1889+ fi
1890+ ]
1891+)
1892
1893-# Prerequisites of lib/xstrdup.c.
1894-AC_DEFUN([gl_PREREQ_XSTRDUP], [
1895- AC_REQUIRE([AC_HEADER_STDC])
1896- AC_CHECK_HEADERS_ONCE(string.h)
1897-])
1898--- patch-2.5.9.orig/configure
1899+++ patch-2.5.9/configure
1900@@ -1,11 +1,10 @@
1901 #! /bin/sh
1902 # Guess values for system-dependent variables and create Makefiles.
1903-# Generated by GNU Autoconf 2.57 for patch 2.5.9.
1904+# Generated by GNU Autoconf 2.59 for patch 2.5.9.
1905 #
1906 # Report bugs to <bug-patch@gnu.org>.
1907 #
1908-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1909-# Free Software Foundation, Inc.
1910+# Copyright (C) 2003 Free Software Foundation, Inc.
1911 # This configure script is free software; the Free Software Foundation
1912 # gives unlimited permission to copy, distribute and modify it.
1913 ## --------------------- ##
1914@@ -22,9 +21,10 @@
1915 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
1916 set -o posix
1917 fi
1918+DUALCASE=1; export DUALCASE # for MKS sh
1919
1920 # Support unset when possible.
1921-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
1922+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
1923 as_unset=unset
1924 else
1925 as_unset=false
1926@@ -43,7 +43,7 @@
1927 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
1928 LC_TELEPHONE LC_TIME
1929 do
1930- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
1931+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
1932 eval $as_var=C; export $as_var
1933 else
1934 $as_unset $as_var
1935@@ -220,16 +220,17 @@
1936 if mkdir -p . 2>/dev/null; then
1937 as_mkdir_p=:
1938 else
1939+ test -d ./-p && rmdir ./-p
1940 as_mkdir_p=false
1941 fi
1942
1943 as_executable_p="test -f"
1944
1945 # Sed expression to map a string onto a valid CPP name.
1946-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
1947+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
1948
1949 # Sed expression to map a string onto a valid variable name.
1950-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
1951+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
1952
1953
1954 # IFS
1955@@ -669,7 +670,7 @@
1956
1957 # Be sure to have absolute paths.
1958 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
1959- localstatedir libdir includedir oldincludedir infodir mandir
1960+ localstatedir libdir includedir oldincludedir infodir mandir
1961 do
1962 eval ac_val=$`echo $ac_var`
1963 case $ac_val in
1964@@ -709,10 +710,10 @@
1965 # Try the directory containing this script, then its parent.
1966 ac_confdir=`(dirname "$0") 2>/dev/null ||
1967 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1968- X"$0" : 'X\(//\)[^/]' \| \
1969- X"$0" : 'X\(//\)$' \| \
1970- X"$0" : 'X\(/\)' \| \
1971- . : '\(.\)' 2>/dev/null ||
1972+ X"$0" : 'X\(//\)[^/]' \| \
1973+ X"$0" : 'X\(//\)$' \| \
1974+ X"$0" : 'X\(/\)' \| \
1975+ . : '\(.\)' 2>/dev/null ||
1976 echo X"$0" |
1977 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1978 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1979@@ -804,9 +805,9 @@
1980 cat <<_ACEOF
1981 Installation directories:
1982 --prefix=PREFIX install architecture-independent files in PREFIX
1983- [$ac_default_prefix]
1984+ [$ac_default_prefix]
1985 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1986- [PREFIX]
1987+ [PREFIX]
1988
1989 By default, \`make install' will install all the files in
1990 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1991@@ -896,12 +897,45 @@
1992 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1993 ac_top_srcdir=$ac_top_builddir$srcdir ;;
1994 esac
1995-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
1996-# absolute.
1997-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
1998-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
1999-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
2000-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
2001+
2002+# Do not use `cd foo && pwd` to compute absolute paths, because
2003+# the directories may not exist.
2004+case `pwd` in
2005+.) ac_abs_builddir="$ac_dir";;
2006+*)
2007+ case "$ac_dir" in
2008+ .) ac_abs_builddir=`pwd`;;
2009+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
2010+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
2011+ esac;;
2012+esac
2013+case $ac_abs_builddir in
2014+.) ac_abs_top_builddir=${ac_top_builddir}.;;
2015+*)
2016+ case ${ac_top_builddir}. in
2017+ .) ac_abs_top_builddir=$ac_abs_builddir;;
2018+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
2019+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
2020+ esac;;
2021+esac
2022+case $ac_abs_builddir in
2023+.) ac_abs_srcdir=$ac_srcdir;;
2024+*)
2025+ case $ac_srcdir in
2026+ .) ac_abs_srcdir=$ac_abs_builddir;;
2027+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
2028+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
2029+ esac;;
2030+esac
2031+case $ac_abs_builddir in
2032+.) ac_abs_top_srcdir=$ac_top_srcdir;;
2033+*)
2034+ case $ac_top_srcdir in
2035+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
2036+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
2037+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
2038+ esac;;
2039+esac
2040
2041 cd $ac_dir
2042 # Check for guested configure; otherwise get Cygnus style configure.
2043@@ -912,13 +946,13 @@
2044 echo
2045 $SHELL $ac_srcdir/configure --help=recursive
2046 elif test -f $ac_srcdir/configure.ac ||
2047- test -f $ac_srcdir/configure.in; then
2048+ test -f $ac_srcdir/configure.in; then
2049 echo
2050 $ac_configure --help
2051 else
2052 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2053 fi
2054- cd $ac_popdir
2055+ cd "$ac_popdir"
2056 done
2057 fi
2058
2059@@ -926,10 +960,9 @@
2060 if $ac_init_version; then
2061 cat <<\_ACEOF
2062 patch configure 2.5.9
2063-generated by GNU Autoconf 2.57
2064+generated by GNU Autoconf 2.59
2065
2066-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
2067-Free Software Foundation, Inc.
2068+Copyright (C) 2003 Free Software Foundation, Inc.
2069 This configure script is free software; the Free Software Foundation
2070 gives unlimited permission to copy, distribute and modify it.
2071 _ACEOF
2072@@ -941,7 +974,7 @@
2073 running configure, to aid debugging if configure makes a mistake.
2074
2075 It was created by patch $as_me 2.5.9, which was
2076-generated by GNU Autoconf 2.57. Invocation command line was
2077+generated by GNU Autoconf 2.59. Invocation command line was
2078
2079 $ $0 $@
2080
2081@@ -1018,19 +1051,19 @@
2082 2)
2083 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
2084 if test $ac_must_keep_next = true; then
2085- ac_must_keep_next=false # Got value, back to normal.
2086+ ac_must_keep_next=false # Got value, back to normal.
2087 else
2088- case $ac_arg in
2089- *=* | --config-cache | -C | -disable-* | --disable-* \
2090- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2091- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2092- | -with-* | --with-* | -without-* | --without-* | --x)
2093- case "$ac_configure_args0 " in
2094- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2095- esac
2096- ;;
2097- -* ) ac_must_keep_next=true ;;
2098- esac
2099+ case $ac_arg in
2100+ *=* | --config-cache | -C | -disable-* | --disable-* \
2101+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2102+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2103+ | -with-* | --with-* | -without-* | --without-* | --x)
2104+ case "$ac_configure_args0 " in
2105+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2106+ esac
2107+ ;;
2108+ -* ) ac_must_keep_next=true ;;
2109+ esac
2110 fi
2111 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
2112 # Get rid of the leading space.
2113@@ -1064,12 +1097,12 @@
2114 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
2115 *ac_space=\ *)
2116 sed -n \
2117- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
2118- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
2119+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
2120+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
2121 ;;
2122 *)
2123 sed -n \
2124- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2125+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2126 ;;
2127 esac;
2128 }
2129@@ -1098,7 +1131,7 @@
2130 for ac_var in $ac_subst_files
2131 do
2132 eval ac_val=$`echo $ac_var`
2133- echo "$ac_var='"'"'$ac_val'"'"'"
2134+ echo "$ac_var='"'"'$ac_val'"'"'"
2135 done | sort
2136 echo
2137 fi
2138@@ -1117,7 +1150,7 @@
2139 echo "$as_me: caught signal $ac_signal"
2140 echo "$as_me: exit $exit_status"
2141 } >&5
2142- rm -f core core.* *.core &&
2143+ rm -f core *.core &&
2144 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
2145 exit $exit_status
2146 ' 0
2147@@ -1197,7 +1230,7 @@
2148 # value.
2149 ac_cache_corrupted=false
2150 for ac_var in `(set) 2>&1 |
2151- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
2152+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
2153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2154 eval ac_new_set=\$ac_env_${ac_var}_set
2155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
2156@@ -1214,13 +1247,13 @@
2157 ,);;
2158 *)
2159 if test "x$ac_old_val" != "x$ac_new_val"; then
2160- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2161+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2162 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2163- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
2164+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
2165 echo "$as_me: former value: $ac_old_val" >&2;}
2166- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
2167+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
2168 echo "$as_me: current value: $ac_new_val" >&2;}
2169- ac_cache_corrupted=:
2170+ ac_cache_corrupted=:
2171 fi;;
2172 esac
2173 # Pass precious variables to config.status.
2174@@ -1629,7 +1662,6 @@
2175 (exit $ac_status); }
2176
2177 cat >conftest.$ac_ext <<_ACEOF
2178-#line $LINENO "configure"
2179 /* confdefs.h. */
2180 _ACEOF
2181 cat confdefs.h >>conftest.$ac_ext
2182@@ -1649,8 +1681,8 @@
2183 # Try to create an executable without -o first, disregard a.out.
2184 # It will help us diagnose broken compilers, and finding out an intuition
2185 # of exeext.
2186-echo "$as_me:$LINENO: checking for C compiler default output" >&5
2187-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2188+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2189+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2190 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2191 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2192 (eval $ac_link_default) 2>&5
2193@@ -1670,23 +1702,23 @@
2194 test -f "$ac_file" || continue
2195 case $ac_file in
2196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2197- ;;
2198+ ;;
2199 conftest.$ac_ext )
2200- # This is the source file.
2201- ;;
2202+ # This is the source file.
2203+ ;;
2204 [ab].out )
2205- # We found the default executable, but exeext='' is most
2206- # certainly right.
2207- break;;
2208+ # We found the default executable, but exeext='' is most
2209+ # certainly right.
2210+ break;;
2211 *.* )
2212- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2213- # FIXME: I believe we export ac_cv_exeext for Libtool,
2214- # but it would be cool to find out if it's true. Does anybody
2215- # maintain Libtool? --akim.
2216- export ac_cv_exeext
2217- break;;
2218+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2219+ # FIXME: I believe we export ac_cv_exeext for Libtool,
2220+ # but it would be cool to find out if it's true. Does anybody
2221+ # maintain Libtool? --akim.
2222+ export ac_cv_exeext
2223+ break;;
2224 * )
2225- break;;
2226+ break;;
2227 esac
2228 done
2229 else
2230@@ -1760,8 +1792,8 @@
2231 case $ac_file in
2232 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2233 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2234- export ac_cv_exeext
2235- break;;
2236+ export ac_cv_exeext
2237+ break;;
2238 * ) break;;
2239 esac
2240 done
2241@@ -1786,7 +1818,6 @@
2242 echo $ECHO_N "(cached) $ECHO_C" >&6
2243 else
2244 cat >conftest.$ac_ext <<_ACEOF
2245-#line $LINENO "configure"
2246 /* confdefs.h. */
2247 _ACEOF
2248 cat confdefs.h >>conftest.$ac_ext
2249@@ -1837,7 +1868,6 @@
2250 echo $ECHO_N "(cached) $ECHO_C" >&6
2251 else
2252 cat >conftest.$ac_ext <<_ACEOF
2253-#line $LINENO "configure"
2254 /* confdefs.h. */
2255 _ACEOF
2256 cat confdefs.h >>conftest.$ac_ext
2257@@ -1857,11 +1887,20 @@
2258 _ACEOF
2259 rm -f conftest.$ac_objext
2260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2261- (eval $ac_compile) 2>&5
2262+ (eval $ac_compile) 2>conftest.er1
2263 ac_status=$?
2264+ grep -v '^ *+' conftest.er1 >conftest.err
2265+ rm -f conftest.er1
2266+ cat conftest.err >&5
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); } &&
2269- { ac_try='test -s conftest.$ac_objext'
2270+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2271+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272+ (eval $ac_try) 2>&5
2273+ ac_status=$?
2274+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275+ (exit $ac_status); }; } &&
2276+ { ac_try='test -s conftest.$ac_objext'
2277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278 (eval $ac_try) 2>&5
2279 ac_status=$?
2280@@ -1874,7 +1913,7 @@
2281
2282 ac_compiler_gnu=no
2283 fi
2284-rm -f conftest.$ac_objext conftest.$ac_ext
2285+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2286 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2287
2288 fi
2289@@ -1890,7 +1929,6 @@
2290 echo $ECHO_N "(cached) $ECHO_C" >&6
2291 else
2292 cat >conftest.$ac_ext <<_ACEOF
2293-#line $LINENO "configure"
2294 /* confdefs.h. */
2295 _ACEOF
2296 cat confdefs.h >>conftest.$ac_ext
2297@@ -1907,11 +1945,20 @@
2298 _ACEOF
2299 rm -f conftest.$ac_objext
2300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2301- (eval $ac_compile) 2>&5
2302+ (eval $ac_compile) 2>conftest.er1
2303 ac_status=$?
2304+ grep -v '^ *+' conftest.er1 >conftest.err
2305+ rm -f conftest.er1
2306+ cat conftest.err >&5
2307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2308 (exit $ac_status); } &&
2309- { ac_try='test -s conftest.$ac_objext'
2310+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2311+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312+ (eval $ac_try) 2>&5
2313+ ac_status=$?
2314+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315+ (exit $ac_status); }; } &&
2316+ { ac_try='test -s conftest.$ac_objext'
2317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2318 (eval $ac_try) 2>&5
2319 ac_status=$?
2320@@ -1924,7 +1971,7 @@
2321
2322 ac_cv_prog_cc_g=no
2323 fi
2324-rm -f conftest.$ac_objext conftest.$ac_ext
2325+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2326 fi
2327 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2328 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2329@@ -1951,7 +1998,6 @@
2330 ac_cv_prog_cc_stdc=no
2331 ac_save_CC=$CC
2332 cat >conftest.$ac_ext <<_ACEOF
2333-#line $LINENO "configure"
2334 /* confdefs.h. */
2335 _ACEOF
2336 cat confdefs.h >>conftest.$ac_ext
2337@@ -1979,6 +2025,16 @@
2338 va_end (v);
2339 return s;
2340 }
2341+
2342+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2343+ function prototypes and stuff, but not '\xHH' hex character constants.
2344+ These don't provoke an error unfortunately, instead are silently treated
2345+ as 'x'. The following induces an error, until -std1 is added to get
2346+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2347+ array size at least. It's necessary to write '\x00'==0 to get something
2348+ that's true only with -std1. */
2349+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2350+
2351 int test (int i, double x);
2352 struct s1 {int (*f) (int a);};
2353 struct s2 {int (*f) (double a);};
2354@@ -2005,11 +2061,20 @@
2355 CC="$ac_save_CC $ac_arg"
2356 rm -f conftest.$ac_objext
2357 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2358- (eval $ac_compile) 2>&5
2359+ (eval $ac_compile) 2>conftest.er1
2360 ac_status=$?
2361+ grep -v '^ *+' conftest.er1 >conftest.err
2362+ rm -f conftest.er1
2363+ cat conftest.err >&5
2364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2365 (exit $ac_status); } &&
2366- { ac_try='test -s conftest.$ac_objext'
2367+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2368+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2369+ (eval $ac_try) 2>&5
2370+ ac_status=$?
2371+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372+ (exit $ac_status); }; } &&
2373+ { ac_try='test -s conftest.$ac_objext'
2374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2375 (eval $ac_try) 2>&5
2376 ac_status=$?
2377@@ -2022,7 +2087,7 @@
2378 sed 's/^/| /' conftest.$ac_ext >&5
2379
2380 fi
2381-rm -f conftest.$ac_objext
2382+rm -f conftest.err conftest.$ac_objext
2383 done
2384 rm -f conftest.$ac_ext conftest.$ac_objext
2385 CC=$ac_save_CC
2386@@ -2050,19 +2115,27 @@
2387 _ACEOF
2388 rm -f conftest.$ac_objext
2389 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2390- (eval $ac_compile) 2>&5
2391+ (eval $ac_compile) 2>conftest.er1
2392 ac_status=$?
2393+ grep -v '^ *+' conftest.er1 >conftest.err
2394+ rm -f conftest.er1
2395+ cat conftest.err >&5
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); } &&
2398- { ac_try='test -s conftest.$ac_objext'
2399+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2400+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401+ (eval $ac_try) 2>&5
2402+ ac_status=$?
2403+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404+ (exit $ac_status); }; } &&
2405+ { ac_try='test -s conftest.$ac_objext'
2406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407 (eval $ac_try) 2>&5
2408 ac_status=$?
2409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410 (exit $ac_status); }; }; then
2411 for ac_declaration in \
2412- ''\
2413- '#include <stdlib.h>' \
2414+ '' \
2415 'extern "C" void std::exit (int) throw (); using std::exit;' \
2416 'extern "C" void std::exit (int); using std::exit;' \
2417 'extern "C" void exit (int) throw ();' \
2418@@ -2070,14 +2143,13 @@
2419 'void exit (int);'
2420 do
2421 cat >conftest.$ac_ext <<_ACEOF
2422-#line $LINENO "configure"
2423 /* confdefs.h. */
2424 _ACEOF
2425 cat confdefs.h >>conftest.$ac_ext
2426 cat >>conftest.$ac_ext <<_ACEOF
2427 /* end confdefs.h. */
2428-#include <stdlib.h>
2429 $ac_declaration
2430+#include <stdlib.h>
2431 int
2432 main ()
2433 {
2434@@ -2088,11 +2160,20 @@
2435 _ACEOF
2436 rm -f conftest.$ac_objext
2437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2438- (eval $ac_compile) 2>&5
2439+ (eval $ac_compile) 2>conftest.er1
2440 ac_status=$?
2441+ grep -v '^ *+' conftest.er1 >conftest.err
2442+ rm -f conftest.er1
2443+ cat conftest.err >&5
2444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2445 (exit $ac_status); } &&
2446- { ac_try='test -s conftest.$ac_objext'
2447+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2448+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2449+ (eval $ac_try) 2>&5
2450+ ac_status=$?
2451+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452+ (exit $ac_status); }; } &&
2453+ { ac_try='test -s conftest.$ac_objext'
2454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2455 (eval $ac_try) 2>&5
2456 ac_status=$?
2457@@ -2105,9 +2186,8 @@
2458
2459 continue
2460 fi
2461-rm -f conftest.$ac_objext conftest.$ac_ext
2462+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2463 cat >conftest.$ac_ext <<_ACEOF
2464-#line $LINENO "configure"
2465 /* confdefs.h. */
2466 _ACEOF
2467 cat confdefs.h >>conftest.$ac_ext
2468@@ -2124,11 +2204,20 @@
2469 _ACEOF
2470 rm -f conftest.$ac_objext
2471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2472- (eval $ac_compile) 2>&5
2473+ (eval $ac_compile) 2>conftest.er1
2474 ac_status=$?
2475+ grep -v '^ *+' conftest.er1 >conftest.err
2476+ rm -f conftest.er1
2477+ cat conftest.err >&5
2478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479 (exit $ac_status); } &&
2480- { ac_try='test -s conftest.$ac_objext'
2481+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2482+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2483+ (eval $ac_try) 2>&5
2484+ ac_status=$?
2485+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2486+ (exit $ac_status); }; } &&
2487+ { ac_try='test -s conftest.$ac_objext'
2488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2489 (eval $ac_try) 2>&5
2490 ac_status=$?
2491@@ -2140,7 +2229,7 @@
2492 sed 's/^/| /' conftest.$ac_ext >&5
2493
2494 fi
2495-rm -f conftest.$ac_objext conftest.$ac_ext
2496+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2497 done
2498 rm -f conftest*
2499 if test -n "$ac_declaration"; then
2500@@ -2154,7 +2243,7 @@
2501 sed 's/^/| /' conftest.$ac_ext >&5
2502
2503 fi
2504-rm -f conftest.$ac_objext conftest.$ac_ext
2505+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2506 ac_ext=c
2507 ac_cpp='$CPP $CPPFLAGS'
2508 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2509@@ -2189,7 +2278,6 @@
2510 # On the NeXT, cc -E runs the code through the compiler's parser,
2511 # not just through cpp. "Syntax error" is here to catch this case.
2512 cat >conftest.$ac_ext <<_ACEOF
2513-#line $LINENO "configure"
2514 /* confdefs.h. */
2515 _ACEOF
2516 cat confdefs.h >>conftest.$ac_ext
2517@@ -2200,7 +2288,7 @@
2518 #else
2519 # include <assert.h>
2520 #endif
2521- Syntax error
2522+ Syntax error
2523 _ACEOF
2524 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2525 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2526@@ -2212,6 +2300,7 @@
2527 (exit $ac_status); } >/dev/null; then
2528 if test -s conftest.err; then
2529 ac_cpp_err=$ac_c_preproc_warn_flag
2530+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2531 else
2532 ac_cpp_err=
2533 fi
2534@@ -2232,7 +2321,6 @@
2535 # OK, works on sane cases. Now check whether non-existent headers
2536 # can be detected and how.
2537 cat >conftest.$ac_ext <<_ACEOF
2538-#line $LINENO "configure"
2539 /* confdefs.h. */
2540 _ACEOF
2541 cat confdefs.h >>conftest.$ac_ext
2542@@ -2250,6 +2338,7 @@
2543 (exit $ac_status); } >/dev/null; then
2544 if test -s conftest.err; then
2545 ac_cpp_err=$ac_c_preproc_warn_flag
2546+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2547 else
2548 ac_cpp_err=
2549 fi
2550@@ -2296,7 +2385,6 @@
2551 # On the NeXT, cc -E runs the code through the compiler's parser,
2552 # not just through cpp. "Syntax error" is here to catch this case.
2553 cat >conftest.$ac_ext <<_ACEOF
2554-#line $LINENO "configure"
2555 /* confdefs.h. */
2556 _ACEOF
2557 cat confdefs.h >>conftest.$ac_ext
2558@@ -2307,7 +2395,7 @@
2559 #else
2560 # include <assert.h>
2561 #endif
2562- Syntax error
2563+ Syntax error
2564 _ACEOF
2565 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2566 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2567@@ -2319,6 +2407,7 @@
2568 (exit $ac_status); } >/dev/null; then
2569 if test -s conftest.err; then
2570 ac_cpp_err=$ac_c_preproc_warn_flag
2571+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2572 else
2573 ac_cpp_err=
2574 fi
2575@@ -2339,7 +2428,6 @@
2576 # OK, works on sane cases. Now check whether non-existent headers
2577 # can be detected and how.
2578 cat >conftest.$ac_ext <<_ACEOF
2579-#line $LINENO "configure"
2580 /* confdefs.h. */
2581 _ACEOF
2582 cat confdefs.h >>conftest.$ac_ext
2583@@ -2357,6 +2445,7 @@
2584 (exit $ac_status); } >/dev/null; then
2585 if test -s conftest.err; then
2586 ac_cpp_err=$ac_c_preproc_warn_flag
2587+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2588 else
2589 ac_cpp_err=
2590 fi
2591@@ -2431,6 +2520,7 @@
2592 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2593 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2594 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2595+# OS/2's system install, which has a completely different semantic
2596 # ./install, which can be erroneously created by make from ./install.sh.
2597 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2598 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2599@@ -2447,6 +2537,7 @@
2600 case $as_dir/ in
2601 ./ | .// | /cC/* | \
2602 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2603+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2604 /usr/ucb/* ) ;;
2605 *)
2606 # OSF1 and SCO ODT 3.0 have their own names for install.
2607@@ -2454,20 +2545,20 @@
2608 # by default.
2609 for ac_prog in ginstall scoinst install; do
2610 for ac_exec_ext in '' $ac_executable_extensions; do
2611- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2612- if test $ac_prog = install &&
2613- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2614- # AIX install. It has an incompatible calling convention.
2615- :
2616- elif test $ac_prog = install &&
2617- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2618- # program-specific install script used by HP pwplus--don't use.
2619- :
2620- else
2621- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2622- break 3
2623- fi
2624- fi
2625+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2626+ if test $ac_prog = install &&
2627+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2628+ # AIX install. It has an incompatible calling convention.
2629+ :
2630+ elif test $ac_prog = install &&
2631+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2632+ # program-specific install script used by HP pwplus--don't use.
2633+ :
2634+ else
2635+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2636+ break 3
2637+ fi
2638+ fi
2639 done
2640 done
2641 ;;
2642@@ -2499,7 +2590,7 @@
2643
2644 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2645 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
2646-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2647+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
2648 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2649 echo $ECHO_N "(cached) $ECHO_C" >&6
2650 else
2651@@ -2596,7 +2687,6 @@
2652 echo "$as_me:$LINENO: checking for AIX" >&5
2653 echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2654 cat >conftest.$ac_ext <<_ACEOF
2655-#line $LINENO "configure"
2656 /* confdefs.h. */
2657 _ACEOF
2658 cat confdefs.h >>conftest.$ac_ext
2659@@ -2628,7 +2718,6 @@
2660 echo $ECHO_N "(cached) $ECHO_C" >&6
2661 else
2662 cat >conftest.$ac_ext <<_ACEOF
2663-#line $LINENO "configure"
2664 /* confdefs.h. */
2665 _ACEOF
2666 cat confdefs.h >>conftest.$ac_ext
2667@@ -2649,11 +2738,20 @@
2668 _ACEOF
2669 rm -f conftest.$ac_objext
2670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2671- (eval $ac_compile) 2>&5
2672+ (eval $ac_compile) 2>conftest.er1
2673 ac_status=$?
2674+ grep -v '^ *+' conftest.er1 >conftest.err
2675+ rm -f conftest.er1
2676+ cat conftest.err >&5
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); } &&
2679- { ac_try='test -s conftest.$ac_objext'
2680+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2681+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2682+ (eval $ac_try) 2>&5
2683+ ac_status=$?
2684+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685+ (exit $ac_status); }; } &&
2686+ { ac_try='test -s conftest.$ac_objext'
2687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2688 (eval $ac_try) 2>&5
2689 ac_status=$?
2690@@ -2666,12 +2764,11 @@
2691
2692 ac_cv_header_stdc=no
2693 fi
2694-rm -f conftest.$ac_objext conftest.$ac_ext
2695+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2696
2697 if test $ac_cv_header_stdc = yes; then
2698 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2699 cat >conftest.$ac_ext <<_ACEOF
2700-#line $LINENO "configure"
2701 /* confdefs.h. */
2702 _ACEOF
2703 cat confdefs.h >>conftest.$ac_ext
2704@@ -2693,7 +2790,6 @@
2705 if test $ac_cv_header_stdc = yes; then
2706 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2707 cat >conftest.$ac_ext <<_ACEOF
2708-#line $LINENO "configure"
2709 /* confdefs.h. */
2710 _ACEOF
2711 cat confdefs.h >>conftest.$ac_ext
2712@@ -2718,7 +2814,6 @@
2713 :
2714 else
2715 cat >conftest.$ac_ext <<_ACEOF
2716-#line $LINENO "configure"
2717 /* confdefs.h. */
2718 _ACEOF
2719 cat confdefs.h >>conftest.$ac_ext
2720@@ -2730,9 +2825,9 @@
2721 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2722 #else
2723 # define ISLOWER(c) \
2724- (('a' <= (c) && (c) <= 'i') \
2725- || ('j' <= (c) && (c) <= 'r') \
2726- || ('s' <= (c) && (c) <= 'z'))
2727+ (('a' <= (c) && (c) <= 'i') \
2728+ || ('j' <= (c) && (c) <= 'r') \
2729+ || ('s' <= (c) && (c) <= 'z'))
2730 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2731 #endif
2732
2733@@ -2743,7 +2838,7 @@
2734 int i;
2735 for (i = 0; i < 256; i++)
2736 if (XOR (islower (i), ISLOWER (i))
2737- || toupper (i) != TOUPPER (i))
2738+ || toupper (i) != TOUPPER (i))
2739 exit(2);
2740 exit (0);
2741 }
2742@@ -2768,7 +2863,7 @@
2743 ( exit $ac_status )
2744 ac_cv_header_stdc=no
2745 fi
2746-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2747+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2748 fi
2749 fi
2750 fi
2751@@ -2793,7 +2888,7 @@
2752
2753
2754 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2755- inttypes.h stdint.h unistd.h
2756+ inttypes.h stdint.h unistd.h
2757 do
2758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2759 echo "$as_me:$LINENO: checking for $ac_header" >&5
2760@@ -2802,7 +2897,6 @@
2761 echo $ECHO_N "(cached) $ECHO_C" >&6
2762 else
2763 cat >conftest.$ac_ext <<_ACEOF
2764-#line $LINENO "configure"
2765 /* confdefs.h. */
2766 _ACEOF
2767 cat confdefs.h >>conftest.$ac_ext
2768@@ -2814,11 +2908,20 @@
2769 _ACEOF
2770 rm -f conftest.$ac_objext
2771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2772- (eval $ac_compile) 2>&5
2773+ (eval $ac_compile) 2>conftest.er1
2774 ac_status=$?
2775+ grep -v '^ *+' conftest.er1 >conftest.err
2776+ rm -f conftest.er1
2777+ cat conftest.err >&5
2778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2779 (exit $ac_status); } &&
2780- { ac_try='test -s conftest.$ac_objext'
2781+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2782+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2783+ (eval $ac_try) 2>&5
2784+ ac_status=$?
2785+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2786+ (exit $ac_status); }; } &&
2787+ { ac_try='test -s conftest.$ac_objext'
2788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791@@ -2831,7 +2934,7 @@
2792
2793 eval "$as_ac_Header=no"
2794 fi
2795-rm -f conftest.$ac_objext conftest.$ac_ext
2796+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2797 fi
2798 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2799 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2800@@ -2858,7 +2961,6 @@
2801 echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2802 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2803 cat >conftest.$ac_ext <<_ACEOF
2804-#line $LINENO "configure"
2805 /* confdefs.h. */
2806 _ACEOF
2807 cat confdefs.h >>conftest.$ac_ext
2808@@ -2869,11 +2971,20 @@
2809 _ACEOF
2810 rm -f conftest.$ac_objext
2811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2812- (eval $ac_compile) 2>&5
2813+ (eval $ac_compile) 2>conftest.er1
2814 ac_status=$?
2815+ grep -v '^ *+' conftest.er1 >conftest.err
2816+ rm -f conftest.er1
2817+ cat conftest.err >&5
2818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2819 (exit $ac_status); } &&
2820- { ac_try='test -s conftest.$ac_objext'
2821+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2822+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2823+ (eval $ac_try) 2>&5
2824+ ac_status=$?
2825+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826+ (exit $ac_status); }; } &&
2827+ { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831@@ -2886,7 +2997,7 @@
2832
2833 ac_header_compiler=no
2834 fi
2835-rm -f conftest.$ac_objext conftest.$ac_ext
2836+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2837 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2838 echo "${ECHO_T}$ac_header_compiler" >&6
2839
2840@@ -2894,7 +3005,6 @@
2841 echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2842 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2843 cat >conftest.$ac_ext <<_ACEOF
2844-#line $LINENO "configure"
2845 /* confdefs.h. */
2846 _ACEOF
2847 cat confdefs.h >>conftest.$ac_ext
2848@@ -2912,6 +3022,7 @@
2849 (exit $ac_status); } >/dev/null; then
2850 if test -s conftest.err; then
2851 ac_cpp_err=$ac_c_preproc_warn_flag
2852+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2853 else
2854 ac_cpp_err=
2855 fi
2856@@ -2931,33 +3042,32 @@
2857 echo "${ECHO_T}$ac_header_preproc" >&6
2858
2859 # So? What about this header?
2860-case $ac_header_compiler:$ac_header_preproc in
2861- yes:no )
2862+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
2863+ yes:no: )
2864 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2865 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2866- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2867-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
2868- (
2869- cat <<\_ASBOX
2870-## ------------------------------------ ##
2871-## Report this to bug-autoconf@gnu.org. ##
2872-## ------------------------------------ ##
2873-_ASBOX
2874- ) |
2875- sed "s/^/$as_me: WARNING: /" >&2
2876+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
2877+echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
2878+ ac_header_preproc=yes
2879 ;;
2880- no:yes )
2881+ no:yes:* )
2882 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2883 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2884- { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2885-echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2886+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2887+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2888+ { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
2889+echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
2890+ { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
2891+echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2893 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
2894+ { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
2895+echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
2896 (
2897 cat <<\_ASBOX
2898-## ------------------------------------ ##
2899-## Report this to bug-autoconf@gnu.org. ##
2900-## ------------------------------------ ##
2901+## -------------------------------- ##
2902+## Report this to bug-patch@gnu.org ##
2903+## -------------------------------- ##
2904 _ASBOX
2905 ) |
2906 sed "s/^/$as_me: WARNING: /" >&2
2907@@ -3000,15 +3110,15 @@
2908 fi
2909
2910
2911-echo "$as_me:$LINENO: checking for library containing strerror" >&5
2912-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
2913-if test "${ac_cv_search_strerror+set}" = set; then
2914+
2915+ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
2916+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
2917+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
2918 echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920- ac_func_search_save_LIBS=$LIBS
2921-ac_cv_search_strerror=no
2922+ ac_check_lib_save_LIBS=$LIBS
2923+LIBS="-lcposix $LIBS"
2924 cat >conftest.$ac_ext <<_ACEOF
2925-#line $LINENO "configure"
2926 /* confdefs.h. */
2927 _ACEOF
2928 cat confdefs.h >>conftest.$ac_ext
2929@@ -3032,79 +3142,43 @@
2930 _ACEOF
2931 rm -f conftest.$ac_objext conftest$ac_exeext
2932 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2933- (eval $ac_link) 2>&5
2934+ (eval $ac_link) 2>conftest.er1
2935 ac_status=$?
2936+ grep -v '^ *+' conftest.er1 >conftest.err
2937+ rm -f conftest.er1
2938+ cat conftest.err >&5
2939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2940 (exit $ac_status); } &&
2941- { ac_try='test -s conftest$ac_exeext'
2942+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2944 (eval $ac_try) 2>&5
2945 ac_status=$?
2946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2947- (exit $ac_status); }; }; then
2948- ac_cv_search_strerror="none required"
2949-else
2950- echo "$as_me: failed program was:" >&5
2951-sed 's/^/| /' conftest.$ac_ext >&5
2952-
2953-fi
2954-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2955-if test "$ac_cv_search_strerror" = no; then
2956- for ac_lib in cposix; do
2957- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2958- cat >conftest.$ac_ext <<_ACEOF
2959-#line $LINENO "configure"
2960-/* confdefs.h. */
2961-_ACEOF
2962-cat confdefs.h >>conftest.$ac_ext
2963-cat >>conftest.$ac_ext <<_ACEOF
2964-/* end confdefs.h. */
2965-
2966-/* Override any gcc2 internal prototype to avoid an error. */
2967-#ifdef __cplusplus
2968-extern "C"
2969-#endif
2970-/* We use char because int might match the return type of a gcc2
2971- builtin and then its argument prototype would still apply. */
2972-char strerror ();
2973-int
2974-main ()
2975-{
2976-strerror ();
2977- ;
2978- return 0;
2979-}
2980-_ACEOF
2981-rm -f conftest.$ac_objext conftest$ac_exeext
2982-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2983- (eval $ac_link) 2>&5
2984- ac_status=$?
2985- echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986- (exit $ac_status); } &&
2987- { ac_try='test -s conftest$ac_exeext'
2988+ (exit $ac_status); }; } &&
2989+ { ac_try='test -s conftest$ac_exeext'
2990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991 (eval $ac_try) 2>&5
2992 ac_status=$?
2993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994 (exit $ac_status); }; }; then
2995- ac_cv_search_strerror="-l$ac_lib"
2996-break
2997+ ac_cv_lib_cposix_strerror=yes
2998 else
2999 echo "$as_me: failed program was:" >&5
3000 sed 's/^/| /' conftest.$ac_ext >&5
3001
3002+ac_cv_lib_cposix_strerror=no
3003 fi
3004-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3005- done
3006+rm -f conftest.err conftest.$ac_objext \
3007+ conftest$ac_exeext conftest.$ac_ext
3008+LIBS=$ac_check_lib_save_LIBS
3009 fi
3010-LIBS=$ac_func_search_save_LIBS
3011+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
3012+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
3013+if test $ac_cv_lib_cposix_strerror = yes; then
3014+ LIBS="$LIBS -lcposix"
3015 fi
3016-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
3017-echo "${ECHO_T}$ac_cv_search_strerror" >&6
3018-if test "$ac_cv_search_strerror" != no; then
3019- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
3020
3021-fi
3022+
3023
3024 # Check whether --enable-largefile or --disable-largefile was given.
3025 if test "${enable_largefile+set}" = set; then
3026@@ -3124,8 +3198,7 @@
3027 while :; do
3028 # IRIX 6.2 and later do not support large files by default,
3029 # so use the C compiler's -n32 option if that helps.
3030- cat >conftest.$ac_ext <<_ACEOF
3031-#line $LINENO "configure"
3032+ cat >conftest.$ac_ext <<_ACEOF
3033 /* confdefs.h. */
3034 _ACEOF
3035 cat confdefs.h >>conftest.$ac_ext
3036@@ -3150,11 +3223,20 @@
3037 _ACEOF
3038 rm -f conftest.$ac_objext
3039 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3040- (eval $ac_compile) 2>&5
3041+ (eval $ac_compile) 2>conftest.er1
3042 ac_status=$?
3043+ grep -v '^ *+' conftest.er1 >conftest.err
3044+ rm -f conftest.er1
3045+ cat conftest.err >&5
3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047 (exit $ac_status); } &&
3048- { ac_try='test -s conftest.$ac_objext'
3049+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3050+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3051+ (eval $ac_try) 2>&5
3052+ ac_status=$?
3053+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3054+ (exit $ac_status); }; } &&
3055+ { ac_try='test -s conftest.$ac_objext'
3056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3057 (eval $ac_try) 2>&5
3058 ac_status=$?
3059@@ -3166,15 +3248,24 @@
3060 sed 's/^/| /' conftest.$ac_ext >&5
3061
3062 fi
3063-rm -f conftest.$ac_objext
3064+rm -f conftest.err conftest.$ac_objext
3065 CC="$CC -n32"
3066 rm -f conftest.$ac_objext
3067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3068- (eval $ac_compile) 2>&5
3069+ (eval $ac_compile) 2>conftest.er1
3070 ac_status=$?
3071+ grep -v '^ *+' conftest.er1 >conftest.err
3072+ rm -f conftest.er1
3073+ cat conftest.err >&5
3074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3075 (exit $ac_status); } &&
3076- { ac_try='test -s conftest.$ac_objext'
3077+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3078+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3079+ (eval $ac_try) 2>&5
3080+ ac_status=$?
3081+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3082+ (exit $ac_status); }; } &&
3083+ { ac_try='test -s conftest.$ac_objext'
3084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3085 (eval $ac_try) 2>&5
3086 ac_status=$?
3087@@ -3186,8 +3277,8 @@
3088 sed 's/^/| /' conftest.$ac_ext >&5
3089
3090 fi
3091-rm -f conftest.$ac_objext
3092- break
3093+rm -f conftest.err conftest.$ac_objext
3094+ break
3095 done
3096 CC=$ac_save_CC
3097 rm -f conftest.$ac_ext
3098@@ -3207,7 +3298,6 @@
3099 while :; do
3100 ac_cv_sys_file_offset_bits=no
3101 cat >conftest.$ac_ext <<_ACEOF
3102-#line $LINENO "configure"
3103 /* confdefs.h. */
3104 _ACEOF
3105 cat confdefs.h >>conftest.$ac_ext
3106@@ -3232,11 +3322,20 @@
3107 _ACEOF
3108 rm -f conftest.$ac_objext
3109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3110- (eval $ac_compile) 2>&5
3111+ (eval $ac_compile) 2>conftest.er1
3112 ac_status=$?
3113+ grep -v '^ *+' conftest.er1 >conftest.err
3114+ rm -f conftest.er1
3115+ cat conftest.err >&5
3116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3117 (exit $ac_status); } &&
3118- { ac_try='test -s conftest.$ac_objext'
3119+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3120+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3121+ (eval $ac_try) 2>&5
3122+ ac_status=$?
3123+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3124+ (exit $ac_status); }; } &&
3125+ { ac_try='test -s conftest.$ac_objext'
3126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3127 (eval $ac_try) 2>&5
3128 ac_status=$?
3129@@ -3248,9 +3347,8 @@
3130 sed 's/^/| /' conftest.$ac_ext >&5
3131
3132 fi
3133-rm -f conftest.$ac_objext conftest.$ac_ext
3134+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3135 cat >conftest.$ac_ext <<_ACEOF
3136-#line $LINENO "configure"
3137 /* confdefs.h. */
3138 _ACEOF
3139 cat confdefs.h >>conftest.$ac_ext
3140@@ -3276,11 +3374,20 @@
3141 _ACEOF
3142 rm -f conftest.$ac_objext
3143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3144- (eval $ac_compile) 2>&5
3145+ (eval $ac_compile) 2>conftest.er1
3146 ac_status=$?
3147+ grep -v '^ *+' conftest.er1 >conftest.err
3148+ rm -f conftest.er1
3149+ cat conftest.err >&5
3150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3151 (exit $ac_status); } &&
3152- { ac_try='test -s conftest.$ac_objext'
3153+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3154+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3155+ (eval $ac_try) 2>&5
3156+ ac_status=$?
3157+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3158+ (exit $ac_status); }; } &&
3159+ { ac_try='test -s conftest.$ac_objext'
3160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3161 (eval $ac_try) 2>&5
3162 ac_status=$?
3163@@ -3292,7 +3399,7 @@
3164 sed 's/^/| /' conftest.$ac_ext >&5
3165
3166 fi
3167-rm -f conftest.$ac_objext conftest.$ac_ext
3168+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3169 break
3170 done
3171 fi
3172@@ -3314,7 +3421,6 @@
3173 while :; do
3174 ac_cv_sys_large_files=no
3175 cat >conftest.$ac_ext <<_ACEOF
3176-#line $LINENO "configure"
3177 /* confdefs.h. */
3178 _ACEOF
3179 cat confdefs.h >>conftest.$ac_ext
3180@@ -3339,11 +3445,20 @@
3181 _ACEOF
3182 rm -f conftest.$ac_objext
3183 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3184- (eval $ac_compile) 2>&5
3185+ (eval $ac_compile) 2>conftest.er1
3186 ac_status=$?
3187+ grep -v '^ *+' conftest.er1 >conftest.err
3188+ rm -f conftest.er1
3189+ cat conftest.err >&5
3190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3191 (exit $ac_status); } &&
3192- { ac_try='test -s conftest.$ac_objext'
3193+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3194+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3195+ (eval $ac_try) 2>&5
3196+ ac_status=$?
3197+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198+ (exit $ac_status); }; } &&
3199+ { ac_try='test -s conftest.$ac_objext'
3200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3201 (eval $ac_try) 2>&5
3202 ac_status=$?
3203@@ -3355,9 +3470,8 @@
3204 sed 's/^/| /' conftest.$ac_ext >&5
3205
3206 fi
3207-rm -f conftest.$ac_objext conftest.$ac_ext
3208+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3209 cat >conftest.$ac_ext <<_ACEOF
3210-#line $LINENO "configure"
3211 /* confdefs.h. */
3212 _ACEOF
3213 cat confdefs.h >>conftest.$ac_ext
3214@@ -3383,11 +3497,20 @@
3215 _ACEOF
3216 rm -f conftest.$ac_objext
3217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3218- (eval $ac_compile) 2>&5
3219+ (eval $ac_compile) 2>conftest.er1
3220 ac_status=$?
3221+ grep -v '^ *+' conftest.er1 >conftest.err
3222+ rm -f conftest.er1
3223+ cat conftest.err >&5
3224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3225 (exit $ac_status); } &&
3226- { ac_try='test -s conftest.$ac_objext'
3227+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3228+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3229+ (eval $ac_try) 2>&5
3230+ ac_status=$?
3231+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3232+ (exit $ac_status); }; } &&
3233+ { ac_try='test -s conftest.$ac_objext'
3234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3235 (eval $ac_try) 2>&5
3236 ac_status=$?
3237@@ -3399,7 +3522,7 @@
3238 sed 's/^/| /' conftest.$ac_ext >&5
3239
3240 fi
3241-rm -f conftest.$ac_objext conftest.$ac_ext
3242+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3243 break
3244 done
3245 fi
3246@@ -3443,7 +3566,6 @@
3247 echo $ECHO_N "(cached) $ECHO_C" >&6
3248 else
3249 cat >conftest.$ac_ext <<_ACEOF
3250-#line $LINENO "configure"
3251 /* confdefs.h. */
3252 _ACEOF
3253 cat confdefs.h >>conftest.$ac_ext
3254@@ -3506,11 +3628,20 @@
3255 _ACEOF
3256 rm -f conftest.$ac_objext
3257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3258- (eval $ac_compile) 2>&5
3259+ (eval $ac_compile) 2>conftest.er1
3260 ac_status=$?
3261+ grep -v '^ *+' conftest.er1 >conftest.err
3262+ rm -f conftest.er1
3263+ cat conftest.err >&5
3264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3265 (exit $ac_status); } &&
3266- { ac_try='test -s conftest.$ac_objext'
3267+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3268+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3269+ (eval $ac_try) 2>&5
3270+ ac_status=$?
3271+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3272+ (exit $ac_status); }; } &&
3273+ { ac_try='test -s conftest.$ac_objext'
3274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3275 (eval $ac_try) 2>&5
3276 ac_status=$?
3277@@ -3523,7 +3654,7 @@
3278
3279 ac_cv_c_const=no
3280 fi
3281-rm -f conftest.$ac_objext conftest.$ac_ext
3282+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3283 fi
3284 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3285 echo "${ECHO_T}$ac_cv_c_const" >&6
3286@@ -3550,7 +3681,6 @@
3287 echo $ECHO_N "(cached) $ECHO_C" >&6
3288 else
3289 cat >conftest.$ac_ext <<_ACEOF
3290-#line $LINENO "configure"
3291 /* confdefs.h. */
3292 _ACEOF
3293 cat confdefs.h >>conftest.$ac_ext
3294@@ -3570,11 +3700,20 @@
3295 _ACEOF
3296 rm -f conftest.$ac_objext
3297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3298- (eval $ac_compile) 2>&5
3299+ (eval $ac_compile) 2>conftest.er1
3300 ac_status=$?
3301+ grep -v '^ *+' conftest.er1 >conftest.err
3302+ rm -f conftest.er1
3303+ cat conftest.err >&5
3304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3305 (exit $ac_status); } &&
3306- { ac_try='test -s conftest.$ac_objext'
3307+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3308+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3309+ (eval $ac_try) 2>&5
3310+ ac_status=$?
3311+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3312+ (exit $ac_status); }; } &&
3313+ { ac_try='test -s conftest.$ac_objext'
3314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3315 (eval $ac_try) 2>&5
3316 ac_status=$?
3317@@ -3587,7 +3726,7 @@
3318
3319 eval "$as_ac_Header=no"
3320 fi
3321-rm -f conftest.$ac_objext conftest.$ac_ext
3322+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3323 fi
3324 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3325 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3326@@ -3610,7 +3749,6 @@
3327 ac_func_search_save_LIBS=$LIBS
3328 ac_cv_search_opendir=no
3329 cat >conftest.$ac_ext <<_ACEOF
3330-#line $LINENO "configure"
3331 /* confdefs.h. */
3332 _ACEOF
3333 cat confdefs.h >>conftest.$ac_ext
3334@@ -3634,11 +3772,20 @@
3335 _ACEOF
3336 rm -f conftest.$ac_objext conftest$ac_exeext
3337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3338- (eval $ac_link) 2>&5
3339+ (eval $ac_link) 2>conftest.er1
3340 ac_status=$?
3341+ grep -v '^ *+' conftest.er1 >conftest.err
3342+ rm -f conftest.er1
3343+ cat conftest.err >&5
3344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3345 (exit $ac_status); } &&
3346- { ac_try='test -s conftest$ac_exeext'
3347+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3348+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3349+ (eval $ac_try) 2>&5
3350+ ac_status=$?
3351+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352+ (exit $ac_status); }; } &&
3353+ { ac_try='test -s conftest$ac_exeext'
3354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3355 (eval $ac_try) 2>&5
3356 ac_status=$?
3357@@ -3650,12 +3797,12 @@
3358 sed 's/^/| /' conftest.$ac_ext >&5
3359
3360 fi
3361-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3362+rm -f conftest.err conftest.$ac_objext \
3363+ conftest$ac_exeext conftest.$ac_ext
3364 if test "$ac_cv_search_opendir" = no; then
3365 for ac_lib in dir; do
3366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3367 cat >conftest.$ac_ext <<_ACEOF
3368-#line $LINENO "configure"
3369 /* confdefs.h. */
3370 _ACEOF
3371 cat confdefs.h >>conftest.$ac_ext
3372@@ -3679,11 +3826,20 @@
3373 _ACEOF
3374 rm -f conftest.$ac_objext conftest$ac_exeext
3375 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3376- (eval $ac_link) 2>&5
3377+ (eval $ac_link) 2>conftest.er1
3378 ac_status=$?
3379+ grep -v '^ *+' conftest.er1 >conftest.err
3380+ rm -f conftest.er1
3381+ cat conftest.err >&5
3382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3383 (exit $ac_status); } &&
3384- { ac_try='test -s conftest$ac_exeext'
3385+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3386+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3387+ (eval $ac_try) 2>&5
3388+ ac_status=$?
3389+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390+ (exit $ac_status); }; } &&
3391+ { ac_try='test -s conftest$ac_exeext'
3392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3393 (eval $ac_try) 2>&5
3394 ac_status=$?
3395@@ -3696,7 +3852,8 @@
3396 sed 's/^/| /' conftest.$ac_ext >&5
3397
3398 fi
3399-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3400+rm -f conftest.err conftest.$ac_objext \
3401+ conftest$ac_exeext conftest.$ac_ext
3402 done
3403 fi
3404 LIBS=$ac_func_search_save_LIBS
3405@@ -3717,7 +3874,6 @@
3406 ac_func_search_save_LIBS=$LIBS
3407 ac_cv_search_opendir=no
3408 cat >conftest.$ac_ext <<_ACEOF
3409-#line $LINENO "configure"
3410 /* confdefs.h. */
3411 _ACEOF
3412 cat confdefs.h >>conftest.$ac_ext
3413@@ -3741,11 +3897,20 @@
3414 _ACEOF
3415 rm -f conftest.$ac_objext conftest$ac_exeext
3416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3417- (eval $ac_link) 2>&5
3418+ (eval $ac_link) 2>conftest.er1
3419 ac_status=$?
3420+ grep -v '^ *+' conftest.er1 >conftest.err
3421+ rm -f conftest.er1
3422+ cat conftest.err >&5
3423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3424 (exit $ac_status); } &&
3425- { ac_try='test -s conftest$ac_exeext'
3426+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3427+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3428+ (eval $ac_try) 2>&5
3429+ ac_status=$?
3430+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3431+ (exit $ac_status); }; } &&
3432+ { ac_try='test -s conftest$ac_exeext'
3433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3434 (eval $ac_try) 2>&5
3435 ac_status=$?
3436@@ -3757,12 +3922,12 @@
3437 sed 's/^/| /' conftest.$ac_ext >&5
3438
3439 fi
3440-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3441+rm -f conftest.err conftest.$ac_objext \
3442+ conftest$ac_exeext conftest.$ac_ext
3443 if test "$ac_cv_search_opendir" = no; then
3444 for ac_lib in x; do
3445 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3446 cat >conftest.$ac_ext <<_ACEOF
3447-#line $LINENO "configure"
3448 /* confdefs.h. */
3449 _ACEOF
3450 cat confdefs.h >>conftest.$ac_ext
3451@@ -3786,11 +3951,20 @@
3452 _ACEOF
3453 rm -f conftest.$ac_objext conftest$ac_exeext
3454 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3455- (eval $ac_link) 2>&5
3456+ (eval $ac_link) 2>conftest.er1
3457 ac_status=$?
3458+ grep -v '^ *+' conftest.er1 >conftest.err
3459+ rm -f conftest.er1
3460+ cat conftest.err >&5
3461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462 (exit $ac_status); } &&
3463- { ac_try='test -s conftest$ac_exeext'
3464+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3465+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3466+ (eval $ac_try) 2>&5
3467+ ac_status=$?
3468+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3469+ (exit $ac_status); }; } &&
3470+ { ac_try='test -s conftest$ac_exeext'
3471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3472 (eval $ac_try) 2>&5
3473 ac_status=$?
3474@@ -3803,7 +3977,8 @@
3475 sed 's/^/| /' conftest.$ac_ext >&5
3476
3477 fi
3478-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3479+rm -f conftest.err conftest.$ac_objext \
3480+ conftest$ac_exeext conftest.$ac_ext
3481 done
3482 fi
3483 LIBS=$ac_func_search_save_LIBS
3484@@ -3823,7 +3998,6 @@
3485 echo $ECHO_N "(cached) $ECHO_C" >&6
3486 else
3487 cat >conftest.$ac_ext <<_ACEOF
3488-#line $LINENO "configure"
3489 /* confdefs.h. */
3490 _ACEOF
3491 cat confdefs.h >>conftest.$ac_ext
3492@@ -3844,11 +4018,20 @@
3493 _ACEOF
3494 rm -f conftest.$ac_objext
3495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3496- (eval $ac_compile) 2>&5
3497+ (eval $ac_compile) 2>conftest.er1
3498 ac_status=$?
3499+ grep -v '^ *+' conftest.er1 >conftest.err
3500+ rm -f conftest.er1
3501+ cat conftest.err >&5
3502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3503 (exit $ac_status); } &&
3504- { ac_try='test -s conftest.$ac_objext'
3505+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3506+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3507+ (eval $ac_try) 2>&5
3508+ ac_status=$?
3509+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3510+ (exit $ac_status); }; } &&
3511+ { ac_try='test -s conftest.$ac_objext'
3512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3513 (eval $ac_try) 2>&5
3514 ac_status=$?
3515@@ -3861,12 +4044,11 @@
3516
3517 ac_cv_header_stdc=no
3518 fi
3519-rm -f conftest.$ac_objext conftest.$ac_ext
3520+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3521
3522 if test $ac_cv_header_stdc = yes; then
3523 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3524 cat >conftest.$ac_ext <<_ACEOF
3525-#line $LINENO "configure"
3526 /* confdefs.h. */
3527 _ACEOF
3528 cat confdefs.h >>conftest.$ac_ext
3529@@ -3888,7 +4070,6 @@
3530 if test $ac_cv_header_stdc = yes; then
3531 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3532 cat >conftest.$ac_ext <<_ACEOF
3533-#line $LINENO "configure"
3534 /* confdefs.h. */
3535 _ACEOF
3536 cat confdefs.h >>conftest.$ac_ext
3537@@ -3913,7 +4094,6 @@
3538 :
3539 else
3540 cat >conftest.$ac_ext <<_ACEOF
3541-#line $LINENO "configure"
3542 /* confdefs.h. */
3543 _ACEOF
3544 cat confdefs.h >>conftest.$ac_ext
3545@@ -3925,9 +4105,9 @@
3546 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3547 #else
3548 # define ISLOWER(c) \
3549- (('a' <= (c) && (c) <= 'i') \
3550- || ('j' <= (c) && (c) <= 'r') \
3551- || ('s' <= (c) && (c) <= 'z'))
3552+ (('a' <= (c) && (c) <= 'i') \
3553+ || ('j' <= (c) && (c) <= 'r') \
3554+ || ('s' <= (c) && (c) <= 'z'))
3555 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3556 #endif
3557
3558@@ -3938,7 +4118,7 @@
3559 int i;
3560 for (i = 0; i < 256; i++)
3561 if (XOR (islower (i), ISLOWER (i))
3562- || toupper (i) != TOUPPER (i))
3563+ || toupper (i) != TOUPPER (i))
3564 exit(2);
3565 exit (0);
3566 }
3567@@ -3963,7 +4143,7 @@
3568 ( exit $ac_status )
3569 ac_cv_header_stdc=no
3570 fi
3571-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3572+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3573 fi
3574 fi
3575 fi
3576@@ -3999,7 +4179,6 @@
3577 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3578 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3579 cat >conftest.$ac_ext <<_ACEOF
3580-#line $LINENO "configure"
3581 /* confdefs.h. */
3582 _ACEOF
3583 cat confdefs.h >>conftest.$ac_ext
3584@@ -4010,11 +4189,20 @@
3585 _ACEOF
3586 rm -f conftest.$ac_objext
3587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3588- (eval $ac_compile) 2>&5
3589+ (eval $ac_compile) 2>conftest.er1
3590 ac_status=$?
3591+ grep -v '^ *+' conftest.er1 >conftest.err
3592+ rm -f conftest.er1
3593+ cat conftest.err >&5
3594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3595 (exit $ac_status); } &&
3596- { ac_try='test -s conftest.$ac_objext'
3597+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3598+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3599+ (eval $ac_try) 2>&5
3600+ ac_status=$?
3601+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3602+ (exit $ac_status); }; } &&
3603+ { ac_try='test -s conftest.$ac_objext'
3604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3605 (eval $ac_try) 2>&5
3606 ac_status=$?
3607@@ -4027,7 +4215,7 @@
3608
3609 ac_header_compiler=no
3610 fi
3611-rm -f conftest.$ac_objext conftest.$ac_ext
3612+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3613 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3614 echo "${ECHO_T}$ac_header_compiler" >&6
3615
3616@@ -4035,7 +4223,6 @@
3617 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3618 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3619 cat >conftest.$ac_ext <<_ACEOF
3620-#line $LINENO "configure"
3621 /* confdefs.h. */
3622 _ACEOF
3623 cat confdefs.h >>conftest.$ac_ext
3624@@ -4053,6 +4240,7 @@
3625 (exit $ac_status); } >/dev/null; then
3626 if test -s conftest.err; then
3627 ac_cpp_err=$ac_c_preproc_warn_flag
3628+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3629 else
3630 ac_cpp_err=
3631 fi
3632@@ -4072,33 +4260,32 @@
3633 echo "${ECHO_T}$ac_header_preproc" >&6
3634
3635 # So? What about this header?
3636-case $ac_header_compiler:$ac_header_preproc in
3637- yes:no )
3638+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3639+ yes:no: )
3640 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3641 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3642+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3643+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3644+ ac_header_preproc=yes
3645+ ;;
3646+ no:yes:* )
3647+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3648+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3649+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3650+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3651+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3652+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3653+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
3654+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
3655 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3656 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3657+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3658+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3659 (
3660 cat <<\_ASBOX
3661-## ------------------------------------ ##
3662-## Report this to bug-autoconf@gnu.org. ##
3663-## ------------------------------------ ##
3664-_ASBOX
3665- ) |
3666- sed "s/^/$as_me: WARNING: /" >&2
3667- ;;
3668- no:yes )
3669- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3670-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3671- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3672-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3673- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3674-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3675- (
3676- cat <<\_ASBOX
3677-## ------------------------------------ ##
3678-## Report this to bug-autoconf@gnu.org. ##
3679-## ------------------------------------ ##
3680+## -------------------------------- ##
3681+## Report this to bug-patch@gnu.org ##
3682+## -------------------------------- ##
3683 _ASBOX
3684 ) |
3685 sed "s/^/$as_me: WARNING: /" >&2
3686@@ -4109,7 +4296,7 @@
3687 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
3689 else
3690- eval "$as_ac_Header=$ac_header_preproc"
3691+ eval "$as_ac_Header=\$ac_header_preproc"
3692 fi
3693 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3695@@ -4131,7 +4318,6 @@
3696 echo $ECHO_N "(cached) $ECHO_C" >&6
3697 else
3698 cat >conftest.$ac_ext <<_ACEOF
3699-#line $LINENO "configure"
3700 /* confdefs.h. */
3701 _ACEOF
3702 cat confdefs.h >>conftest.$ac_ext
3703@@ -4151,11 +4337,20 @@
3704 _ACEOF
3705 rm -f conftest.$ac_objext
3706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3707- (eval $ac_compile) 2>&5
3708+ (eval $ac_compile) 2>conftest.er1
3709 ac_status=$?
3710+ grep -v '^ *+' conftest.er1 >conftest.err
3711+ rm -f conftest.er1
3712+ cat conftest.err >&5
3713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714 (exit $ac_status); } &&
3715- { ac_try='test -s conftest.$ac_objext'
3716+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3717+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3718+ (eval $ac_try) 2>&5
3719+ ac_status=$?
3720+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3721+ (exit $ac_status); }; } &&
3722+ { ac_try='test -s conftest.$ac_objext'
3723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3724 (eval $ac_try) 2>&5
3725 ac_status=$?
3726@@ -4168,7 +4363,7 @@
3727
3728 ac_cv_type_mode_t=no
3729 fi
3730-rm -f conftest.$ac_objext conftest.$ac_ext
3731+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3732 fi
3733 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3734 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3735@@ -4188,7 +4383,6 @@
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
3737 else
3738 cat >conftest.$ac_ext <<_ACEOF
3739-#line $LINENO "configure"
3740 /* confdefs.h. */
3741 _ACEOF
3742 cat confdefs.h >>conftest.$ac_ext
3743@@ -4208,11 +4402,20 @@
3744 _ACEOF
3745 rm -f conftest.$ac_objext
3746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3747- (eval $ac_compile) 2>&5
3748+ (eval $ac_compile) 2>conftest.er1
3749 ac_status=$?
3750+ grep -v '^ *+' conftest.er1 >conftest.err
3751+ rm -f conftest.er1
3752+ cat conftest.err >&5
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); } &&
3755- { ac_try='test -s conftest.$ac_objext'
3756+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3757+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3758+ (eval $ac_try) 2>&5
3759+ ac_status=$?
3760+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761+ (exit $ac_status); }; } &&
3762+ { ac_try='test -s conftest.$ac_objext'
3763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3764 (eval $ac_try) 2>&5
3765 ac_status=$?
3766@@ -4225,7 +4428,7 @@
3767
3768 ac_cv_type_off_t=no
3769 fi
3770-rm -f conftest.$ac_objext conftest.$ac_ext
3771+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3772 fi
3773 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
3774 echo "${ECHO_T}$ac_cv_type_off_t" >&6
3775@@ -4245,7 +4448,6 @@
3776 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778 cat >conftest.$ac_ext <<_ACEOF
3779-#line $LINENO "configure"
3780 /* confdefs.h. */
3781 _ACEOF
3782 cat confdefs.h >>conftest.$ac_ext
3783@@ -4265,11 +4467,20 @@
3784 _ACEOF
3785 rm -f conftest.$ac_objext
3786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3787- (eval $ac_compile) 2>&5
3788+ (eval $ac_compile) 2>conftest.er1
3789 ac_status=$?
3790+ grep -v '^ *+' conftest.er1 >conftest.err
3791+ rm -f conftest.er1
3792+ cat conftest.err >&5
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } &&
3795- { ac_try='test -s conftest.$ac_objext'
3796+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3797+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3798+ (eval $ac_try) 2>&5
3799+ ac_status=$?
3800+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801+ (exit $ac_status); }; } &&
3802+ { ac_try='test -s conftest.$ac_objext'
3803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3804 (eval $ac_try) 2>&5
3805 ac_status=$?
3806@@ -4282,7 +4493,7 @@
3807
3808 ac_cv_type_pid_t=no
3809 fi
3810-rm -f conftest.$ac_objext conftest.$ac_ext
3811+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3812 fi
3813 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3814 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3815@@ -4302,7 +4513,6 @@
3816 echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818 cat >conftest.$ac_ext <<_ACEOF
3819-#line $LINENO "configure"
3820 /* confdefs.h. */
3821 _ACEOF
3822 cat confdefs.h >>conftest.$ac_ext
3823@@ -4329,11 +4539,20 @@
3824 _ACEOF
3825 rm -f conftest.$ac_objext
3826 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3827- (eval $ac_compile) 2>&5
3828+ (eval $ac_compile) 2>conftest.er1
3829 ac_status=$?
3830+ grep -v '^ *+' conftest.er1 >conftest.err
3831+ rm -f conftest.er1
3832+ cat conftest.err >&5
3833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3834 (exit $ac_status); } &&
3835- { ac_try='test -s conftest.$ac_objext'
3836+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3837+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3838+ (eval $ac_try) 2>&5
3839+ ac_status=$?
3840+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3841+ (exit $ac_status); }; } &&
3842+ { ac_try='test -s conftest.$ac_objext'
3843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3844 (eval $ac_try) 2>&5
3845 ac_status=$?
3846@@ -4346,7 +4565,7 @@
3847
3848 ac_cv_type_signal=int
3849 fi
3850-rm -f conftest.$ac_objext conftest.$ac_ext
3851+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3852 fi
3853 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3854 echo "${ECHO_T}$ac_cv_type_signal" >&6
3855@@ -4362,7 +4581,6 @@
3856 echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858 cat >conftest.$ac_ext <<_ACEOF
3859-#line $LINENO "configure"
3860 /* confdefs.h. */
3861 _ACEOF
3862 cat confdefs.h >>conftest.$ac_ext
3863@@ -4382,11 +4600,20 @@
3864 _ACEOF
3865 rm -f conftest.$ac_objext
3866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3867- (eval $ac_compile) 2>&5
3868+ (eval $ac_compile) 2>conftest.er1
3869 ac_status=$?
3870+ grep -v '^ *+' conftest.er1 >conftest.err
3871+ rm -f conftest.er1
3872+ cat conftest.err >&5
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } &&
3875- { ac_try='test -s conftest.$ac_objext'
3876+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3877+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3878+ (eval $ac_try) 2>&5
3879+ ac_status=$?
3880+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3881+ (exit $ac_status); }; } &&
3882+ { ac_try='test -s conftest.$ac_objext'
3883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3884 (eval $ac_try) 2>&5
3885 ac_status=$?
3886@@ -4399,7 +4626,7 @@
3887
3888 ac_cv_type_size_t=no
3889 fi
3890-rm -f conftest.$ac_objext conftest.$ac_ext
3891+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3892 fi
3893 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3894 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3895@@ -4419,7 +4646,6 @@
3896 echo $ECHO_N "(cached) $ECHO_C" >&6
3897 else
3898 cat >conftest.$ac_ext <<_ACEOF
3899-#line $LINENO "configure"
3900 /* confdefs.h. */
3901 _ACEOF
3902 cat confdefs.h >>conftest.$ac_ext
3903@@ -4468,11 +4694,20 @@
3904 _ACEOF
3905 rm -f conftest.$ac_objext
3906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3907- (eval $ac_compile) 2>&5
3908+ (eval $ac_compile) 2>conftest.er1
3909 ac_status=$?
3910+ grep -v '^ *+' conftest.er1 >conftest.err
3911+ rm -f conftest.er1
3912+ cat conftest.err >&5
3913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3914 (exit $ac_status); } &&
3915- { ac_try='test -s conftest.$ac_objext'
3916+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3917+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3918+ (eval $ac_try) 2>&5
3919+ ac_status=$?
3920+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921+ (exit $ac_status); }; } &&
3922+ { ac_try='test -s conftest.$ac_objext'
3923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3924 (eval $ac_try) 2>&5
3925 ac_status=$?
3926@@ -4485,7 +4720,7 @@
3927
3928 ac_cv_header_stdbool_h=no
3929 fi
3930-rm -f conftest.$ac_objext conftest.$ac_ext
3931+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3932 fi
3933 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
3934 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
3935@@ -4495,7 +4730,6 @@
3936 echo $ECHO_N "(cached) $ECHO_C" >&6
3937 else
3938 cat >conftest.$ac_ext <<_ACEOF
3939-#line $LINENO "configure"
3940 /* confdefs.h. */
3941 _ACEOF
3942 cat confdefs.h >>conftest.$ac_ext
3943@@ -4515,11 +4749,20 @@
3944 _ACEOF
3945 rm -f conftest.$ac_objext
3946 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3947- (eval $ac_compile) 2>&5
3948+ (eval $ac_compile) 2>conftest.er1
3949 ac_status=$?
3950+ grep -v '^ *+' conftest.er1 >conftest.err
3951+ rm -f conftest.er1
3952+ cat conftest.err >&5
3953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954 (exit $ac_status); } &&
3955- { ac_try='test -s conftest.$ac_objext'
3956+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3957+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3958+ (eval $ac_try) 2>&5
3959+ ac_status=$?
3960+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3961+ (exit $ac_status); }; } &&
3962+ { ac_try='test -s conftest.$ac_objext'
3963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3964 (eval $ac_try) 2>&5
3965 ac_status=$?
3966@@ -4532,7 +4775,7 @@
3967
3968 ac_cv_type__Bool=no
3969 fi
3970-rm -f conftest.$ac_objext conftest.$ac_ext
3971+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3972 fi
3973 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
3974 echo "${ECHO_T}$ac_cv_type__Bool" >&6
3975@@ -4589,7 +4832,6 @@
3976 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3978 cat >conftest.$ac_ext <<_ACEOF
3979-#line $LINENO "configure"
3980 /* confdefs.h. */
3981 _ACEOF
3982 cat confdefs.h >>conftest.$ac_ext
3983@@ -4600,11 +4842,20 @@
3984 _ACEOF
3985 rm -f conftest.$ac_objext
3986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3987- (eval $ac_compile) 2>&5
3988+ (eval $ac_compile) 2>conftest.er1
3989 ac_status=$?
3990+ grep -v '^ *+' conftest.er1 >conftest.err
3991+ rm -f conftest.er1
3992+ cat conftest.err >&5
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } &&
3995- { ac_try='test -s conftest.$ac_objext'
3996+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3997+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3998+ (eval $ac_try) 2>&5
3999+ ac_status=$?
4000+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4001+ (exit $ac_status); }; } &&
4002+ { ac_try='test -s conftest.$ac_objext'
4003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4004 (eval $ac_try) 2>&5
4005 ac_status=$?
4006@@ -4617,7 +4868,7 @@
4007
4008 ac_header_compiler=no
4009 fi
4010-rm -f conftest.$ac_objext conftest.$ac_ext
4011+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4012 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4013 echo "${ECHO_T}$ac_header_compiler" >&6
4014
4015@@ -4625,7 +4876,6 @@
4016 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4017 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4018 cat >conftest.$ac_ext <<_ACEOF
4019-#line $LINENO "configure"
4020 /* confdefs.h. */
4021 _ACEOF
4022 cat confdefs.h >>conftest.$ac_ext
4023@@ -4643,6 +4893,7 @@
4024 (exit $ac_status); } >/dev/null; then
4025 if test -s conftest.err; then
4026 ac_cpp_err=$ac_c_preproc_warn_flag
4027+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4028 else
4029 ac_cpp_err=
4030 fi
4031@@ -4662,33 +4913,32 @@
4032 echo "${ECHO_T}$ac_header_preproc" >&6
4033
4034 # So? What about this header?
4035-case $ac_header_compiler:$ac_header_preproc in
4036- yes:no )
4037+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4038+ yes:no: )
4039 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4040 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4041- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4042-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4043- (
4044- cat <<\_ASBOX
4045-## ------------------------------------ ##
4046-## Report this to bug-autoconf@gnu.org. ##
4047-## ------------------------------------ ##
4048-_ASBOX
4049- ) |
4050- sed "s/^/$as_me: WARNING: /" >&2
4051+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4052+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4053+ ac_header_preproc=yes
4054 ;;
4055- no:yes )
4056+ no:yes:* )
4057 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4058 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4059- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4060-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4061+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4062+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4063+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4064+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4065+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4066+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4067 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4068 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4069+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4070+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4071 (
4072 cat <<\_ASBOX
4073-## ------------------------------------ ##
4074-## Report this to bug-autoconf@gnu.org. ##
4075-## ------------------------------------ ##
4076+## -------------------------------- ##
4077+## Report this to bug-patch@gnu.org ##
4078+## -------------------------------- ##
4079 _ASBOX
4080 ) |
4081 sed "s/^/$as_me: WARNING: /" >&2
4082@@ -4699,7 +4949,7 @@
4083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4084 echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086- eval "$as_ac_Header=$ac_header_preproc"
4087+ eval "$as_ac_Header=\$ac_header_preproc"
4088 fi
4089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4091@@ -4733,7 +4983,6 @@
4092 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4093 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4094 cat >conftest.$ac_ext <<_ACEOF
4095-#line $LINENO "configure"
4096 /* confdefs.h. */
4097 _ACEOF
4098 cat confdefs.h >>conftest.$ac_ext
4099@@ -4744,11 +4993,20 @@
4100 _ACEOF
4101 rm -f conftest.$ac_objext
4102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4103- (eval $ac_compile) 2>&5
4104+ (eval $ac_compile) 2>conftest.er1
4105 ac_status=$?
4106+ grep -v '^ *+' conftest.er1 >conftest.err
4107+ rm -f conftest.er1
4108+ cat conftest.err >&5
4109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4110 (exit $ac_status); } &&
4111- { ac_try='test -s conftest.$ac_objext'
4112+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4113+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4114+ (eval $ac_try) 2>&5
4115+ ac_status=$?
4116+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117+ (exit $ac_status); }; } &&
4118+ { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4120 (eval $ac_try) 2>&5
4121 ac_status=$?
4122@@ -4761,7 +5019,7 @@
4123
4124 ac_header_compiler=no
4125 fi
4126-rm -f conftest.$ac_objext conftest.$ac_ext
4127+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4128 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4129 echo "${ECHO_T}$ac_header_compiler" >&6
4130
4131@@ -4769,7 +5027,6 @@
4132 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4133 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4134 cat >conftest.$ac_ext <<_ACEOF
4135-#line $LINENO "configure"
4136 /* confdefs.h. */
4137 _ACEOF
4138 cat confdefs.h >>conftest.$ac_ext
4139@@ -4787,6 +5044,7 @@
4140 (exit $ac_status); } >/dev/null; then
4141 if test -s conftest.err; then
4142 ac_cpp_err=$ac_c_preproc_warn_flag
4143+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4144 else
4145 ac_cpp_err=
4146 fi
4147@@ -4806,33 +5064,32 @@
4148 echo "${ECHO_T}$ac_header_preproc" >&6
4149
4150 # So? What about this header?
4151-case $ac_header_compiler:$ac_header_preproc in
4152- yes:no )
4153+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4154+ yes:no: )
4155 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4156 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4157- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4158-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4159- (
4160- cat <<\_ASBOX
4161-## ------------------------------------ ##
4162-## Report this to bug-autoconf@gnu.org. ##
4163-## ------------------------------------ ##
4164-_ASBOX
4165- ) |
4166- sed "s/^/$as_me: WARNING: /" >&2
4167+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4168+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4169+ ac_header_preproc=yes
4170 ;;
4171- no:yes )
4172+ no:yes:* )
4173 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4174 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4175- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4176-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4177+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4178+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4179+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4180+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4181+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4182+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4183 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4184 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4185+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4186+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4187 (
4188 cat <<\_ASBOX
4189-## ------------------------------------ ##
4190-## Report this to bug-autoconf@gnu.org. ##
4191-## ------------------------------------ ##
4192+## -------------------------------- ##
4193+## Report this to bug-patch@gnu.org ##
4194+## -------------------------------- ##
4195 _ASBOX
4196 ) |
4197 sed "s/^/$as_me: WARNING: /" >&2
4198@@ -4843,7 +5100,7 @@
4199 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4200 echo $ECHO_N "(cached) $ECHO_C" >&6
4201 else
4202- eval "$as_ac_Header=$ac_header_preproc"
4203+ eval "$as_ac_Header=\$ac_header_preproc"
4204 fi
4205 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4206 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4207@@ -4865,7 +5122,6 @@
4208 echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210 cat >conftest.$ac_ext <<_ACEOF
4211-#line $LINENO "configure"
4212 /* confdefs.h. */
4213 _ACEOF
4214 cat confdefs.h >>conftest.$ac_ext
4215@@ -4886,11 +5142,20 @@
4216 _ACEOF
4217 rm -f conftest.$ac_objext
4218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4219- (eval $ac_compile) 2>&5
4220+ (eval $ac_compile) 2>conftest.er1
4221 ac_status=$?
4222+ grep -v '^ *+' conftest.er1 >conftest.err
4223+ rm -f conftest.er1
4224+ cat conftest.err >&5
4225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226 (exit $ac_status); } &&
4227- { ac_try='test -s conftest.$ac_objext'
4228+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4229+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4230+ (eval $ac_try) 2>&5
4231+ ac_status=$?
4232+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233+ (exit $ac_status); }; } &&
4234+ { ac_try='test -s conftest.$ac_objext'
4235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4236 (eval $ac_try) 2>&5
4237 ac_status=$?
4238@@ -4903,7 +5168,7 @@
4239
4240 ac_cv_header_time=no
4241 fi
4242-rm -f conftest.$ac_objext conftest.$ac_ext
4243+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4244 fi
4245 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4246 echo "${ECHO_T}$ac_cv_header_time" >&6
4247@@ -4933,7 +5198,6 @@
4248 echo $ECHO_N "(cached) $ECHO_C" >&6
4249 else
4250 cat >conftest.$ac_ext <<_ACEOF
4251-#line $LINENO "configure"
4252 /* confdefs.h. */
4253 _ACEOF
4254 cat confdefs.h >>conftest.$ac_ext
4255@@ -4964,11 +5228,20 @@
4256 _ACEOF
4257 rm -f conftest.$ac_objext
4258 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4259- (eval $ac_compile) 2>&5
4260+ (eval $ac_compile) 2>conftest.er1
4261 ac_status=$?
4262+ grep -v '^ *+' conftest.er1 >conftest.err
4263+ rm -f conftest.er1
4264+ cat conftest.err >&5
4265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4266 (exit $ac_status); } &&
4267- { ac_try='test -s conftest.$ac_objext'
4268+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4269+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4270+ (eval $ac_try) 2>&5
4271+ ac_status=$?
4272+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4273+ (exit $ac_status); }; } &&
4274+ { ac_try='test -s conftest.$ac_objext'
4275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4276 (eval $ac_try) 2>&5
4277 ac_status=$?
4278@@ -4981,7 +5254,7 @@
4279
4280 fu_cv_sys_struct_utimbuf=no
4281 fi
4282-rm -f conftest.$ac_objext conftest.$ac_ext
4283+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4284
4285 fi
4286 echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
4287@@ -5005,7 +5278,6 @@
4288 ac_cv_func_closedir_void=yes
4289 else
4290 cat >conftest.$ac_ext <<_ACEOF
4291-#line $LINENO "configure"
4292 /* confdefs.h. */
4293 _ACEOF
4294 cat confdefs.h >>conftest.$ac_ext
4295@@ -5045,7 +5317,7 @@
4296 ( exit $ac_status )
4297 ac_cv_func_closedir_void=yes
4298 fi
4299-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4300+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4301 fi
4302 fi
4303 echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
4304@@ -5076,7 +5348,6 @@
4305 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4306 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4307 cat >conftest.$ac_ext <<_ACEOF
4308-#line $LINENO "configure"
4309 /* confdefs.h. */
4310 _ACEOF
4311 cat confdefs.h >>conftest.$ac_ext
4312@@ -5087,11 +5358,20 @@
4313 _ACEOF
4314 rm -f conftest.$ac_objext
4315 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4316- (eval $ac_compile) 2>&5
4317+ (eval $ac_compile) 2>conftest.er1
4318 ac_status=$?
4319+ grep -v '^ *+' conftest.er1 >conftest.err
4320+ rm -f conftest.er1
4321+ cat conftest.err >&5
4322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4323 (exit $ac_status); } &&
4324- { ac_try='test -s conftest.$ac_objext'
4325+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4326+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4327+ (eval $ac_try) 2>&5
4328+ ac_status=$?
4329+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330+ (exit $ac_status); }; } &&
4331+ { ac_try='test -s conftest.$ac_objext'
4332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4333 (eval $ac_try) 2>&5
4334 ac_status=$?
4335@@ -5104,7 +5384,7 @@
4336
4337 ac_header_compiler=no
4338 fi
4339-rm -f conftest.$ac_objext conftest.$ac_ext
4340+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4341 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4342 echo "${ECHO_T}$ac_header_compiler" >&6
4343
4344@@ -5112,7 +5392,6 @@
4345 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4346 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4347 cat >conftest.$ac_ext <<_ACEOF
4348-#line $LINENO "configure"
4349 /* confdefs.h. */
4350 _ACEOF
4351 cat confdefs.h >>conftest.$ac_ext
4352@@ -5130,6 +5409,7 @@
4353 (exit $ac_status); } >/dev/null; then
4354 if test -s conftest.err; then
4355 ac_cpp_err=$ac_c_preproc_warn_flag
4356+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4357 else
4358 ac_cpp_err=
4359 fi
4360@@ -5149,33 +5429,32 @@
4361 echo "${ECHO_T}$ac_header_preproc" >&6
4362
4363 # So? What about this header?
4364-case $ac_header_compiler:$ac_header_preproc in
4365- yes:no )
4366+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4367+ yes:no: )
4368 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4369 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4370- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4371-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4372- (
4373- cat <<\_ASBOX
4374-## ------------------------------------ ##
4375-## Report this to bug-autoconf@gnu.org. ##
4376-## ------------------------------------ ##
4377-_ASBOX
4378- ) |
4379- sed "s/^/$as_me: WARNING: /" >&2
4380+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4381+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4382+ ac_header_preproc=yes
4383 ;;
4384- no:yes )
4385+ no:yes:* )
4386 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4388- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4389-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4390+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4391+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4392+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4393+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4394+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4395+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4396 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4397 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4398+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4399+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4400 (
4401 cat <<\_ASBOX
4402-## ------------------------------------ ##
4403-## Report this to bug-autoconf@gnu.org. ##
4404-## ------------------------------------ ##
4405+## -------------------------------- ##
4406+## Report this to bug-patch@gnu.org ##
4407+## -------------------------------- ##
4408 _ASBOX
4409 ) |
4410 sed "s/^/$as_me: WARNING: /" >&2
4411@@ -5186,7 +5465,7 @@
4412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4413 echo $ECHO_N "(cached) $ECHO_C" >&6
4414 else
4415- eval "$as_ac_Header=$ac_header_preproc"
4416+ eval "$as_ac_Header=\$ac_header_preproc"
4417 fi
4418 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4419 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4420@@ -5220,7 +5499,6 @@
4421 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4422 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4423 cat >conftest.$ac_ext <<_ACEOF
4424-#line $LINENO "configure"
4425 /* confdefs.h. */
4426 _ACEOF
4427 cat confdefs.h >>conftest.$ac_ext
4428@@ -5231,11 +5509,20 @@
4429 _ACEOF
4430 rm -f conftest.$ac_objext
4431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4432- (eval $ac_compile) 2>&5
4433+ (eval $ac_compile) 2>conftest.er1
4434 ac_status=$?
4435+ grep -v '^ *+' conftest.er1 >conftest.err
4436+ rm -f conftest.er1
4437+ cat conftest.err >&5
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439 (exit $ac_status); } &&
4440- { ac_try='test -s conftest.$ac_objext'
4441+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4442+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4443+ (eval $ac_try) 2>&5
4444+ ac_status=$?
4445+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4446+ (exit $ac_status); }; } &&
4447+ { ac_try='test -s conftest.$ac_objext'
4448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4449 (eval $ac_try) 2>&5
4450 ac_status=$?
4451@@ -5248,7 +5535,7 @@
4452
4453 ac_header_compiler=no
4454 fi
4455-rm -f conftest.$ac_objext conftest.$ac_ext
4456+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4457 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4458 echo "${ECHO_T}$ac_header_compiler" >&6
4459
4460@@ -5256,7 +5543,6 @@
4461 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4462 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4463 cat >conftest.$ac_ext <<_ACEOF
4464-#line $LINENO "configure"
4465 /* confdefs.h. */
4466 _ACEOF
4467 cat confdefs.h >>conftest.$ac_ext
4468@@ -5274,6 +5560,7 @@
4469 (exit $ac_status); } >/dev/null; then
4470 if test -s conftest.err; then
4471 ac_cpp_err=$ac_c_preproc_warn_flag
4472+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4473 else
4474 ac_cpp_err=
4475 fi
4476@@ -5293,33 +5580,32 @@
4477 echo "${ECHO_T}$ac_header_preproc" >&6
4478
4479 # So? What about this header?
4480-case $ac_header_compiler:$ac_header_preproc in
4481- yes:no )
4482+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4483+ yes:no: )
4484 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4485 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4486- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4487-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4488- (
4489- cat <<\_ASBOX
4490-## ------------------------------------ ##
4491-## Report this to bug-autoconf@gnu.org. ##
4492-## ------------------------------------ ##
4493-_ASBOX
4494- ) |
4495- sed "s/^/$as_me: WARNING: /" >&2
4496+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4497+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4498+ ac_header_preproc=yes
4499 ;;
4500- no:yes )
4501+ no:yes:* )
4502 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4503 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4504- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4505-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4506+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4507+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4508+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4509+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4510+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4511+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4512 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4513 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4514+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4515+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4516 (
4517 cat <<\_ASBOX
4518-## ------------------------------------ ##
4519-## Report this to bug-autoconf@gnu.org. ##
4520-## ------------------------------------ ##
4521+## -------------------------------- ##
4522+## Report this to bug-patch@gnu.org ##
4523+## -------------------------------- ##
4524 _ASBOX
4525 ) |
4526 sed "s/^/$as_me: WARNING: /" >&2
4527@@ -5330,7 +5616,7 @@
4528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4529 echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531- eval "$as_ac_Header=$ac_header_preproc"
4532+ eval "$as_ac_Header=\$ac_header_preproc"
4533 fi
4534 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4535 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4536@@ -5364,7 +5650,6 @@
4537 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4538 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4539 cat >conftest.$ac_ext <<_ACEOF
4540-#line $LINENO "configure"
4541 /* confdefs.h. */
4542 _ACEOF
4543 cat confdefs.h >>conftest.$ac_ext
4544@@ -5375,11 +5660,20 @@
4545 _ACEOF
4546 rm -f conftest.$ac_objext
4547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4548- (eval $ac_compile) 2>&5
4549+ (eval $ac_compile) 2>conftest.er1
4550 ac_status=$?
4551+ grep -v '^ *+' conftest.er1 >conftest.err
4552+ rm -f conftest.er1
4553+ cat conftest.err >&5
4554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4555 (exit $ac_status); } &&
4556- { ac_try='test -s conftest.$ac_objext'
4557+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4558+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4559+ (eval $ac_try) 2>&5
4560+ ac_status=$?
4561+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4562+ (exit $ac_status); }; } &&
4563+ { ac_try='test -s conftest.$ac_objext'
4564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4565 (eval $ac_try) 2>&5
4566 ac_status=$?
4567@@ -5392,7 +5686,7 @@
4568
4569 ac_header_compiler=no
4570 fi
4571-rm -f conftest.$ac_objext conftest.$ac_ext
4572+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4573 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4574 echo "${ECHO_T}$ac_header_compiler" >&6
4575
4576@@ -5400,7 +5694,6 @@
4577 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4578 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4579 cat >conftest.$ac_ext <<_ACEOF
4580-#line $LINENO "configure"
4581 /* confdefs.h. */
4582 _ACEOF
4583 cat confdefs.h >>conftest.$ac_ext
4584@@ -5418,6 +5711,7 @@
4585 (exit $ac_status); } >/dev/null; then
4586 if test -s conftest.err; then
4587 ac_cpp_err=$ac_c_preproc_warn_flag
4588+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4589 else
4590 ac_cpp_err=
4591 fi
4592@@ -5437,33 +5731,32 @@
4593 echo "${ECHO_T}$ac_header_preproc" >&6
4594
4595 # So? What about this header?
4596-case $ac_header_compiler:$ac_header_preproc in
4597- yes:no )
4598+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4599+ yes:no: )
4600 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4601 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4602- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4603-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4604- (
4605- cat <<\_ASBOX
4606-## ------------------------------------ ##
4607-## Report this to bug-autoconf@gnu.org. ##
4608-## ------------------------------------ ##
4609-_ASBOX
4610- ) |
4611- sed "s/^/$as_me: WARNING: /" >&2
4612+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4613+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4614+ ac_header_preproc=yes
4615 ;;
4616- no:yes )
4617+ no:yes:* )
4618 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4619 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4620- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4621-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4622+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4623+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4624+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4625+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4626+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4627+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4628 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4629 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4630+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4631+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4632 (
4633 cat <<\_ASBOX
4634-## ------------------------------------ ##
4635-## Report this to bug-autoconf@gnu.org. ##
4636-## ------------------------------------ ##
4637+## -------------------------------- ##
4638+## Report this to bug-patch@gnu.org ##
4639+## -------------------------------- ##
4640 _ASBOX
4641 ) |
4642 sed "s/^/$as_me: WARNING: /" >&2
4643@@ -5474,7 +5767,7 @@
4644 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4645 echo $ECHO_N "(cached) $ECHO_C" >&6
4646 else
4647- eval "$as_ac_Header=$ac_header_preproc"
4648+ eval "$as_ac_Header=\$ac_header_preproc"
4649 fi
4650 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4651 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4652@@ -5497,7 +5790,6 @@
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654 else
4655 cat >conftest.$ac_ext <<_ACEOF
4656-#line $LINENO "configure"
4657 /* confdefs.h. */
4658 _ACEOF
4659 cat confdefs.h >>conftest.$ac_ext
4660@@ -5517,11 +5809,20 @@
4661 _ACEOF
4662 rm -f conftest.$ac_objext
4663 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4664- (eval $ac_compile) 2>&5
4665+ (eval $ac_compile) 2>conftest.er1
4666 ac_status=$?
4667+ grep -v '^ *+' conftest.er1 >conftest.err
4668+ rm -f conftest.er1
4669+ cat conftest.err >&5
4670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4671 (exit $ac_status); } &&
4672- { ac_try='test -s conftest.$ac_objext'
4673+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4674+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4675+ (eval $ac_try) 2>&5
4676+ ac_status=$?
4677+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678+ (exit $ac_status); }; } &&
4679+ { ac_try='test -s conftest.$ac_objext'
4680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4681 (eval $ac_try) 2>&5
4682 ac_status=$?
4683@@ -5534,7 +5835,7 @@
4684
4685 ac_cv_have_decl_getenv=no
4686 fi
4687-rm -f conftest.$ac_objext conftest.$ac_ext
4688+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4689 fi
4690 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
4691 echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
4692@@ -5562,7 +5863,6 @@
4693 echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695 cat >conftest.$ac_ext <<_ACEOF
4696-#line $LINENO "configure"
4697 /* confdefs.h. */
4698 _ACEOF
4699 cat confdefs.h >>conftest.$ac_ext
4700@@ -5582,11 +5882,20 @@
4701 _ACEOF
4702 rm -f conftest.$ac_objext
4703 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4704- (eval $ac_compile) 2>&5
4705+ (eval $ac_compile) 2>conftest.er1
4706 ac_status=$?
4707+ grep -v '^ *+' conftest.er1 >conftest.err
4708+ rm -f conftest.er1
4709+ cat conftest.err >&5
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } &&
4712- { ac_try='test -s conftest.$ac_objext'
4713+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4714+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715+ (eval $ac_try) 2>&5
4716+ ac_status=$?
4717+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718+ (exit $ac_status); }; } &&
4719+ { ac_try='test -s conftest.$ac_objext'
4720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4721 (eval $ac_try) 2>&5
4722 ac_status=$?
4723@@ -5599,7 +5908,7 @@
4724
4725 ac_cv_have_decl_malloc=no
4726 fi
4727-rm -f conftest.$ac_objext conftest.$ac_ext
4728+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4729 fi
4730 echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
4731 echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
4732@@ -5628,7 +5937,6 @@
4733 else
4734
4735 cat >conftest.$ac_ext <<_ACEOF
4736-#line $LINENO "configure"
4737 /* confdefs.h. */
4738 _ACEOF
4739 cat confdefs.h >>conftest.$ac_ext
4740@@ -5647,11 +5955,20 @@
4741 _ACEOF
4742 rm -f conftest.$ac_objext
4743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4744- (eval $ac_compile) 2>&5
4745+ (eval $ac_compile) 2>conftest.er1
4746 ac_status=$?
4747+ grep -v '^ *+' conftest.er1 >conftest.err
4748+ rm -f conftest.er1
4749+ cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); } &&
4752- { ac_try='test -s conftest.$ac_objext'
4753+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4754+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755+ (eval $ac_try) 2>&5
4756+ ac_status=$?
4757+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758+ (exit $ac_status); }; } &&
4759+ { ac_try='test -s conftest.$ac_objext'
4760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761 (eval $ac_try) 2>&5
4762 ac_status=$?
4763@@ -5664,7 +5981,7 @@
4764
4765 ac_cv_win_or_dos=no
4766 fi
4767-rm -f conftest.$ac_objext conftest.$ac_ext
4768+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4769
4770 fi
4771 echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
4772@@ -5714,7 +6031,6 @@
4773 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4774 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4775 cat >conftest.$ac_ext <<_ACEOF
4776-#line $LINENO "configure"
4777 /* confdefs.h. */
4778 _ACEOF
4779 cat confdefs.h >>conftest.$ac_ext
4780@@ -5725,11 +6041,20 @@
4781 _ACEOF
4782 rm -f conftest.$ac_objext
4783 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4784- (eval $ac_compile) 2>&5
4785+ (eval $ac_compile) 2>conftest.er1
4786 ac_status=$?
4787+ grep -v '^ *+' conftest.er1 >conftest.err
4788+ rm -f conftest.er1
4789+ cat conftest.err >&5
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); } &&
4792- { ac_try='test -s conftest.$ac_objext'
4793+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4794+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4795+ (eval $ac_try) 2>&5
4796+ ac_status=$?
4797+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4798+ (exit $ac_status); }; } &&
4799+ { ac_try='test -s conftest.$ac_objext'
4800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4801 (eval $ac_try) 2>&5
4802 ac_status=$?
4803@@ -5742,7 +6067,7 @@
4804
4805 ac_header_compiler=no
4806 fi
4807-rm -f conftest.$ac_objext conftest.$ac_ext
4808+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4809 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4810 echo "${ECHO_T}$ac_header_compiler" >&6
4811
4812@@ -5750,7 +6075,6 @@
4813 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4814 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4815 cat >conftest.$ac_ext <<_ACEOF
4816-#line $LINENO "configure"
4817 /* confdefs.h. */
4818 _ACEOF
4819 cat confdefs.h >>conftest.$ac_ext
4820@@ -5768,6 +6092,7 @@
4821 (exit $ac_status); } >/dev/null; then
4822 if test -s conftest.err; then
4823 ac_cpp_err=$ac_c_preproc_warn_flag
4824+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4825 else
4826 ac_cpp_err=
4827 fi
4828@@ -5787,33 +6112,32 @@
4829 echo "${ECHO_T}$ac_header_preproc" >&6
4830
4831 # So? What about this header?
4832-case $ac_header_compiler:$ac_header_preproc in
4833- yes:no )
4834+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4835+ yes:no: )
4836 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4837 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4838- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4839-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4840- (
4841- cat <<\_ASBOX
4842-## ------------------------------------ ##
4843-## Report this to bug-autoconf@gnu.org. ##
4844-## ------------------------------------ ##
4845-_ASBOX
4846- ) |
4847- sed "s/^/$as_me: WARNING: /" >&2
4848+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4849+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4850+ ac_header_preproc=yes
4851 ;;
4852- no:yes )
4853+ no:yes:* )
4854 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4855 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4856- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4857-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4858+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4859+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4860+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4861+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4862+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4863+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4864 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4865 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4866+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4867+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4868 (
4869 cat <<\_ASBOX
4870-## ------------------------------------ ##
4871-## Report this to bug-autoconf@gnu.org. ##
4872-## ------------------------------------ ##
4873+## -------------------------------- ##
4874+## Report this to bug-patch@gnu.org ##
4875+## -------------------------------- ##
4876 _ASBOX
4877 ) |
4878 sed "s/^/$as_me: WARNING: /" >&2
4879@@ -5824,7 +6148,7 @@
4880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4881 echo $ECHO_N "(cached) $ECHO_C" >&6
4882 else
4883- eval "$as_ac_Header=$ac_header_preproc"
4884+ eval "$as_ac_Header=\$ac_header_preproc"
4885 fi
4886 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4887 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4888@@ -5872,7 +6196,6 @@
4889 echo $ECHO_N "(cached) $ECHO_C" >&6
4890 else
4891 cat >conftest.$ac_ext <<_ACEOF
4892-#line $LINENO "configure"
4893 /* confdefs.h. */
4894 _ACEOF
4895 cat confdefs.h >>conftest.$ac_ext
4896@@ -5905,11 +6228,20 @@
4897 _ACEOF
4898 rm -f conftest.$ac_objext conftest$ac_exeext
4899 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4900- (eval $ac_link) 2>&5
4901+ (eval $ac_link) 2>conftest.er1
4902 ac_status=$?
4903+ grep -v '^ *+' conftest.er1 >conftest.err
4904+ rm -f conftest.er1
4905+ cat conftest.err >&5
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); } &&
4908- { ac_try='test -s conftest$ac_exeext'
4909+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4910+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4911+ (eval $ac_try) 2>&5
4912+ ac_status=$?
4913+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914+ (exit $ac_status); }; } &&
4915+ { ac_try='test -s conftest$ac_exeext'
4916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917 (eval $ac_try) 2>&5
4918 ac_status=$?
4919@@ -5922,7 +6254,8 @@
4920
4921 jm_cv_struct_dirent_d_ino=no
4922 fi
4923-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4924+rm -f conftest.err conftest.$ac_objext \
4925+ conftest$ac_exeext conftest.$ac_ext
4926
4927
4928 fi
4929@@ -6011,21 +6344,28 @@
4930 echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932 cat >conftest.$ac_ext <<_ACEOF
4933-#line $LINENO "configure"
4934 /* confdefs.h. */
4935 _ACEOF
4936 cat confdefs.h >>conftest.$ac_ext
4937 cat >>conftest.$ac_ext <<_ACEOF
4938 /* end confdefs.h. */
4939+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4940+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
4941+#define $ac_func innocuous_$ac_func
4942+
4943 /* System header to define __stub macros and hopefully few prototypes,
4944 which can conflict with char $ac_func (); below.
4945 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4946 <limits.h> exists even on freestanding compilers. */
4947+
4948 #ifdef __STDC__
4949 # include <limits.h>
4950 #else
4951 # include <assert.h>
4952 #endif
4953+
4954+#undef $ac_func
4955+
4956 /* Override any gcc2 internal prototype to avoid an error. */
4957 #ifdef __cplusplus
4958 extern "C"
4959@@ -6056,11 +6396,20 @@
4960 _ACEOF
4961 rm -f conftest.$ac_objext conftest$ac_exeext
4962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4963- (eval $ac_link) 2>&5
4964+ (eval $ac_link) 2>conftest.er1
4965 ac_status=$?
4966+ grep -v '^ *+' conftest.er1 >conftest.err
4967+ rm -f conftest.er1
4968+ cat conftest.err >&5
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 (exit $ac_status); } &&
4971- { ac_try='test -s conftest$ac_exeext'
4972+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
4973+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974+ (eval $ac_try) 2>&5
4975+ ac_status=$?
4976+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977+ (exit $ac_status); }; } &&
4978+ { ac_try='test -s conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982@@ -6073,7 +6422,8 @@
4983
4984 eval "$as_ac_var=no"
4985 fi
4986-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4987+rm -f conftest.err conftest.$ac_objext \
4988+ conftest$ac_exeext conftest.$ac_ext
4989 fi
4990 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4991 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4992@@ -6126,21 +6476,28 @@
4993 echo $ECHO_N "(cached) $ECHO_C" >&6
4994 else
4995 cat >conftest.$ac_ext <<_ACEOF
4996-#line $LINENO "configure"
4997 /* confdefs.h. */
4998 _ACEOF
4999 cat confdefs.h >>conftest.$ac_ext
5000 cat >>conftest.$ac_ext <<_ACEOF
5001 /* end confdefs.h. */
5002+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5003+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5004+#define $ac_func innocuous_$ac_func
5005+
5006 /* System header to define __stub macros and hopefully few prototypes,
5007 which can conflict with char $ac_func (); below.
5008 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5009 <limits.h> exists even on freestanding compilers. */
5010+
5011 #ifdef __STDC__
5012 # include <limits.h>
5013 #else
5014 # include <assert.h>
5015 #endif
5016+
5017+#undef $ac_func
5018+
5019 /* Override any gcc2 internal prototype to avoid an error. */
5020 #ifdef __cplusplus
5021 extern "C"
5022@@ -6171,11 +6528,20 @@
5023 _ACEOF
5024 rm -f conftest.$ac_objext conftest$ac_exeext
5025 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5026- (eval $ac_link) 2>&5
5027+ (eval $ac_link) 2>conftest.er1
5028 ac_status=$?
5029+ grep -v '^ *+' conftest.er1 >conftest.err
5030+ rm -f conftest.er1
5031+ cat conftest.err >&5
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); } &&
5034- { ac_try='test -s conftest$ac_exeext'
5035+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5036+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037+ (eval $ac_try) 2>&5
5038+ ac_status=$?
5039+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040+ (exit $ac_status); }; } &&
5041+ { ac_try='test -s conftest$ac_exeext'
5042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043 (eval $ac_try) 2>&5
5044 ac_status=$?
5045@@ -6188,7 +6554,8 @@
5046
5047 eval "$as_ac_var=no"
5048 fi
5049-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5050+rm -f conftest.err conftest.$ac_objext \
5051+ conftest$ac_exeext conftest.$ac_ext
5052 fi
5053 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5054 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5055@@ -6203,21 +6570,28 @@
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
5057 else
5058 cat >conftest.$ac_ext <<_ACEOF
5059-#line $LINENO "configure"
5060 /* confdefs.h. */
5061 _ACEOF
5062 cat confdefs.h >>conftest.$ac_ext
5063 cat >>conftest.$ac_ext <<_ACEOF
5064 /* end confdefs.h. */
5065+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
5066+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5067+#define _doprnt innocuous__doprnt
5068+
5069 /* System header to define __stub macros and hopefully few prototypes,
5070 which can conflict with char _doprnt (); below.
5071 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5072 <limits.h> exists even on freestanding compilers. */
5073+
5074 #ifdef __STDC__
5075 # include <limits.h>
5076 #else
5077 # include <assert.h>
5078 #endif
5079+
5080+#undef _doprnt
5081+
5082 /* Override any gcc2 internal prototype to avoid an error. */
5083 #ifdef __cplusplus
5084 extern "C"
5085@@ -6248,11 +6622,20 @@
5086 _ACEOF
5087 rm -f conftest.$ac_objext conftest$ac_exeext
5088 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5089- (eval $ac_link) 2>&5
5090+ (eval $ac_link) 2>conftest.er1
5091 ac_status=$?
5092+ grep -v '^ *+' conftest.er1 >conftest.err
5093+ rm -f conftest.er1
5094+ cat conftest.err >&5
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); } &&
5097- { ac_try='test -s conftest$ac_exeext'
5098+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5099+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100+ (eval $ac_try) 2>&5
5101+ ac_status=$?
5102+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103+ (exit $ac_status); }; } &&
5104+ { ac_try='test -s conftest$ac_exeext'
5105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106 (eval $ac_try) 2>&5
5107 ac_status=$?
5108@@ -6265,7 +6648,8 @@
5109
5110 ac_cv_func__doprnt=no
5111 fi
5112-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5113+rm -f conftest.err conftest.$ac_objext \
5114+ conftest$ac_exeext conftest.$ac_ext
5115 fi
5116 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
5117 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
5118@@ -6288,13 +6672,12 @@
5119 echo $ECHO_N "(cached) $ECHO_C" >&6
5120 else
5121 cat >conftest.$ac_ext <<_ACEOF
5122-#line $LINENO "configure"
5123 /* confdefs.h. */
5124 _ACEOF
5125 cat confdefs.h >>conftest.$ac_ext
5126 cat >>conftest.$ac_ext <<_ACEOF
5127 /* end confdefs.h. */
5128-
5129+$ac_includes_default
5130 int
5131 main ()
5132 {
5133@@ -6305,11 +6688,20 @@
5134 _ACEOF
5135 rm -f conftest.$ac_objext conftest$ac_exeext
5136 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5137- (eval $ac_link) 2>&5
5138+ (eval $ac_link) 2>conftest.er1
5139 ac_status=$?
5140+ grep -v '^ *+' conftest.er1 >conftest.err
5141+ rm -f conftest.er1
5142+ cat conftest.err >&5
5143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5144 (exit $ac_status); } &&
5145- { ac_try='test -s conftest$ac_exeext'
5146+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5147+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5148+ (eval $ac_try) 2>&5
5149+ ac_status=$?
5150+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5151+ (exit $ac_status); }; } &&
5152+ { ac_try='test -s conftest$ac_exeext'
5153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5154 (eval $ac_try) 2>&5
5155 ac_status=$?
5156@@ -6322,12 +6714,20 @@
5157
5158 ac_cv_lib_error_at_line=no
5159 fi
5160-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5161+rm -f conftest.err conftest.$ac_objext \
5162+ conftest$ac_exeext conftest.$ac_ext
5163 fi
5164 echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
5165 echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
5166 if test $ac_cv_lib_error_at_line = no; then
5167- LIBOBJS="$LIBOBJS error.$ac_objext"
5168+ case $LIBOBJS in
5169+ "error.$ac_objext" | \
5170+ *" error.$ac_objext" | \
5171+ "error.$ac_objext "* | \
5172+ *" error.$ac_objext "* ) ;;
5173+ *) LIBOBJS="$LIBOBJS error.$ac_objext" ;;
5174+esac
5175+
5176 fi
5177
5178
5179@@ -6343,21 +6743,28 @@
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181 else
5182 cat >conftest.$ac_ext <<_ACEOF
5183-#line $LINENO "configure"
5184 /* confdefs.h. */
5185 _ACEOF
5186 cat confdefs.h >>conftest.$ac_ext
5187 cat >>conftest.$ac_ext <<_ACEOF
5188 /* end confdefs.h. */
5189+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5190+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5191+#define $ac_func innocuous_$ac_func
5192+
5193 /* System header to define __stub macros and hopefully few prototypes,
5194 which can conflict with char $ac_func (); below.
5195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5196 <limits.h> exists even on freestanding compilers. */
5197+
5198 #ifdef __STDC__
5199 # include <limits.h>
5200 #else
5201 # include <assert.h>
5202 #endif
5203+
5204+#undef $ac_func
5205+
5206 /* Override any gcc2 internal prototype to avoid an error. */
5207 #ifdef __cplusplus
5208 extern "C"
5209@@ -6388,11 +6795,20 @@
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5213- (eval $ac_link) 2>&5
5214+ (eval $ac_link) 2>conftest.er1
5215 ac_status=$?
5216- echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217+ grep -v '^ *+' conftest.er1 >conftest.err
5218+ rm -f conftest.er1
5219+ cat conftest.err >&5
5220+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5221 (exit $ac_status); } &&
5222- { ac_try='test -s conftest$ac_exeext'
5223+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5224+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5225+ (eval $ac_try) 2>&5
5226+ ac_status=$?
5227+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228+ (exit $ac_status); }; } &&
5229+ { ac_try='test -s conftest$ac_exeext'
5230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5231 (eval $ac_try) 2>&5
5232 ac_status=$?
5233@@ -6405,7 +6821,8 @@
5234
5235 eval "$as_ac_var=no"
5236 fi
5237-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5238+rm -f conftest.err conftest.$ac_objext \
5239+ conftest$ac_exeext conftest.$ac_ext
5240 fi
5241 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5242 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5243@@ -6423,7 +6840,6 @@
5244 echo $ECHO_N "(cached) $ECHO_C" >&6
5245 else
5246 cat >conftest.$ac_ext <<_ACEOF
5247-#line $LINENO "configure"
5248 /* confdefs.h. */
5249 _ACEOF
5250 cat confdefs.h >>conftest.$ac_ext
5251@@ -6443,11 +6859,20 @@
5252 _ACEOF
5253 rm -f conftest.$ac_objext
5254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5255- (eval $ac_compile) 2>&5
5256+ (eval $ac_compile) 2>conftest.er1
5257 ac_status=$?
5258+ grep -v '^ *+' conftest.er1 >conftest.err
5259+ rm -f conftest.er1
5260+ cat conftest.err >&5
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
5263- { ac_try='test -s conftest.$ac_objext'
5264+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5265+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5266+ (eval $ac_try) 2>&5
5267+ ac_status=$?
5268+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269+ (exit $ac_status); }; } &&
5270+ { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274@@ -6460,7 +6885,7 @@
5275
5276 ac_cv_have_decl_strerror=no
5277 fi
5278-rm -f conftest.$ac_objext conftest.$ac_ext
5279+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5280 fi
5281 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
5282 echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
5283@@ -6486,7 +6911,6 @@
5284 echo $ECHO_N "(cached) $ECHO_C" >&6
5285 else
5286 cat >conftest.$ac_ext <<_ACEOF
5287-#line $LINENO "configure"
5288 /* confdefs.h. */
5289 _ACEOF
5290 cat confdefs.h >>conftest.$ac_ext
5291@@ -6506,11 +6930,20 @@
5292 _ACEOF
5293 rm -f conftest.$ac_objext
5294 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5295- (eval $ac_compile) 2>&5
5296+ (eval $ac_compile) 2>conftest.er1
5297 ac_status=$?
5298+ grep -v '^ *+' conftest.er1 >conftest.err
5299+ rm -f conftest.er1
5300+ cat conftest.err >&5
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); } &&
5303- { ac_try='test -s conftest.$ac_objext'
5304+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5305+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5306+ (eval $ac_try) 2>&5
5307+ ac_status=$?
5308+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5309+ (exit $ac_status); }; } &&
5310+ { ac_try='test -s conftest.$ac_objext'
5311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5312 (eval $ac_try) 2>&5
5313 ac_status=$?
5314@@ -6523,7 +6956,7 @@
5315
5316 ac_cv_have_decl_strerror_r=no
5317 fi
5318-rm -f conftest.$ac_objext conftest.$ac_ext
5319+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5320 fi
5321 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
5322 echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
5323@@ -6553,21 +6986,28 @@
5324 echo $ECHO_N "(cached) $ECHO_C" >&6
5325 else
5326 cat >conftest.$ac_ext <<_ACEOF
5327-#line $LINENO "configure"
5328 /* confdefs.h. */
5329 _ACEOF
5330 cat confdefs.h >>conftest.$ac_ext
5331 cat >>conftest.$ac_ext <<_ACEOF
5332 /* end confdefs.h. */
5333+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5334+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5335+#define $ac_func innocuous_$ac_func
5336+
5337 /* System header to define __stub macros and hopefully few prototypes,
5338 which can conflict with char $ac_func (); below.
5339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5340 <limits.h> exists even on freestanding compilers. */
5341+
5342 #ifdef __STDC__
5343 # include <limits.h>
5344 #else
5345 # include <assert.h>
5346 #endif
5347+
5348+#undef $ac_func
5349+
5350 /* Override any gcc2 internal prototype to avoid an error. */
5351 #ifdef __cplusplus
5352 extern "C"
5353@@ -6598,11 +7038,20 @@
5354 _ACEOF
5355 rm -f conftest.$ac_objext conftest$ac_exeext
5356 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5357- (eval $ac_link) 2>&5
5358+ (eval $ac_link) 2>conftest.er1
5359 ac_status=$?
5360+ grep -v '^ *+' conftest.er1 >conftest.err
5361+ rm -f conftest.er1
5362+ cat conftest.err >&5
5363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364 (exit $ac_status); } &&
5365- { ac_try='test -s conftest$ac_exeext'
5366+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5367+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5368+ (eval $ac_try) 2>&5
5369+ ac_status=$?
5370+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371+ (exit $ac_status); }; } &&
5372+ { ac_try='test -s conftest$ac_exeext'
5373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5374 (eval $ac_try) 2>&5
5375 ac_status=$?
5376@@ -6615,7 +7064,8 @@
5377
5378 eval "$as_ac_var=no"
5379 fi
5380-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5381+rm -f conftest.err conftest.$ac_objext \
5382+ conftest$ac_exeext conftest.$ac_ext
5383 fi
5384 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5385 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5386@@ -6636,7 +7086,6 @@
5387 ac_cv_func_strerror_r_char_p=no
5388 if test $ac_cv_have_decl_strerror_r = yes; then
5389 cat >conftest.$ac_ext <<_ACEOF
5390-#line $LINENO "configure"
5391 /* confdefs.h. */
5392 _ACEOF
5393 cat confdefs.h >>conftest.$ac_ext
5394@@ -6657,11 +7106,20 @@
5395 _ACEOF
5396 rm -f conftest.$ac_objext
5397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5398- (eval $ac_compile) 2>&5
5399+ (eval $ac_compile) 2>conftest.er1
5400 ac_status=$?
5401+ grep -v '^ *+' conftest.er1 >conftest.err
5402+ rm -f conftest.er1
5403+ cat conftest.err >&5
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); } &&
5406- { ac_try='test -s conftest.$ac_objext'
5407+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5408+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409+ (eval $ac_try) 2>&5
5410+ ac_status=$?
5411+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412+ (exit $ac_status); }; } &&
5413+ { ac_try='test -s conftest.$ac_objext'
5414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415 (eval $ac_try) 2>&5
5416 ac_status=$?
5417@@ -6673,7 +7131,7 @@
5418 sed 's/^/| /' conftest.$ac_ext >&5
5419
5420 fi
5421-rm -f conftest.$ac_objext conftest.$ac_ext
5422+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5423 else
5424 # strerror_r is not declared. Choose between
5425 # systems that have relatively inaccessible declarations for the
5426@@ -6685,7 +7143,6 @@
5427 :
5428 else
5429 cat >conftest.$ac_ext <<_ACEOF
5430-#line $LINENO "configure"
5431 /* confdefs.h. */
5432 _ACEOF
5433 cat confdefs.h >>conftest.$ac_ext
5434@@ -6721,7 +7178,7 @@
5435 sed 's/^/| /' conftest.$ac_ext >&5
5436
5437 fi
5438-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5439+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5440 fi
5441 fi
5442
5443@@ -6749,21 +7206,28 @@
5444 echo $ECHO_N "(cached) $ECHO_C" >&6
5445 else
5446 cat >conftest.$ac_ext <<_ACEOF
5447-#line $LINENO "configure"
5448 /* confdefs.h. */
5449 _ACEOF
5450 cat confdefs.h >>conftest.$ac_ext
5451 cat >>conftest.$ac_ext <<_ACEOF
5452 /* end confdefs.h. */
5453+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5454+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5455+#define $ac_func innocuous_$ac_func
5456+
5457 /* System header to define __stub macros and hopefully few prototypes,
5458 which can conflict with char $ac_func (); below.
5459 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5460 <limits.h> exists even on freestanding compilers. */
5461+
5462 #ifdef __STDC__
5463 # include <limits.h>
5464 #else
5465 # include <assert.h>
5466 #endif
5467+
5468+#undef $ac_func
5469+
5470 /* Override any gcc2 internal prototype to avoid an error. */
5471 #ifdef __cplusplus
5472 extern "C"
5473@@ -6794,11 +7258,20 @@
5474 _ACEOF
5475 rm -f conftest.$ac_objext conftest$ac_exeext
5476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5477- (eval $ac_link) 2>&5
5478+ (eval $ac_link) 2>conftest.er1
5479 ac_status=$?
5480+ grep -v '^ *+' conftest.er1 >conftest.err
5481+ rm -f conftest.er1
5482+ cat conftest.err >&5
5483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484 (exit $ac_status); } &&
5485- { ac_try='test -s conftest$ac_exeext'
5486+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5487+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5488+ (eval $ac_try) 2>&5
5489+ ac_status=$?
5490+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491+ (exit $ac_status); }; } &&
5492+ { ac_try='test -s conftest$ac_exeext'
5493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496@@ -6811,7 +7284,8 @@
5497
5498 eval "$as_ac_var=no"
5499 fi
5500-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5501+rm -f conftest.err conftest.$ac_objext \
5502+ conftest$ac_exeext conftest.$ac_ext
5503 fi
5504 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5505 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5506@@ -6821,7 +7295,14 @@
5507 _ACEOF
5508
5509 else
5510- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
5511+ case $LIBOBJS in
5512+ "$ac_func.$ac_objext" | \
5513+ *" $ac_func.$ac_objext" | \
5514+ "$ac_func.$ac_objext "* | \
5515+ *" $ac_func.$ac_objext "* ) ;;
5516+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5517+esac
5518+
5519 fi
5520 done
5521
5522@@ -6855,7 +7336,6 @@
5523 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5524 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5525 cat >conftest.$ac_ext <<_ACEOF
5526-#line $LINENO "configure"
5527 /* confdefs.h. */
5528 _ACEOF
5529 cat confdefs.h >>conftest.$ac_ext
5530@@ -6866,11 +7346,20 @@
5531 _ACEOF
5532 rm -f conftest.$ac_objext
5533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5534- (eval $ac_compile) 2>&5
5535+ (eval $ac_compile) 2>conftest.er1
5536 ac_status=$?
5537+ grep -v '^ *+' conftest.er1 >conftest.err
5538+ rm -f conftest.er1
5539+ cat conftest.err >&5
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); } &&
5542- { ac_try='test -s conftest.$ac_objext'
5543+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5544+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545+ (eval $ac_try) 2>&5
5546+ ac_status=$?
5547+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548+ (exit $ac_status); }; } &&
5549+ { ac_try='test -s conftest.$ac_objext'
5550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5551 (eval $ac_try) 2>&5
5552 ac_status=$?
5553@@ -6883,7 +7372,7 @@
5554
5555 ac_header_compiler=no
5556 fi
5557-rm -f conftest.$ac_objext conftest.$ac_ext
5558+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5559 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5560 echo "${ECHO_T}$ac_header_compiler" >&6
5561
5562@@ -6891,7 +7380,6 @@
5563 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5564 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5565 cat >conftest.$ac_ext <<_ACEOF
5566-#line $LINENO "configure"
5567 /* confdefs.h. */
5568 _ACEOF
5569 cat confdefs.h >>conftest.$ac_ext
5570@@ -6909,6 +7397,7 @@
5571 (exit $ac_status); } >/dev/null; then
5572 if test -s conftest.err; then
5573 ac_cpp_err=$ac_c_preproc_warn_flag
5574+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5575 else
5576 ac_cpp_err=
5577 fi
5578@@ -6928,33 +7417,32 @@
5579 echo "${ECHO_T}$ac_header_preproc" >&6
5580
5581 # So? What about this header?
5582-case $ac_header_compiler:$ac_header_preproc in
5583- yes:no )
5584+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5585+ yes:no: )
5586 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5587 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5588- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5589-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5590- (
5591- cat <<\_ASBOX
5592-## ------------------------------------ ##
5593-## Report this to bug-autoconf@gnu.org. ##
5594-## ------------------------------------ ##
5595-_ASBOX
5596- ) |
5597- sed "s/^/$as_me: WARNING: /" >&2
5598+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5599+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5600+ ac_header_preproc=yes
5601 ;;
5602- no:yes )
5603+ no:yes:* )
5604 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5605 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5606- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5607-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5608+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5609+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5610+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5611+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5612+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5613+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5614 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5615 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5616+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5617+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5618 (
5619 cat <<\_ASBOX
5620-## ------------------------------------ ##
5621-## Report this to bug-autoconf@gnu.org. ##
5622-## ------------------------------------ ##
5623+## -------------------------------- ##
5624+## Report this to bug-patch@gnu.org ##
5625+## -------------------------------- ##
5626 _ASBOX
5627 ) |
5628 sed "s/^/$as_me: WARNING: /" >&2
5629@@ -6965,7 +7453,7 @@
5630 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5631 echo $ECHO_N "(cached) $ECHO_C" >&6
5632 else
5633- eval "$as_ac_Header=$ac_header_preproc"
5634+ eval "$as_ac_Header=\$ac_header_preproc"
5635 fi
5636 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5637 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5638@@ -6989,7 +7477,6 @@
5639 echo $ECHO_N "(cached) $ECHO_C" >&6
5640 else
5641 cat >conftest.$ac_ext <<_ACEOF
5642-#line $LINENO "configure"
5643 /* confdefs.h. */
5644 _ACEOF
5645 cat confdefs.h >>conftest.$ac_ext
5646@@ -7053,21 +7540,28 @@
5647 echo $ECHO_N "(cached) $ECHO_C" >&6
5648 else
5649 cat >conftest.$ac_ext <<_ACEOF
5650-#line $LINENO "configure"
5651 /* confdefs.h. */
5652 _ACEOF
5653 cat confdefs.h >>conftest.$ac_ext
5654 cat >>conftest.$ac_ext <<_ACEOF
5655 /* end confdefs.h. */
5656+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5657+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
5658+#define $ac_func innocuous_$ac_func
5659+
5660 /* System header to define __stub macros and hopefully few prototypes,
5661 which can conflict with char $ac_func (); below.
5662 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5663 <limits.h> exists even on freestanding compilers. */
5664+
5665 #ifdef __STDC__
5666 # include <limits.h>
5667 #else
5668 # include <assert.h>
5669 #endif
5670+
5671+#undef $ac_func
5672+
5673 /* Override any gcc2 internal prototype to avoid an error. */
5674 #ifdef __cplusplus
5675 extern "C"
5676@@ -7098,11 +7592,20 @@
5677 _ACEOF
5678 rm -f conftest.$ac_objext conftest$ac_exeext
5679 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5680- (eval $ac_link) 2>&5
5681+ (eval $ac_link) 2>conftest.er1
5682 ac_status=$?
5683+ grep -v '^ *+' conftest.er1 >conftest.err
5684+ rm -f conftest.er1
5685+ cat conftest.err >&5
5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687 (exit $ac_status); } &&
5688- { ac_try='test -s conftest$ac_exeext'
5689+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5690+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691+ (eval $ac_try) 2>&5
5692+ ac_status=$?
5693+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694+ (exit $ac_status); }; } &&
5695+ { ac_try='test -s conftest$ac_exeext'
5696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5697 (eval $ac_try) 2>&5
5698 ac_status=$?
5699@@ -7115,7 +7618,8 @@
5700
5701 eval "$as_ac_var=no"
5702 fi
5703-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5704+rm -f conftest.err conftest.$ac_objext \
5705+ conftest$ac_exeext conftest.$ac_ext
5706 fi
5707 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5708 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5709@@ -7125,7 +7629,14 @@
5710 _ACEOF
5711
5712 else
5713- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
5714+ case $LIBOBJS in
5715+ "$ac_func.$ac_objext" | \
5716+ *" $ac_func.$ac_objext" | \
5717+ "$ac_func.$ac_objext "* | \
5718+ *" $ac_func.$ac_objext "* ) ;;
5719+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5720+esac
5721+
5722 fi
5723 done
5724
5725@@ -7163,7 +7674,6 @@
5726 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5727 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5728 cat >conftest.$ac_ext <<_ACEOF
5729-#line $LINENO "configure"
5730 /* confdefs.h. */
5731 _ACEOF
5732 cat confdefs.h >>conftest.$ac_ext
5733@@ -7174,11 +7684,20 @@
5734 _ACEOF
5735 rm -f conftest.$ac_objext
5736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5737- (eval $ac_compile) 2>&5
5738+ (eval $ac_compile) 2>conftest.er1
5739 ac_status=$?
5740+ grep -v '^ *+' conftest.er1 >conftest.err
5741+ rm -f conftest.er1
5742+ cat conftest.err >&5
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); } &&
5745- { ac_try='test -s conftest.$ac_objext'
5746+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5747+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5748+ (eval $ac_try) 2>&5
5749+ ac_status=$?
5750+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751+ (exit $ac_status); }; } &&
5752+ { ac_try='test -s conftest.$ac_objext'
5753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5754 (eval $ac_try) 2>&5
5755 ac_status=$?
5756@@ -7191,7 +7710,7 @@
5757
5758 ac_header_compiler=no
5759 fi
5760-rm -f conftest.$ac_objext conftest.$ac_ext
5761+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5762 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5763 echo "${ECHO_T}$ac_header_compiler" >&6
5764
5765@@ -7199,7 +7718,6 @@
5766 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5767 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5768 cat >conftest.$ac_ext <<_ACEOF
5769-#line $LINENO "configure"
5770 /* confdefs.h. */
5771 _ACEOF
5772 cat confdefs.h >>conftest.$ac_ext
5773@@ -7217,6 +7735,7 @@
5774 (exit $ac_status); } >/dev/null; then
5775 if test -s conftest.err; then
5776 ac_cpp_err=$ac_c_preproc_warn_flag
5777+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5778 else
5779 ac_cpp_err=
5780 fi
5781@@ -7236,33 +7755,32 @@
5782 echo "${ECHO_T}$ac_header_preproc" >&6
5783
5784 # So? What about this header?
5785-case $ac_header_compiler:$ac_header_preproc in
5786- yes:no )
5787+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5788+ yes:no: )
5789 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5790 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5791- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5792-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5793- (
5794- cat <<\_ASBOX
5795-## ------------------------------------ ##
5796-## Report this to bug-autoconf@gnu.org. ##
5797-## ------------------------------------ ##
5798-_ASBOX
5799- ) |
5800- sed "s/^/$as_me: WARNING: /" >&2
5801+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5802+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5803+ ac_header_preproc=yes
5804 ;;
5805- no:yes )
5806+ no:yes:* )
5807 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5808 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5809- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5810-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5811+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5812+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5813+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5814+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5815+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5816+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5817 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5818 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5819+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5820+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5821 (
5822 cat <<\_ASBOX
5823-## ------------------------------------ ##
5824-## Report this to bug-autoconf@gnu.org. ##
5825-## ------------------------------------ ##
5826+## -------------------------------- ##
5827+## Report this to bug-patch@gnu.org ##
5828+## -------------------------------- ##
5829 _ASBOX
5830 ) |
5831 sed "s/^/$as_me: WARNING: /" >&2
5832@@ -7273,7 +7791,7 @@
5833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5834 echo $ECHO_N "(cached) $ECHO_C" >&6
5835 else
5836- eval "$as_ac_Header=$ac_header_preproc"
5837+ eval "$as_ac_Header=\$ac_header_preproc"
5838 fi
5839 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5840 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5841@@ -7297,7 +7815,6 @@
5842 ac_cv_func_malloc_0_nonnull=no
5843 else
5844 cat >conftest.$ac_ext <<_ACEOF
5845-#line $LINENO "configure"
5846 /* confdefs.h. */
5847 _ACEOF
5848 cat confdefs.h >>conftest.$ac_ext
5849@@ -7337,7 +7854,7 @@
5850 ( exit $ac_status )
5851 ac_cv_func_malloc_0_nonnull=no
5852 fi
5853-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5854+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5855 fi
5856 fi
5857 echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
5858@@ -7353,7 +7870,14 @@
5859 #define HAVE_MALLOC 0
5860 _ACEOF
5861
5862- LIBOBJS="$LIBOBJS malloc.$ac_objext"
5863+ case $LIBOBJS in
5864+ "malloc.$ac_objext" | \
5865+ *" malloc.$ac_objext" | \
5866+ "malloc.$ac_objext "* | \
5867+ *" malloc.$ac_objext "* ) ;;
5868+ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
5869+esac
5870+
5871
5872 cat >>confdefs.h <<\_ACEOF
5873 #define malloc rpl_malloc
5874@@ -7388,7 +7912,6 @@
5875 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5876 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5877 cat >conftest.$ac_ext <<_ACEOF
5878-#line $LINENO "configure"
5879 /* confdefs.h. */
5880 _ACEOF
5881 cat confdefs.h >>conftest.$ac_ext
5882@@ -7399,11 +7922,20 @@
5883 _ACEOF
5884 rm -f conftest.$ac_objext
5885 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5886- (eval $ac_compile) 2>&5
5887+ (eval $ac_compile) 2>conftest.er1
5888 ac_status=$?
5889+ grep -v '^ *+' conftest.er1 >conftest.err
5890+ rm -f conftest.er1
5891+ cat conftest.err >&5
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); } &&
5894- { ac_try='test -s conftest.$ac_objext'
5895+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5896+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897+ (eval $ac_try) 2>&5
5898+ ac_status=$?
5899+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900+ (exit $ac_status); }; } &&
5901+ { ac_try='test -s conftest.$ac_objext'
5902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5903 (eval $ac_try) 2>&5
5904 ac_status=$?
5905@@ -7416,7 +7948,7 @@
5906
5907 ac_header_compiler=no
5908 fi
5909-rm -f conftest.$ac_objext conftest.$ac_ext
5910+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5911 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5912 echo "${ECHO_T}$ac_header_compiler" >&6
5913
5914@@ -7424,7 +7956,6 @@
5915 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5916 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5917 cat >conftest.$ac_ext <<_ACEOF
5918-#line $LINENO "configure"
5919 /* confdefs.h. */
5920 _ACEOF
5921 cat confdefs.h >>conftest.$ac_ext
5922@@ -7442,6 +7973,7 @@
5923 (exit $ac_status); } >/dev/null; then
5924 if test -s conftest.err; then
5925 ac_cpp_err=$ac_c_preproc_warn_flag
5926+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5927 else
5928 ac_cpp_err=
5929 fi
5930@@ -7461,33 +7993,32 @@
5931 echo "${ECHO_T}$ac_header_preproc" >&6
5932
5933 # So? What about this header?
5934-case $ac_header_compiler:$ac_header_preproc in
5935- yes:no )
5936+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5937+ yes:no: )
5938 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5939 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5940- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5941-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5942- (
5943- cat <<\_ASBOX
5944-## ------------------------------------ ##
5945-## Report this to bug-autoconf@gnu.org. ##
5946-## ------------------------------------ ##
5947-_ASBOX
5948- ) |
5949- sed "s/^/$as_me: WARNING: /" >&2
5950+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5951+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5952+ ac_header_preproc=yes
5953 ;;
5954- no:yes )
5955+ no:yes:* )
5956 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5957 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5958- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5959-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5960+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5961+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5962+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5963+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5964+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5965+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5966 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5967 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5968+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5969+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5970 (
5971 cat <<\_ASBOX
5972-## ------------------------------------ ##
5973-## Report this to bug-autoconf@gnu.org. ##
5974-## ------------------------------------ ##
5975+## -------------------------------- ##
5976+## Report this to bug-patch@gnu.org ##
5977+## -------------------------------- ##
5978 _ASBOX
5979 ) |
5980 sed "s/^/$as_me: WARNING: /" >&2
5981@@ -7498,7 +8029,7 @@
5982 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985- eval "$as_ac_Header=$ac_header_preproc"
5986+ eval "$as_ac_Header=\$ac_header_preproc"
5987 fi
5988 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5989 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5990@@ -7522,7 +8053,6 @@
5991 ac_cv_func_realloc_0_nonnull=no
5992 else
5993 cat >conftest.$ac_ext <<_ACEOF
5994-#line $LINENO "configure"
5995 /* confdefs.h. */
5996 _ACEOF
5997 cat confdefs.h >>conftest.$ac_ext
5998@@ -7562,7 +8092,7 @@
5999 ( exit $ac_status )
6000 ac_cv_func_realloc_0_nonnull=no
6001 fi
6002-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6003+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6004 fi
6005 fi
6006 echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
6007@@ -7578,7 +8108,14 @@
6008 #define HAVE_REALLOC 0
6009 _ACEOF
6010
6011- LIBOBJS="$LIBOBJS realloc.$ac_objext"
6012+ case $LIBOBJS in
6013+ "realloc.$ac_objext" | \
6014+ *" realloc.$ac_objext" | \
6015+ "realloc.$ac_objext "* | \
6016+ *" realloc.$ac_objext "* ) ;;
6017+ *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
6018+esac
6019+
6020
6021 cat >>confdefs.h <<\_ACEOF
6022 #define realloc rpl_realloc
6023@@ -7619,7 +8156,6 @@
6024 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6025 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6026 cat >conftest.$ac_ext <<_ACEOF
6027-#line $LINENO "configure"
6028 /* confdefs.h. */
6029 _ACEOF
6030 cat confdefs.h >>conftest.$ac_ext
6031@@ -7630,11 +8166,20 @@
6032 _ACEOF
6033 rm -f conftest.$ac_objext
6034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6035- (eval $ac_compile) 2>&5
6036+ (eval $ac_compile) 2>conftest.er1
6037 ac_status=$?
6038+ grep -v '^ *+' conftest.er1 >conftest.err
6039+ rm -f conftest.er1
6040+ cat conftest.err >&5
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); } &&
6043- { ac_try='test -s conftest.$ac_objext'
6044+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6045+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6046+ (eval $ac_try) 2>&5
6047+ ac_status=$?
6048+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049+ (exit $ac_status); }; } &&
6050+ { ac_try='test -s conftest.$ac_objext'
6051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6052 (eval $ac_try) 2>&5
6053 ac_status=$?
6054@@ -7647,7 +8192,7 @@
6055
6056 ac_header_compiler=no
6057 fi
6058-rm -f conftest.$ac_objext conftest.$ac_ext
6059+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6060 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6061 echo "${ECHO_T}$ac_header_compiler" >&6
6062
6063@@ -7655,7 +8200,6 @@
6064 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6065 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6066 cat >conftest.$ac_ext <<_ACEOF
6067-#line $LINENO "configure"
6068 /* confdefs.h. */
6069 _ACEOF
6070 cat confdefs.h >>conftest.$ac_ext
6071@@ -7673,6 +8217,7 @@
6072 (exit $ac_status); } >/dev/null; then
6073 if test -s conftest.err; then
6074 ac_cpp_err=$ac_c_preproc_warn_flag
6075+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6076 else
6077 ac_cpp_err=
6078 fi
6079@@ -7692,33 +8237,32 @@
6080 echo "${ECHO_T}$ac_header_preproc" >&6
6081
6082 # So? What about this header?
6083-case $ac_header_compiler:$ac_header_preproc in
6084- yes:no )
6085+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6086+ yes:no: )
6087 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6088 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6089- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6090-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6091- (
6092- cat <<\_ASBOX
6093-## ------------------------------------ ##
6094-## Report this to bug-autoconf@gnu.org. ##
6095-## ------------------------------------ ##
6096-_ASBOX
6097- ) |
6098- sed "s/^/$as_me: WARNING: /" >&2
6099+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6100+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6101+ ac_header_preproc=yes
6102 ;;
6103- no:yes )
6104+ no:yes:* )
6105 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6106 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6107- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6108-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6109+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6110+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6111+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6112+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6113+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6114+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6116 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6117+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6118+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6119 (
6120 cat <<\_ASBOX
6121-## ------------------------------------ ##
6122-## Report this to bug-autoconf@gnu.org. ##
6123-## ------------------------------------ ##
6124+## -------------------------------- ##
6125+## Report this to bug-patch@gnu.org ##
6126+## -------------------------------- ##
6127 _ASBOX
6128 ) |
6129 sed "s/^/$as_me: WARNING: /" >&2
6130@@ -7729,7 +8273,7 @@
6131 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6132 echo $ECHO_N "(cached) $ECHO_C" >&6
6133 else
6134- eval "$as_ac_Header=$ac_header_preproc"
6135+ eval "$as_ac_Header=\$ac_header_preproc"
6136 fi
6137 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6138 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6139@@ -7772,7 +8316,6 @@
6140 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6141 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6142 cat >conftest.$ac_ext <<_ACEOF
6143-#line $LINENO "configure"
6144 /* confdefs.h. */
6145 _ACEOF
6146 cat confdefs.h >>conftest.$ac_ext
6147@@ -7783,11 +8326,20 @@
6148 _ACEOF
6149 rm -f conftest.$ac_objext
6150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6151- (eval $ac_compile) 2>&5
6152+ (eval $ac_compile) 2>conftest.er1
6153 ac_status=$?
6154+ grep -v '^ *+' conftest.er1 >conftest.err
6155+ rm -f conftest.er1
6156+ cat conftest.err >&5
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); } &&
6159- { ac_try='test -s conftest.$ac_objext'
6160+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6161+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6162+ (eval $ac_try) 2>&5
6163+ ac_status=$?
6164+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165+ (exit $ac_status); }; } &&
6166+ { ac_try='test -s conftest.$ac_objext'
6167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6168 (eval $ac_try) 2>&5
6169 ac_status=$?
6170@@ -7800,7 +8352,7 @@
6171
6172 ac_header_compiler=no
6173 fi
6174-rm -f conftest.$ac_objext conftest.$ac_ext
6175+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6176 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6177 echo "${ECHO_T}$ac_header_compiler" >&6
6178
6179@@ -7808,7 +8360,6 @@
6180 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6181 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6182 cat >conftest.$ac_ext <<_ACEOF
6183-#line $LINENO "configure"
6184 /* confdefs.h. */
6185 _ACEOF
6186 cat confdefs.h >>conftest.$ac_ext
6187@@ -7826,6 +8377,7 @@
6188 (exit $ac_status); } >/dev/null; then
6189 if test -s conftest.err; then
6190 ac_cpp_err=$ac_c_preproc_warn_flag
6191+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6192 else
6193 ac_cpp_err=
6194 fi
6195@@ -7845,33 +8397,32 @@
6196 echo "${ECHO_T}$ac_header_preproc" >&6
6197
6198 # So? What about this header?
6199-case $ac_header_compiler:$ac_header_preproc in
6200- yes:no )
6201+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6202+ yes:no: )
6203 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6204 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6205- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6206-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6207- (
6208- cat <<\_ASBOX
6209-## ------------------------------------ ##
6210-## Report this to bug-autoconf@gnu.org. ##
6211-## ------------------------------------ ##
6212-_ASBOX
6213- ) |
6214- sed "s/^/$as_me: WARNING: /" >&2
6215+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6216+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6217+ ac_header_preproc=yes
6218 ;;
6219- no:yes )
6220+ no:yes:* )
6221 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6222 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6223- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6224-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6225+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6226+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6227+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6228+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6229+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6230+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6231 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6232 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6233+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6234+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6235 (
6236 cat <<\_ASBOX
6237-## ------------------------------------ ##
6238-## Report this to bug-autoconf@gnu.org. ##
6239-## ------------------------------------ ##
6240+## -------------------------------- ##
6241+## Report this to bug-patch@gnu.org ##
6242+## -------------------------------- ##
6243 _ASBOX
6244 ) |
6245 sed "s/^/$as_me: WARNING: /" >&2
6246@@ -7882,7 +8433,7 @@
6247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6248 echo $ECHO_N "(cached) $ECHO_C" >&6
6249 else
6250- eval "$as_ac_Header=$ac_header_preproc"
6251+ eval "$as_ac_Header=\$ac_header_preproc"
6252 fi
6253 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6254 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6255@@ -7916,7 +8467,6 @@
6256 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6257 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6258 cat >conftest.$ac_ext <<_ACEOF
6259-#line $LINENO "configure"
6260 /* confdefs.h. */
6261 _ACEOF
6262 cat confdefs.h >>conftest.$ac_ext
6263@@ -7927,11 +8477,20 @@
6264 _ACEOF
6265 rm -f conftest.$ac_objext
6266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6267- (eval $ac_compile) 2>&5
6268+ (eval $ac_compile) 2>conftest.er1
6269 ac_status=$?
6270+ grep -v '^ *+' conftest.er1 >conftest.err
6271+ rm -f conftest.er1
6272+ cat conftest.err >&5
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); } &&
6275- { ac_try='test -s conftest.$ac_objext'
6276+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6277+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6278+ (eval $ac_try) 2>&5
6279+ ac_status=$?
6280+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281+ (exit $ac_status); }; } &&
6282+ { ac_try='test -s conftest.$ac_objext'
6283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
6286@@ -7944,7 +8503,7 @@
6287
6288 ac_header_compiler=no
6289 fi
6290-rm -f conftest.$ac_objext conftest.$ac_ext
6291+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6292 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6293 echo "${ECHO_T}$ac_header_compiler" >&6
6294
6295@@ -7952,7 +8511,6 @@
6296 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6297 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6298 cat >conftest.$ac_ext <<_ACEOF
6299-#line $LINENO "configure"
6300 /* confdefs.h. */
6301 _ACEOF
6302 cat confdefs.h >>conftest.$ac_ext
6303@@ -7970,6 +8528,7 @@
6304 (exit $ac_status); } >/dev/null; then
6305 if test -s conftest.err; then
6306 ac_cpp_err=$ac_c_preproc_warn_flag
6307+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6308 else
6309 ac_cpp_err=
6310 fi
6311@@ -7989,33 +8548,32 @@
6312 echo "${ECHO_T}$ac_header_preproc" >&6
6313
6314 # So? What about this header?
6315-case $ac_header_compiler:$ac_header_preproc in
6316- yes:no )
6317+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6318+ yes:no: )
6319 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6320 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6321- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6322-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6323- (
6324- cat <<\_ASBOX
6325-## ------------------------------------ ##
6326-## Report this to bug-autoconf@gnu.org. ##
6327-## ------------------------------------ ##
6328-_ASBOX
6329- ) |
6330- sed "s/^/$as_me: WARNING: /" >&2
6331+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6332+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6333+ ac_header_preproc=yes
6334 ;;
6335- no:yes )
6336+ no:yes:* )
6337 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6338 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6339- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6340-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6341+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6342+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6343+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6344+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6345+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6346+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6347 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6348 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6349+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6350+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6351 (
6352 cat <<\_ASBOX
6353-## ------------------------------------ ##
6354-## Report this to bug-autoconf@gnu.org. ##
6355-## ------------------------------------ ##
6356+## -------------------------------- ##
6357+## Report this to bug-patch@gnu.org ##
6358+## -------------------------------- ##
6359 _ASBOX
6360 ) |
6361 sed "s/^/$as_me: WARNING: /" >&2
6362@@ -8026,7 +8584,7 @@
6363 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6364 echo $ECHO_N "(cached) $ECHO_C" >&6
6365 else
6366- eval "$as_ac_Header=$ac_header_preproc"
6367+ eval "$as_ac_Header=\$ac_header_preproc"
6368 fi
6369 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6370 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6371@@ -8053,21 +8611,28 @@
6372 echo $ECHO_N "(cached) $ECHO_C" >&6
6373 else
6374 cat >conftest.$ac_ext <<_ACEOF
6375-#line $LINENO "configure"
6376 /* confdefs.h. */
6377 _ACEOF
6378 cat confdefs.h >>conftest.$ac_ext
6379 cat >>conftest.$ac_ext <<_ACEOF
6380 /* end confdefs.h. */
6381+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6382+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
6383+#define $ac_func innocuous_$ac_func
6384+
6385 /* System header to define __stub macros and hopefully few prototypes,
6386 which can conflict with char $ac_func (); below.
6387 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6388 <limits.h> exists even on freestanding compilers. */
6389+
6390 #ifdef __STDC__
6391 # include <limits.h>
6392 #else
6393 # include <assert.h>
6394 #endif
6395+
6396+#undef $ac_func
6397+
6398 /* Override any gcc2 internal prototype to avoid an error. */
6399 #ifdef __cplusplus
6400 extern "C"
6401@@ -8098,11 +8663,20 @@
6402 _ACEOF
6403 rm -f conftest.$ac_objext conftest$ac_exeext
6404 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6405- (eval $ac_link) 2>&5
6406+ (eval $ac_link) 2>conftest.er1
6407 ac_status=$?
6408+ grep -v '^ *+' conftest.er1 >conftest.err
6409+ rm -f conftest.er1
6410+ cat conftest.err >&5
6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); } &&
6413- { ac_try='test -s conftest$ac_exeext'
6414+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6415+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6416+ (eval $ac_try) 2>&5
6417+ ac_status=$?
6418+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419+ (exit $ac_status); }; } &&
6420+ { ac_try='test -s conftest$ac_exeext'
6421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422 (eval $ac_try) 2>&5
6423 ac_status=$?
6424@@ -8115,7 +8689,8 @@
6425
6426 eval "$as_ac_var=no"
6427 fi
6428-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6429+rm -f conftest.err conftest.$ac_objext \
6430+ conftest$ac_exeext conftest.$ac_ext
6431 fi
6432 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6433 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6434@@ -8139,21 +8714,28 @@
6435 echo $ECHO_N "(cached) $ECHO_C" >&6
6436 else
6437 cat >conftest.$ac_ext <<_ACEOF
6438-#line $LINENO "configure"
6439 /* confdefs.h. */
6440 _ACEOF
6441 cat confdefs.h >>conftest.$ac_ext
6442 cat >>conftest.$ac_ext <<_ACEOF
6443 /* end confdefs.h. */
6444+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
6445+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
6446+#define $ac_func innocuous_$ac_func
6447+
6448 /* System header to define __stub macros and hopefully few prototypes,
6449 which can conflict with char $ac_func (); below.
6450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6451 <limits.h> exists even on freestanding compilers. */
6452+
6453 #ifdef __STDC__
6454 # include <limits.h>
6455 #else
6456 # include <assert.h>
6457 #endif
6458+
6459+#undef $ac_func
6460+
6461 /* Override any gcc2 internal prototype to avoid an error. */
6462 #ifdef __cplusplus
6463 extern "C"
6464@@ -8184,11 +8766,20 @@
6465 _ACEOF
6466 rm -f conftest.$ac_objext conftest$ac_exeext
6467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6468- (eval $ac_link) 2>&5
6469+ (eval $ac_link) 2>conftest.er1
6470 ac_status=$?
6471+ grep -v '^ *+' conftest.er1 >conftest.err
6472+ rm -f conftest.er1
6473+ cat conftest.err >&5
6474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475 (exit $ac_status); } &&
6476- { ac_try='test -s conftest$ac_exeext'
6477+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6478+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6479+ (eval $ac_try) 2>&5
6480+ ac_status=$?
6481+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482+ (exit $ac_status); }; } &&
6483+ { ac_try='test -s conftest$ac_exeext'
6484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6485 (eval $ac_try) 2>&5
6486 ac_status=$?
6487@@ -8201,7 +8792,8 @@
6488
6489 eval "$as_ac_var=no"
6490 fi
6491-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6492+rm -f conftest.err conftest.$ac_objext \
6493+ conftest$ac_exeext conftest.$ac_ext
6494 fi
6495 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6496 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6497@@ -8241,7 +8833,6 @@
6498 echo $ECHO_N "(cached) $ECHO_C" >&6
6499 else
6500 cat >conftest.$ac_ext <<_ACEOF
6501-#line $LINENO "configure"
6502 /* confdefs.h. */
6503 _ACEOF
6504 cat confdefs.h >>conftest.$ac_ext
6505@@ -8259,11 +8850,20 @@
6506 _ACEOF
6507 rm -f conftest.$ac_objext
6508 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6509- (eval $ac_compile) 2>&5
6510+ (eval $ac_compile) 2>conftest.er1
6511 ac_status=$?
6512+ grep -v '^ *+' conftest.er1 >conftest.err
6513+ rm -f conftest.er1
6514+ cat conftest.err >&5
6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516 (exit $ac_status); } &&
6517- { ac_try='test -s conftest.$ac_objext'
6518+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6519+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6520+ (eval $ac_try) 2>&5
6521+ ac_status=$?
6522+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523+ (exit $ac_status); }; } &&
6524+ { ac_try='test -s conftest.$ac_objext'
6525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6526 (eval $ac_try) 2>&5
6527 ac_status=$?
6528@@ -8276,7 +8876,7 @@
6529
6530 ac_cv_type_mbstate_t=no
6531 fi
6532-rm -f conftest.$ac_objext conftest.$ac_ext
6533+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6534 fi
6535 echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
6536 echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
6537@@ -8300,7 +8900,6 @@
6538 echo $ECHO_N "(cached) $ECHO_C" >&6
6539 else
6540 cat >conftest.$ac_ext <<_ACEOF
6541-#line $LINENO "configure"
6542 /* confdefs.h. */
6543 _ACEOF
6544 cat confdefs.h >>conftest.$ac_ext
6545@@ -8317,11 +8916,20 @@
6546 _ACEOF
6547 rm -f conftest.$ac_objext conftest$ac_exeext
6548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6549- (eval $ac_link) 2>&5
6550+ (eval $ac_link) 2>conftest.er1
6551 ac_status=$?
6552+ grep -v '^ *+' conftest.er1 >conftest.err
6553+ rm -f conftest.er1
6554+ cat conftest.err >&5
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); } &&
6557- { ac_try='test -s conftest$ac_exeext'
6558+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6559+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6560+ (eval $ac_try) 2>&5
6561+ ac_status=$?
6562+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563+ (exit $ac_status); }; } &&
6564+ { ac_try='test -s conftest$ac_exeext'
6565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6566 (eval $ac_try) 2>&5
6567 ac_status=$?
6568@@ -8334,7 +8942,8 @@
6569
6570 jm_cv_func_mbrtowc=no
6571 fi
6572-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6573+rm -f conftest.err conftest.$ac_objext \
6574+ conftest$ac_exeext conftest.$ac_ext
6575 fi
6576 echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
6577 echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
6578@@ -8348,69 +8957,465 @@
6579
6580
6581
6582-
6583-
6584-
6585-
6586-for ac_func in pathconf
6587-do
6588-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6589-echo "$as_me:$LINENO: checking for $ac_func" >&5
6590-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6591-if eval "test \"\${$as_ac_var+set}\" = set"; then
6592+ echo "$as_me:$LINENO: checking whether free is declared" >&5
6593+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
6594+if test "${ac_cv_have_decl_free+set}" = set; then
6595 echo $ECHO_N "(cached) $ECHO_C" >&6
6596 else
6597 cat >conftest.$ac_ext <<_ACEOF
6598-#line $LINENO "configure"
6599 /* confdefs.h. */
6600 _ACEOF
6601 cat confdefs.h >>conftest.$ac_ext
6602 cat >>conftest.$ac_ext <<_ACEOF
6603 /* end confdefs.h. */
6604-/* System header to define __stub macros and hopefully few prototypes,
6605- which can conflict with char $ac_func (); below.
6606- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6607- <limits.h> exists even on freestanding compilers. */
6608-#ifdef __STDC__
6609-# include <limits.h>
6610-#else
6611-# include <assert.h>
6612-#endif
6613-/* Override any gcc2 internal prototype to avoid an error. */
6614-#ifdef __cplusplus
6615-extern "C"
6616-{
6617-#endif
6618-/* We use char because int might match the return type of a gcc2
6619- builtin and then its argument prototype would still apply. */
6620-char $ac_func ();
6621-/* The GNU C library defines this for functions which it implements
6622- to always fail with ENOSYS. Some functions are actually named
6623- something starting with __ and the normal name is an alias. */
6624-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6625-choke me
6626-#else
6627-char (*f) () = $ac_func;
6628-#endif
6629-#ifdef __cplusplus
6630-}
6631-#endif
6632-
6633+$ac_includes_default
6634 int
6635 main ()
6636 {
6637-return f != $ac_func;
6638+#ifndef free
6639+ char *p = (char *) free;
6640+#endif
6641+
6642 ;
6643 return 0;
6644 }
6645 _ACEOF
6646-rm -f conftest.$ac_objext conftest$ac_exeext
6647-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6648- (eval $ac_link) 2>&5
6649+rm -f conftest.$ac_objext
6650+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6651+ (eval $ac_compile) 2>conftest.er1
6652+ ac_status=$?
6653+ grep -v '^ *+' conftest.er1 >conftest.err
6654+ rm -f conftest.er1
6655+ cat conftest.err >&5
6656+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6657+ (exit $ac_status); } &&
6658+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6659+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6660+ (eval $ac_try) 2>&5
6661+ ac_status=$?
6662+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6663+ (exit $ac_status); }; } &&
6664+ { ac_try='test -s conftest.$ac_objext'
6665+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6666+ (eval $ac_try) 2>&5
6667+ ac_status=$?
6668+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6669+ (exit $ac_status); }; }; then
6670+ ac_cv_have_decl_free=yes
6671+else
6672+ echo "$as_me: failed program was:" >&5
6673+sed 's/^/| /' conftest.$ac_ext >&5
6674+
6675+ac_cv_have_decl_free=no
6676+fi
6677+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6678+fi
6679+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
6680+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
6681+if test $ac_cv_have_decl_free = yes; then
6682+
6683+cat >>confdefs.h <<_ACEOF
6684+#define HAVE_DECL_FREE 1
6685+_ACEOF
6686+
6687+
6688+else
6689+ cat >>confdefs.h <<_ACEOF
6690+#define HAVE_DECL_FREE 0
6691+_ACEOF
6692+
6693+
6694+fi
6695+
6696+
6697+
6698+
6699+
6700+ :
6701+
6702+
6703+
6704+
6705+
6706+ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
6707+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
6708+if test "${ac_cv_header_stdbool_h+set}" = set; then
6709+ echo $ECHO_N "(cached) $ECHO_C" >&6
6710+else
6711+ cat >conftest.$ac_ext <<_ACEOF
6712+/* confdefs.h. */
6713+_ACEOF
6714+cat confdefs.h >>conftest.$ac_ext
6715+cat >>conftest.$ac_ext <<_ACEOF
6716+/* end confdefs.h. */
6717+
6718+ #include <stdbool.h>
6719+ #ifndef bool
6720+ "error: bool is not defined"
6721+ #endif
6722+ #ifndef false
6723+ "error: false is not defined"
6724+ #endif
6725+ #if false
6726+ "error: false is not 0"
6727+ #endif
6728+ #ifndef true
6729+ "error: false is not defined"
6730+ #endif
6731+ #if true != 1
6732+ "error: true is not 1"
6733+ #endif
6734+ #ifndef __bool_true_false_are_defined
6735+ "error: __bool_true_false_are_defined is not defined"
6736+ #endif
6737+
6738+ struct s { _Bool s: 1; _Bool t; } s;
6739+
6740+ char a[true == 1 ? 1 : -1];
6741+ char b[false == 0 ? 1 : -1];
6742+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
6743+ char d[(bool) -0.5 == true ? 1 : -1];
6744+ bool e = &s;
6745+ char f[(_Bool) -0.0 == false ? 1 : -1];
6746+ char g[true];
6747+ char h[sizeof (_Bool)];
6748+ char i[sizeof s.t];
6749+
6750+int
6751+main ()
6752+{
6753+ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
6754+ ;
6755+ return 0;
6756+}
6757+_ACEOF
6758+rm -f conftest.$ac_objext
6759+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760+ (eval $ac_compile) 2>conftest.er1
6761+ ac_status=$?
6762+ grep -v '^ *+' conftest.er1 >conftest.err
6763+ rm -f conftest.er1
6764+ cat conftest.err >&5
6765+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766+ (exit $ac_status); } &&
6767+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6768+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6769+ (eval $ac_try) 2>&5
6770+ ac_status=$?
6771+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772+ (exit $ac_status); }; } &&
6773+ { ac_try='test -s conftest.$ac_objext'
6774+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6775+ (eval $ac_try) 2>&5
6776+ ac_status=$?
6777+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778+ (exit $ac_status); }; }; then
6779+ ac_cv_header_stdbool_h=yes
6780+else
6781+ echo "$as_me: failed program was:" >&5
6782+sed 's/^/| /' conftest.$ac_ext >&5
6783+
6784+ac_cv_header_stdbool_h=no
6785+fi
6786+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6787+fi
6788+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
6789+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
6790+ echo "$as_me:$LINENO: checking for _Bool" >&5
6791+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
6792+if test "${ac_cv_type__Bool+set}" = set; then
6793+ echo $ECHO_N "(cached) $ECHO_C" >&6
6794+else
6795+ cat >conftest.$ac_ext <<_ACEOF
6796+/* confdefs.h. */
6797+_ACEOF
6798+cat confdefs.h >>conftest.$ac_ext
6799+cat >>conftest.$ac_ext <<_ACEOF
6800+/* end confdefs.h. */
6801+$ac_includes_default
6802+int
6803+main ()
6804+{
6805+if ((_Bool *) 0)
6806+ return 0;
6807+if (sizeof (_Bool))
6808+ return 0;
6809+ ;
6810+ return 0;
6811+}
6812+_ACEOF
6813+rm -f conftest.$ac_objext
6814+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6815+ (eval $ac_compile) 2>conftest.er1
6816+ ac_status=$?
6817+ grep -v '^ *+' conftest.er1 >conftest.err
6818+ rm -f conftest.er1
6819+ cat conftest.err >&5
6820+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821+ (exit $ac_status); } &&
6822+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6823+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6824+ (eval $ac_try) 2>&5
6825+ ac_status=$?
6826+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6827+ (exit $ac_status); }; } &&
6828+ { ac_try='test -s conftest.$ac_objext'
6829+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830+ (eval $ac_try) 2>&5
6831+ ac_status=$?
6832+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833+ (exit $ac_status); }; }; then
6834+ ac_cv_type__Bool=yes
6835+else
6836+ echo "$as_me: failed program was:" >&5
6837+sed 's/^/| /' conftest.$ac_ext >&5
6838+
6839+ac_cv_type__Bool=no
6840+fi
6841+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6842+fi
6843+echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
6844+echo "${ECHO_T}$ac_cv_type__Bool" >&6
6845+if test $ac_cv_type__Bool = yes; then
6846+
6847+cat >>confdefs.h <<_ACEOF
6848+#define HAVE__BOOL 1
6849+_ACEOF
6850+
6851+
6852+fi
6853+
6854+ if test $ac_cv_header_stdbool_h = yes; then
6855+
6856+cat >>confdefs.h <<\_ACEOF
6857+#define HAVE_STDBOOL_H 1
6858+_ACEOF
6859+
6860+ fi
6861+
6862+ :
6863+
6864+
6865+
6866+
6867+
6868+
6869+
6870+
6871+
6872+
6873+echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
6874+echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
6875+if test "${ac_cv_stat_nsec+set}" = set; then
6876+ echo $ECHO_N "(cached) $ECHO_C" >&6
6877+else
6878+ cat >conftest.$ac_ext <<_ACEOF
6879+/* confdefs.h. */
6880+_ACEOF
6881+cat confdefs.h >>conftest.$ac_ext
6882+cat >>conftest.$ac_ext <<_ACEOF
6883+/* end confdefs.h. */
6884+
6885+ #include <sys/types.h>
6886+ #include <sys/stat.h>
6887+ #include <unistd.h>
6888+ struct stat st;
6889+
6890+int
6891+main ()
6892+{
6893+ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec;
6894+ ;
6895+ return 0;
6896+}
6897+_ACEOF
6898+rm -f conftest.$ac_objext
6899+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6900+ (eval $ac_compile) 2>conftest.er1
6901 ac_status=$?
6902+ grep -v '^ *+' conftest.er1 >conftest.err
6903+ rm -f conftest.er1
6904+ cat conftest.err >&5
6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906 (exit $ac_status); } &&
6907- { ac_try='test -s conftest$ac_exeext'
6908+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6909+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6910+ (eval $ac_try) 2>&5
6911+ ac_status=$?
6912+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913+ (exit $ac_status); }; } &&
6914+ { ac_try='test -s conftest.$ac_objext'
6915+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6916+ (eval $ac_try) 2>&5
6917+ ac_status=$?
6918+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6919+ (exit $ac_status); }; }; then
6920+ ac_cv_stat_nsec=yes
6921+else
6922+ echo "$as_me: failed program was:" >&5
6923+sed 's/^/| /' conftest.$ac_ext >&5
6924+
6925+ac_cv_stat_nsec=no
6926+fi
6927+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6928+
6929+fi
6930+echo "$as_me:$LINENO: result: $ac_cv_stat_nsec" >&5
6931+echo "${ECHO_T}$ac_cv_stat_nsec" >&6
6932+ if test $ac_cv_stat_nsec = yes; then
6933+
6934+cat >>confdefs.h <<\_ACEOF
6935+#define HAVE_STAT_NSEC 1
6936+_ACEOF
6937+
6938+ fi
6939+
6940+ echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
6941+echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
6942+if test "${ac_cv_stat_timeval+set}" = set; then
6943+ echo $ECHO_N "(cached) $ECHO_C" >&6
6944+else
6945+ cat >conftest.$ac_ext <<_ACEOF
6946+/* confdefs.h. */
6947+_ACEOF
6948+cat confdefs.h >>conftest.$ac_ext
6949+cat >>conftest.$ac_ext <<_ACEOF
6950+/* end confdefs.h. */
6951+
6952+ #include <time.h>
6953+ #include <sys/types.h>
6954+ #include <sys/stat.h>
6955+ #include <unistd.h>
6956+ struct stat st;
6957+
6958+int
6959+main ()
6960+{
6961+ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec;
6962+ ;
6963+ return 0;
6964+}
6965+_ACEOF
6966+rm -f conftest.$ac_objext
6967+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6968+ (eval $ac_compile) 2>conftest.er1
6969+ ac_status=$?
6970+ grep -v '^ *+' conftest.er1 >conftest.err
6971+ rm -f conftest.er1
6972+ cat conftest.err >&5
6973+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974+ (exit $ac_status); } &&
6975+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6976+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6977+ (eval $ac_try) 2>&5
6978+ ac_status=$?
6979+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980+ (exit $ac_status); }; } &&
6981+ { ac_try='test -s conftest.$ac_objext'
6982+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6983+ (eval $ac_try) 2>&5
6984+ ac_status=$?
6985+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986+ (exit $ac_status); }; }; then
6987+ ac_cv_stat_timeval=yes
6988+else
6989+ echo "$as_me: failed program was:" >&5
6990+sed 's/^/| /' conftest.$ac_ext >&5
6991+
6992+ac_cv_stat_timeval=no
6993+fi
6994+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6995+
6996+fi
6997+echo "$as_me:$LINENO: result: $ac_cv_stat_timeval" >&5
6998+echo "${ECHO_T}$ac_cv_stat_timeval" >&6
6999+ if test $ac_cv_stat_timeval = yes; then
7000+
7001+cat >>confdefs.h <<\_ACEOF
7002+#define HAVE_STAT_TIMEVAL 1
7003+_ACEOF
7004+
7005+ fi
7006+
7007+
7008+
7009+
7010+
7011+for ac_func in pathconf
7012+do
7013+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7014+echo "$as_me:$LINENO: checking for $ac_func" >&5
7015+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7016+if eval "test \"\${$as_ac_var+set}\" = set"; then
7017+ echo $ECHO_N "(cached) $ECHO_C" >&6
7018+else
7019+ cat >conftest.$ac_ext <<_ACEOF
7020+/* confdefs.h. */
7021+_ACEOF
7022+cat confdefs.h >>conftest.$ac_ext
7023+cat >>conftest.$ac_ext <<_ACEOF
7024+/* end confdefs.h. */
7025+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7026+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
7027+#define $ac_func innocuous_$ac_func
7028+
7029+/* System header to define __stub macros and hopefully few prototypes,
7030+ which can conflict with char $ac_func (); below.
7031+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7032+ <limits.h> exists even on freestanding compilers. */
7033+
7034+#ifdef __STDC__
7035+# include <limits.h>
7036+#else
7037+# include <assert.h>
7038+#endif
7039+
7040+#undef $ac_func
7041+
7042+/* Override any gcc2 internal prototype to avoid an error. */
7043+#ifdef __cplusplus
7044+extern "C"
7045+{
7046+#endif
7047+/* We use char because int might match the return type of a gcc2
7048+ builtin and then its argument prototype would still apply. */
7049+char $ac_func ();
7050+/* The GNU C library defines this for functions which it implements
7051+ to always fail with ENOSYS. Some functions are actually named
7052+ something starting with __ and the normal name is an alias. */
7053+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7054+choke me
7055+#else
7056+char (*f) () = $ac_func;
7057+#endif
7058+#ifdef __cplusplus
7059+}
7060+#endif
7061+
7062+int
7063+main ()
7064+{
7065+return f != $ac_func;
7066+ ;
7067+ return 0;
7068+}
7069+_ACEOF
7070+rm -f conftest.$ac_objext conftest$ac_exeext
7071+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7072+ (eval $ac_link) 2>conftest.er1
7073+ ac_status=$?
7074+ grep -v '^ *+' conftest.er1 >conftest.err
7075+ rm -f conftest.er1
7076+ cat conftest.err >&5
7077+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078+ (exit $ac_status); } &&
7079+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7080+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081+ (eval $ac_try) 2>&5
7082+ ac_status=$?
7083+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084+ (exit $ac_status); }; } &&
7085+ { ac_try='test -s conftest$ac_exeext'
7086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7087 (eval $ac_try) 2>&5
7088 ac_status=$?
7089@@ -8423,7 +9428,8 @@
7090
7091 eval "$as_ac_var=no"
7092 fi
7093-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7094+rm -f conftest.err conftest.$ac_objext \
7095+ conftest$ac_exeext conftest.$ac_ext
7096 fi
7097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7098 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7099@@ -8454,7 +9460,6 @@
7100 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7101 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7102 cat >conftest.$ac_ext <<_ACEOF
7103-#line $LINENO "configure"
7104 /* confdefs.h. */
7105 _ACEOF
7106 cat confdefs.h >>conftest.$ac_ext
7107@@ -8465,11 +9470,20 @@
7108 _ACEOF
7109 rm -f conftest.$ac_objext
7110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7111- (eval $ac_compile) 2>&5
7112+ (eval $ac_compile) 2>conftest.er1
7113 ac_status=$?
7114+ grep -v '^ *+' conftest.er1 >conftest.err
7115+ rm -f conftest.er1
7116+ cat conftest.err >&5
7117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118 (exit $ac_status); } &&
7119- { ac_try='test -s conftest.$ac_objext'
7120+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7121+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122+ (eval $ac_try) 2>&5
7123+ ac_status=$?
7124+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125+ (exit $ac_status); }; } &&
7126+ { ac_try='test -s conftest.$ac_objext'
7127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7128 (eval $ac_try) 2>&5
7129 ac_status=$?
7130@@ -8482,7 +9496,7 @@
7131
7132 ac_header_compiler=no
7133 fi
7134-rm -f conftest.$ac_objext conftest.$ac_ext
7135+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7136 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7137 echo "${ECHO_T}$ac_header_compiler" >&6
7138
7139@@ -8490,7 +9504,6 @@
7140 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7141 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7142 cat >conftest.$ac_ext <<_ACEOF
7143-#line $LINENO "configure"
7144 /* confdefs.h. */
7145 _ACEOF
7146 cat confdefs.h >>conftest.$ac_ext
7147@@ -8508,6 +9521,7 @@
7148 (exit $ac_status); } >/dev/null; then
7149 if test -s conftest.err; then
7150 ac_cpp_err=$ac_c_preproc_warn_flag
7151+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7152 else
7153 ac_cpp_err=
7154 fi
7155@@ -8527,33 +9541,32 @@
7156 echo "${ECHO_T}$ac_header_preproc" >&6
7157
7158 # So? What about this header?
7159-case $ac_header_compiler:$ac_header_preproc in
7160- yes:no )
7161+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7162+ yes:no: )
7163 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7164 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7165- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7166-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7167- (
7168- cat <<\_ASBOX
7169-## ------------------------------------ ##
7170-## Report this to bug-autoconf@gnu.org. ##
7171-## ------------------------------------ ##
7172-_ASBOX
7173- ) |
7174- sed "s/^/$as_me: WARNING: /" >&2
7175+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7176+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7177+ ac_header_preproc=yes
7178 ;;
7179- no:yes )
7180+ no:yes:* )
7181 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7182 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7183- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7184-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7185+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7186+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7187+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7188+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7189+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7190+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7191 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7192 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7193+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7194+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7195 (
7196 cat <<\_ASBOX
7197-## ------------------------------------ ##
7198-## Report this to bug-autoconf@gnu.org. ##
7199-## ------------------------------------ ##
7200+## -------------------------------- ##
7201+## Report this to bug-patch@gnu.org ##
7202+## -------------------------------- ##
7203 _ASBOX
7204 ) |
7205 sed "s/^/$as_me: WARNING: /" >&2
7206@@ -8564,7 +9577,7 @@
7207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7208 echo $ECHO_N "(cached) $ECHO_C" >&6
7209 else
7210- eval "$as_ac_Header=$ac_header_preproc"
7211+ eval "$as_ac_Header=\$ac_header_preproc"
7212 fi
7213 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7214 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7215@@ -8587,7 +9600,6 @@
7216 echo $ECHO_N "(cached) $ECHO_C" >&6
7217 else
7218 cat >conftest.$ac_ext <<_ACEOF
7219-#line $LINENO "configure"
7220 /* confdefs.h. */
7221 _ACEOF
7222 cat confdefs.h >>conftest.$ac_ext
7223@@ -8607,11 +9619,20 @@
7224 _ACEOF
7225 rm -f conftest.$ac_objext
7226 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7227- (eval $ac_compile) 2>&5
7228+ (eval $ac_compile) 2>conftest.er1
7229 ac_status=$?
7230+ grep -v '^ *+' conftest.er1 >conftest.err
7231+ rm -f conftest.er1
7232+ cat conftest.err >&5
7233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7234 (exit $ac_status); } &&
7235- { ac_try='test -s conftest.$ac_objext'
7236+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7237+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7238+ (eval $ac_try) 2>&5
7239+ ac_status=$?
7240+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241+ (exit $ac_status); }; } &&
7242+ { ac_try='test -s conftest.$ac_objext'
7243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7244 (eval $ac_try) 2>&5
7245 ac_status=$?
7246@@ -8624,7 +9645,7 @@
7247
7248 ac_cv_have_decl_free=no
7249 fi
7250-rm -f conftest.$ac_objext conftest.$ac_ext
7251+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7252 fi
7253 echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
7254 echo "${ECHO_T}$ac_cv_have_decl_free" >&6
7255@@ -8648,7 +9669,6 @@
7256 echo $ECHO_N "(cached) $ECHO_C" >&6
7257 else
7258 cat >conftest.$ac_ext <<_ACEOF
7259-#line $LINENO "configure"
7260 /* confdefs.h. */
7261 _ACEOF
7262 cat confdefs.h >>conftest.$ac_ext
7263@@ -8668,11 +9688,20 @@
7264 _ACEOF
7265 rm -f conftest.$ac_objext
7266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7267- (eval $ac_compile) 2>&5
7268+ (eval $ac_compile) 2>conftest.er1
7269 ac_status=$?
7270+ grep -v '^ *+' conftest.er1 >conftest.err
7271+ rm -f conftest.er1
7272+ cat conftest.err >&5
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); } &&
7275- { ac_try='test -s conftest.$ac_objext'
7276+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7277+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7278+ (eval $ac_try) 2>&5
7279+ ac_status=$?
7280+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281+ (exit $ac_status); }; } &&
7282+ { ac_try='test -s conftest.$ac_objext'
7283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284 (eval $ac_try) 2>&5
7285 ac_status=$?
7286@@ -8685,7 +9714,7 @@
7287
7288 ac_cv_have_decl_getenv=no
7289 fi
7290-rm -f conftest.$ac_objext conftest.$ac_ext
7291+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7292 fi
7293 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
7294 echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
7295@@ -8709,7 +9738,6 @@
7296 echo $ECHO_N "(cached) $ECHO_C" >&6
7297 else
7298 cat >conftest.$ac_ext <<_ACEOF
7299-#line $LINENO "configure"
7300 /* confdefs.h. */
7301 _ACEOF
7302 cat confdefs.h >>conftest.$ac_ext
7303@@ -8729,11 +9757,20 @@
7304 _ACEOF
7305 rm -f conftest.$ac_objext
7306 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7307- (eval $ac_compile) 2>&5
7308+ (eval $ac_compile) 2>conftest.er1
7309 ac_status=$?
7310+ grep -v '^ *+' conftest.er1 >conftest.err
7311+ rm -f conftest.er1
7312+ cat conftest.err >&5
7313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); } &&
7315- { ac_try='test -s conftest.$ac_objext'
7316+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7317+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318+ (eval $ac_try) 2>&5
7319+ ac_status=$?
7320+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321+ (exit $ac_status); }; } &&
7322+ { ac_try='test -s conftest.$ac_objext'
7323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7324 (eval $ac_try) 2>&5
7325 ac_status=$?
7326@@ -8746,7 +9783,7 @@
7327
7328 ac_cv_have_decl_malloc=no
7329 fi
7330-rm -f conftest.$ac_objext conftest.$ac_ext
7331+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7332 fi
7333 echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
7334 echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
7335@@ -8770,7 +9807,6 @@
7336 echo $ECHO_N "(cached) $ECHO_C" >&6
7337 else
7338 cat >conftest.$ac_ext <<_ACEOF
7339-#line $LINENO "configure"
7340 /* confdefs.h. */
7341 _ACEOF
7342 cat confdefs.h >>conftest.$ac_ext
7343@@ -8790,11 +9826,20 @@
7344 _ACEOF
7345 rm -f conftest.$ac_objext
7346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7347- (eval $ac_compile) 2>&5
7348+ (eval $ac_compile) 2>conftest.er1
7349 ac_status=$?
7350+ grep -v '^ *+' conftest.er1 >conftest.err
7351+ rm -f conftest.er1
7352+ cat conftest.err >&5
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); } &&
7355- { ac_try='test -s conftest.$ac_objext'
7356+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7357+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7358+ (eval $ac_try) 2>&5
7359+ ac_status=$?
7360+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361+ (exit $ac_status); }; } &&
7362+ { ac_try='test -s conftest.$ac_objext'
7363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7364 (eval $ac_try) 2>&5
7365 ac_status=$?
7366@@ -8807,7 +9852,7 @@
7367
7368 ac_cv_have_decl_mktemp=no
7369 fi
7370-rm -f conftest.$ac_objext conftest.$ac_ext
7371+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7372 fi
7373 echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
7374 echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
7375@@ -8849,21 +9894,28 @@
7376 echo $ECHO_N "(cached) $ECHO_C" >&6
7377 else
7378 cat >conftest.$ac_ext <<_ACEOF
7379-#line $LINENO "configure"
7380 /* confdefs.h. */
7381 _ACEOF
7382 cat confdefs.h >>conftest.$ac_ext
7383 cat >>conftest.$ac_ext <<_ACEOF
7384 /* end confdefs.h. */
7385+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7386+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
7387+#define $ac_func innocuous_$ac_func
7388+
7389 /* System header to define __stub macros and hopefully few prototypes,
7390 which can conflict with char $ac_func (); below.
7391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7392 <limits.h> exists even on freestanding compilers. */
7393+
7394 #ifdef __STDC__
7395 # include <limits.h>
7396 #else
7397 # include <assert.h>
7398 #endif
7399+
7400+#undef $ac_func
7401+
7402 /* Override any gcc2 internal prototype to avoid an error. */
7403 #ifdef __cplusplus
7404 extern "C"
7405@@ -8894,11 +9946,20 @@
7406 _ACEOF
7407 rm -f conftest.$ac_objext conftest$ac_exeext
7408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7409- (eval $ac_link) 2>&5
7410+ (eval $ac_link) 2>conftest.er1
7411 ac_status=$?
7412+ grep -v '^ *+' conftest.er1 >conftest.err
7413+ rm -f conftest.er1
7414+ cat conftest.err >&5
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); } &&
7417- { ac_try='test -s conftest$ac_exeext'
7418+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7419+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7420+ (eval $ac_try) 2>&5
7421+ ac_status=$?
7422+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7423+ (exit $ac_status); }; } &&
7424+ { ac_try='test -s conftest$ac_exeext'
7425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7426 (eval $ac_try) 2>&5
7427 ac_status=$?
7428@@ -8911,7 +9972,8 @@
7429
7430 eval "$as_ac_var=no"
7431 fi
7432-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7433+rm -f conftest.err conftest.$ac_objext \
7434+ conftest$ac_exeext conftest.$ac_ext
7435 fi
7436 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7437 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7438@@ -8934,21 +9996,28 @@
7439 echo $ECHO_N "(cached) $ECHO_C" >&6
7440 else
7441 cat >conftest.$ac_ext <<_ACEOF
7442-#line $LINENO "configure"
7443 /* confdefs.h. */
7444 _ACEOF
7445 cat confdefs.h >>conftest.$ac_ext
7446 cat >>conftest.$ac_ext <<_ACEOF
7447 /* end confdefs.h. */
7448+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7449+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
7450+#define $ac_func innocuous_$ac_func
7451+
7452 /* System header to define __stub macros and hopefully few prototypes,
7453 which can conflict with char $ac_func (); below.
7454 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7455 <limits.h> exists even on freestanding compilers. */
7456+
7457 #ifdef __STDC__
7458 # include <limits.h>
7459 #else
7460 # include <assert.h>
7461 #endif
7462+
7463+#undef $ac_func
7464+
7465 /* Override any gcc2 internal prototype to avoid an error. */
7466 #ifdef __cplusplus
7467 extern "C"
7468@@ -8979,11 +10048,20 @@
7469 _ACEOF
7470 rm -f conftest.$ac_objext conftest$ac_exeext
7471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7472- (eval $ac_link) 2>&5
7473+ (eval $ac_link) 2>conftest.er1
7474 ac_status=$?
7475+ grep -v '^ *+' conftest.er1 >conftest.err
7476+ rm -f conftest.er1
7477+ cat conftest.err >&5
7478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7479 (exit $ac_status); } &&
7480- { ac_try='test -s conftest$ac_exeext'
7481+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7482+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7483+ (eval $ac_try) 2>&5
7484+ ac_status=$?
7485+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486+ (exit $ac_status); }; } &&
7487+ { ac_try='test -s conftest$ac_exeext'
7488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7489 (eval $ac_try) 2>&5
7490 ac_status=$?
7491@@ -8996,7 +10074,8 @@
7492
7493 eval "$as_ac_var=no"
7494 fi
7495-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7496+rm -f conftest.err conftest.$ac_objext \
7497+ conftest$ac_exeext conftest.$ac_ext
7498 fi
7499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7500 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7501@@ -9006,7 +10085,14 @@
7502 _ACEOF
7503
7504 else
7505- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
7506+ case $LIBOBJS in
7507+ "$ac_func.$ac_objext" | \
7508+ *" $ac_func.$ac_objext" | \
7509+ "$ac_func.$ac_objext "* | \
7510+ *" $ac_func.$ac_objext "* ) ;;
7511+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
7512+esac
7513+
7514 fi
7515 done
7516
7517@@ -9019,7 +10105,6 @@
7518 while :; do
7519 ac_cv_sys_largefile_source=no
7520 cat >conftest.$ac_ext <<_ACEOF
7521-#line $LINENO "configure"
7522 /* confdefs.h. */
7523 _ACEOF
7524 cat confdefs.h >>conftest.$ac_ext
7525@@ -9036,11 +10121,20 @@
7526 _ACEOF
7527 rm -f conftest.$ac_objext
7528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7529- (eval $ac_compile) 2>&5
7530+ (eval $ac_compile) 2>conftest.er1
7531 ac_status=$?
7532+ grep -v '^ *+' conftest.er1 >conftest.err
7533+ rm -f conftest.er1
7534+ cat conftest.err >&5
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
7537- { ac_try='test -s conftest.$ac_objext'
7538+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7539+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7540+ (eval $ac_try) 2>&5
7541+ ac_status=$?
7542+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543+ (exit $ac_status); }; } &&
7544+ { ac_try='test -s conftest.$ac_objext'
7545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546 (eval $ac_try) 2>&5
7547 ac_status=$?
7548@@ -9052,9 +10146,8 @@
7549 sed 's/^/| /' conftest.$ac_ext >&5
7550
7551 fi
7552-rm -f conftest.$ac_objext conftest.$ac_ext
7553+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7554 cat >conftest.$ac_ext <<_ACEOF
7555-#line $LINENO "configure"
7556 /* confdefs.h. */
7557 _ACEOF
7558 cat confdefs.h >>conftest.$ac_ext
7559@@ -9072,11 +10165,20 @@
7560 _ACEOF
7561 rm -f conftest.$ac_objext
7562 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7563- (eval $ac_compile) 2>&5
7564+ (eval $ac_compile) 2>conftest.er1
7565 ac_status=$?
7566+ grep -v '^ *+' conftest.er1 >conftest.err
7567+ rm -f conftest.er1
7568+ cat conftest.err >&5
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571- { ac_try='test -s conftest.$ac_objext'
7572+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7573+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574+ (eval $ac_try) 2>&5
7575+ ac_status=$?
7576+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577+ (exit $ac_status); }; } &&
7578+ { ac_try='test -s conftest.$ac_objext'
7579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7580 (eval $ac_try) 2>&5
7581 ac_status=$?
7582@@ -9088,7 +10190,7 @@
7583 sed 's/^/| /' conftest.$ac_ext >&5
7584
7585 fi
7586-rm -f conftest.$ac_objext conftest.$ac_ext
7587+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7588 break
7589 done
7590 fi
7591@@ -9112,7 +10214,6 @@
7592 echo $ECHO_N "(cached) $ECHO_C" >&6
7593 else
7594 cat >conftest.$ac_ext <<_ACEOF
7595-#line $LINENO "configure"
7596 /* confdefs.h. */
7597 _ACEOF
7598 cat confdefs.h >>conftest.$ac_ext
7599@@ -9129,11 +10230,20 @@
7600 _ACEOF
7601 rm -f conftest.$ac_objext conftest$ac_exeext
7602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7603- (eval $ac_link) 2>&5
7604+ (eval $ac_link) 2>conftest.er1
7605 ac_status=$?
7606+ grep -v '^ *+' conftest.er1 >conftest.err
7607+ rm -f conftest.er1
7608+ cat conftest.err >&5
7609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7610 (exit $ac_status); } &&
7611- { ac_try='test -s conftest$ac_exeext'
7612+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7613+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614+ (eval $ac_try) 2>&5
7615+ ac_status=$?
7616+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617+ (exit $ac_status); }; } &&
7618+ { ac_try='test -s conftest$ac_exeext'
7619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622@@ -9146,7 +10256,8 @@
7623
7624 ac_cv_func_fseeko=no
7625 fi
7626-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7627+rm -f conftest.err conftest.$ac_objext \
7628+ conftest$ac_exeext conftest.$ac_ext
7629 fi
7630 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
7631 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7632@@ -9165,7 +10276,6 @@
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7634 else
7635 cat >conftest.$ac_ext <<_ACEOF
7636-#line $LINENO "configure"
7637 /* confdefs.h. */
7638 _ACEOF
7639 cat confdefs.h >>conftest.$ac_ext
7640@@ -9185,11 +10295,20 @@
7641 _ACEOF
7642 rm -f conftest.$ac_objext
7643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7644- (eval $ac_compile) 2>&5
7645+ (eval $ac_compile) 2>conftest.er1
7646 ac_status=$?
7647+ grep -v '^ *+' conftest.er1 >conftest.err
7648+ rm -f conftest.er1
7649+ cat conftest.err >&5
7650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
7652- { ac_try='test -s conftest.$ac_objext'
7653+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7654+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655+ (eval $ac_try) 2>&5
7656+ ac_status=$?
7657+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658+ (exit $ac_status); }; } &&
7659+ { ac_try='test -s conftest.$ac_objext'
7660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7661 (eval $ac_try) 2>&5
7662 ac_status=$?
7663@@ -9202,7 +10321,7 @@
7664
7665 ac_cv_have_decl_clearerr_unlocked=no
7666 fi
7667-rm -f conftest.$ac_objext conftest.$ac_ext
7668+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7669 fi
7670 echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
7671 echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
7672@@ -9230,7 +10349,6 @@
7673 echo $ECHO_N "(cached) $ECHO_C" >&6
7674 else
7675 cat >conftest.$ac_ext <<_ACEOF
7676-#line $LINENO "configure"
7677 /* confdefs.h. */
7678 _ACEOF
7679 cat confdefs.h >>conftest.$ac_ext
7680@@ -9250,11 +10368,20 @@
7681 _ACEOF
7682 rm -f conftest.$ac_objext
7683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7684- (eval $ac_compile) 2>&5
7685+ (eval $ac_compile) 2>conftest.er1
7686 ac_status=$?
7687+ grep -v '^ *+' conftest.er1 >conftest.err
7688+ rm -f conftest.er1
7689+ cat conftest.err >&5
7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); } &&
7692- { ac_try='test -s conftest.$ac_objext'
7693+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7694+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7695+ (eval $ac_try) 2>&5
7696+ ac_status=$?
7697+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7698+ (exit $ac_status); }; } &&
7699+ { ac_try='test -s conftest.$ac_objext'
7700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7701 (eval $ac_try) 2>&5
7702 ac_status=$?
7703@@ -9267,7 +10394,7 @@
7704
7705 ac_cv_have_decl_feof_unlocked=no
7706 fi
7707-rm -f conftest.$ac_objext conftest.$ac_ext
7708+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7709 fi
7710 echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
7711 echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
7712@@ -9295,7 +10422,6 @@
7713 echo $ECHO_N "(cached) $ECHO_C" >&6
7714 else
7715 cat >conftest.$ac_ext <<_ACEOF
7716-#line $LINENO "configure"
7717 /* confdefs.h. */
7718 _ACEOF
7719 cat confdefs.h >>conftest.$ac_ext
7720@@ -9315,11 +10441,20 @@
7721 _ACEOF
7722 rm -f conftest.$ac_objext
7723 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7724- (eval $ac_compile) 2>&5
7725+ (eval $ac_compile) 2>conftest.er1
7726 ac_status=$?
7727+ grep -v '^ *+' conftest.er1 >conftest.err
7728+ rm -f conftest.er1
7729+ cat conftest.err >&5
7730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7731 (exit $ac_status); } &&
7732- { ac_try='test -s conftest.$ac_objext'
7733+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7734+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7735+ (eval $ac_try) 2>&5
7736+ ac_status=$?
7737+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738+ (exit $ac_status); }; } &&
7739+ { ac_try='test -s conftest.$ac_objext'
7740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7741 (eval $ac_try) 2>&5
7742 ac_status=$?
7743@@ -9332,7 +10467,7 @@
7744
7745 ac_cv_have_decl_ferror_unlocked=no
7746 fi
7747-rm -f conftest.$ac_objext conftest.$ac_ext
7748+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7749 fi
7750 echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
7751 echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
7752@@ -9360,7 +10495,6 @@
7753 echo $ECHO_N "(cached) $ECHO_C" >&6
7754 else
7755 cat >conftest.$ac_ext <<_ACEOF
7756-#line $LINENO "configure"
7757 /* confdefs.h. */
7758 _ACEOF
7759 cat confdefs.h >>conftest.$ac_ext
7760@@ -9380,11 +10514,20 @@
7761 _ACEOF
7762 rm -f conftest.$ac_objext
7763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7764- (eval $ac_compile) 2>&5
7765+ (eval $ac_compile) 2>conftest.er1
7766 ac_status=$?
7767+ grep -v '^ *+' conftest.er1 >conftest.err
7768+ rm -f conftest.er1
7769+ cat conftest.err >&5
7770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7771 (exit $ac_status); } &&
7772- { ac_try='test -s conftest.$ac_objext'
7773+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7774+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775+ (eval $ac_try) 2>&5
7776+ ac_status=$?
7777+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778+ (exit $ac_status); }; } &&
7779+ { ac_try='test -s conftest.$ac_objext'
7780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781 (eval $ac_try) 2>&5
7782 ac_status=$?
7783@@ -9397,7 +10540,7 @@
7784
7785 ac_cv_have_decl_fflush_unlocked=no
7786 fi
7787-rm -f conftest.$ac_objext conftest.$ac_ext
7788+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7789 fi
7790 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
7791 echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
7792@@ -9425,7 +10568,6 @@
7793 echo $ECHO_N "(cached) $ECHO_C" >&6
7794 else
7795 cat >conftest.$ac_ext <<_ACEOF
7796-#line $LINENO "configure"
7797 /* confdefs.h. */
7798 _ACEOF
7799 cat confdefs.h >>conftest.$ac_ext
7800@@ -9445,11 +10587,20 @@
7801 _ACEOF
7802 rm -f conftest.$ac_objext
7803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7804- (eval $ac_compile) 2>&5
7805+ (eval $ac_compile) 2>conftest.er1
7806 ac_status=$?
7807+ grep -v '^ *+' conftest.er1 >conftest.err
7808+ rm -f conftest.er1
7809+ cat conftest.err >&5
7810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); } &&
7812- { ac_try='test -s conftest.$ac_objext'
7813+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7814+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7815+ (eval $ac_try) 2>&5
7816+ ac_status=$?
7817+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818+ (exit $ac_status); }; } &&
7819+ { ac_try='test -s conftest.$ac_objext'
7820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823@@ -9462,7 +10613,7 @@
7824
7825 ac_cv_have_decl_fgets_unlocked=no
7826 fi
7827-rm -f conftest.$ac_objext conftest.$ac_ext
7828+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7829 fi
7830 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
7831 echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
7832@@ -9490,7 +10641,6 @@
7833 echo $ECHO_N "(cached) $ECHO_C" >&6
7834 else
7835 cat >conftest.$ac_ext <<_ACEOF
7836-#line $LINENO "configure"
7837 /* confdefs.h. */
7838 _ACEOF
7839 cat confdefs.h >>conftest.$ac_ext
7840@@ -9510,11 +10660,20 @@
7841 _ACEOF
7842 rm -f conftest.$ac_objext
7843 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7844- (eval $ac_compile) 2>&5
7845+ (eval $ac_compile) 2>conftest.er1
7846 ac_status=$?
7847+ grep -v '^ *+' conftest.er1 >conftest.err
7848+ rm -f conftest.er1
7849+ cat conftest.err >&5
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); } &&
7852- { ac_try='test -s conftest.$ac_objext'
7853+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7854+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7855+ (eval $ac_try) 2>&5
7856+ ac_status=$?
7857+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858+ (exit $ac_status); }; } &&
7859+ { ac_try='test -s conftest.$ac_objext'
7860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7861 (eval $ac_try) 2>&5
7862 ac_status=$?
7863@@ -9527,7 +10686,7 @@
7864
7865 ac_cv_have_decl_fputc_unlocked=no
7866 fi
7867-rm -f conftest.$ac_objext conftest.$ac_ext
7868+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7869 fi
7870 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
7871 echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
7872@@ -9555,7 +10714,6 @@
7873 echo $ECHO_N "(cached) $ECHO_C" >&6
7874 else
7875 cat >conftest.$ac_ext <<_ACEOF
7876-#line $LINENO "configure"
7877 /* confdefs.h. */
7878 _ACEOF
7879 cat confdefs.h >>conftest.$ac_ext
7880@@ -9575,11 +10733,20 @@
7881 _ACEOF
7882 rm -f conftest.$ac_objext
7883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7884- (eval $ac_compile) 2>&5
7885+ (eval $ac_compile) 2>conftest.er1
7886 ac_status=$?
7887+ grep -v '^ *+' conftest.er1 >conftest.err
7888+ rm -f conftest.er1
7889+ cat conftest.err >&5
7890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); } &&
7892- { ac_try='test -s conftest.$ac_objext'
7893+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7894+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7895+ (eval $ac_try) 2>&5
7896+ ac_status=$?
7897+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898+ (exit $ac_status); }; } &&
7899+ { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903@@ -9592,7 +10759,7 @@
7904
7905 ac_cv_have_decl_fputs_unlocked=no
7906 fi
7907-rm -f conftest.$ac_objext conftest.$ac_ext
7908+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7909 fi
7910 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
7911 echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
7912@@ -9620,7 +10787,6 @@
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
7914 else
7915 cat >conftest.$ac_ext <<_ACEOF
7916-#line $LINENO "configure"
7917 /* confdefs.h. */
7918 _ACEOF
7919 cat confdefs.h >>conftest.$ac_ext
7920@@ -9640,11 +10806,20 @@
7921 _ACEOF
7922 rm -f conftest.$ac_objext
7923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7924- (eval $ac_compile) 2>&5
7925+ (eval $ac_compile) 2>conftest.er1
7926 ac_status=$?
7927+ grep -v '^ *+' conftest.er1 >conftest.err
7928+ rm -f conftest.er1
7929+ cat conftest.err >&5
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } &&
7932- { ac_try='test -s conftest.$ac_objext'
7933+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7934+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935+ (eval $ac_try) 2>&5
7936+ ac_status=$?
7937+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938+ (exit $ac_status); }; } &&
7939+ { ac_try='test -s conftest.$ac_objext'
7940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7941 (eval $ac_try) 2>&5
7942 ac_status=$?
7943@@ -9657,7 +10832,7 @@
7944
7945 ac_cv_have_decl_fread_unlocked=no
7946 fi
7947-rm -f conftest.$ac_objext conftest.$ac_ext
7948+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7949 fi
7950 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
7951 echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
7952@@ -9685,7 +10860,6 @@
7953 echo $ECHO_N "(cached) $ECHO_C" >&6
7954 else
7955 cat >conftest.$ac_ext <<_ACEOF
7956-#line $LINENO "configure"
7957 /* confdefs.h. */
7958 _ACEOF
7959 cat confdefs.h >>conftest.$ac_ext
7960@@ -9705,11 +10879,20 @@
7961 _ACEOF
7962 rm -f conftest.$ac_objext
7963 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7964- (eval $ac_compile) 2>&5
7965+ (eval $ac_compile) 2>conftest.er1
7966 ac_status=$?
7967+ grep -v '^ *+' conftest.er1 >conftest.err
7968+ rm -f conftest.er1
7969+ cat conftest.err >&5
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); } &&
7972- { ac_try='test -s conftest.$ac_objext'
7973+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7974+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7975+ (eval $ac_try) 2>&5
7976+ ac_status=$?
7977+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978+ (exit $ac_status); }; } &&
7979+ { ac_try='test -s conftest.$ac_objext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983@@ -9722,7 +10905,7 @@
7984
7985 ac_cv_have_decl_fwrite_unlocked=no
7986 fi
7987-rm -f conftest.$ac_objext conftest.$ac_ext
7988+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7989 fi
7990 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
7991 echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
7992@@ -9750,7 +10933,6 @@
7993 echo $ECHO_N "(cached) $ECHO_C" >&6
7994 else
7995 cat >conftest.$ac_ext <<_ACEOF
7996-#line $LINENO "configure"
7997 /* confdefs.h. */
7998 _ACEOF
7999 cat confdefs.h >>conftest.$ac_ext
8000@@ -9770,11 +10952,20 @@
8001 _ACEOF
8002 rm -f conftest.$ac_objext
8003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8004- (eval $ac_compile) 2>&5
8005+ (eval $ac_compile) 2>conftest.er1
8006 ac_status=$?
8007+ grep -v '^ *+' conftest.er1 >conftest.err
8008+ rm -f conftest.er1
8009+ cat conftest.err >&5
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } &&
8012- { ac_try='test -s conftest.$ac_objext'
8013+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8014+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015+ (eval $ac_try) 2>&5
8016+ ac_status=$?
8017+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018+ (exit $ac_status); }; } &&
8019+ { ac_try='test -s conftest.$ac_objext'
8020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8021 (eval $ac_try) 2>&5
8022 ac_status=$?
8023@@ -9787,7 +10978,7 @@
8024
8025 ac_cv_have_decl_getc_unlocked=no
8026 fi
8027-rm -f conftest.$ac_objext conftest.$ac_ext
8028+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8029 fi
8030 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
8031 echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
8032@@ -9815,7 +11006,6 @@
8033 echo $ECHO_N "(cached) $ECHO_C" >&6
8034 else
8035 cat >conftest.$ac_ext <<_ACEOF
8036-#line $LINENO "configure"
8037 /* confdefs.h. */
8038 _ACEOF
8039 cat confdefs.h >>conftest.$ac_ext
8040@@ -9835,11 +11025,20 @@
8041 _ACEOF
8042 rm -f conftest.$ac_objext
8043 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8044- (eval $ac_compile) 2>&5
8045+ (eval $ac_compile) 2>conftest.er1
8046 ac_status=$?
8047+ grep -v '^ *+' conftest.er1 >conftest.err
8048+ rm -f conftest.er1
8049+ cat conftest.err >&5
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); } &&
8052- { ac_try='test -s conftest.$ac_objext'
8053+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8054+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8055+ (eval $ac_try) 2>&5
8056+ ac_status=$?
8057+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058+ (exit $ac_status); }; } &&
8059+ { ac_try='test -s conftest.$ac_objext'
8060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8061 (eval $ac_try) 2>&5
8062 ac_status=$?
8063@@ -9852,7 +11051,7 @@
8064
8065 ac_cv_have_decl_getchar_unlocked=no
8066 fi
8067-rm -f conftest.$ac_objext conftest.$ac_ext
8068+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8069 fi
8070 echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
8071 echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
8072@@ -9880,7 +11079,6 @@
8073 echo $ECHO_N "(cached) $ECHO_C" >&6
8074 else
8075 cat >conftest.$ac_ext <<_ACEOF
8076-#line $LINENO "configure"
8077 /* confdefs.h. */
8078 _ACEOF
8079 cat confdefs.h >>conftest.$ac_ext
8080@@ -9900,11 +11098,20 @@
8081 _ACEOF
8082 rm -f conftest.$ac_objext
8083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8084- (eval $ac_compile) 2>&5
8085+ (eval $ac_compile) 2>conftest.er1
8086 ac_status=$?
8087+ grep -v '^ *+' conftest.er1 >conftest.err
8088+ rm -f conftest.er1
8089+ cat conftest.err >&5
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); } &&
8092- { ac_try='test -s conftest.$ac_objext'
8093+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8094+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8095+ (eval $ac_try) 2>&5
8096+ ac_status=$?
8097+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098+ (exit $ac_status); }; } &&
8099+ { ac_try='test -s conftest.$ac_objext'
8100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8101 (eval $ac_try) 2>&5
8102 ac_status=$?
8103@@ -9917,7 +11124,7 @@
8104
8105 ac_cv_have_decl_putc_unlocked=no
8106 fi
8107-rm -f conftest.$ac_objext conftest.$ac_ext
8108+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8109 fi
8110 echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
8111 echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
8112@@ -9945,7 +11152,6 @@
8113 echo $ECHO_N "(cached) $ECHO_C" >&6
8114 else
8115 cat >conftest.$ac_ext <<_ACEOF
8116-#line $LINENO "configure"
8117 /* confdefs.h. */
8118 _ACEOF
8119 cat confdefs.h >>conftest.$ac_ext
8120@@ -9965,11 +11171,20 @@
8121 _ACEOF
8122 rm -f conftest.$ac_objext
8123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8124- (eval $ac_compile) 2>&5
8125+ (eval $ac_compile) 2>conftest.er1
8126 ac_status=$?
8127+ grep -v '^ *+' conftest.er1 >conftest.err
8128+ rm -f conftest.er1
8129+ cat conftest.err >&5
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); } &&
8132- { ac_try='test -s conftest.$ac_objext'
8133+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8134+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135+ (eval $ac_try) 2>&5
8136+ ac_status=$?
8137+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138+ (exit $ac_status); }; } &&
8139+ { ac_try='test -s conftest.$ac_objext'
8140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8141 (eval $ac_try) 2>&5
8142 ac_status=$?
8143@@ -9982,7 +11197,7 @@
8144
8145 ac_cv_have_decl_putchar_unlocked=no
8146 fi
8147-rm -f conftest.$ac_objext conftest.$ac_ext
8148+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8149 fi
8150 echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
8151 echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
8152@@ -10075,7 +11290,6 @@
8153 ac_cv_func_closedir_void=yes
8154 else
8155 cat >conftest.$ac_ext <<_ACEOF
8156-#line $LINENO "configure"
8157 /* confdefs.h. */
8158 _ACEOF
8159 cat confdefs.h >>conftest.$ac_ext
8160@@ -10115,7 +11329,7 @@
8161 ( exit $ac_status )
8162 ac_cv_func_closedir_void=yes
8163 fi
8164-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8165+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8166 fi
8167 fi
8168 echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
8169@@ -10146,7 +11360,6 @@
8170 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8171 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8172 cat >conftest.$ac_ext <<_ACEOF
8173-#line $LINENO "configure"
8174 /* confdefs.h. */
8175 _ACEOF
8176 cat confdefs.h >>conftest.$ac_ext
8177@@ -10157,11 +11370,20 @@
8178 _ACEOF
8179 rm -f conftest.$ac_objext
8180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8181- (eval $ac_compile) 2>&5
8182+ (eval $ac_compile) 2>conftest.er1
8183 ac_status=$?
8184+ grep -v '^ *+' conftest.er1 >conftest.err
8185+ rm -f conftest.er1
8186+ cat conftest.err >&5
8187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188 (exit $ac_status); } &&
8189- { ac_try='test -s conftest.$ac_objext'
8190+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8191+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8192+ (eval $ac_try) 2>&5
8193+ ac_status=$?
8194+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195+ (exit $ac_status); }; } &&
8196+ { ac_try='test -s conftest.$ac_objext'
8197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198 (eval $ac_try) 2>&5
8199 ac_status=$?
8200@@ -10174,7 +11396,7 @@
8201
8202 ac_header_compiler=no
8203 fi
8204-rm -f conftest.$ac_objext conftest.$ac_ext
8205+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8206 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8207 echo "${ECHO_T}$ac_header_compiler" >&6
8208
8209@@ -10182,7 +11404,6 @@
8210 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8211 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8212 cat >conftest.$ac_ext <<_ACEOF
8213-#line $LINENO "configure"
8214 /* confdefs.h. */
8215 _ACEOF
8216 cat confdefs.h >>conftest.$ac_ext
8217@@ -10200,6 +11421,7 @@
8218 (exit $ac_status); } >/dev/null; then
8219 if test -s conftest.err; then
8220 ac_cpp_err=$ac_c_preproc_warn_flag
8221+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8222 else
8223 ac_cpp_err=
8224 fi
8225@@ -10219,33 +11441,32 @@
8226 echo "${ECHO_T}$ac_header_preproc" >&6
8227
8228 # So? What about this header?
8229-case $ac_header_compiler:$ac_header_preproc in
8230- yes:no )
8231+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8232+ yes:no: )
8233 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8234 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8235- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8236-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8237- (
8238- cat <<\_ASBOX
8239-## ------------------------------------ ##
8240-## Report this to bug-autoconf@gnu.org. ##
8241-## ------------------------------------ ##
8242-_ASBOX
8243- ) |
8244- sed "s/^/$as_me: WARNING: /" >&2
8245+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8246+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8247+ ac_header_preproc=yes
8248 ;;
8249- no:yes )
8250+ no:yes:* )
8251 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8252 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8253- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8254-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8255+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8256+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8257+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8258+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8259+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8260+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8261 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8262 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8263+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8264+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8265 (
8266 cat <<\_ASBOX
8267-## ------------------------------------ ##
8268-## Report this to bug-autoconf@gnu.org. ##
8269-## ------------------------------------ ##
8270+## -------------------------------- ##
8271+## Report this to bug-patch@gnu.org ##
8272+## -------------------------------- ##
8273 _ASBOX
8274 ) |
8275 sed "s/^/$as_me: WARNING: /" >&2
8276@@ -10256,7 +11477,7 @@
8277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8279 else
8280- eval "$as_ac_Header=$ac_header_preproc"
8281+ eval "$as_ac_Header=\$ac_header_preproc"
8282 fi
8283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8284 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8285@@ -10277,7 +11498,6 @@
8286 echo $ECHO_N "(cached) $ECHO_C" >&6
8287 else
8288 cat >conftest.$ac_ext <<_ACEOF
8289-#line $LINENO "configure"
8290 /* confdefs.h. */
8291 _ACEOF
8292 cat confdefs.h >>conftest.$ac_ext
8293@@ -10300,11 +11520,20 @@
8294 _ACEOF
8295 rm -f conftest.$ac_objext conftest$ac_exeext
8296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8297- (eval $ac_link) 2>&5
8298+ (eval $ac_link) 2>conftest.er1
8299 ac_status=$?
8300+ grep -v '^ *+' conftest.er1 >conftest.err
8301+ rm -f conftest.er1
8302+ cat conftest.err >&5
8303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8304 (exit $ac_status); } &&
8305- { ac_try='test -s conftest$ac_exeext'
8306+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8307+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308+ (eval $ac_try) 2>&5
8309+ ac_status=$?
8310+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311+ (exit $ac_status); }; } &&
8312+ { ac_try='test -s conftest$ac_exeext'
8313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314 (eval $ac_try) 2>&5
8315 ac_status=$?
8316@@ -10317,7 +11546,8 @@
8317
8318 ac_cv_func_setmode_dos=no
8319 fi
8320-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8321+rm -f conftest.err conftest.$ac_objext \
8322+ conftest$ac_exeext conftest.$ac_ext
8323 fi
8324 echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
8325 echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
8326@@ -10338,21 +11568,28 @@
8327 echo $ECHO_N "(cached) $ECHO_C" >&6
8328 else
8329 cat >conftest.$ac_ext <<_ACEOF
8330-#line $LINENO "configure"
8331 /* confdefs.h. */
8332 _ACEOF
8333 cat confdefs.h >>conftest.$ac_ext
8334 cat >>conftest.$ac_ext <<_ACEOF
8335 /* end confdefs.h. */
8336+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8337+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
8338+#define $ac_func innocuous_$ac_func
8339+
8340 /* System header to define __stub macros and hopefully few prototypes,
8341 which can conflict with char $ac_func (); below.
8342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8343 <limits.h> exists even on freestanding compilers. */
8344+
8345 #ifdef __STDC__
8346 # include <limits.h>
8347 #else
8348 # include <assert.h>
8349 #endif
8350+
8351+#undef $ac_func
8352+
8353 /* Override any gcc2 internal prototype to avoid an error. */
8354 #ifdef __cplusplus
8355 extern "C"
8356@@ -10383,11 +11620,20 @@
8357 _ACEOF
8358 rm -f conftest.$ac_objext conftest$ac_exeext
8359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8360- (eval $ac_link) 2>&5
8361+ (eval $ac_link) 2>conftest.er1
8362 ac_status=$?
8363+ grep -v '^ *+' conftest.er1 >conftest.err
8364+ rm -f conftest.er1
8365+ cat conftest.err >&5
8366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8367 (exit $ac_status); } &&
8368- { ac_try='test -s conftest$ac_exeext'
8369+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8370+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8371+ (eval $ac_try) 2>&5
8372+ ac_status=$?
8373+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374+ (exit $ac_status); }; } &&
8375+ { ac_try='test -s conftest$ac_exeext'
8376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8377 (eval $ac_try) 2>&5
8378 ac_status=$?
8379@@ -10400,7 +11646,8 @@
8380
8381 eval "$as_ac_var=no"
8382 fi
8383-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8384+rm -f conftest.err conftest.$ac_objext \
8385+ conftest$ac_exeext conftest.$ac_ext
8386 fi
8387 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8388 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8389@@ -10415,21 +11662,28 @@
8390 echo $ECHO_N "(cached) $ECHO_C" >&6
8391 else
8392 cat >conftest.$ac_ext <<_ACEOF
8393-#line $LINENO "configure"
8394 /* confdefs.h. */
8395 _ACEOF
8396 cat confdefs.h >>conftest.$ac_ext
8397 cat >>conftest.$ac_ext <<_ACEOF
8398 /* end confdefs.h. */
8399+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
8400+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
8401+#define _doprnt innocuous__doprnt
8402+
8403 /* System header to define __stub macros and hopefully few prototypes,
8404 which can conflict with char _doprnt (); below.
8405 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8406 <limits.h> exists even on freestanding compilers. */
8407+
8408 #ifdef __STDC__
8409 # include <limits.h>
8410 #else
8411 # include <assert.h>
8412 #endif
8413+
8414+#undef _doprnt
8415+
8416 /* Override any gcc2 internal prototype to avoid an error. */
8417 #ifdef __cplusplus
8418 extern "C"
8419@@ -10460,11 +11714,20 @@
8420 _ACEOF
8421 rm -f conftest.$ac_objext conftest$ac_exeext
8422 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8423- (eval $ac_link) 2>&5
8424+ (eval $ac_link) 2>conftest.er1
8425 ac_status=$?
8426+ grep -v '^ *+' conftest.er1 >conftest.err
8427+ rm -f conftest.er1
8428+ cat conftest.err >&5
8429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); } &&
8431- { ac_try='test -s conftest$ac_exeext'
8432+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8433+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8434+ (eval $ac_try) 2>&5
8435+ ac_status=$?
8436+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437+ (exit $ac_status); }; } &&
8438+ { ac_try='test -s conftest$ac_exeext'
8439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8440 (eval $ac_try) 2>&5
8441 ac_status=$?
8442@@ -10477,7 +11740,8 @@
8443
8444 ac_cv_func__doprnt=no
8445 fi
8446-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8447+rm -f conftest.err conftest.$ac_objext \
8448+ conftest$ac_exeext conftest.$ac_ext
8449 fi
8450 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
8451 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
8452@@ -10503,21 +11767,28 @@
8453 echo $ECHO_N "(cached) $ECHO_C" >&6
8454 else
8455 cat >conftest.$ac_ext <<_ACEOF
8456-#line $LINENO "configure"
8457 /* confdefs.h. */
8458 _ACEOF
8459 cat confdefs.h >>conftest.$ac_ext
8460 cat >>conftest.$ac_ext <<_ACEOF
8461 /* end confdefs.h. */
8462+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8463+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
8464+#define $ac_func innocuous_$ac_func
8465+
8466 /* System header to define __stub macros and hopefully few prototypes,
8467 which can conflict with char $ac_func (); below.
8468 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8469 <limits.h> exists even on freestanding compilers. */
8470+
8471 #ifdef __STDC__
8472 # include <limits.h>
8473 #else
8474 # include <assert.h>
8475 #endif
8476+
8477+#undef $ac_func
8478+
8479 /* Override any gcc2 internal prototype to avoid an error. */
8480 #ifdef __cplusplus
8481 extern "C"
8482@@ -10548,11 +11819,20 @@
8483 _ACEOF
8484 rm -f conftest.$ac_objext conftest$ac_exeext
8485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8486- (eval $ac_link) 2>&5
8487+ (eval $ac_link) 2>conftest.er1
8488 ac_status=$?
8489+ grep -v '^ *+' conftest.er1 >conftest.err
8490+ rm -f conftest.er1
8491+ cat conftest.err >&5
8492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8493 (exit $ac_status); } &&
8494- { ac_try='test -s conftest$ac_exeext'
8495+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8496+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8497+ (eval $ac_try) 2>&5
8498+ ac_status=$?
8499+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500+ (exit $ac_status); }; } &&
8501+ { ac_try='test -s conftest$ac_exeext'
8502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8503 (eval $ac_try) 2>&5
8504 ac_status=$?
8505@@ -10565,7 +11845,8 @@
8506
8507 eval "$as_ac_var=no"
8508 fi
8509-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8510+rm -f conftest.err conftest.$ac_objext \
8511+ conftest$ac_exeext conftest.$ac_ext
8512 fi
8513 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8514 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8515@@ -10585,7 +11866,6 @@
8516 patch_cv_mkdir_takes_one_arg=no
8517 if test $ac_cv_func_mkdir = yes; then
8518 cat >conftest.$ac_ext <<_ACEOF
8519-#line $LINENO "configure"
8520 /* confdefs.h. */
8521 _ACEOF
8522 cat confdefs.h >>conftest.$ac_ext
8523@@ -10605,11 +11885,20 @@
8524 _ACEOF
8525 rm -f conftest.$ac_objext
8526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8527- (eval $ac_compile) 2>&5
8528+ (eval $ac_compile) 2>conftest.er1
8529 ac_status=$?
8530+ grep -v '^ *+' conftest.er1 >conftest.err
8531+ rm -f conftest.er1
8532+ cat conftest.err >&5
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535- { ac_try='test -s conftest.$ac_objext'
8536+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8537+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8538+ (eval $ac_try) 2>&5
8539+ ac_status=$?
8540+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541+ (exit $ac_status); }; } &&
8542+ { ac_try='test -s conftest.$ac_objext'
8543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8544 (eval $ac_try) 2>&5
8545 ac_status=$?
8546@@ -10621,7 +11910,6 @@
8547 sed 's/^/| /' conftest.$ac_ext >&5
8548
8549 cat >conftest.$ac_ext <<_ACEOF
8550-#line $LINENO "configure"
8551 /* confdefs.h. */
8552 _ACEOF
8553 cat confdefs.h >>conftest.$ac_ext
8554@@ -10641,11 +11929,20 @@
8555 _ACEOF
8556 rm -f conftest.$ac_objext
8557 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8558- (eval $ac_compile) 2>&5
8559+ (eval $ac_compile) 2>conftest.er1
8560 ac_status=$?
8561+ grep -v '^ *+' conftest.er1 >conftest.err
8562+ rm -f conftest.er1
8563+ cat conftest.err >&5
8564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565 (exit $ac_status); } &&
8566- { ac_try='test -s conftest.$ac_objext'
8567+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8568+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8569+ (eval $ac_try) 2>&5
8570+ ac_status=$?
8571+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572+ (exit $ac_status); }; } &&
8573+ { ac_try='test -s conftest.$ac_objext'
8574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577@@ -10658,10 +11955,10 @@
8578 sed 's/^/| /' conftest.$ac_ext >&5
8579
8580 fi
8581-rm -f conftest.$ac_objext conftest.$ac_ext
8582+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8583
8584 fi
8585-rm -f conftest.$ac_objext conftest.$ac_ext
8586+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8587 fi
8588
8589
8590@@ -10686,7 +11983,6 @@
8591 else
8592
8593 cat >conftest.$ac_ext <<_ACEOF
8594-#line $LINENO "configure"
8595 /* confdefs.h. */
8596 _ACEOF
8597 cat confdefs.h >>conftest.$ac_ext
8598@@ -10705,11 +12001,20 @@
8599 _ACEOF
8600 rm -f conftest.$ac_objext
8601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8602- (eval $ac_compile) 2>&5
8603+ (eval $ac_compile) 2>conftest.er1
8604 ac_status=$?
8605+ grep -v '^ *+' conftest.er1 >conftest.err
8606+ rm -f conftest.er1
8607+ cat conftest.err >&5
8608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609 (exit $ac_status); } &&
8610- { ac_try='test -s conftest.$ac_objext'
8611+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8612+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8613+ (eval $ac_try) 2>&5
8614+ ac_status=$?
8615+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616+ (exit $ac_status); }; } &&
8617+ { ac_try='test -s conftest.$ac_objext'
8618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8619 (eval $ac_try) 2>&5
8620 ac_status=$?
8621@@ -10722,7 +12027,7 @@
8622
8623 ac_cv_win_or_dos=no
8624 fi
8625-rm -f conftest.$ac_objext conftest.$ac_ext
8626+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8627
8628 fi
8629 echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
8630@@ -10834,13 +12139,13 @@
8631 # `set' does not quote correctly, so add quotes (double-quote
8632 # substitution turns \\\\ into \\, and sed turns \\ into \).
8633 sed -n \
8634- "s/'/'\\\\''/g;
8635- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8636+ "s/'/'\\\\''/g;
8637+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8638 ;;
8639 *)
8640 # `set' quotes correctly as required by POSIX, so do not add quotes.
8641 sed -n \
8642- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8643+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8644 ;;
8645 esac;
8646 } |
8647@@ -10870,13 +12175,13 @@
8648 # trailing colons and then remove the whole line if VPATH becomes empty
8649 # (actually we leave an empty line to preserve line numbers).
8650 if test "x$srcdir" = x.; then
8651- ac_vpsub='/^[ ]*VPATH[ ]*=/{
8652+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
8653 s/:*\$(srcdir):*/:/;
8654 s/:*\${srcdir}:*/:/;
8655 s/:*@srcdir@:*/:/;
8656-s/^\([^=]*=[ ]*\):*/\1/;
8657+s/^\([^=]*=[ ]*\):*/\1/;
8658 s/:*$//;
8659-s/^[^=]*=[ ]*$//;
8660+s/^[^=]*=[ ]*$//;
8661 }'
8662 fi
8663
8664@@ -10887,7 +12192,7 @@
8665 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8666 # 1. Remove the extension, and $U if already installed.
8667 ac_i=`echo "$ac_i" |
8668- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
8669+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
8670 # 2. Add them.
8671 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
8672 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
8673@@ -10931,9 +12236,10 @@
8674 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
8675 set -o posix
8676 fi
8677+DUALCASE=1; export DUALCASE # for MKS sh
8678
8679 # Support unset when possible.
8680-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
8681+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8682 as_unset=unset
8683 else
8684 as_unset=false
8685@@ -10952,7 +12258,7 @@
8686 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
8687 LC_TELEPHONE LC_TIME
8688 do
8689- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
8690+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
8691 eval $as_var=C; export $as_var
8692 else
8693 $as_unset $as_var
8694@@ -11131,16 +12437,17 @@
8695 if mkdir -p . 2>/dev/null; then
8696 as_mkdir_p=:
8697 else
8698+ test -d ./-p && rmdir ./-p
8699 as_mkdir_p=false
8700 fi
8701
8702 as_executable_p="test -f"
8703
8704 # Sed expression to map a string onto a valid CPP name.
8705-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
8706+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8707
8708 # Sed expression to map a string onto a valid variable name.
8709-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
8710+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8711
8712
8713 # IFS
8714@@ -11167,7 +12474,7 @@
8715 cat >&5 <<_CSEOF
8716
8717 This file was extended by patch $as_me 2.5.9, which was
8718-generated by GNU Autoconf 2.57. Invocation command line was
8719+generated by GNU Autoconf 2.59. Invocation command line was
8720
8721 CONFIG_FILES = $CONFIG_FILES
8722 CONFIG_HEADERS = $CONFIG_HEADERS
8723@@ -11211,9 +12518,9 @@
8724 -d, --debug don't remove temporary files
8725 --recheck update $as_me by reconfiguring in the same conditions
8726 --file=FILE[:TEMPLATE]
8727- instantiate the configuration file FILE
8728+ instantiate the configuration file FILE
8729 --header=FILE[:TEMPLATE]
8730- instantiate the configuration header FILE
8731+ instantiate the configuration header FILE
8732
8733 Configuration files:
8734 $config_files
8735@@ -11227,11 +12534,10 @@
8736 cat >>$CONFIG_STATUS <<_ACEOF
8737 ac_cs_version="\\
8738 patch config.status 2.5.9
8739-configured by $0, generated by GNU Autoconf 2.57,
8740+configured by $0, generated by GNU Autoconf 2.59,
8741 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
8742
8743-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8744-Free Software Foundation, Inc.
8745+Copyright (C) 2003 Free Software Foundation, Inc.
8746 This config.status script is free software; the Free Software Foundation
8747 gives unlimited permission to copy, distribute and modify it."
8748 srcdir=$srcdir
8749@@ -11463,9 +12769,9 @@
8750 (echo ':t
8751 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8752 if test -z "$ac_sed_cmds"; then
8753- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8754+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8755 else
8756- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8757+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8758 fi
8759 ac_sed_frag=`expr $ac_sed_frag + 1`
8760 ac_beg=$ac_end
8761@@ -11483,21 +12789,21 @@
8762 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8763 case $ac_file in
8764 - | *:- | *:-:* ) # input from stdin
8765- cat >$tmp/stdin
8766- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8767- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8768+ cat >$tmp/stdin
8769+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8770+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8771 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8772- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8773+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8774 * ) ac_file_in=$ac_file.in ;;
8775 esac
8776
8777 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8778 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8779 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8780- X"$ac_file" : 'X\(//\)[^/]' \| \
8781- X"$ac_file" : 'X\(//\)$' \| \
8782- X"$ac_file" : 'X\(/\)' \| \
8783- . : '\(.\)' 2>/dev/null ||
8784+ X"$ac_file" : 'X\(//\)[^/]' \| \
8785+ X"$ac_file" : 'X\(//\)$' \| \
8786+ X"$ac_file" : 'X\(/\)' \| \
8787+ . : '\(.\)' 2>/dev/null ||
8788 echo X"$ac_file" |
8789 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8790 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8791@@ -11513,10 +12819,10 @@
8792 as_dirs="$as_dir $as_dirs"
8793 as_dir=`(dirname "$as_dir") 2>/dev/null ||
8794 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8795- X"$as_dir" : 'X\(//\)[^/]' \| \
8796- X"$as_dir" : 'X\(//\)$' \| \
8797- X"$as_dir" : 'X\(/\)' \| \
8798- . : '\(.\)' 2>/dev/null ||
8799+ X"$as_dir" : 'X\(//\)[^/]' \| \
8800+ X"$as_dir" : 'X\(//\)$' \| \
8801+ X"$as_dir" : 'X\(/\)' \| \
8802+ . : '\(.\)' 2>/dev/null ||
8803 echo X"$as_dir" |
8804 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8805 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8806@@ -11554,12 +12860,45 @@
8807 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8808 ac_top_srcdir=$ac_top_builddir$srcdir ;;
8809 esac
8810-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
8811-# absolute.
8812-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
8813-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
8814-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
8815-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
8816+
8817+# Do not use `cd foo && pwd` to compute absolute paths, because
8818+# the directories may not exist.
8819+case `pwd` in
8820+.) ac_abs_builddir="$ac_dir";;
8821+*)
8822+ case "$ac_dir" in
8823+ .) ac_abs_builddir=`pwd`;;
8824+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8825+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
8826+ esac;;
8827+esac
8828+case $ac_abs_builddir in
8829+.) ac_abs_top_builddir=${ac_top_builddir}.;;
8830+*)
8831+ case ${ac_top_builddir}. in
8832+ .) ac_abs_top_builddir=$ac_abs_builddir;;
8833+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8834+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
8835+ esac;;
8836+esac
8837+case $ac_abs_builddir in
8838+.) ac_abs_srcdir=$ac_srcdir;;
8839+*)
8840+ case $ac_srcdir in
8841+ .) ac_abs_srcdir=$ac_abs_builddir;;
8842+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8843+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
8844+ esac;;
8845+esac
8846+case $ac_abs_builddir in
8847+.) ac_abs_top_srcdir=$ac_top_srcdir;;
8848+*)
8849+ case $ac_top_srcdir in
8850+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
8851+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8852+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
8853+ esac;;
8854+esac
8855
8856
8857 case $INSTALL in
8858@@ -11567,11 +12906,6 @@
8859 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8860 esac
8861
8862- if test x"$ac_file" != x-; then
8863- { echo "$as_me:$LINENO: creating $ac_file" >&5
8864-echo "$as_me: creating $ac_file" >&6;}
8865- rm -f "$ac_file"
8866- fi
8867 # Let's still pretend it is `configure' which instantiates (i.e., don't
8868 # use $as_me), people would be surprised to read:
8869 # /* config.h. Generated by config.status. */
8870@@ -11581,7 +12915,7 @@
8871 configure_input="$ac_file. "
8872 fi
8873 configure_input=$configure_input"Generated from `echo $ac_file_in |
8874- sed 's,.*/,,'` by configure."
8875+ sed 's,.*/,,'` by configure."
8876
8877 # First look for the input files in the build tree, otherwise in the
8878 # src tree.
8879@@ -11590,26 +12924,32 @@
8880 case $f in
8881 -) echo $tmp/stdin ;;
8882 [\\/$]*)
8883- # Absolute (can't be DOS-style, as IFS=:)
8884- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8885+ # Absolute (can't be DOS-style, as IFS=:)
8886+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8887 echo "$as_me: error: cannot find input file: $f" >&2;}
8888 { (exit 1); exit 1; }; }
8889- echo $f;;
8890+ echo "$f";;
8891 *) # Relative
8892- if test -f "$f"; then
8893- # Build tree
8894- echo $f
8895- elif test -f "$srcdir/$f"; then
8896- # Source tree
8897- echo $srcdir/$f
8898- else
8899- # /dev/null tree
8900- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8901+ if test -f "$f"; then
8902+ # Build tree
8903+ echo "$f"
8904+ elif test -f "$srcdir/$f"; then
8905+ # Source tree
8906+ echo "$srcdir/$f"
8907+ else
8908+ # /dev/null tree
8909+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8910 echo "$as_me: error: cannot find input file: $f" >&2;}
8911 { (exit 1); exit 1; }; }
8912- fi;;
8913+ fi;;
8914 esac
8915 done` || { (exit 1); exit 1; }
8916+
8917+ if test x"$ac_file" != x-; then
8918+ { echo "$as_me:$LINENO: creating $ac_file" >&5
8919+echo "$as_me: creating $ac_file" >&6;}
8920+ rm -f "$ac_file"
8921+ fi
8922 _ACEOF
8923 cat >>$CONFIG_STATUS <<_ACEOF
8924 sed "$ac_vpsub
8925@@ -11649,12 +12989,12 @@
8926 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8927 #
8928 # ac_d sets the value in "#define NAME VALUE" lines.
8929-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8930-ac_dB='[ ].*$,\1#\2'
8931+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8932+ac_dB='[ ].*$,\1#\2'
8933 ac_dC=' '
8934 ac_dD=',;t'
8935 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8936-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8937+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8938 ac_uB='$,\1#\2define\3'
8939 ac_uC=' '
8940 ac_uD=',;t'
8941@@ -11663,11 +13003,11 @@
8942 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8943 case $ac_file in
8944 - | *:- | *:-:* ) # input from stdin
8945- cat >$tmp/stdin
8946- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8947- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8948+ cat >$tmp/stdin
8949+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8950+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8951 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8952- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8953+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8954 * ) ac_file_in=$ac_file.in ;;
8955 esac
8956
8957@@ -11681,28 +13021,29 @@
8958 case $f in
8959 -) echo $tmp/stdin ;;
8960 [\\/$]*)
8961- # Absolute (can't be DOS-style, as IFS=:)
8962- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8963+ # Absolute (can't be DOS-style, as IFS=:)
8964+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8965 echo "$as_me: error: cannot find input file: $f" >&2;}
8966 { (exit 1); exit 1; }; }
8967- echo $f;;
8968+ # Do quote $f, to prevent DOS paths from being IFS'd.
8969+ echo "$f";;
8970 *) # Relative
8971- if test -f "$f"; then
8972- # Build tree
8973- echo $f
8974- elif test -f "$srcdir/$f"; then
8975- # Source tree
8976- echo $srcdir/$f
8977- else
8978- # /dev/null tree
8979- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8980+ if test -f "$f"; then
8981+ # Build tree
8982+ echo "$f"
8983+ elif test -f "$srcdir/$f"; then
8984+ # Source tree
8985+ echo "$srcdir/$f"
8986+ else
8987+ # /dev/null tree
8988+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8989 echo "$as_me: error: cannot find input file: $f" >&2;}
8990 { (exit 1); exit 1; }; }
8991- fi;;
8992+ fi;;
8993 esac
8994 done` || { (exit 1); exit 1; }
8995 # Remove the trailing spaces.
8996- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
8997+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
8998
8999 _ACEOF
9000
9001@@ -11725,9 +13066,9 @@
9002 s,[\\$`],\\&,g
9003 t clear
9004 : clear
9005-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
9006+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
9007 t end
9008-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
9009+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
9010 : end
9011 _ACEOF
9012 # If some macros were called several times there might be several times
9013@@ -11741,13 +13082,13 @@
9014 # example, in the case of _POSIX_SOURCE, which is predefined and required
9015 # on some systems where configure will not decide to define it.
9016 cat >>conftest.undefs <<\_ACEOF
9017-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
9018+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
9019 _ACEOF
9020
9021 # Break up conftest.defines because some shells have a limit on the size
9022 # of here documents, and old seds have small limits too (100 cmds).
9023 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
9024-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
9025+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
9026 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
9027 echo ' :' >>$CONFIG_STATUS
9028 rm -f conftest.tail
9029@@ -11756,7 +13097,7 @@
9030 # Write a limited-size here document to $tmp/defines.sed.
9031 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
9032 # Speed up: don't consider the non `#define' lines.
9033- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
9034+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
9035 # Work around the forget-to-reset-the-flag bug.
9036 echo 't clr' >>$CONFIG_STATUS
9037 echo ': clr' >>$CONFIG_STATUS
9038@@ -11783,7 +13124,7 @@
9039 # Write a limited-size here document to $tmp/undefs.sed.
9040 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
9041 # Speed up: don't consider the non `#undef'
9042- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
9043+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
9044 # Work around the forget-to-reset-the-flag bug.
9045 echo 't clr' >>$CONFIG_STATUS
9046 echo ': clr' >>$CONFIG_STATUS
9047@@ -11817,10 +13158,10 @@
9048 else
9049 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
9050 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9051- X"$ac_file" : 'X\(//\)[^/]' \| \
9052- X"$ac_file" : 'X\(//\)$' \| \
9053- X"$ac_file" : 'X\(/\)' \| \
9054- . : '\(.\)' 2>/dev/null ||
9055+ X"$ac_file" : 'X\(//\)[^/]' \| \
9056+ X"$ac_file" : 'X\(//\)$' \| \
9057+ X"$ac_file" : 'X\(/\)' \| \
9058+ . : '\(.\)' 2>/dev/null ||
9059 echo X"$ac_file" |
9060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9061 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9062@@ -11836,10 +13177,10 @@
9063 as_dirs="$as_dir $as_dirs"
9064 as_dir=`(dirname "$as_dir") 2>/dev/null ||
9065 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9066- X"$as_dir" : 'X\(//\)[^/]' \| \
9067- X"$as_dir" : 'X\(//\)$' \| \
9068- X"$as_dir" : 'X\(/\)' \| \
9069- . : '\(.\)' 2>/dev/null ||
9070+ X"$as_dir" : 'X\(//\)[^/]' \| \
9071+ X"$as_dir" : 'X\(//\)$' \| \
9072+ X"$as_dir" : 'X\(/\)' \| \
9073+ . : '\(.\)' 2>/dev/null ||
9074 echo X"$as_dir" |
9075 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9076 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9077--- patch-2.5.9.orig/configure.ac
9078+++ patch-2.5.9/configure.ac
9079@@ -64,6 +64,9 @@
9080 gl_PREREQ_XMALLOC
9081 gl_QUOTE
9082 gl_QUOTEARG
9083+gl_HASH
9084+
9085+ag_CHECK_NANOSECOND_STAT
9086
9087 dnl This should be in gnulib, but isn't for some reason.
9088 AC_DEFUN([jm_PREREQ_ADDEXT],
9089--- patch-2.5.9.orig/pch.c
9090+++ patch-2.5.9/pch.c
9091@@ -1,6 +1,6 @@
9092 /* reading patches */
9093
9094-/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
9095+/* $Id: pch.c,v 1.45 2003/07/02 22:19:21 eggert Exp $ */
9096
9097 /* Copyright (C) 1986, 1987, 1988 Larry Wall
9098
9099@@ -366,10 +366,16 @@
9100 if (!stars_last_line && strnEQ(s, "*** ", 4))
9101 name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
9102 else if (strnEQ(s, "+++ ", 4))
9103+ {
9104 /* Swap with NEW below. */
9105 name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
9106+ p_strip_trailing_cr = strip_trailing_cr;
9107+ }
9108 else if (strnEQ(s, "Index:", 6))
9109+ {
9110 name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
9111+ p_strip_trailing_cr = strip_trailing_cr;
9112+ }
9113 else if (strnEQ(s, "Prereq:", 7)) {
9114 for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
9115 continue;
9116@@ -409,6 +415,7 @@
9117 p_timestamp[NEW] = timestamp;
9118 p_rfc934_nesting = (t - s) >> 1;
9119 }
9120+ p_strip_trailing_cr = strip_trailing_cr;
9121 }
9122 }
9123 if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
9124--- patch-2.5.9.orig/util.c
9125+++ patch-2.5.9/util.c
9126@@ -45,9 +45,17 @@
9127 # define raise(sig) kill (getpid (), sig)
9128 #endif
9129
9130+#if defined(HAVE_STAT_TIMEVAL)
9131+#include <time.h>
9132+#endif
9133+
9134 #include <stdarg.h>
9135+#include <hash.h>
9136
9137 static void makedirs (char *);
9138+static bool fid_search (const char *, const struct stat *, bool);
9139+# define fid_exists(name, pst) fid_search (name, pst, false)
9140+# define insert_fid(name) fid_search (name, NULL, true)
9141
9142 /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
9143 needs removal when cleaning up at the end of execution)
9144@@ -64,7 +72,7 @@
9145 struct stat to_st;
9146 int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
9147
9148- if (backup)
9149+ if (backup && (to_errno || ! fid_exists (to, &to_st)))
9150 {
9151 int try_makedirs_errno = 0;
9152 char *bakname;
9153@@ -165,6 +173,7 @@
9154 if (! to_dir_known_to_exist)
9155 makedirs (to);
9156 copy_file (from, to, 0, mode);
9157+ insert_fid (to);
9158 return;
9159 }
9160
9161@@ -173,6 +182,7 @@
9162 }
9163
9164 rename_succeeded:
9165+ insert_fid (to);
9166 /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
9167 rename returned zero because FROM and TO are hard links to
9168 the same file. */
9169@@ -1011,3 +1021,105 @@
9170 if (file_seek (stream, offset, ptrname) != 0)
9171 pfatal ("fseek");
9172 }
9173+
9174+typedef struct
9175+{
9176+ dev_t fid_dev;
9177+ ino_t fid_ino;
9178+ time_t fid_mtime;
9179+ unsigned long fid_mtimensec;
9180+} file_id;
9181+
9182+unsigned
9183+file_id_hasher (file_id *entry, unsigned table_size)
9184+{
9185+ return ((unsigned long) entry->fid_ino +
9186+ (unsigned long) entry->fid_dev +
9187+ (unsigned long) entry->fid_mtime +
9188+ (unsigned long) entry->fid_mtimensec) % table_size;
9189+}
9190+
9191+bool
9192+file_id_comparator (file_id *entry1, file_id *entry2)
9193+{
9194+ return (entry1->fid_dev == entry2->fid_dev &&
9195+ entry1->fid_ino == entry2->fid_ino &&
9196+ entry1->fid_mtime == entry2->fid_mtime &&
9197+ entry1->fid_mtimensec == entry2->fid_mtimensec);
9198+}
9199+
9200+void
9201+file_id_freer (file_id *entry)
9202+{
9203+ free (entry);
9204+}
9205+
9206+Hash_table *file_id_hash;
9207+
9208+/* Check if the file identified by FILENAME and PST was already seen. If the
9209+ file was already seen, returns TRUE. If the file has not yet been seen
9210+ and INSERT is TRUE, it is inserted. PST or FILENAME may be NULL (but not
9211+ both of them). */
9212+
9213+static bool
9214+fid_search (const char *filename, const struct stat *pst, bool insert)
9215+{
9216+ struct stat st;
9217+
9218+ if (!file_id_hash)
9219+ {
9220+ file_id_hash = hash_initialize (0, NULL, (Hash_hasher) file_id_hasher,
9221+ (Hash_comparator) file_id_comparator,
9222+ (Hash_data_freer) file_id_freer);
9223+ if (!file_id_hash)
9224+ pfatal ("hash_initialize");
9225+ }
9226+
9227+ if (!pst)
9228+ {
9229+ if (stat (filename, &st) != 0)
9230+ pfatal ("%s", quotearg (filename));
9231+ pst = &st;
9232+ }
9233+
9234+ if (insert)
9235+ {
9236+ file_id *pfid = xmalloc (sizeof (file_id)), *old_pfid;
9237+ pfid->fid_dev = pst->st_dev;
9238+ pfid->fid_ino = pst->st_ino;
9239+ pfid->fid_mtime = pst->st_mtime;
9240+#if defined(HAVE_STAT_NSEC)
9241+ pfid->fid_mtimensec = pst->st_mtimensec;
9242+#elif defined(HAVE_STAT_TIMEVAL)
9243+ pfid->fid_mtimensec = pst->st_mtim.tv_nsec;
9244+#else
9245+ pfid->fid_mtimensec = 0;
9246+#endif
9247+ old_pfid = hash_insert (file_id_hash, pfid);
9248+ if (!old_pfid)
9249+ pfatal ("hash_insert");
9250+ else if (old_pfid != pfid)
9251+ {
9252+ free (pfid);
9253+ return true;
9254+ }
9255+ else
9256+ return false;
9257+ }
9258+ else
9259+ {
9260+ file_id fid;
9261+ fid.fid_dev = pst->st_dev;
9262+ fid.fid_ino = pst->st_ino;
9263+ fid.fid_mtime = pst->st_mtime;
9264+#if defined(HAVE_STAT_NSEC)
9265+ fid.fid_mtimensec = pst->st_mtimensec;
9266+#elif defined(HAVE_STAT_TIMEVAL)
9267+ fid.fid_mtimensec = pst->st_mtim.tv_nsec;
9268+#else
9269+ fid.fid_mtimensec = 0;
9270+#endif
9271+ return hash_lookup (file_id_hash, &fid) != 0;
9272+ }
9273+}
9274+
9275--- patch-2.5.9.orig/hash.c
9276+++ patch-2.5.9/hash.c
9277@@ -0,0 +1,1051 @@
9278+/* hash - hashing table processing.
9279+
9280+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
9281+ Foundation, Inc.
9282+
9283+ Written by Jim Meyering, 1992.
9284+
9285+ This program is free software; you can redistribute it and/or modify
9286+ it under the terms of the GNU General Public License as published by
9287+ the Free Software Foundation; either version 2, or (at your option)
9288+ any later version.
9289+
9290+ This program is distributed in the hope that it will be useful,
9291+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9292+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9293+ GNU General Public License for more details.
9294+
9295+ You should have received a copy of the GNU General Public License
9296+ along with this program; if not, write to the Free Software Foundation,
9297+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9298+
9299+/* A generic hash table package. */
9300+
9301+/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
9302+ of malloc. If you change USE_OBSTACK, you have to recompile! */
9303+
9304+#if HAVE_CONFIG_H
9305+# include <config.h>
9306+#endif
9307+#if HAVE_STDLIB_H
9308+# include <stdlib.h>
9309+#endif
9310+
9311+#include <limits.h>
9312+#include <stdbool.h>
9313+#include <stdio.h>
9314+
9315+#ifndef HAVE_DECL_FREE
9316+"this configure-time declaration test was not run"
9317+#endif
9318+#if !HAVE_DECL_FREE
9319+void free ();
9320+#endif
9321+
9322+#ifndef HAVE_DECL_MALLOC
9323+"this configure-time declaration test was not run"
9324+#endif
9325+#if !HAVE_DECL_MALLOC
9326+char *malloc ();
9327+#endif
9328+
9329+#if USE_OBSTACK
9330+# include "obstack.h"
9331+# ifndef obstack_chunk_alloc
9332+# define obstack_chunk_alloc malloc
9333+# endif
9334+# ifndef obstack_chunk_free
9335+# define obstack_chunk_free free
9336+# endif
9337+#endif
9338+
9339+#include "hash.h"
9340+
9341+struct hash_table
9342+ {
9343+ /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
9344+ for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
9345+ are not empty, there are N_ENTRIES active entries in the table. */
9346+ struct hash_entry *bucket;
9347+ struct hash_entry *bucket_limit;
9348+ unsigned n_buckets;
9349+ unsigned n_buckets_used;
9350+ unsigned n_entries;
9351+
9352+ /* Tuning arguments, kept in a physicaly separate structure. */
9353+ const Hash_tuning *tuning;
9354+
9355+ /* Three functions are given to `hash_initialize', see the documentation
9356+ block for this function. In a word, HASHER randomizes a user entry
9357+ into a number up from 0 up to some maximum minus 1; COMPARATOR returns
9358+ true if two user entries compare equally; and DATA_FREER is the cleanup
9359+ function for a user entry. */
9360+ Hash_hasher hasher;
9361+ Hash_comparator comparator;
9362+ Hash_data_freer data_freer;
9363+
9364+ /* A linked list of freed struct hash_entry structs. */
9365+ struct hash_entry *free_entry_list;
9366+
9367+#if USE_OBSTACK
9368+ /* Whenever obstacks are used, it is possible to allocate all overflowed
9369+ entries into a single stack, so they all can be freed in a single
9370+ operation. It is not clear if the speedup is worth the trouble. */
9371+ struct obstack entry_stack;
9372+#endif
9373+ };
9374+
9375+/* A hash table contains many internal entries, each holding a pointer to
9376+ some user provided data (also called a user entry). An entry indistinctly
9377+ refers to both the internal entry and its associated user entry. A user
9378+ entry contents may be hashed by a randomization function (the hashing
9379+ function, or just `hasher' for short) into a number (or `slot') between 0
9380+ and the current table size. At each slot position in the hash table,
9381+ starts a linked chain of entries for which the user data all hash to this
9382+ slot. A bucket is the collection of all entries hashing to the same slot.
9383+
9384+ A good `hasher' function will distribute entries rather evenly in buckets.
9385+ In the ideal case, the length of each bucket is roughly the number of
9386+ entries divided by the table size. Finding the slot for a data is usually
9387+ done in constant time by the `hasher', and the later finding of a precise
9388+ entry is linear in time with the size of the bucket. Consequently, a
9389+ larger hash table size (that is, a larger number of buckets) is prone to
9390+ yielding shorter chains, *given* the `hasher' function behaves properly.
9391+
9392+ Long buckets slow down the lookup algorithm. One might use big hash table
9393+ sizes in hope to reduce the average length of buckets, but this might
9394+ become inordinate, as unused slots in the hash table take some space. The
9395+ best bet is to make sure you are using a good `hasher' function (beware
9396+ that those are not that easy to write! :-), and to use a table size
9397+ larger than the actual number of entries. */
9398+
9399+/* If an insertion makes the ratio of nonempty buckets to table size larger
9400+ than the growth threshold (a number between 0.0 and 1.0), then increase
9401+ the table size by multiplying by the growth factor (a number greater than
9402+ 1.0). The growth threshold defaults to 0.8, and the growth factor
9403+ defaults to 1.414, meaning that the table will have doubled its size
9404+ every second time 80% of the buckets get used. */
9405+#define DEFAULT_GROWTH_THRESHOLD 0.8
9406+#define DEFAULT_GROWTH_FACTOR 1.414
9407+
9408+/* If a deletion empties a bucket and causes the ratio of used buckets to
9409+ table size to become smaller than the shrink threshold (a number between
9410+ 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a
9411+ number greater than the shrink threshold but smaller than 1.0). The shrink
9412+ threshold and factor default to 0.0 and 1.0, meaning that the table never
9413+ shrinks. */
9414+#define DEFAULT_SHRINK_THRESHOLD 0.0
9415+#define DEFAULT_SHRINK_FACTOR 1.0
9416+
9417+/* Use this to initialize or reset a TUNING structure to
9418+ some sensible values. */
9419+static const Hash_tuning default_tuning =
9420+ {
9421+ DEFAULT_SHRINK_THRESHOLD,
9422+ DEFAULT_SHRINK_FACTOR,
9423+ DEFAULT_GROWTH_THRESHOLD,
9424+ DEFAULT_GROWTH_FACTOR,
9425+ false
9426+ };
9427+
9428+/* Information and lookup. */
9429+
9430+/* The following few functions provide information about the overall hash
9431+ table organization: the number of entries, number of buckets and maximum
9432+ length of buckets. */
9433+
9434+/* Return the number of buckets in the hash table. The table size, the total
9435+ number of buckets (used plus unused), or the maximum number of slots, are
9436+ the same quantity. */
9437+
9438+unsigned
9439+hash_get_n_buckets (const Hash_table *table)
9440+{
9441+ return table->n_buckets;
9442+}
9443+
9444+/* Return the number of slots in use (non-empty buckets). */
9445+
9446+unsigned
9447+hash_get_n_buckets_used (const Hash_table *table)
9448+{
9449+ return table->n_buckets_used;
9450+}
9451+
9452+/* Return the number of active entries. */
9453+
9454+unsigned
9455+hash_get_n_entries (const Hash_table *table)
9456+{
9457+ return table->n_entries;
9458+}
9459+
9460+/* Return the length of the longest chain (bucket). */
9461+
9462+unsigned
9463+hash_get_max_bucket_length (const Hash_table *table)
9464+{
9465+ struct hash_entry *bucket;
9466+ unsigned max_bucket_length = 0;
9467+
9468+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9469+ {
9470+ if (bucket->data)
9471+ {
9472+ struct hash_entry *cursor = bucket;
9473+ unsigned bucket_length = 1;
9474+
9475+ while (cursor = cursor->next, cursor)
9476+ bucket_length++;
9477+
9478+ if (bucket_length > max_bucket_length)
9479+ max_bucket_length = bucket_length;
9480+ }
9481+ }
9482+
9483+ return max_bucket_length;
9484+}
9485+
9486+/* Do a mild validation of a hash table, by traversing it and checking two
9487+ statistics. */
9488+
9489+bool
9490+hash_table_ok (const Hash_table *table)
9491+{
9492+ struct hash_entry *bucket;
9493+ unsigned n_buckets_used = 0;
9494+ unsigned n_entries = 0;
9495+
9496+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9497+ {
9498+ if (bucket->data)
9499+ {
9500+ struct hash_entry *cursor = bucket;
9501+
9502+ /* Count bucket head. */
9503+ n_buckets_used++;
9504+ n_entries++;
9505+
9506+ /* Count bucket overflow. */
9507+ while (cursor = cursor->next, cursor)
9508+ n_entries++;
9509+ }
9510+ }
9511+
9512+ if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
9513+ return true;
9514+
9515+ return false;
9516+}
9517+
9518+void
9519+hash_print_statistics (const Hash_table *table, FILE *stream)
9520+{
9521+ unsigned n_entries = hash_get_n_entries (table);
9522+ unsigned n_buckets = hash_get_n_buckets (table);
9523+ unsigned n_buckets_used = hash_get_n_buckets_used (table);
9524+ unsigned max_bucket_length = hash_get_max_bucket_length (table);
9525+
9526+ fprintf (stream, "# entries: %u\n", n_entries);
9527+ fprintf (stream, "# buckets: %u\n", n_buckets);
9528+ fprintf (stream, "# buckets used: %u (%.2f%%)\n", n_buckets_used,
9529+ (100.0 * n_buckets_used) / n_buckets);
9530+ fprintf (stream, "max bucket length: %u\n", max_bucket_length);
9531+}
9532+
9533+/* If ENTRY matches an entry already in the hash table, return the
9534+ entry from the table. Otherwise, return NULL. */
9535+
9536+void *
9537+hash_lookup (const Hash_table *table, const void *entry)
9538+{
9539+ struct hash_entry *bucket
9540+ = table->bucket + table->hasher (entry, table->n_buckets);
9541+ struct hash_entry *cursor;
9542+
9543+ if (! (bucket < table->bucket_limit))
9544+ abort ();
9545+
9546+ if (bucket->data == NULL)
9547+ return NULL;
9548+
9549+ for (cursor = bucket; cursor; cursor = cursor->next)
9550+ if (table->comparator (entry, cursor->data))
9551+ return cursor->data;
9552+
9553+ return NULL;
9554+}
9555+
9556+/* Walking. */
9557+
9558+/* The functions in this page traverse the hash table and process the
9559+ contained entries. For the traversal to work properly, the hash table
9560+ should not be resized nor modified while any particular entry is being
9561+ processed. In particular, entries should not be added or removed. */
9562+
9563+/* Return the first data in the table, or NULL if the table is empty. */
9564+
9565+void *
9566+hash_get_first (const Hash_table *table)
9567+{
9568+ struct hash_entry *bucket;
9569+
9570+ if (table->n_entries == 0)
9571+ return NULL;
9572+
9573+ for (bucket = table->bucket; ; bucket++)
9574+ if (! (bucket < table->bucket_limit))
9575+ abort ();
9576+ else if (bucket->data)
9577+ return bucket->data;
9578+}
9579+
9580+/* Return the user data for the entry following ENTRY, where ENTRY has been
9581+ returned by a previous call to either `hash_get_first' or `hash_get_next'.
9582+ Return NULL if there are no more entries. */
9583+
9584+void *
9585+hash_get_next (const Hash_table *table, const void *entry)
9586+{
9587+ struct hash_entry *bucket
9588+ = table->bucket + table->hasher (entry, table->n_buckets);
9589+ struct hash_entry *cursor;
9590+
9591+ if (! (bucket < table->bucket_limit))
9592+ abort ();
9593+
9594+ /* Find next entry in the same bucket. */
9595+ for (cursor = bucket; cursor; cursor = cursor->next)
9596+ if (cursor->data == entry && cursor->next)
9597+ return cursor->next->data;
9598+
9599+ /* Find first entry in any subsequent bucket. */
9600+ while (++bucket < table->bucket_limit)
9601+ if (bucket->data)
9602+ return bucket->data;
9603+
9604+ /* None found. */
9605+ return NULL;
9606+}
9607+
9608+/* Fill BUFFER with pointers to active user entries in the hash table, then
9609+ return the number of pointers copied. Do not copy more than BUFFER_SIZE
9610+ pointers. */
9611+
9612+unsigned
9613+hash_get_entries (const Hash_table *table, void **buffer,
9614+ unsigned buffer_size)
9615+{
9616+ unsigned counter = 0;
9617+ struct hash_entry *bucket;
9618+ struct hash_entry *cursor;
9619+
9620+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9621+ {
9622+ if (bucket->data)
9623+ {
9624+ for (cursor = bucket; cursor; cursor = cursor->next)
9625+ {
9626+ if (counter >= buffer_size)
9627+ return counter;
9628+ buffer[counter++] = cursor->data;
9629+ }
9630+ }
9631+ }
9632+
9633+ return counter;
9634+}
9635+
9636+/* Call a PROCESSOR function for each entry of a hash table, and return the
9637+ number of entries for which the processor function returned success. A
9638+ pointer to some PROCESSOR_DATA which will be made available to each call to
9639+ the processor function. The PROCESSOR accepts two arguments: the first is
9640+ the user entry being walked into, the second is the value of PROCESSOR_DATA
9641+ as received. The walking continue for as long as the PROCESSOR function
9642+ returns nonzero. When it returns zero, the walking is interrupted. */
9643+
9644+unsigned
9645+hash_do_for_each (const Hash_table *table, Hash_processor processor,
9646+ void *processor_data)
9647+{
9648+ unsigned counter = 0;
9649+ struct hash_entry *bucket;
9650+ struct hash_entry *cursor;
9651+
9652+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9653+ {
9654+ if (bucket->data)
9655+ {
9656+ for (cursor = bucket; cursor; cursor = cursor->next)
9657+ {
9658+ if (!(*processor) (cursor->data, processor_data))
9659+ return counter;
9660+ counter++;
9661+ }
9662+ }
9663+ }
9664+
9665+ return counter;
9666+}
9667+
9668+/* Allocation and clean-up. */
9669+
9670+/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
9671+ This is a convenience routine for constructing other hashing functions. */
9672+
9673+#if USE_DIFF_HASH
9674+
9675+/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
9676+ B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm,
9677+ Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash
9678+ algorithms tend to be domain-specific, so what's good for [diffutils'] io.c
9679+ may not be good for your application." */
9680+
9681+unsigned
9682+hash_string (const char *string, unsigned n_buckets)
9683+{
9684+# define ROTATE_LEFT(Value, Shift) \
9685+ ((Value) << (Shift) | (Value) >> ((sizeof (unsigned) * CHAR_BIT) - (Shift)))
9686+# define HASH_ONE_CHAR(Value, Byte) \
9687+ ((Byte) + ROTATE_LEFT (Value, 7))
9688+
9689+ unsigned value = 0;
9690+
9691+ for (; *string; string++)
9692+ value = HASH_ONE_CHAR (value, *(const unsigned char *) string);
9693+ return value % n_buckets;
9694+
9695+# undef ROTATE_LEFT
9696+# undef HASH_ONE_CHAR
9697+}
9698+
9699+#else /* not USE_DIFF_HASH */
9700+
9701+/* This one comes from `recode', and performs a bit better than the above as
9702+ per a few experiments. It is inspired from a hashing routine found in the
9703+ very old Cyber `snoop', itself written in typical Greg Mansfield style.
9704+ (By the way, what happened to this excellent man? Is he still alive?) */
9705+
9706+unsigned
9707+hash_string (const char *string, unsigned n_buckets)
9708+{
9709+ unsigned value = 0;
9710+
9711+ while (*string)
9712+ value = ((value * 31 + (int) *(const unsigned char *) string++)
9713+ % n_buckets);
9714+ return value;
9715+}
9716+
9717+#endif /* not USE_DIFF_HASH */
9718+
9719+/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd
9720+ number at least equal to 11. */
9721+
9722+static bool
9723+is_prime (unsigned long candidate)
9724+{
9725+ unsigned long divisor = 3;
9726+ unsigned long square = divisor * divisor;
9727+
9728+ while (square < candidate && (candidate % divisor))
9729+ {
9730+ divisor++;
9731+ square += 4 * divisor;
9732+ divisor++;
9733+ }
9734+
9735+ return (candidate % divisor ? true : false);
9736+}
9737+
9738+/* Round a given CANDIDATE number up to the nearest prime, and return that
9739+ prime. Primes lower than 10 are merely skipped. */
9740+
9741+static unsigned long
9742+next_prime (unsigned long candidate)
9743+{
9744+ /* Skip small primes. */
9745+ if (candidate < 10)
9746+ candidate = 10;
9747+
9748+ /* Make it definitely odd. */
9749+ candidate |= 1;
9750+
9751+ while (!is_prime (candidate))
9752+ candidate += 2;
9753+
9754+ return candidate;
9755+}
9756+
9757+void
9758+hash_reset_tuning (Hash_tuning *tuning)
9759+{
9760+ *tuning = default_tuning;
9761+}
9762+
9763+/* For the given hash TABLE, check the user supplied tuning structure for
9764+ reasonable values, and return true if there is no gross error with it.
9765+ Otherwise, definitively reset the TUNING field to some acceptable default
9766+ in the hash table (that is, the user loses the right of further modifying
9767+ tuning arguments), and return false. */
9768+
9769+static bool
9770+check_tuning (Hash_table *table)
9771+{
9772+ const Hash_tuning *tuning = table->tuning;
9773+
9774+ if (tuning->growth_threshold > 0.0
9775+ && tuning->growth_threshold < 1.0
9776+ && tuning->growth_factor > 1.0
9777+ && tuning->shrink_threshold >= 0.0
9778+ && tuning->shrink_threshold < 1.0
9779+ && tuning->shrink_factor > tuning->shrink_threshold
9780+ && tuning->shrink_factor <= 1.0
9781+ && tuning->shrink_threshold < tuning->growth_threshold)
9782+ return true;
9783+
9784+ table->tuning = &default_tuning;
9785+ return false;
9786+}
9787+
9788+/* Allocate and return a new hash table, or NULL upon failure. The initial
9789+ number of buckets is automatically selected so as to _guarantee_ that you
9790+ may insert at least CANDIDATE different user entries before any growth of
9791+ the hash table size occurs. So, if have a reasonably tight a-priori upper
9792+ bound on the number of entries you intend to insert in the hash table, you
9793+ may save some table memory and insertion time, by specifying it here. If
9794+ the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
9795+ argument has its meaning changed to the wanted number of buckets.
9796+
9797+ TUNING points to a structure of user-supplied values, in case some fine
9798+ tuning is wanted over the default behavior of the hasher. If TUNING is
9799+ NULL, the default tuning parameters are used instead.
9800+
9801+ The user-supplied HASHER function should be provided. It accepts two
9802+ arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a
9803+ slot number for that entry which should be in the range 0..TABLE_SIZE-1.
9804+ This slot number is then returned.
9805+
9806+ The user-supplied COMPARATOR function should be provided. It accepts two
9807+ arguments pointing to user data, it then returns true for a pair of entries
9808+ that compare equal, or false otherwise. This function is internally called
9809+ on entries which are already known to hash to the same bucket index.
9810+
9811+ The user-supplied DATA_FREER function, when not NULL, may be later called
9812+ with the user data as an argument, just before the entry containing the
9813+ data gets freed. This happens from within `hash_free' or `hash_clear'.
9814+ You should specify this function only if you want these functions to free
9815+ all of your `data' data. This is typically the case when your data is
9816+ simply an auxiliary struct that you have malloc'd to aggregate several
9817+ values. */
9818+
9819+Hash_table *
9820+hash_initialize (unsigned candidate, const Hash_tuning *tuning,
9821+ Hash_hasher hasher, Hash_comparator comparator,
9822+ Hash_data_freer data_freer)
9823+{
9824+ Hash_table *table;
9825+ struct hash_entry *bucket;
9826+
9827+ if (hasher == NULL || comparator == NULL)
9828+ return NULL;
9829+
9830+ table = (Hash_table *) malloc (sizeof (Hash_table));
9831+ if (table == NULL)
9832+ return NULL;
9833+
9834+ if (!tuning)
9835+ tuning = &default_tuning;
9836+ table->tuning = tuning;
9837+ if (!check_tuning (table))
9838+ {
9839+ /* Fail if the tuning options are invalid. This is the only occasion
9840+ when the user gets some feedback about it. Once the table is created,
9841+ if the user provides invalid tuning options, we silently revert to
9842+ using the defaults, and ignore further request to change the tuning
9843+ options. */
9844+ free (table);
9845+ return NULL;
9846+ }
9847+
9848+ table->n_buckets
9849+ = next_prime (tuning->is_n_buckets ? candidate
9850+ : (unsigned) (candidate / tuning->growth_threshold));
9851+
9852+ table->bucket = (struct hash_entry *)
9853+ malloc (table->n_buckets * sizeof (struct hash_entry));
9854+ if (table->bucket == NULL)
9855+ {
9856+ free (table);
9857+ return NULL;
9858+ }
9859+ table->bucket_limit = table->bucket + table->n_buckets;
9860+
9861+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9862+ {
9863+ bucket->data = NULL;
9864+ bucket->next = NULL;
9865+ }
9866+ table->n_buckets_used = 0;
9867+ table->n_entries = 0;
9868+
9869+ table->hasher = hasher;
9870+ table->comparator = comparator;
9871+ table->data_freer = data_freer;
9872+
9873+ table->free_entry_list = NULL;
9874+#if USE_OBSTACK
9875+ obstack_init (&table->entry_stack);
9876+#endif
9877+ return table;
9878+}
9879+
9880+/* Make all buckets empty, placing any chained entries on the free list.
9881+ Apply the user-specified function data_freer (if any) to the datas of any
9882+ affected entries. */
9883+
9884+void
9885+hash_clear (Hash_table *table)
9886+{
9887+ struct hash_entry *bucket;
9888+
9889+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9890+ {
9891+ if (bucket->data)
9892+ {
9893+ struct hash_entry *cursor;
9894+ struct hash_entry *next;
9895+
9896+ /* Free the bucket overflow. */
9897+ for (cursor = bucket->next; cursor; cursor = next)
9898+ {
9899+ if (table->data_freer)
9900+ (*table->data_freer) (cursor->data);
9901+ cursor->data = NULL;
9902+
9903+ next = cursor->next;
9904+ /* Relinking is done one entry at a time, as it is to be expected
9905+ that overflows are either rare or short. */
9906+ cursor->next = table->free_entry_list;
9907+ table->free_entry_list = cursor;
9908+ }
9909+
9910+ /* Free the bucket head. */
9911+ if (table->data_freer)
9912+ (*table->data_freer) (bucket->data);
9913+ bucket->data = NULL;
9914+ bucket->next = NULL;
9915+ }
9916+ }
9917+
9918+ table->n_buckets_used = 0;
9919+ table->n_entries = 0;
9920+}
9921+
9922+/* Reclaim all storage associated with a hash table. If a data_freer
9923+ function has been supplied by the user when the hash table was created,
9924+ this function applies it to the data of each entry before freeing that
9925+ entry. */
9926+
9927+void
9928+hash_free (Hash_table *table)
9929+{
9930+ struct hash_entry *bucket;
9931+ struct hash_entry *cursor;
9932+ struct hash_entry *next;
9933+
9934+ /* Call the user data_freer function. */
9935+ if (table->data_freer && table->n_entries)
9936+ {
9937+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9938+ {
9939+ if (bucket->data)
9940+ {
9941+ for (cursor = bucket; cursor; cursor = cursor->next)
9942+ {
9943+ (*table->data_freer) (cursor->data);
9944+ }
9945+ }
9946+ }
9947+ }
9948+
9949+#if USE_OBSTACK
9950+
9951+ obstack_free (&table->entry_stack, NULL);
9952+
9953+#else
9954+
9955+ /* Free all bucket overflowed entries. */
9956+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
9957+ {
9958+ for (cursor = bucket->next; cursor; cursor = next)
9959+ {
9960+ next = cursor->next;
9961+ free (cursor);
9962+ }
9963+ }
9964+
9965+ /* Also reclaim the internal list of previously freed entries. */
9966+ for (cursor = table->free_entry_list; cursor; cursor = next)
9967+ {
9968+ next = cursor->next;
9969+ free (cursor);
9970+ }
9971+
9972+#endif
9973+
9974+ /* Free the remainder of the hash table structure. */
9975+ free (table->bucket);
9976+ free (table);
9977+}
9978+
9979+/* Insertion and deletion. */
9980+
9981+/* Get a new hash entry for a bucket overflow, possibly by reclying a
9982+ previously freed one. If this is not possible, allocate a new one. */
9983+
9984+static struct hash_entry *
9985+allocate_entry (Hash_table *table)
9986+{
9987+ struct hash_entry *new;
9988+
9989+ if (table->free_entry_list)
9990+ {
9991+ new = table->free_entry_list;
9992+ table->free_entry_list = new->next;
9993+ }
9994+ else
9995+ {
9996+#if USE_OBSTACK
9997+ new = (struct hash_entry *)
9998+ obstack_alloc (&table->entry_stack, sizeof (struct hash_entry));
9999+#else
10000+ new = (struct hash_entry *) malloc (sizeof (struct hash_entry));
10001+#endif
10002+ }
10003+
10004+ return new;
10005+}
10006+
10007+/* Free a hash entry which was part of some bucket overflow,
10008+ saving it for later recycling. */
10009+
10010+static void
10011+free_entry (Hash_table *table, struct hash_entry *entry)
10012+{
10013+ entry->data = NULL;
10014+ entry->next = table->free_entry_list;
10015+ table->free_entry_list = entry;
10016+}
10017+
10018+/* This private function is used to help with insertion and deletion. When
10019+ ENTRY matches an entry in the table, return a pointer to the corresponding
10020+ user data and set *BUCKET_HEAD to the head of the selected bucket.
10021+ Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in
10022+ the table, unlink the matching entry. */
10023+
10024+static void *
10025+hash_find_entry (Hash_table *table, const void *entry,
10026+ struct hash_entry **bucket_head, bool delete)
10027+{
10028+ struct hash_entry *bucket
10029+ = table->bucket + table->hasher (entry, table->n_buckets);
10030+ struct hash_entry *cursor;
10031+
10032+ if (! (bucket < table->bucket_limit))
10033+ abort ();
10034+
10035+ *bucket_head = bucket;
10036+
10037+ /* Test for empty bucket. */
10038+ if (bucket->data == NULL)
10039+ return NULL;
10040+
10041+ /* See if the entry is the first in the bucket. */
10042+ if ((*table->comparator) (entry, bucket->data))
10043+ {
10044+ void *data = bucket->data;
10045+
10046+ if (delete)
10047+ {
10048+ if (bucket->next)
10049+ {
10050+ struct hash_entry *next = bucket->next;
10051+
10052+ /* Bump the first overflow entry into the bucket head, then save
10053+ the previous first overflow entry for later recycling. */
10054+ *bucket = *next;
10055+ free_entry (table, next);
10056+ }
10057+ else
10058+ {
10059+ bucket->data = NULL;
10060+ }
10061+ }
10062+
10063+ return data;
10064+ }
10065+
10066+ /* Scan the bucket overflow. */
10067+ for (cursor = bucket; cursor->next; cursor = cursor->next)
10068+ {
10069+ if ((*table->comparator) (entry, cursor->next->data))
10070+ {
10071+ void *data = cursor->next->data;
10072+
10073+ if (delete)
10074+ {
10075+ struct hash_entry *next = cursor->next;
10076+
10077+ /* Unlink the entry to delete, then save the freed entry for later
10078+ recycling. */
10079+ cursor->next = next->next;
10080+ free_entry (table, next);
10081+ }
10082+
10083+ return data;
10084+ }
10085+ }
10086+
10087+ /* No entry found. */
10088+ return NULL;
10089+}
10090+
10091+/* For an already existing hash table, change the number of buckets through
10092+ specifying CANDIDATE. The contents of the hash table are preserved. The
10093+ new number of buckets is automatically selected so as to _guarantee_ that
10094+ the table may receive at least CANDIDATE different user entries, including
10095+ those already in the table, before any other growth of the hash table size
10096+ occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
10097+ exact number of buckets desired. */
10098+
10099+bool
10100+hash_rehash (Hash_table *table, unsigned candidate)
10101+{
10102+ Hash_table *new_table;
10103+ struct hash_entry *bucket;
10104+ struct hash_entry *cursor;
10105+ struct hash_entry *next;
10106+
10107+ new_table = hash_initialize (candidate, table->tuning, table->hasher,
10108+ table->comparator, table->data_freer);
10109+ if (new_table == NULL)
10110+ return false;
10111+
10112+ /* Merely reuse the extra old space into the new table. */
10113+#if USE_OBSTACK
10114+ obstack_free (&new_table->entry_stack, NULL);
10115+ new_table->entry_stack = table->entry_stack;
10116+#endif
10117+ new_table->free_entry_list = table->free_entry_list;
10118+
10119+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
10120+ if (bucket->data)
10121+ for (cursor = bucket; cursor; cursor = next)
10122+ {
10123+ void *data = cursor->data;
10124+ struct hash_entry *new_bucket
10125+ = (new_table->bucket
10126+ + new_table->hasher (data, new_table->n_buckets));
10127+
10128+ if (! (new_bucket < new_table->bucket_limit))
10129+ abort ();
10130+
10131+ next = cursor->next;
10132+
10133+ if (new_bucket->data)
10134+ {
10135+ if (cursor == bucket)
10136+ {
10137+ /* Allocate or recycle an entry, when moving from a bucket
10138+ header into a bucket overflow. */
10139+ struct hash_entry *new_entry = allocate_entry (new_table);
10140+
10141+ if (new_entry == NULL)
10142+ return false;
10143+
10144+ new_entry->data = data;
10145+ new_entry->next = new_bucket->next;
10146+ new_bucket->next = new_entry;
10147+ }
10148+ else
10149+ {
10150+ /* Merely relink an existing entry, when moving from a
10151+ bucket overflow into a bucket overflow. */
10152+ cursor->next = new_bucket->next;
10153+ new_bucket->next = cursor;
10154+ }
10155+ }
10156+ else
10157+ {
10158+ /* Free an existing entry, when moving from a bucket
10159+ overflow into a bucket header. Also take care of the
10160+ simple case of moving from a bucket header into a bucket
10161+ header. */
10162+ new_bucket->data = data;
10163+ new_table->n_buckets_used++;
10164+ if (cursor != bucket)
10165+ free_entry (new_table, cursor);
10166+ }
10167+ }
10168+
10169+ free (table->bucket);
10170+ table->bucket = new_table->bucket;
10171+ table->bucket_limit = new_table->bucket_limit;
10172+ table->n_buckets = new_table->n_buckets;
10173+ table->n_buckets_used = new_table->n_buckets_used;
10174+ table->free_entry_list = new_table->free_entry_list;
10175+ /* table->n_entries already holds its value. */
10176+#if USE_OBSTACK
10177+ table->entry_stack = new_table->entry_stack;
10178+#endif
10179+ free (new_table);
10180+
10181+ return true;
10182+}
10183+
10184+/* If ENTRY matches an entry already in the hash table, return the pointer
10185+ to the entry from the table. Otherwise, insert ENTRY and return ENTRY.
10186+ Return NULL if the storage required for insertion cannot be allocated. */
10187+
10188+void *
10189+hash_insert (Hash_table *table, const void *entry)
10190+{
10191+ void *data;
10192+ struct hash_entry *bucket;
10193+
10194+ /* The caller cannot insert a NULL entry. */
10195+ if (! entry)
10196+ abort ();
10197+
10198+ /* If there's a matching entry already in the table, return that. */
10199+ if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
10200+ return data;
10201+
10202+ /* ENTRY is not matched, it should be inserted. */
10203+
10204+ if (bucket->data)
10205+ {
10206+ struct hash_entry *new_entry = allocate_entry (table);
10207+
10208+ if (new_entry == NULL)
10209+ return NULL;
10210+
10211+ /* Add ENTRY in the overflow of the bucket. */
10212+
10213+ new_entry->data = (void *) entry;
10214+ new_entry->next = bucket->next;
10215+ bucket->next = new_entry;
10216+ table->n_entries++;
10217+ return (void *) entry;
10218+ }
10219+
10220+ /* Add ENTRY right in the bucket head. */
10221+
10222+ bucket->data = (void *) entry;
10223+ table->n_entries++;
10224+ table->n_buckets_used++;
10225+
10226+ /* If the growth threshold of the buckets in use has been reached, increase
10227+ the table size and rehash. There's no point in checking the number of
10228+ entries: if the hashing function is ill-conditioned, rehashing is not
10229+ likely to improve it. */
10230+
10231+ if (table->n_buckets_used
10232+ > table->tuning->growth_threshold * table->n_buckets)
10233+ {
10234+ /* Check more fully, before starting real work. If tuning arguments
10235+ became invalid, the second check will rely on proper defaults. */
10236+ check_tuning (table);
10237+ if (table->n_buckets_used
10238+ > table->tuning->growth_threshold * table->n_buckets)
10239+ {
10240+ const Hash_tuning *tuning = table->tuning;
10241+ unsigned candidate
10242+ = (unsigned) (tuning->is_n_buckets
10243+ ? (table->n_buckets * tuning->growth_factor)
10244+ : (table->n_buckets * tuning->growth_factor
10245+ * tuning->growth_threshold));
10246+
10247+ /* If the rehash fails, arrange to return NULL. */
10248+ if (!hash_rehash (table, candidate))
10249+ entry = NULL;
10250+ }
10251+ }
10252+
10253+ return (void *) entry;
10254+}
10255+
10256+/* If ENTRY is already in the table, remove it and return the just-deleted
10257+ data (the user may want to deallocate its storage). If ENTRY is not in the
10258+ table, don't modify the table and return NULL. */
10259+
10260+void *
10261+hash_delete (Hash_table *table, const void *entry)
10262+{
10263+ void *data;
10264+ struct hash_entry *bucket;
10265+
10266+ data = hash_find_entry (table, entry, &bucket, true);
10267+ if (!data)
10268+ return NULL;
10269+
10270+ table->n_entries--;
10271+ if (!bucket->data)
10272+ {
10273+ table->n_buckets_used--;
10274+
10275+ /* If the shrink threshold of the buckets in use has been reached,
10276+ rehash into a smaller table. */
10277+
10278+ if (table->n_buckets_used
10279+ < table->tuning->shrink_threshold * table->n_buckets)
10280+ {
10281+ /* Check more fully, before starting real work. If tuning arguments
10282+ became invalid, the second check will rely on proper defaults. */
10283+ check_tuning (table);
10284+ if (table->n_buckets_used
10285+ < table->tuning->shrink_threshold * table->n_buckets)
10286+ {
10287+ const Hash_tuning *tuning = table->tuning;
10288+ unsigned candidate
10289+ = (unsigned) (tuning->is_n_buckets
10290+ ? table->n_buckets * tuning->shrink_factor
10291+ : (table->n_buckets * tuning->shrink_factor
10292+ * tuning->growth_threshold));
10293+
10294+ hash_rehash (table, candidate);
10295+ }
10296+ }
10297+ }
10298+
10299+ return data;
10300+}
10301+
10302+/* Testing. */
10303+
10304+#if TESTING
10305+
10306+void
10307+hash_print (const Hash_table *table)
10308+{
10309+ struct hash_entry *bucket;
10310+
10311+ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
10312+ {
10313+ struct hash_entry *cursor;
10314+
10315+ if (bucket)
10316+ printf ("%d:\n", bucket - table->bucket);
10317+
10318+ for (cursor = bucket; cursor; cursor = cursor->next)
10319+ {
10320+ char *s = (char *) cursor->data;
10321+ /* FIXME */
10322+ if (s)
10323+ printf (" %s\n", s);
10324+ }
10325+ }
10326+}
10327+
10328+#endif /* TESTING */
10329--- patch-2.5.9.orig/hash.h
10330+++ patch-2.5.9/hash.h
10331@@ -0,0 +1,93 @@
10332+/* hash - hashing table processing.
10333+ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
10334+ Written by Jim Meyering <meyering@ascend.com>, 1998.
10335+
10336+ This program is free software; you can redistribute it and/or modify
10337+ it under the terms of the GNU General Public License as published by
10338+ the Free Software Foundation; either version 2, or (at your option)
10339+ any later version.
10340+
10341+ This program is distributed in the hope that it will be useful,
10342+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10343+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10344+ GNU General Public License for more details.
10345+
10346+ You should have received a copy of the GNU General Public License
10347+ along with this program; if not, write to the Free Software Foundation,
10348+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10349+
10350+/* A generic hash table package. */
10351+
10352+/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
10353+ obstacks instead of malloc, and recompile `hash.c' with same setting. */
10354+
10355+#ifndef HASH_H_
10356+# define HASH_H_
10357+
10358+# ifndef PARAMS
10359+# if PROTOTYPES || __STDC__
10360+# define PARAMS(Args) Args
10361+# else
10362+# define PARAMS(Args) ()
10363+# endif
10364+# endif
10365+
10366+typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
10367+typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
10368+typedef void (*Hash_data_freer) PARAMS ((void *));
10369+typedef bool (*Hash_processor) PARAMS ((void *, void *));
10370+
10371+struct hash_entry
10372+ {
10373+ void *data;
10374+ struct hash_entry *next;
10375+ };
10376+
10377+struct hash_tuning
10378+ {
10379+ /* This structure is mainly used for `hash_initialize', see the block
10380+ documentation of `hash_reset_tuning' for more complete comments. */
10381+
10382+ float shrink_threshold; /* ratio of used buckets to trigger a shrink */
10383+ float shrink_factor; /* ratio of new smaller size to original size */
10384+ float growth_threshold; /* ratio of used buckets to trigger a growth */
10385+ float growth_factor; /* ratio of new bigger size to original size */
10386+ bool is_n_buckets; /* if CANDIDATE really means table size */
10387+ };
10388+
10389+typedef struct hash_tuning Hash_tuning;
10390+
10391+struct hash_table;
10392+
10393+typedef struct hash_table Hash_table;
10394+
10395+/* Information and lookup. */
10396+unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
10397+unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
10398+unsigned hash_get_n_entries PARAMS ((const Hash_table *));
10399+unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
10400+bool hash_table_ok PARAMS ((const Hash_table *));
10401+void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
10402+void *hash_lookup PARAMS ((const Hash_table *, const void *));
10403+
10404+/* Walking. */
10405+void *hash_get_first PARAMS ((const Hash_table *));
10406+void *hash_get_next PARAMS ((const Hash_table *, const void *));
10407+unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
10408+unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
10409+
10410+/* Allocation and clean-up. */
10411+unsigned hash_string PARAMS ((const char *, unsigned));
10412+void hash_reset_tuning PARAMS ((Hash_tuning *));
10413+Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
10414+ Hash_hasher, Hash_comparator,
10415+ Hash_data_freer));
10416+void hash_clear PARAMS ((Hash_table *));
10417+void hash_free PARAMS ((Hash_table *));
10418+
10419+/* Insertion and deletion. */
10420+bool hash_rehash PARAMS ((Hash_table *, unsigned));
10421+void *hash_insert PARAMS ((Hash_table *, const void *));
10422+void *hash_delete PARAMS ((Hash_table *, const void *));
10423+
10424+#endif
diff --git a/meta/recipes-devtools/patch/patch-2.5.9/global-reject-file.diff b/meta/recipes-devtools/patch/patch-2.5.9/global-reject-file.diff
new file mode 100644
index 0000000000..66065fcbf5
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/global-reject-file.diff
@@ -0,0 +1,201 @@
1Index: patch-2.5.9/patch.man
2===================================================================
3--- patch-2.5.9.orig/patch.man
4+++ patch-2.5.9/patch.man
5@@ -520,6 +520,15 @@ file.
6 \fB\*=reject\-unified\fP
7 Produce unified reject files. The default is to produce context type reject files.
8 .TP
9+.BI \*=global\-reject\-file= rejectfile
10+Put all rejects into
11+.I rejectfile
12+instead of creating separate reject files for all files that have rejects. The
13+.I rejectfile
14+will contain headers that identify which file each reject refers to. Note that
15+the global reject file is created even if \-\-dry\-run is specified (while
16+non-global reject files will only be created without \-\-dry\-run).
17+.TP
18 \fB\-R\fP or \fB\*=reverse\fP
19 Assume that this patch was created with the old and new files swapped.
20 (Yes, I'm afraid that does happen occasionally, human nature being what it
21Index: patch-2.5.9/patch.c
22===================================================================
23--- patch-2.5.9.orig/patch.c
24+++ patch-2.5.9/patch.c
25@@ -67,6 +67,7 @@ static bool similar (char const *, size_
26 static bool spew_output (struct outstate *);
27 static char const *make_temp (char);
28 static int numeric_string (char const *, bool, char const *);
29+static void reject_header (const char *filename);
30 static void abort_hunk (void);
31 static void cleanup (void);
32 static void get_some_switches (void);
33@@ -98,6 +99,7 @@ static int Argc;
34 static char * const *Argv;
35
36 static FILE *rejfp; /* reject file pointer */
37+static char *global_reject;
38
39 static char const *patchname;
40 static char *rejname;
41@@ -172,6 +174,10 @@ main (int argc, char **argv)
42 /* Make sure we clean up in case of disaster. */
43 set_signals (false);
44
45+ /* initialize global reject file */
46+ if (global_reject)
47+ init_reject ();
48+
49 for (
50 open_patch_file (patchname);
51 there_is_another_patch();
52@@ -208,8 +214,9 @@ main (int argc, char **argv)
53 init_output (TMPOUTNAME, exclusive, &outstate);
54 }
55
56- /* initialize reject file */
57- init_reject ();
58+ /* initialize per-patch reject file */
59+ if (!global_reject)
60+ init_reject ();
61
62 /* find out where all the lines are */
63 if (!skip_rest_of_patch)
64@@ -278,6 +285,8 @@ main (int argc, char **argv)
65
66 newwhere = pch_newfirst() + last_offset;
67 if (skip_rest_of_patch) {
68+ if (!failed)
69+ reject_header(outname);
70 abort_hunk();
71 failed++;
72 if (verbosity == VERBOSE)
73@@ -292,6 +301,8 @@ main (int argc, char **argv)
74 say ("Patch attempted to create file %s, which already exists.\n",
75 quotearg (inname));
76
77+ if (!failed)
78+ reject_header(outname);
79 abort_hunk();
80 failed++;
81 if (verbosity != SILENT)
82@@ -299,6 +310,8 @@ main (int argc, char **argv)
83 format_linenum (numbuf, newwhere));
84 }
85 else if (! apply_hunk (&outstate, where)) {
86+ if (!failed)
87+ reject_header(outname);
88 abort_hunk ();
89 failed++;
90 if (verbosity != SILENT)
91@@ -332,7 +345,8 @@ main (int argc, char **argv)
92 fclose (outstate.ofp);
93 outstate.ofp = 0;
94 }
95- fclose (rejfp);
96+ if (!global_reject)
97+ fclose (rejfp);
98 continue;
99 }
100
101@@ -412,13 +426,13 @@ main (int argc, char **argv)
102 }
103 }
104 if (diff_type != ED_DIFF) {
105- if (fclose (rejfp) != 0)
106+ if (!global_reject && fclose (rejfp) != 0)
107 write_fatal ();
108 if (failed) {
109 somefailed = true;
110 say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
111 skip_rest_of_patch ? "ignored" : "FAILED");
112- if (outname) {
113+ if (!global_reject && outname) {
114 char *rej = rejname;
115 if (!rejname) {
116 rej = xmalloc (strlen (outname) + 5);
117@@ -445,6 +459,20 @@ main (int argc, char **argv)
118 }
119 set_signals (true);
120 }
121+ if (global_reject)
122+ {
123+ if (fclose (rejfp) != 0)
124+ write_fatal ();
125+ if (somefailed)
126+ {
127+ say (" -- saving rejects to file %s\n", quotearg (global_reject));
128+ /*if (! dry_run)
129+ {*/
130+ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
131+ global_reject, 0644, false);
132+ /*}*/
133+ }
134+ }
135 if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
136 write_fatal ();
137 cleanup ();
138@@ -523,6 +551,7 @@ static struct option const longopts[] =
139 {"posix", no_argument, NULL, CHAR_MAX + 7},
140 {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
141 {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
142+ {"global-reject-file", required_argument, NULL, CHAR_MAX + 10},
143 {NULL, no_argument, NULL, 0}
144 };
145
146@@ -582,6 +611,7 @@ static char const *const option_help[] =
147 " --dry-run Do not actually change any files; just print what would happen.",
148 " --posix Conform to the POSIX standard.",
149 " --unified-reject-files Create unified reject files.",
150+" --global-reject-file=file Put all rejects into one file.",
151 "",
152 " -d DIR --directory=DIR Change the working directory to DIR first.",
153 #if HAVE_SETMODE_DOS
154@@ -784,6 +814,9 @@ get_some_switches (void)
155 case CHAR_MAX + 9:
156 unified_reject_files = true;
157 break;
158+ case CHAR_MAX + 10:
159+ global_reject = savestr (optarg);
160+ break;
161 default:
162 usage (stderr, 2);
163 }
164@@ -933,6 +966,37 @@ locate_hunk (LINENUM fuzz)
165 }
166
167 static char *
168+format_timestamp (char timebuf[37], bool which)
169+{
170+ time_t ts = pch_timestamp(which);
171+ if (ts != -1)
172+ {
173+ struct tm *tm = localtime(&ts);
174+ strftime(timebuf, 37, "\t%Y-%m-%d %H:%M:%S.000000000 %z", tm);
175+ }
176+ else
177+ timebuf[0] = 0;
178+ return timebuf;
179+}
180+
181+/* Write a header in a reject file that combines multiple hunks. */
182+static void
183+reject_header (const char *outname)
184+{
185+ char timebuf0[37], timebuf1[37];
186+ if (!global_reject)
187+ return;
188+ if (diff_type == UNI_DIFF)
189+ fprintf(rejfp, "--- %s.orig%s\n+++ %s%s\n",
190+ outname, format_timestamp(timebuf0, reverse),
191+ outname, format_timestamp(timebuf1, !reverse));
192+ else
193+ fprintf(rejfp, "*** %s.orig%s\n--- %s%s\n",
194+ outname, format_timestamp(timebuf0, reverse),
195+ outname, format_timestamp(timebuf1, !reverse));
196+}
197+
198+static char *
199 format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
200 LINENUM first, LINENUM lines)
201 {
diff --git a/meta/recipes-devtools/patch/patch-2.5.9/install.patch b/meta/recipes-devtools/patch/patch-2.5.9/install.patch
new file mode 100644
index 0000000000..c959189f37
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/install.patch
@@ -0,0 +1,41 @@
1Index: patch-2.5.4/Makefile.in
2===================================================================
3--- patch-2.5.4.orig/Makefile.in 2005-03-09 07:23:54.779311824 -0500
4+++ patch-2.5.4/Makefile.in 2005-03-09 07:26:09.616813408 -0500
5@@ -43,10 +43,11 @@
6 PACKAGE_NAME = @PACKAGE_NAME@
7 PACKAGE_VERSION = @PACKAGE_VERSION@
8
9+DESTDIR =
10 prefix = @prefix@
11 exec_prefix = @exec_prefix@
12
13-bindir = $(exec_prefix)/bin
14+bindir = @bindir@
15
16 # Where to put the manual pages.
17 mandir = @mandir@
18@@ -112,18 +113,18 @@
19 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
20
21 install:: all installdirs
22- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
23- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
24+ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
25+ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
26
27 installdirs::
28- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
29+ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
30
31 install-strip::
32 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
33
34 uninstall::
35- rm -f $(bindir)/$(patch_name)$(EXEEXT)
36- rm -f $(man1dir)/$(patch_name)$(man1ext)
37+ rm -f $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
38+ rm -f $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
39
40 Makefile: Makefile.in $(CONFIG_STATUS)
41 $(SHELL) $(CONFIG_STATUS)
diff --git a/meta/recipes-devtools/patch/patch-2.5.9/unified-reject-files.diff b/meta/recipes-devtools/patch/patch-2.5.9/unified-reject-files.diff
new file mode 100644
index 0000000000..6bfa00dd75
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/unified-reject-files.diff
@@ -0,0 +1,305 @@
1Generate unified diff style reject files. Also include the C function names
2in reject files whenever possible.
3
4 $ cat > f.orig
5 < a() {
6 < 2
7 < 3
8 <
9 < 5
10 < 6
11 < }
12
13 $ sed -e 's/5/5a/' f.orig > f
14 $ diff -U2 -p f.orig f > f.diff
15 $ sed -e 's/5/5a/' -e 's/6/6x/' f.orig > f
16 $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f.diff
17 > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
18
19 $ cat f.rej
20 > @@ -3,5 +3,5 @@ a() {
21 > 3
22 >
23 > -5
24 > +5a
25 > 6
26 > }
27
28 $ ./patch -F0 -s --no-backup-if-mismatch f < f.diff
29 > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
30
31 $ cat f.rej
32 > *************** a() {
33 > *** 3,7 ****
34 > 3
35 >
36 > - 5
37 > 6
38 > }
39 > --- 3,7 ----
40 > 3
41 >
42 > + 5a
43 > 6
44 > }
45
46 $ diff -Nu -p /dev/null f.orig > f2.diff
47 $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f2.diff
48 > Patch attempted to create file f, which already exists.
49 > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
50
51 $ cat f.rej
52 > @@ -0,0 +1,7 @@
53 > +a() {
54 > +2
55 > +3
56 > +
57 > +5
58 > +6
59 > +}
60
61 $ rm -f f f.orig f.rej f.diff f2.diff
62
63Index: patch-2.5.9/pch.c
64===================================================================
65--- patch-2.5.9.orig/pch.c
66+++ patch-2.5.9/pch.c
67@@ -68,6 +68,7 @@ static LINENUM p_sline; /* and the lin
68 static LINENUM p_hunk_beg; /* line number of current hunk */
69 static LINENUM p_efake = -1; /* end of faked up lines--don't free */
70 static LINENUM p_bfake = -1; /* beg of faked up lines */
71+static char *p_c_function; /* the C function a hunk is in */
72
73 enum nametype { OLD, NEW, INDEX, NONE };
74
75@@ -888,6 +889,19 @@ another_hunk (enum diff difftype, bool r
76 next_intuit_at(line_beginning,p_input_line);
77 return chars_read == (size_t) -1 ? -1 : 0;
78 }
79+ s = buf;
80+ while (*s == '*')
81+ s++;
82+ if (*s == ' ')
83+ {
84+ p_c_function = s;
85+ while (*s != '\n')
86+ s++;
87+ *s = '\0';
88+ p_c_function = savestr (p_c_function);
89+ }
90+ else
91+ p_c_function = NULL;
92 p_hunk_beg = p_input_line + 1;
93 while (p_end < p_max) {
94 chars_read = get_line ();
95@@ -1277,8 +1291,18 @@ another_hunk (enum diff difftype, bool r
96 else
97 p_repl_lines = 1;
98 if (*s == ' ') s++;
99- if (*s != '@')
100+ if (*s++ != '@')
101 malformed ();
102+ if (*s++ == '@' && *s == ' ' && *s != '\0')
103+ {
104+ p_c_function = s;
105+ while (*s != '\n')
106+ s++;
107+ *s = '\0';
108+ p_c_function = savestr (p_c_function);
109+ }
110+ else
111+ p_c_function = NULL;
112 if (!p_ptrn_lines)
113 p_first++; /* do append rather than insert */
114 if (!p_repl_lines)
115@@ -1884,6 +1908,12 @@ pch_hunk_beg (void)
116 return p_hunk_beg;
117 }
118
119+char const *
120+pch_c_function (void)
121+{
122+ return p_c_function;
123+}
124+
125 /* Is the newline-terminated line a valid `ed' command for patch
126 input? If so, return the command character; if not, return 0.
127 This accepts accepts just a subset of the valid commands, but it's
128Index: patch-2.5.9/pch.h
129===================================================================
130--- patch-2.5.9.orig/pch.h
131+++ patch-2.5.9/pch.h
132@@ -25,6 +25,7 @@
133 LINENUM pch_end (void);
134 LINENUM pch_first (void);
135 LINENUM pch_hunk_beg (void);
136+char const *pch_c_function (void);
137 LINENUM pch_newfirst (void);
138 LINENUM pch_prefix_context (void);
139 LINENUM pch_ptrn_lines (void);
140Index: patch-2.5.9/patch.man
141===================================================================
142--- patch-2.5.9.orig/patch.man
143+++ patch-2.5.9/patch.man
144@@ -517,6 +517,9 @@ instead of the default
145 .B \&.rej
146 file.
147 .TP
148+\fB\*=reject\-unified\fP
149+Produce unified reject files. The default is to produce context type reject files.
150+.TP
151 \fB\-R\fP or \fB\*=reverse\fP
152 Assume that this patch was created with the old and new files swapped.
153 (Yes, I'm afraid that does happen occasionally, human nature being what it
154Index: patch-2.5.9/common.h
155===================================================================
156--- patch-2.5.9.orig/common.h
157+++ patch-2.5.9/common.h
158@@ -146,6 +146,7 @@ XTERN int invc;
159 XTERN struct stat instat;
160 XTERN bool dry_run;
161 XTERN bool posixly_correct;
162+XTERN bool unified_reject_files;
163
164 XTERN char const *origprae;
165 XTERN char const *origbase;
166Index: patch-2.5.9/patch.c
167===================================================================
168--- patch-2.5.9.orig/patch.c
169+++ patch-2.5.9/patch.c
170@@ -522,6 +522,7 @@ static struct option const longopts[] =
171 {"no-backup-if-mismatch", no_argument, NULL, CHAR_MAX + 6},
172 {"posix", no_argument, NULL, CHAR_MAX + 7},
173 {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
174+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
175 {NULL, no_argument, NULL, 0}
176 };
177
178@@ -580,6 +581,7 @@ static char const *const option_help[] =
179 " --verbose Output extra information about the work being done.",
180 " --dry-run Do not actually change any files; just print what would happen.",
181 " --posix Conform to the POSIX standard.",
182+" --unified-reject-files Create unified reject files.",
183 "",
184 " -d DIR --directory=DIR Change the working directory to DIR first.",
185 #if HAVE_SETMODE_DOS
186@@ -779,6 +781,9 @@ get_some_switches (void)
187 (enum quoting_style) i);
188 }
189 break;
190+ case CHAR_MAX + 9:
191+ unified_reject_files = true;
192+ break;
193 default:
194 usage (stderr, 2);
195 }
196@@ -927,6 +932,24 @@ locate_hunk (LINENUM fuzz)
197 return 0;
198 }
199
200+static char *
201+format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
202+ LINENUM first, LINENUM lines)
203+{
204+ if (lines == 1)
205+ rangebuf = format_linenum (rangebuf, first);
206+ else
207+ {
208+ char *rb;
209+ rangebuf = format_linenum (rangebuf + LINENUM_LENGTH_BOUND + 1, lines);
210+ rb = rangebuf-1;
211+ rangebuf = format_linenum (rangebuf - LINENUM_LENGTH_BOUND - 1,
212+ (lines > 0) ? first : 0);
213+ *rb = ',';
214+ }
215+ return rangebuf;
216+}
217+
218 /* We did not find the pattern, dump out the hunk so they can handle it. */
219
220 static void
221@@ -943,8 +966,83 @@ abort_hunk (void)
222 (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ****" : "";
223 char const *minuses =
224 (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ----" : " -----";
225+ char const *function = pch_c_function();
226+ if (function == NULL)
227+ function = "";
228+
229+ if (unified_reject_files)
230+ {
231+ /* produce unified reject files */
232+ char rangebuf0[LINENUM_LENGTH_BOUND*2 + 2];
233+ char rangebuf1[LINENUM_LENGTH_BOUND*2 + 2];
234+ LINENUM j;
235+
236+ /* Find the beginning of the remove and insert section. */
237+ for (j = 0; j <= pat_end; j++)
238+ if (pch_char (j) == '=')
239+ break;
240+ for (i = j+1; i <= pat_end; i++)
241+ if (pch_char (i) == '^')
242+ break;
243+ if (pch_char (0) != '*' || j > pat_end || i > pat_end+1)
244+ fatal ("internal error in abort_hunk");
245+ i = 1; j++;
246+
247+ /* @@ -from,lines +to,lines @@ */
248+ fprintf (rejfp, "@@ -%s +%s @@%s\n",
249+ format_linerange (rangebuf0, oldfirst, pch_ptrn_lines()),
250+ format_linerange (rangebuf1, newfirst, pch_repl_lines()),
251+ function);
252+
253+ while ( (i <= pat_end && pch_char (i) != '=')
254+ || (j <= pat_end && pch_char (j) != '^'))
255+ {
256+ if (i <= pat_end
257+ && (pch_char (i) == '-' || pch_char (i) == '!'))
258+ {
259+ fputc('-', rejfp);
260+ pch_write_line (i++, rejfp);
261+ }
262+ else if (j <= pat_end
263+ && (pch_char (j) == '+' || pch_char (j) == '!'))
264+ {
265+ fputc('+', rejfp);
266+ pch_write_line (j++, rejfp);
267+ }
268+ else if ((i <= pat_end
269+ && (pch_char (i) == ' ' || pch_char (i) == '\n')) &&
270+ (j > pat_end
271+ || (pch_char (j) == ' ' || pch_char (j) == '\n')))
272+ {
273+ /* Unless j is already past the end, lines i and j
274+ must be equal here. */
275+
276+ if (pch_char (i) == ' ')
277+ fputc(' ', rejfp);
278+ pch_write_line (i++, rejfp);
279+ if (j <= pat_end)
280+ j++;
281+ }
282+ else if ((j <= pat_end &&
283+ (pch_char (j) == ' ' || pch_char (j) == '\n')) &&
284+ (pch_char (i) == '='))
285+ {
286+ if (pch_char (j) == ' ')
287+ fputc(' ', rejfp);
288+ pch_write_line (j++, rejfp);
289+ }
290+ else
291+ fatal ("internal error in abort_hunk");
292+ }
293+
294+ if (ferror (rejfp))
295+ write_fatal ();
296+ return;
297+ }
298
299- fprintf(rejfp, "***************\n");
300+ /* produce context type reject files */
301+
302+ fprintf(rejfp, "***************%s\n", function);
303 for (i=0; i<=pat_end; i++) {
304 char numbuf0[LINENUM_LENGTH_BOUND + 1];
305 char numbuf1[LINENUM_LENGTH_BOUND + 1];
diff --git a/meta/recipes-devtools/patch/patch.inc b/meta/recipes-devtools/patch/patch.inc
new file mode 100644
index 0000000000..4ce51703aa
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch.inc
@@ -0,0 +1,19 @@
1DESCRIPTION = "patch takes a patch file containing a difference listing \
2produced by the diff program and applies those differences to one or more \
3original files, producing patched versions."
4LICENSE = "GPL"
5PRIORITY = "standard"
6SECTION = "utils"
7
8SRC_URI = "${GNU_MIRROR}/patch/patch-${PV}.tar.gz"
9S = "${WORKDIR}/patch-${PV}"
10
11inherit autotools update-alternatives
12
13do_install_append () {
14 mv ${D}${bindir}/patch ${D}${bindir}/patch.${PN}
15}
16
17ALTERNATIVE_NAME = "patch"
18ALTERNATIVE_PATH = "patch.${PN}"
19ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-devtools/patch/patch_2.5.9.bb b/meta/recipes-devtools/patch/patch_2.5.9.bb
new file mode 100644
index 0000000000..ff485546fc
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch_2.5.9.bb
@@ -0,0 +1,10 @@
1require patch.inc
2
3SRC_URI = "${GNU_MIRROR}/patch/patch-2.5.4.tar.gz \
4 file://2.5.9.patch;patch=1 \
5 file://debian.patch;patch=1 \
6 file://install.patch;patch=1 \
7 file://unified-reject-files.diff;patch=1 \
8 file://global-reject-file.diff;patch=1 "
9S = "${WORKDIR}/patch-2.5.4"
10PR = "r2" \ No newline at end of file
diff --git a/meta/recipes-devtools/pax-utils/pax-utils_0.2.1.bb b/meta/recipes-devtools/pax-utils/pax-utils_0.2.1.bb
new file mode 100644
index 0000000000..f450f32f1c
--- /dev/null
+++ b/meta/recipes-devtools/pax-utils/pax-utils_0.2.1.bb
@@ -0,0 +1,13 @@
1DESCRIPTION = "pax-utils is a small set of various PaX aware and related utilities for ELF binaries. PaX's main goal is to research various defense mechanisms against the exploitation of software bugs that give an attacker arbitrary read/write access to the attacked task's address space"
2HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
3LICENSE = "GPLv2+"
4
5SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.bz2"
6
7PR = "r0"
8
9do_install() {
10 oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
11}
12
13BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/perl/files/Configure-multilib.patch b/meta/recipes-devtools/perl/files/Configure-multilib.patch
new file mode 100644
index 0000000000..d3948a92c0
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/Configure-multilib.patch
@@ -0,0 +1,11 @@
1--- perl-5.8.7/Configure.orig 2006-01-30 10:50:04.000000000 +0000
2+++ perl-5.8.7/Configure 2006-01-30 10:51:18.000000000 +0000
3@@ -1240,7 +1240,7 @@
4 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
5
6 : general looking path for locating libraries
7-glibpth="/lib /usr/lib $xlibpth"
8+glibpth="/lib /usr/lib /lib64 /usr/lib64 $xlibpth"
9 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
10 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
11 test -f /shlib/libc.so && glibpth="/shlib $glibpth"
diff --git a/meta/recipes-devtools/perl/files/letgcc-find-errno.patch b/meta/recipes-devtools/perl/files/letgcc-find-errno.patch
new file mode 100644
index 0000000000..24722ee964
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/letgcc-find-errno.patch
@@ -0,0 +1,42 @@
1This removes all the logic that perl uses to locate an appropriate
2errno.h for the target. Instead we simple create a file that does
3
4 #include "errno.h"
5
6and use that as the file to parse. This is needed when using an
7external toolchain since perl will search in ${STAGING_INCDIR} for
8errno.h (when using gcc) and that isn't where it's located - its
9wherever the external toolchain keeps it's headers.
10
11--- perl-5.8.8/ext/Errno/Errno_pm.PL 2007/04/30 14:10:10 1.1
12+++ perl-5.8.8/ext/Errno/Errno_pm.PL 2007/04/30 14:21:35
13@@ -11,8 +11,18 @@
14 open OUT, ">Errno.pm" or die "Cannot open Errno.pm: $!";
15 select OUT;
16 my $file;
17-my @files = get_files();
18-if ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
19+#my @files = get_files();
20+my @files = ("errno.h");
21+
22+if (1) {
23+ open INCS, '>includes.c' or
24+ die "Cannot open includes.c";
25+ print INCS qq[#include "errno.h"\n];
26+ close INCS;
27+ process_file('includes.c');
28+ unlink 'includes.c';
29+}
30+elsif ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
31 # MinGW complains "warning: #pragma system_header ignored outside include
32 # file" if the header files are processed individually, so include them
33 # all in .c file and process that instead.
34@@ -44,7 +54,7 @@
35 chomp($file = `cygpath -w "$file"`);
36 }
37
38- return unless defined $file and -f $file;
39+# return unless defined $file and -f $file;
40 # warn "Processing $file\n";
41
42 local *FH;
diff --git a/meta/recipes-devtools/perl/files/libperl-5.8.3-create-libperl-soname.patch b/meta/recipes-devtools/perl/files/libperl-5.8.3-create-libperl-soname.patch
new file mode 100644
index 0000000000..6b34ec2318
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/libperl-5.8.3-create-libperl-soname.patch
@@ -0,0 +1,11 @@
1--- Makefile.SH.orig 2003-07-10 14:59:04.000000000 -0700
2+++ Makefile.SH 2003-07-10 15:14:08.000000000 -0700
3@@ -494,7 +494,7 @@
4 case "$useshrplib" in
5 true)
6 $spitshell >>Makefile <<'!NO!SUBS!'
7- $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
8+ $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs) -soname libperl.so.5
9 !NO!SUBS!
10 case "$osname" in
11 aix)
diff --git a/meta/recipes-devtools/perl/files/perl-5.8.8-gcc-4.2.patch b/meta/recipes-devtools/perl/files/perl-5.8.8-gcc-4.2.patch
new file mode 100644
index 0000000000..653a4758f4
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-5.8.8-gcc-4.2.patch
@@ -0,0 +1,13 @@
1See http://bugs.openembedded.net/show_bug.cgi?id=2168
2Fix for gcc 4.2
3
4--- perl-5.8.8/makedepend.SH.ark 2006-11-01 16:32:05.000000000 +0100
5+++ perl-5.8.8/makedepend.SH 2006-11-01 16:32:15.000000000 +0100
6@@ -167,6 +167,7 @@
7 -e '/^#.*<builtin>/d' \
8 -e '/^#.*<built-in>/d' \
9 -e '/^#.*<command line>/d' \
10+ -e '/^#.*<command-line>/d' \
11 -e '/^#.*"-"/d' \
12 -e '/: file path prefix .* never used$/d' \
13 -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl-native_2.36.bb b/meta/recipes-devtools/perl/libxml-parser-perl-native_2.36.bb
new file mode 100644
index 0000000000..6ba56b3b89
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-parser-perl-native_2.36.bb
@@ -0,0 +1,7 @@
1SECTION = "libs"
2
3require libxml-parser-perl_${PV}.bb
4
5inherit native
6
7DEPENDS = "expat-native perl-native" \ No newline at end of file
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
new file mode 100644
index 0000000000..818840504a
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
@@ -0,0 +1,21 @@
1SECTION = "libs"
2LICENSE = "Artistic"
3DEPENDS += "expat expat-native"
4
5SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
6
7S = "${WORKDIR}/XML-Parser-${PV}"
8
9EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
10
11inherit cpan
12
13do_compile() {
14 export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
15 cpan_do_compile
16}
17
18
19
20FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
21 ${PERLLIBDIRS}/XML"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl-native_2.18.bb b/meta/recipes-devtools/perl/libxml-simple-perl-native_2.18.bb
new file mode 100644
index 0000000000..bfdfc3de45
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-simple-perl-native_2.18.bb
@@ -0,0 +1,7 @@
1SECTION = "libs"
2
3inherit native
4
5require libxml-simple-perl_${PV}.bb
6
7DEPENDS = "libxml-parser-perl-native perl-native"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.18.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.18.bb
new file mode 100644
index 0000000000..6cab76bf1e
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.18.bb
@@ -0,0 +1,10 @@
1SECTION = "libs"
2LICENSE = "Artistic"
3DEPENDS += "libxml-parser-perl"
4PR = "r0"
5
6SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
7
8S = "${WORKDIR}/XML-Simple-${PV}"
9
10inherit cpan
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/09_fix_installperl.patch b/meta/recipes-devtools/perl/perl-5.8.8/09_fix_installperl.patch
new file mode 100644
index 0000000000..f550537d02
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/09_fix_installperl.patch
@@ -0,0 +1,32 @@
1Correctly identify arch-specific modules in ext/ where the .pm files
2are under lib.
3
4Ensure that POSIX/SigAction is kept with the rest of the POSIX module
5under archlib.
6
7diff --exclude=debian -Naur perl-5.8.8.orig/installperl perl-5.8.8/installperl
8--- perl-5.8.8.orig/installperl 2006-01-29 02:35:28.000000000 +1100
9+++ perl-5.8.8/installperl 2006-05-31 22:54:41.000000000 +1000
10@@ -156,11 +156,8 @@
11 if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
12 my($path, $modname) = ($1,$2);
13
14- # strip trailing component first
15- $path =~ s{/[^/]*$}{};
16-
17- # strip optional "/lib";
18- $path =~ s{/lib\b}{};
19+ # strip to optional "/lib", or remove trailing component
20+ $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
21
22 # strip any leading /
23 $path =~ s{^/}{};
24@@ -851,7 +848,7 @@
25 }
26
27 if (-f $_) {
28- if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$] && $archpms{$1})) {
29+ if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$])) {
30 $installlib = $installprivlib;
31 #We're installing *.al and *.ix files into $installprivlib,
32 #but we have to delete old *.al and *.ix files from the 5.000
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/52_debian_extutils_hacks.patch b/meta/recipes-devtools/perl/perl-5.8.8/52_debian_extutils_hacks.patch
new file mode 100644
index 0000000000..8a964f9338
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/52_debian_extutils_hacks.patch
@@ -0,0 +1,234 @@
1Various debian-specific ExtUtils changes:
2
3 * Respect umask during installation, and set as appropriate for each of
4 perl, vendor and site (policy requires group writable site dirs).
5
6 * Don't install .packlist or perllocal.pod for perl or vendor.
7 * Fiddle with *PREFIX and variables written to the makefile so that
8 install directories may be changed when make is run by passing
9 PREFIX= to the "make install" command (used when packaging
10 modules).
11
12 * Set location of libperl.a to /usr/lib.
13 * Note that libperl-dev package is required for embedded linking.
14
15diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Embed.pm perl-5.8.8/lib/ExtUtils/Embed.pm
16--- perl-5.8.8.orig/lib/ExtUtils/Embed.pm 2004-08-03 20:41:49.000000000 +1000
17+++ perl-5.8.8/lib/ExtUtils/Embed.pm 2006-02-05 10:42:11.000000000 +1100
18@@ -300,6 +300,9 @@
19 Typically, an application B<Makefile> will invoke ExtUtils::Embed
20 functions while building your application.
21
22+Note that on Debian systems the B<libperl-dev> package is required for
23+compiling applications which embed an interpreter.
24+
25 =head1 @EXPORT
26
27 ExtUtils::Embed exports the following functions:
28diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Install.pm perl-5.8.8/lib/ExtUtils/Install.pm
29--- perl-5.8.8.orig/lib/ExtUtils/Install.pm 2005-10-21 22:00:01.000000000 +1000
30+++ perl-5.8.8/lib/ExtUtils/Install.pm 2006-02-05 10:42:11.000000000 +1100
31@@ -173,8 +173,8 @@
32 if (-f $targetfile){
33 forceunlink($targetfile) unless $nonono;
34 } else {
35- mkpath($targetdir,0,0755) unless $nonono;
36- print "mkpath($targetdir,0,0755)\n" if $verbose>1;
37+ mkpath($targetdir) unless $nonono;
38+ print "mkpath($targetdir)\n" if $verbose>1;
39 }
40 copy($sourcefile, $targetfile) unless $nonono;
41 print "Installing $targetfile\n";
42diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm perl-5.8.8/lib/ExtUtils/MM_Any.pm
43--- perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm 2005-04-13 17:49:53.000000000 +1000
44+++ perl-5.8.8/lib/ExtUtils/MM_Any.pm 2006-02-05 11:17:52.000000000 +1100
45@@ -645,8 +645,6 @@
46 sub manifypods_target {
47 my($self) = shift;
48
49- my $man1pods = '';
50- my $man3pods = '';
51 my $dependencies = '';
52
53 # populate manXpods & dependencies:
54@@ -666,7 +664,7 @@
55 foreach my $section (qw(1 3)) {
56 my $pods = $self->{"MAN${section}PODS"};
57 push @man_cmds, $self->split_command(<<CMD, %$pods);
58- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
59+ \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW)
60 CMD
61 }
62
63@@ -1080,9 +1078,11 @@
64 $self->{SITEPREFIX} ||= $sprefix;
65 $self->{VENDORPREFIX} ||= $vprefix;
66
67- # Lots of MM extension authors like to use $(PREFIX) so we
68- # put something sensible in there no matter what.
69- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
70+ my $p = $self->{PREFIX} = $self->{PERLPREFIX};
71+ for my $t (qw/PERL SITE VENDOR/)
72+ {
73+ $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!;
74+ }
75 }
76
77 my $arch = $Config{archname};
78diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
79--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
80+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
81@@ -2054,9 +2054,7 @@
82 $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
83
84 pure_perl_install ::
85- $(NOECHO) $(MOD_INSTALL) \
86- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
87- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
88+ $(NOECHO) umask 022; $(MOD_INSTALL) \
89 $(INST_LIB) $(DESTINSTALLPRIVLIB) \
90 $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
91 $(INST_BIN) $(DESTINSTALLBIN) \
92@@ -2068,7 +2066,7 @@
93
94
95 pure_site_install ::
96- $(NOECHO) $(MOD_INSTALL) \
97+ $(NOECHO) umask 02; $(MOD_INSTALL) \
98 read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
99 write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
100 $(INST_LIB) $(DESTINSTALLSITELIB) \
101@@ -2081,9 +2079,7 @@
102 }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
103
104 pure_vendor_install ::
105- $(NOECHO) $(MOD_INSTALL) \
106- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
107- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
108+ $(NOECHO) umask 022; $(MOD_INSTALL) \
109 $(INST_LIB) $(DESTINSTALLVENDORLIB) \
110 $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
111 $(INST_BIN) $(DESTINSTALLVENDORBIN) \
112@@ -2092,37 +2088,19 @@
113 $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
114
115 doc_perl_install ::
116- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
117- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
118- -$(NOECHO) $(DOC_INSTALL) \
119- "Module" "$(NAME)" \
120- "installed into" "$(INSTALLPRIVLIB)" \
121- LINKTYPE "$(LINKTYPE)" \
122- VERSION "$(VERSION)" \
123- EXE_FILES "$(EXE_FILES)" \
124- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
125
126 doc_site_install ::
127- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
128- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
129- -$(NOECHO) $(DOC_INSTALL) \
130+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
131+ -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
132+ -$(NOECHO) umask 02; $(DOC_INSTALL) \
133 "Module" "$(NAME)" \
134 "installed into" "$(INSTALLSITELIB)" \
135 LINKTYPE "$(LINKTYPE)" \
136 VERSION "$(VERSION)" \
137 EXE_FILES "$(EXE_FILES)" \
138- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
139+ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
140
141 doc_vendor_install ::
142- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
143- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
144- -$(NOECHO) $(DOC_INSTALL) \
145- "Module" "$(NAME)" \
146- "installed into" "$(INSTALLVENDORLIB)" \
147- LINKTYPE "$(LINKTYPE)" \
148- VERSION "$(VERSION)" \
149- EXE_FILES "$(EXE_FILES)" \
150- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
151
152 };
153
154@@ -2131,13 +2109,12 @@
155 $(NOECHO) $(NOOP)
156
157 uninstall_from_perldirs ::
158- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
159
160 uninstall_from_sitedirs ::
161 $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
162
163 uninstall_from_vendordirs ::
164- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
165+
166 };
167
168 join("",@m);
169@@ -2415,7 +2392,7 @@
170 ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
171 }
172 unless ($libperl && -f $lperl) { # Ilya's code...
173- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
174+ my $dir = $self->{PERL_SRC} || "/usr/lib";
175 $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
176 $libperl ||= "libperl$self->{LIB_EXT}";
177 $libperl = "$dir/$libperl";
178@@ -3007,8 +2984,7 @@
179 print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
180 print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
181
182- if( $self->{ARGS}{PREFIX} && $self->file_name_is_absolute($path) &&
183- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
184+ if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} )
185 {
186
187 print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
188diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST.t perl-5.8.8/lib/ExtUtils/t/INST.t
189--- perl-5.8.8.orig/lib/ExtUtils/t/INST.t 2005-10-21 19:12:39.000000000 +1000
190+++ perl-5.8.8/lib/ExtUtils/t/INST.t 2006-02-05 17:48:56.000000000 +1100
191@@ -65,9 +65,7 @@
192 is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
193 is( $mm->{VERSION}, 0.01, 'VERSION' );
194
195-my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
196- $Config{prefixexp} || $Config{prefix};
197-is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
198+is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' );
199
200 is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
201
202diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t
203--- perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t 2005-10-21 22:00:19.000000000 +1000
204+++ perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t 2006-02-05 17:48:06.000000000 +1100
205@@ -16,7 +16,7 @@
206 }
207
208 use strict;
209-use Test::More tests => 52;
210+use Test::More tests => 47;
211 use MakeMaker::Test::Utils;
212 use MakeMaker::Test::Setup::BFD;
213 use ExtUtils::MakeMaker;
214@@ -62,16 +62,16 @@
215 Writing\ $Makefile\ for\ Big::Dummy\n
216 }x );
217
218-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
219+#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
220
221 isa_ok( $mm, 'ExtUtils::MakeMaker' );
222
223 is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
224 is( $mm->{VERSION}, 0.01, 'VERSION' );
225
226-foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
227- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
228-}
229+#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
230+# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
231+#}
232
233
234 my $PREFIX = File::Spec->catdir('foo', 'bar');
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch b/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
new file mode 100644
index 0000000000..df74bc598d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
@@ -0,0 +1,107 @@
1Tweak @INC so that the ordering is:
2
3 etc (for config files)
4 site (5.8.1)
5 vendor (all)
6 core (5.8.1)
7 site (version-indep)
8 site (pre-5.8.1)
9
10The rationale being that an admin (via site), or module packager
11(vendor) can chose to shadow core modules when there is a newer
12version than is included in core.
13
14diff -Naur --exclude=debian perl-5.8.8.orig/perl.c perl-5.8.8/perl.c
15--- perl-5.8.8.orig/perl.c 2006-01-31 23:34:47.000000000 +1100
16+++ perl-5.8.8/perl.c 2006-02-02 23:36:38.000000000 +1100
17@@ -4776,9 +4776,14 @@
18 incpush(APPLLIB_EXP, TRUE, TRUE, TRUE);
19 #endif
20
21+#if 1
22+ /* for configuration where /usr is mounted ro (CPAN::Config, Net::Config) */
23+ incpush("/etc/perl", FALSE, FALSE, FALSE);
24+#else
25 #ifdef ARCHLIB_EXP
26 incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
27 #endif
28+#endif
29 #ifdef MACOS_TRADITIONAL
30 {
31 Stat_t tmpstatbuf;
32@@ -4803,11 +4808,13 @@
33 #ifndef PRIVLIB_EXP
34 # define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
35 #endif
36+#if 0
37 #if defined(WIN32)
38 incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE);
39 #else
40 incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
41 #endif
42+#endif
43
44 #ifdef SITEARCH_EXP
45 /* sitearch is always relative to sitelib on Windows for
46@@ -4850,6 +4857,61 @@
47 incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
48 #endif
49
50+#if 1
51+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
52+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
53+
54+ /* Non-versioned site directory for local modules and for
55+ compatability with the previous packages' site dirs */
56+ incpush("/usr/local/lib/site_perl", TRUE, FALSE, FALSE);
57+
58+#ifdef PERL_INC_VERSION_LIST
59+ {
60+ struct stat s;
61+
62+ /* add small buffer in case old versions are longer than the
63+ current version */
64+ char sitearch[sizeof(SITEARCH_EXP)+16] = SITEARCH_EXP;
65+ char sitelib[sizeof(SITELIB_EXP)+16] = SITELIB_EXP;
66+ char const *vers[] = { PERL_INC_VERSION_LIST };
67+ char const **p;
68+
69+ char *arch_vers = strrchr(sitearch, '/');
70+ char *lib_vers = strrchr(sitelib, '/');
71+
72+ if (arch_vers && isdigit(*++arch_vers))
73+ *arch_vers = 0;
74+ else
75+ arch_vers = 0;
76+
77+ if (lib_vers && isdigit(*++lib_vers))
78+ *lib_vers = 0;
79+ else
80+ lib_vers = 0;
81+
82+ /* there is some duplication here as incpush does something
83+ similar internally, but required as sitearch is not a
84+ subdirectory of sitelib */
85+ for (p = vers; *p; p++)
86+ {
87+ if (arch_vers)
88+ {
89+ strcpy(arch_vers, *p);
90+ if (PerlLIO_stat(sitearch, &s) >= 0 && S_ISDIR(s.st_mode))
91+ incpush(sitearch, FALSE, FALSE, FALSE);
92+ }
93+
94+ if (lib_vers)
95+ {
96+ strcpy(lib_vers, *p);
97+ if (PerlLIO_stat(sitelib, &s) >= 0 && S_ISDIR(s.st_mode))
98+ incpush(sitelib, FALSE, FALSE, FALSE);
99+ }
100+ }
101+ }
102+#endif
103+#endif
104+
105 #ifdef PERL_OTHERLIBDIRS
106 incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE);
107 #endif
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/54_debian_perldoc-r.patch b/meta/recipes-devtools/perl/perl-5.8.8/54_debian_perldoc-r.patch
new file mode 100644
index 0000000000..432cd857a7
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/54_debian_perldoc-r.patch
@@ -0,0 +1,16 @@
1In a Debian installation, not all directories in @INC need exist (the
2site directories for example are created on demand).
3
4Suggested by Joey Hess <joeyh@debian.org>.
5
6diff -Naur --exclude=debian perl-5.8.8.orig/lib/Pod/Perldoc.pm perl-5.8.8/lib/Pod/Perldoc.pm
7--- perl-5.8.8.orig/lib/Pod/Perldoc.pm 2004-12-29 23:15:33.000000000 +1100
8+++ perl-5.8.8/lib/Pod/Perldoc.pm 2006-02-02 23:38:49.000000000 +1100
9@@ -1533,6 +1533,7 @@
10 $self->{'target'} = (splitdir $s)[-1]; # XXX: why not use File::Basename?
11 for ($i=0; $i<@dirs; $i++) {
12 $dir = $dirs[$i];
13+ next unless -d $dir; # some dirs in @INC are optional
14 ($dir = VMS::Filespec::unixpath($dir)) =~ s!/\z!! if IS_VMS;
15 if ( (! $self->opt_m && ( $ret = $self->check_file($dir,"$s.pod")))
16 or ( $ret = $self->check_file($dir,"$s.pm"))
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/58_debian_cpan_config_path.patch b/meta/recipes-devtools/perl/perl-5.8.8/58_debian_cpan_config_path.patch
new file mode 100644
index 0000000000..b38c70c515
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/58_debian_cpan_config_path.patch
@@ -0,0 +1,14 @@
1Set location of CPAN::Config to /etc/perl as /usr may not be writable.
2
3diff -Naur --exclude=debian perl-5.8.8.orig/lib/CPAN.pm perl-5.8.8/lib/CPAN.pm
4--- perl-5.8.8.orig/lib/CPAN.pm 2006-02-01 01:11:22.000000000 +1100
5+++ perl-5.8.8/lib/CPAN.pm 2006-02-02 23:49:26.000000000 +1100
6@@ -1246,7 +1246,7 @@
7 $configpm = $INC{"CPAN/MyConfig.pm"};
8 $redo++;
9 } else {
10- my($path_to_cpan) = File::Basename::dirname($INC{"CPAN.pm"});
11+ my($path_to_cpan) = '/etc/perl';
12 my($configpmdir) = File::Spec->catdir($path_to_cpan,"CPAN");
13 my($configpmtest) = File::Spec->catfile($configpmdir,"Config.pm");
14 if (-d $configpmdir or File::Path::mkpath($configpmdir)) {
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/60_debian_libnet_config_path.patch b/meta/recipes-devtools/perl/perl-5.8.8/60_debian_libnet_config_path.patch
new file mode 100644
index 0000000000..7842ce115c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/60_debian_libnet_config_path.patch
@@ -0,0 +1,16 @@
1Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable.
2
3diff -Naur --exclude=debian perl-5.8.8.orig/lib/Net/Config.pm perl-5.8.8/lib/Net/Config.pm
4--- perl-5.8.8.orig/lib/Net/Config.pm 2002-03-01 01:04:31.000000000 +1100
5+++ perl-5.8.8/lib/Net/Config.pm 2006-02-03 00:00:55.000000000 +1100
6@@ -57,9 +57,8 @@
7 }
8 TRY_INTERNET_CONFIG
9
10-my $file = __FILE__;
11+my $file = '/etc/perl/Net/libnet.cfg';
12 my $ref;
13-$file =~ s/Config.pm/libnet.cfg/;
14 if ( -f $file ) {
15 $ref = eval { local $SIG{__DIE__}; do $file };
16 if (ref($ref) eq 'HASH') {
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/62_debian_cpan_definstalldirs.patch b/meta/recipes-devtools/perl/perl-5.8.8/62_debian_cpan_definstalldirs.patch
new file mode 100644
index 0000000000..682061dd8b
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/62_debian_cpan_definstalldirs.patch
@@ -0,0 +1,16 @@
1Some modules which are included in core set INSTALLDIRS => 'perl'
2explicitly in Makefile.PL. This makes sense for the normal @INC
3ordering, but not ours. Provide a sensible default.
4
5diff -Naur --exclude=debian perl-5.8.8.orig/lib/CPAN/FirstTime.pm perl-5.8.8/lib/CPAN/FirstTime.pm
6--- perl-5.8.8.orig/lib/CPAN/FirstTime.pm 2006-01-31 08:08:57.000000000 +1100
7+++ perl-5.8.8/lib/CPAN/FirstTime.pm 2006-02-03 00:05:24.000000000 +1100
8@@ -358,7 +358,7 @@
9
10 };
11
12- $default = $CPAN::Config->{makepl_arg} || "";
13+ $default = $CPAN::Config->{makepl_arg} || "INSTALLDIRS=site";
14 $CPAN::Config->{makepl_arg} =
15 prompt("Parameters for the 'perl Makefile.PL' command?
16 Typical frequently used settings:
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/64_debian_enc2xs_inc.patch b/meta/recipes-devtools/perl/perl-5.8.8/64_debian_enc2xs_inc.patch
new file mode 100644
index 0000000000..c207a9380a
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/64_debian_enc2xs_inc.patch
@@ -0,0 +1,28 @@
1Tweak enc2xs to handle Debian @INC: ignore missing directories,
2follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
3
4diff -Naur --exclude=debian perl-5.8.8.orig/ext/Encode/bin/enc2xs perl-5.8.8/ext/Encode/bin/enc2xs
5--- perl-5.8.8.orig/ext/Encode/bin/enc2xs 2004-09-03 01:53:51.000000000 +1000
6+++ perl-5.8.8/ext/Encode/bin/enc2xs 2006-02-03 00:21:32.000000000 +1100
7@@ -909,10 +909,11 @@
8 eval { require File::Find; };
9 my (@inc, %e2x_dir);
10 for my $inc (@INC){
11+ next unless -d $inc; # skip non-existent directories
12 push @inc, $inc unless $inc eq '.'; #skip current dir
13 }
14 File::Find::find(
15- sub {
16+ { wanted => sub {
17 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
18 $atime,$mtime,$ctime,$blksize,$blocks)
19 = lstat($_) or return;
20@@ -922,7 +923,7 @@
21 $e2x_dir{$File::Find::dir} ||= $mtime;
22 }
23 return;
24- }, @inc);
25+ }, follow => 1}, @inc);
26 warn join("\n", keys %e2x_dir), "\n";
27 for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
28 $_E2X = $d;
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/Makefile.SH.patch b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.SH.patch
new file mode 100644
index 0000000000..ab9c4b7d63
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.SH.patch
@@ -0,0 +1,253 @@
1Index: perl-5.8.8/Makefile.SH
2===================================================================
3--- perl-5.8.8.orig/Makefile.SH 2006-01-24 23:49:44.000000000 +1100
4+++ perl-5.8.8/Makefile.SH 2007-06-14 13:29:37.000000000 +1000
5@@ -43,12 +43,12 @@
6 true)
7 # Prefix all runs of 'miniperl' and 'perl' with
8 # $ldlibpth so that ./perl finds *this* shared libperl.
9- case "$LD_LIBRARY_PATH" in
10- '')
11- ldlibpth="LD_LIBRARY_PATH=`pwd`";;
12- *)
13- ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
14- esac
15+# case "$LD_LIBRARY_PATH" in
16+# '')
17+# ldlibpth="LD_LIBRARY_PATH=`pwd`";;
18+# *)
19+# ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
20+# esac
21
22 pldlflags="$cccdlflags"
23 static_target='static_pic'
24@@ -108,7 +108,8 @@
25 ldlibpth=''
26 ;;
27 *)
28- eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
29+# We compile in the library path in OE from cross-compile, so lets not do this
30+# eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
31 ;;
32 esac
33 # Strip off any trailing :'s
34@@ -129,18 +130,7 @@
35 # INSTALL file, under "Building a shared perl library".
36 # If there is no pre-existing $libperl, we don't need
37 # to do anything further.
38- if test -f $archlib/CORE/$libperl; then
39- rm -f preload
40- cat <<'EOT' > preload
41-#! /bin/sh
42-lib=$1
43-shift
44-test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
45-exec "$@"
46-EOT
47- chmod 755 preload
48- ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
49- fi
50+ echo linux libraries overwritten by cross-compile patches
51 ;;
52 os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
53 ;;
54@@ -401,9 +391,19 @@
55 .c.s:
56 $(CCCMDSRC) -S $*.c
57
58-all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
59- @echo " ";
60- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
61+#all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
62+# @echo " ";
63+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
64+
65+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) $(unidatafiles)
66+
67+more: extra.pods $(private) $(public)
68+
69+more2: $(dynamic_ext)
70+
71+more3: $(nonxs_ext)
72+
73+more4: extras.make
74
75 .PHONY: all compile translators utilities
76
77@@ -413,10 +413,10 @@
78 cd x2p; $(MAKE) compile;
79 cd pod; $(MAKE) compile;
80
81-translators: miniperl$(EXE_EXT) $(CONFIGPM) FORCE
82+translators: $(CONFIGPM) FORCE
83 @echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
84
85-utilities: miniperl$(EXE_EXT) $(CONFIGPM) $(plextract) lib/lib.pm FORCE
86+utilities: $(CONFIGPM) $(plextract) lib/lib.pm FORCE
87 @echo " "; echo " Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
88
89
90@@ -550,7 +550,7 @@
91 case "$useshrplib" in
92 true)
93 $spitshell >>Makefile <<'!NO!SUBS!'
94- $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
95+ $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs) -Wl,-soname,libperl.so.5
96 !NO!SUBS!
97 case "$osname" in
98 aix)
99@@ -591,7 +591,9 @@
100 $(CC) -o miniperl $(CLDFLAGS) \
101 `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
102 miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
103- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
104+ mv -f miniperl miniperl-target
105+ ln -s hostperl miniperl
106+# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
107 !NO!SUBS!
108 ;;
109 next4*)
110@@ -599,7 +601,9 @@
111 miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
112 $(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
113 miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
114- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
115+ mv -f miniperl miniperl-target
116+ ln -s hostperl miniperl
117+# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
118 !NO!SUBS!
119 ;;
120 darwin*)
121@@ -620,7 +624,9 @@
122 -@rm -f miniperl.xok
123 $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \
124 miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
125- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
126+ mv -f miniperl miniperl-target
127+ ln -s hostperl miniperl
128+# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
129 !NO!SUBS!
130 ;;
131 *)
132@@ -629,7 +635,9 @@
133 -@rm -f miniperl.xok
134 $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
135 miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
136- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
137+ mv -f miniperl miniperl-target
138+ ln -s hostperl miniperl
139+# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
140 !NO!SUBS!
141 ;;
142 esac
143@@ -766,7 +774,7 @@
144 # We need to autosplit in two steps because VOS can't handle so many args
145 #
146 .PHONY: preplibrary
147-preplibrary: miniperl$(EXE_EXT) $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
148+preplibrary: $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
149 @sh ./makedir lib/auto
150 @echo " AutoSplitting perl library"
151 $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
152@@ -775,35 +783,35 @@
153 autosplit_lib_modules(@ARGV)' lib/*/*.pm
154 $(MAKE) lib/re.pm
155
156-lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
157+lib/Config.pod: config.sh configpm Porting/Glossary
158 $(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm
159
160 $(CONFIGPM): lib/Config.pod
161
162-lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
163+lib/ExtUtils/Miniperl.pm: miniperlmain.c minimod.pl $(CONFIGPM)
164 $(LDLIBPTH) ./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
165
166 lib/re.pm: ext/re/re.pm
167 cp ext/re/re.pm lib/re.pm
168
169-$(plextract): miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p
170+$(plextract): $(CONFIGPM) x2p/s2p
171 @-rm -f $@
172 $(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
173
174-x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL
175+x2p/s2p: $(CONFIGPM) x2p/s2p.PL
176 cd x2p; $(LDLIBPTH) $(MAKE) s2p
177
178-lib/lib.pm: miniperl$(EXE_EXT) $(CONFIGPM)
179+lib/lib.pm: $(CONFIGPM)
180 @-rm -f $@
181 $(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL
182
183 unidatafiles $(unidatafiles): uni.data
184
185-uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
186+uni.data: $(CONFIGPM) lib/unicore/mktables
187 cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
188 touch uni.data
189
190-extra.pods: miniperl$(EXE_EXT)
191+extra.pods:
192 -@test -f extra.pods && rm -f `cat extra.pods`
193 -@rm -f extra.pods
194 -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
195@@ -850,18 +858,7 @@
196 INSTALL_DEPENDENCE = all
197
198 install.perl: $(INSTALL_DEPENDENCE) installperl
199- if [ -n "$(COMPILE)" ]; \
200- then \
201- cd utils; $(MAKE) compile; \
202- cd ../x2p; $(MAKE) compile; \
203- cd ../pod; $(MAKE) compile; \
204- else :; \
205- fi
206- $(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
207- $(MAKE) extras.install
208-
209-install.man: all installman
210- $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
211+ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
212
213 # XXX Experimental. Hardwired values, but useful for testing.
214 # Eventually Configure could ask for some of these values.
215@@ -978,16 +975,16 @@
216 #
217 # DynaLoader may be needed for extensions that use Makefile.PL.
218
219-$(DYNALOADER): miniperl$(EXE_EXT) preplibrary FORCE
220+$(DYNALOADER): preplibrary FORCE
221 @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
222
223-d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
224+d_dummy $(dynamic_ext): preplibrary $(DYNALOADER) FORCE
225 @$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
226
227-s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
228+s_dummy $(static_ext): preplibrary $(DYNALOADER) FORCE
229 @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
230
231-n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
232+n_dummy $(nonxs_ext): preplibrary $(DYNALOADER) FORCE
233 @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
234
235 .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
236@@ -1125,7 +1122,7 @@
237
238 test_prep_pre: preplibrary utilities $(nonxs_ext)
239
240-test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
241+test_prep: test_prep_pre $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
242 PERL=./perl $(MAKE) _test_prep
243
244 _test_tty:
245@@ -1238,7 +1235,7 @@
246
247 # Can't depend on lib/Config.pm because that might be where miniperl
248 # is crashing.
249-minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
250+minitest: lib/re.pm minitest.prep
251 - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
252 && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
253
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/Makefile.patch b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.patch
new file mode 100644
index 0000000000..ed494b3287
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.patch
@@ -0,0 +1,61 @@
1Index: perl-5.8.8/Cross/Makefile
2===================================================================
3--- perl-5.8.8.orig/Cross/Makefile 2004-01-12 21:44:01.000000000 +0100
4+++ perl-5.8.8/Cross/Makefile 2007-08-15 00:15:18.000000000 +0200
5@@ -2,7 +2,8 @@
6 #
7 ## $Id: Makefile,v 1.7 2004/01/12 15:41:02 red Exp red $
8
9-export TOPDIR=${shell pwd}
10+override TOPDIR=${shell pwd}
11+export TOPDIR
12 include $(TOPDIR)/config
13 export CFLAGS
14 export SYS=$(ARCH)-$(OS)
15@@ -12,7 +13,7 @@
16
17 export CC = $(CROSS)gcc
18 export CXX = $(CROSS)g++
19-export LD = $(CROSS)ld
20+export LD = $(CC)
21 export STRIP = $(CROSS)strip
22 export AR = $(CROSS)ar
23 export RANLIB = $(CROSS)ranlib
24@@ -34,21 +35,6 @@
25 all:
26 @echo Please read the README file before doing anything else.
27
28-gen_patch:
29- diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
30- diff -Bbur ../installperl installperl > installperl.patch
31-
32-patch:
33- cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
34- patch -p1 < Cross/Makefile.SH.patch; \
35- patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
36- sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
37- touch CROSS_PATCHED ; fi
38-
39-dry_patch:
40- cd .. ; patch --dry-run -p1 < Cross/Makefile.SH.patch; \
41- patch --dry-run -p1 < Cross/installperl.patch; \
42-
43 perl:
44 @echo Perl cross-build directory is $(TOPDIR)
45 @echo Target arch is $(SYS)
46@@ -58,11 +44,11 @@
47 $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
48 cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
49 cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm fake_config_library
50- cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
51- cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
52- cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
53+ cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
54+ cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
55+ cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
56 cd $(TOPDIR)/.. ; rm -rf install_me_here
57- cd $(TOPDIR)/.. ; make install-strip
58+# cd $(TOPDIR)/.. ; make install-strip
59 cd $(TOPDIR)/.. ; sh -x Cross/warp
60
61
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/asm-pageh-fix.patch b/meta/recipes-devtools/perl/perl-5.8.8/asm-pageh-fix.patch
new file mode 100644
index 0000000000..41f3b1d23c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/asm-pageh-fix.patch
@@ -0,0 +1,19 @@
1Perl inclues asm/page.h in order to get the definition for getpagesize which
2has been definied in unistd.h since glibc 2.1. Some recent version of linux
3libc headers removed the asm/page.h resulting in failures here for some
4people.
5
6Index: perl-5.8.8/ext/IPC/SysV/SysV.xs
7===================================================================
8--- perl-5.8.8.orig/ext/IPC/SysV/SysV.xs 2001-07-01 04:46:07.000000000 +1000
9+++ perl-5.8.8/ext/IPC/SysV/SysV.xs 2007-07-06 11:40:21.000000000 +1000
10@@ -3,9 +3,6 @@
11 #include "XSUB.h"
12
13 #include <sys/types.h>
14-#ifdef __linux__
15-# include <asm/page.h>
16-#endif
17 #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
18 #ifndef HAS_SEM
19 # include <sys/ipc.h>
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh b/meta/recipes-devtools/perl/perl-5.8.8/config.sh
new file mode 100644
index 0000000000..8d1f904f20
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh
@@ -0,0 +1,1020 @@
1#!/bin/sh
2#
3# This file was produced by running the Configure script. It holds all the
4# definitions figured out by Configure. Should you modify one of these values,
5# do not forget to propagate your changes by running "Configure -der". You may
6# instead choose to run each of the .SH files by yourself, or "Configure -S".
7#
8
9# Package name : perl5
10# Source directory : .
11# Configuration time: Thu Apr 5 19:20:23 EST 2007
12# Configured by : Open Embedded
13# Target system : linux birgitte 2.6.21-rc5 #63 tue mar 27 14:41:54 est 2007 i686 gnulinux
14
15Author=''
16Date='$Date'
17Header=''
18Id='$Id'
19Locker=''
20Log='$Log'
21Mcc='Mcc'
22RCSfile='$RCSfile'
23Revision='$Revision'
24Source=''
25State=''
26_a='.a'
27_exe=''
28_o='.o'
29afs='false'
30afsroot='/afs'
31ansi2knr=''
32aphostname=''
33api_revision='5'
34api_subversion='0'
35api_version='8'
36api_versionstring='5.8.0'
37ar='ar'
38archlib='/usr/lib/perl/5.8'
39archlibexp='/usr/lib/perl/5.8'
40archname64=''
41archname='@ARCH@-thread-multi'
42archobjs=''
43asctime_r_proto='REENTRANT_PROTO_B_SB'
44awk='awk'
45baserev='5.0'
46bash=''
47bin='/usr/bin'
48binexp='/usr/bin'
49bison='bison'
50byacc='byacc'
51c=''
52castflags='0'
53cat='cat'
54cc='gcc'
55cccdlflags='-fPIC'
56ccdlflags='-Wl,-E'
57ccname='gcc'
58ccversion=''
59cf_by='Open Embedded'
60cf_email='Open Embedded@localhost.localdomain'
61cf_time='Thu Apr 5 23:06:39 EST 2007'
62charsize='1'
63chgrp=''
64chmod='chmod'
65chown=''
66clocktype='clock_t'
67comm='comm'
68compress=''
69contains='grep'
70cp='cp'
71cpio=''
72cpp='cpp'
73cpp_stuff='42'
74cpplast='-'
75cppminus='-'
76cpprun='gcc -E'
77cppstdin='gcc -E'
78crypt_r_proto='REENTRANT_PROTO_B_CCS'
79cryptlib=''
80csh='csh'
81ctermid_r_proto='0'
82ctime_r_proto='REENTRANT_PROTO_B_SB'
83d_Gconvert='gcvt((x),(n),(b))'
84d_PRIEUldbl='define'
85d_PRIFUldbl='define'
86d_PRIGUldbl='define'
87d_PRIXU64='define'
88d_PRId64='define'
89d_PRIeldbl='define'
90d_PRIfldbl='define'
91d_PRIgldbl='define'
92d_PRIi64='define'
93d_PRIo64='define'
94d_PRIu64='define'
95d_PRIx64='define'
96d_SCNfldbl='define'
97d__fwalk='undef'
98d_access='define'
99d_accessx='undef'
100d_aintl='undef'
101d_alarm='define'
102d_archlib='define'
103d_asctime_r='define'
104d_atolf='undef'
105d_atoll='define'
106d_attribute_format='define'
107d_attribute_malloc='define'
108d_attribute_nonnull='define'
109d_attribute_noreturn='define'
110d_attribute_pure='define'
111d_attribute_unused='define'
112d_attribute_warn_unused_result='undef'
113d_bcmp='define'
114d_bcopy='define'
115d_bsd='undef'
116d_bsdgetpgrp='undef'
117d_bsdsetpgrp='undef'
118d_bzero='define'
119d_casti32='undef'
120d_castneg='define'
121d_charvspr='define'
122d_chown='define'
123d_chroot='define'
124d_chsize='undef'
125d_class='undef'
126d_clearenv='define'
127d_closedir='define'
128d_cmsghdr_s='define'
129d_const='define'
130d_copysignl='define'
131d_crypt='define'
132d_crypt_r='define'
133d_csh='undef'
134d_ctermid_r='undef'
135d_ctime_r='define'
136d_cuserid='define'
137d_dbl_dig='define'
138d_dbminitproto='undef'
139d_difftime='define'
140d_dirfd='define'
141d_dirnamlen='undef'
142d_dlerror='define'
143d_dlopen='define'
144d_dlsymun='undef'
145d_dosuid='undef'
146d_drand48_r='define'
147d_drand48proto='define'
148d_dup2='define'
149d_eaccess='undef'
150d_endgrent='define'
151d_endgrent_r='undef'
152d_endhent='define'
153d_endhostent_r='undef'
154d_endnent='define'
155d_endnetent_r='undef'
156d_endpent='define'
157d_endprotoent_r='undef'
158d_endpwent='define'
159d_endpwent_r='undef'
160d_endsent='define'
161d_endservent_r='undef'
162d_eofnblk='define'
163d_eunice='undef'
164d_faststdio='undef'
165d_fchdir='define'
166d_fchmod='define'
167d_fchown='define'
168d_fcntl='define'
169d_fcntl_can_lock='define'
170d_fd_macros='define'
171d_fd_set='define'
172d_fds_bits='define'
173d_fgetpos='define'
174d_finite='define'
175d_finitel='define'
176d_flexfnam='define'
177d_flock='define'
178d_flockproto='define'
179d_fork='define'
180d_fp_class='undef'
181d_fpathconf='define'
182d_fpclass='undef'
183d_fpclassify='undef'
184d_fpclassl='undef'
185d_fpos64_t='undef'
186d_frexpl='define'
187d_fs_data_s='undef'
188d_fseeko='define'
189d_fsetpos='define'
190d_fstatfs='define'
191d_fstatvfs='define'
192d_fsync='define'
193d_ftello='define'
194d_ftime='undef'
195d_futimes='define'
196d_getcwd='define'
197d_getespwnam='undef'
198d_getfsstat='undef'
199d_getgrent='define'
200d_getgrent_r='define'
201d_getgrgid_r='define'
202d_getgrnam_r='define'
203d_getgrps='define'
204d_gethbyaddr='define'
205d_gethbyname='define'
206d_gethent='define'
207d_gethname='define'
208d_gethostbyaddr_r='define'
209d_gethostbyname_r='define'
210d_gethostent_r='define'
211d_gethostprotos='define'
212d_getitimer='define'
213d_getlogin='define'
214d_getlogin_r='define'
215d_getmnt='undef'
216d_getmntent='define'
217d_getnbyaddr='define'
218d_getnbyname='define'
219d_getnent='define'
220d_getnetbyaddr_r='define'
221d_getnetbyname_r='define'
222d_getnetent_r='define'
223d_getnetprotos='define'
224d_getpagsz='define'
225d_getpbyname='define'
226d_getpbynumber='define'
227d_getpent='define'
228d_getpgid='define'
229d_getpgrp2='undef'
230d_getpgrp='define'
231d_getppid='define'
232d_getprior='define'
233d_getprotobyname_r='define'
234d_getprotobynumber_r='define'
235d_getprotoent_r='define'
236d_getprotoprotos='define'
237d_getprpwnam='undef'
238d_getpwent='define'
239d_getpwent_r='define'
240d_getpwnam_r='define'
241d_getpwuid_r='define'
242d_getsbyname='define'
243d_getsbyport='define'
244d_getsent='define'
245d_getservbyname_r='define'
246d_getservbyport_r='define'
247d_getservent_r='define'
248d_getservprotos='define'
249d_getspnam='define'
250d_getspnam_r='undef'
251d_gettimeod='define'
252d_gmtime_r='define'
253d_gnulibc='define'
254d_grpasswd='define'
255d_hasmntopt='define'
256d_htonl='define'
257d_ilogbl='define'
258d_index='undef'
259d_inetaton='define'
260d_int64_t='define'
261d_isascii='define'
262d_isfinite='undef'
263d_isinf='define'
264d_isnan='define'
265d_isnanl='define'
266d_killpg='define'
267d_lchown='define'
268d_ldbl_dig='define'
269d_libm_lib_version='define'
270d_link='define'
271d_localtime_r='define'
272d_locconv='define'
273d_lockf='define'
274d_longdbl='define'
275d_longlong='define'
276d_lseekproto='define'
277d_lstat='define'
278d_madvise='define'
279d_malloc_good_size='undef'
280d_malloc_size='undef'
281d_mblen='define'
282d_mbstowcs='define'
283d_mbtowc='define'
284d_memchr='define'
285d_memcmp='define'
286d_memcpy='define'
287d_memmove='define'
288d_memset='define'
289d_mkdir='define'
290d_mkdtemp='define'
291d_mkfifo='define'
292d_mkstemp='define'
293d_mkstemps='undef'
294d_mktime='define'
295d_mmap='define'
296d_modfl='define'
297d_modfl_pow32_bug='undef'
298d_modflproto='define'
299d_mprotect='define'
300d_msg='define'
301d_msg_ctrunc='define'
302d_msg_dontroute='define'
303d_msg_oob='define'
304d_msg_peek='define'
305d_msg_proxy='define'
306d_msgctl='define'
307d_msgget='define'
308d_msghdr_s='define'
309d_msgrcv='define'
310d_msgsnd='define'
311d_msync='define'
312d_munmap='define'
313d_mymalloc='undef'
314d_nice='define'
315d_nl_langinfo='define'
316d_nv_zero_is_allbits_zero='define'
317d_off64_t='define'
318d_old_pthread_create_joinable='undef'
319d_oldpthreads='undef'
320d_oldsock='undef'
321d_open3='define'
322d_pathconf='define'
323d_pause='define'
324d_perl_otherlibdirs='define'
325d_phostname='undef'
326d_pipe='define'
327d_poll='define'
328d_portable='define'
329d_procselfexe='define'
330d_pthread_atfork='define'
331d_pthread_attr_setscope='define'
332d_pthread_yield='define'
333d_pwage='undef'
334d_pwchange='undef'
335d_pwclass='undef'
336d_pwcomment='undef'
337d_pwexpire='undef'
338d_pwgecos='define'
339d_pwpasswd='define'
340d_pwquota='undef'
341d_qgcvt='define'
342d_quad='define'
343d_random_r='define'
344d_readdir64_r='define'
345d_readdir='define'
346d_readdir_r='define'
347d_readlink='define'
348d_readv='define'
349d_recvmsg='define'
350d_rename='define'
351d_rewinddir='define'
352d_rmdir='define'
353d_safebcpy='undef'
354d_safemcpy='undef'
355d_sanemcmp='define'
356d_sbrkproto='define'
357d_scalbnl='define'
358d_sched_yield='define'
359d_scm_rights='define'
360d_seekdir='define'
361d_select='define'
362d_sem='define'
363d_semctl='define'
364d_semctl_semid_ds='define'
365d_semctl_semun='define'
366d_semget='define'
367d_semop='define'
368d_sendmsg='define'
369d_setegid='define'
370d_seteuid='define'
371d_setgrent='define'
372d_setgrent_r='undef'
373d_setgrps='define'
374d_sethent='define'
375d_sethostent_r='undef'
376d_setitimer='define'
377d_setlinebuf='define'
378d_setlocale='define'
379d_setlocale_r='undef'
380d_setnent='define'
381d_setnetent_r='undef'
382d_setpent='define'
383d_setpgid='define'
384d_setpgrp2='undef'
385d_setpgrp='define'
386d_setprior='define'
387d_setproctitle='undef'
388d_setprotoent_r='undef'
389d_setpwent='define'
390d_setpwent_r='undef'
391d_setregid='define'
392d_setresgid='define'
393d_setresuid='define'
394d_setreuid='define'
395d_setrgid='undef'
396d_setruid='undef'
397d_setsent='define'
398d_setservent_r='undef'
399d_setsid='define'
400d_setvbuf='define'
401d_sfio='undef'
402d_shm='define'
403d_shmat='define'
404d_shmatprototype='define'
405d_shmctl='define'
406d_shmdt='define'
407d_shmget='define'
408d_sigaction='define'
409d_sigprocmask='define'
410d_sigsetjmp='define'
411d_sockatmark='define'
412d_sockatmarkproto='define'
413d_socket='define'
414d_socklen_t='define'
415d_sockpair='define'
416d_socks5_init='undef'
417d_sprintf_returns_strlen='define'
418d_sqrtl='define'
419d_srand48_r='define'
420d_srandom_r='define'
421d_sresgproto='define'
422d_sresuproto='define'
423d_statblks='define'
424d_statfs_f_flags='undef'
425d_statfs_s='define'
426d_statvfs='define'
427d_stdio_cnt_lval='undef'
428d_stdio_ptr_lval='undef'
429d_stdio_ptr_lval_nochange_cnt='undef'
430d_stdio_ptr_lval_sets_cnt='undef'
431d_stdio_stream_array='undef'
432d_stdiobase='undef'
433d_stdstdio='undef'
434d_strchr='define'
435d_strcoll='define'
436d_strctcpy='define'
437d_strerrm='strerror(e)'
438d_strerror='define'
439d_strerror_r='define'
440d_strftime='define'
441d_strlcat='undef'
442d_strlcpy='undef'
443d_strtod='define'
444d_strtol='define'
445d_strtold='define'
446d_strtoll='define'
447d_strtoq='define'
448d_strtoul='define'
449d_strtoull='define'
450d_strtouq='define'
451d_strxfrm='define'
452d_suidsafe='undef'
453d_symlink='define'
454d_syscall='define'
455d_syscallproto='define'
456d_sysconf='define'
457d_sysernlst=''
458d_syserrlst='define'
459d_system='define'
460d_tcgetpgrp='define'
461d_tcsetpgrp='define'
462d_telldir='define'
463d_telldirproto='define'
464d_time='define'
465d_times='define'
466d_tm_tm_gmtoff='define'
467d_tm_tm_zone='define'
468d_tmpnam_r='define'
469d_truncate='define'
470d_ttyname_r='define'
471d_tzname='define'
472d_ualarm='define'
473d_umask='define'
474d_uname='define'
475d_union_semun='undef'
476d_unordered='undef'
477d_unsetenv='define'
478d_usleep='define'
479d_usleepproto='define'
480d_ustat='define'
481d_vendorarch='define'
482d_vendorbin='define'
483d_vendorlib='define'
484d_vendorscript='define'
485d_vfork='undef'
486d_void_closedir='undef'
487d_voidsig='define'
488d_voidtty=''
489d_volatile='define'
490d_vprintf='define'
491d_wait4='define'
492d_waitpid='define'
493d_wcstombs='define'
494d_wctomb='define'
495d_writev='define'
496d_xenix='undef'
497date='date'
498db_hashtype='u_int32_t'
499db_prefixtype='size_t'
500db_version_major=''
501db_version_minor=''
502db_version_patch=''
503defvoidused='15'
504direntrytype='struct dirent'
505dlext='so'
506dlsrc='dl_dlopen.xs'
507doublesize='8'
508drand01='drand48()'
509drand48_r_proto='REENTRANT_PROTO_I_ST'
510dynamic_ext='attrs B ByteLoader Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog threads Time/HiRes Unicode/Normalize XS/APItest XS/Typemap threads/shared'
511eagain='EAGAIN'
512ebcdic='undef'
513echo='echo'
514egrep='egrep'
515emacs=''
516endgrent_r_proto='0'
517endhostent_r_proto='0'
518endnetent_r_proto='0'
519endprotoent_r_proto='0'
520endpwent_r_proto='0'
521endservent_r_proto='0'
522eunicefix=':'
523exe_ext=''
524expr='expr'
525extensions='attrs B ByteLoader Cwd Data/Dumper Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog threads Time/HiRes Unicode/Normalize XS/APItest XS/Typemap threads/shared Errno'
526extras=''
527fflushNULL='define'
528fflushall='undef'
529find=''
530firstmakefile='makefile'
531flex=''
532fpossize='16'
533fpostype='fpos_t'
534freetype='void'
535from=':'
536full_ar='/usr/bin/ar'
537full_csh='/bin/csh'
538full_sed='/bin/sed'
539gccansipedantic=''
540gccosandvers=''
541getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
542getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
543getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
544gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
545gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
546gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
547getlogin_r_proto='REENTRANT_PROTO_I_BW'
548getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
549getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
550getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
551getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
552getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
553getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
554getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
555getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
556getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
557getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
558getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
559getservent_r_proto='REENTRANT_PROTO_I_SBWR'
560gidsign='1'
561gidsize='4'
562gidtype='gid_t'
563glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
564gmake='gmake'
565gmtime_r_proto='REENTRANT_PROTO_S_TS'
566grep='grep'
567groupcat='cat /etc/group'
568groupstype='gid_t'
569gzip='gzip'
570h_fcntl='false'
571h_sysfile='true'
572hint='recommended'
573hostcat='cat /etc/hosts'
574html1dir=' '
575html1direxp=''
576html3dir=' '
577html3direxp=''
578i16size='2'
579i16type='short'
580i32size='4'
581i64size='8'
582i8size='1'
583i8type='char'
584i_arpainet='define'
585i_bsdioctl=''
586i_crypt='define'
587i_db='undef'
588i_dbm='undef'
589i_dirent='define'
590i_dld='undef'
591i_dlfcn='define'
592i_fcntl='undef'
593i_float='define'
594i_fp='undef'
595i_fp_class='undef'
596i_gdbm='undef'
597i_grp='define'
598i_ieeefp='undef'
599i_inttypes='define'
600i_langinfo='define'
601i_libutil='undef'
602i_limits='define'
603i_locale='define'
604i_machcthr='undef'
605i_malloc='define'
606i_math='define'
607i_memory='undef'
608i_mntent='define'
609i_ndbm='undef'
610i_netdb='define'
611i_neterrno='undef'
612i_netinettcp='define'
613i_niin='define'
614i_poll='define'
615i_prot='undef'
616i_pthread='define'
617i_pwd='define'
618i_rpcsvcdbm='undef'
619i_sfio='undef'
620i_sgtty='undef'
621i_shadow='define'
622i_socks='undef'
623i_stdarg='define'
624i_stddef='define'
625i_stdlib='define'
626i_string='define'
627i_sunmath='undef'
628i_sysaccess='undef'
629i_sysdir='define'
630i_sysfile='define'
631i_sysfilio='undef'
632i_sysin='undef'
633i_sysioctl='define'
634i_syslog='define'
635i_sysmman='define'
636i_sysmode='undef'
637i_sysmount='define'
638i_sysndir='undef'
639i_sysparam='define'
640i_sysresrc='define'
641i_syssecrt='undef'
642i_sysselct='define'
643i_syssockio='undef'
644i_sysstat='define'
645i_sysstatfs='define'
646i_sysstatvfs='define'
647i_systime='define'
648i_systimek='undef'
649i_systimes='define'
650i_systypes='define'
651i_sysuio='define'
652i_sysun='define'
653i_sysutsname='define'
654i_sysvfs='define'
655i_syswait='define'
656i_termio='undef'
657i_termios='define'
658i_time='define'
659i_unistd='define'
660i_ustat='define'
661i_utime='define'
662i_values='define'
663i_varargs='undef'
664i_varhdr='stdarg.h'
665i_vfork='undef'
666ignore_versioned_solibs='y'
667inc_version_list=' '
668inc_version_list_init='0'
669incpath=''
670inews=''
671installarchlib='@LIBDIR@/perl/5.8'
672installbin='@BINDIR@'
673installhtml1dir=''
674installhtml3dir=''
675installman1dir='@MANDIR@/man1'
676installman3dir='@MANDIR@/man3'
677installprefix='@PREFIX@'
678installprefixexp='@PREFIX@/usr'
679installprivlib='@DATADIR@/perl/5.8'
680installscript='@BINDIR@'
681installsitearch='@PREFIX@/local/lib/perl/5.8.8'
682installsitebin='@PREFIX@/local/bin'
683installsitehtml1dir=''
684installsitehtml3dir=''
685installsitelib='@PREFIX@/local/share/perl/5.8.8'
686installsiteman1dir='@PREFIX@/local/man/man1'
687installsiteman3dir='@PREFIX@/local/man/man3'
688installsitescript='@PREFIX@/local/bin'
689installstyle='lib/perl5'
690installusrbinperl='define'
691installvendorarch='@LIBDIR@/perl5'
692installvendorbin='@BINDIR@'
693installvendorhtml1dir=''
694installvendorhtml3dir=''
695installvendorlib='@DATADIR@/perl5'
696installvendorman1dir='@MANDIR@/man1'
697installvendorman3dir='@MANDIR@/man3'
698installvendorscript='@BINDIR@'
699intsize='4'
700issymlink='test -h'
701ivdformat='"ld"'
702ivtype='long'
703known_extensions='attrs B ByteLoader Cwd Data/Dumper DB_File Devel/DProf Devel/Peek Devel/PPPort Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode PerlIO/encoding PerlIO/scalar PerlIO/via POSIX re SDBM_File Socket Storable Sys/Hostname Sys/Syslog Thread threads Time/HiRes Unicode/Normalize XS/APItest XS/Typemap threads/shared'
704ksh=''
705ld='gcc'
706lddlflags='-shared -L/usr/local/lib'
707ldflags=' -L/usr/local/lib'
708ldflags_uselargefiles=''
709ldlibpthname='LD_LIBRARY_PATH'
710less='less'
711lib_ext='.a'
712libperl='libperl.so'
713libpth='/usr/local/lib /lib /usr/lib'
714line=''
715lint=''
716lkflags=''
717ln='ln'
718lns='/bin/ln -s'
719localtime_r_proto='REENTRANT_PROTO_S_TS'
720locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
721loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
722longlongsize='8'
723lp=''
724lpr=''
725ls='ls'
726lseeksize='8'
727lseektype='off_t'
728mail=''
729mailx=''
730make='make'
731make_set_make='#'
732mallocobj=''
733mallocsrc=''
734malloctype='void *'
735man1dir='/usr/share/man/man1'
736man1direxp='/usr/share/man/man1'
737man1ext='1'
738man3dir='/usr/share/man/man3'
739man3direxp='/usr/share/man/man3'
740man3ext='3pm'
741mips_type=''
742mistrustnm=''
743mkdir='mkdir'
744mmaptype='void *'
745modetype='mode_t'
746more='more'
747multiarch='undef'
748mv=''
749myarchname='@ARCH@'
750mydomain='.localdomain'
751myhostname='localhost'
752n='-n'
753need_va_copy='undef'
754netdb_hlen_type='size_t'
755netdb_host_type='const void *'
756netdb_name_type='const char *'
757netdb_net_type='in_addr_t'
758nm='nm'
759nm_opt=''
760nm_so_opt='--dynamic'
761nonxs_ext='Errno'
762nroff='nroff'
763nvEUformat='"E"'
764nvFUformat='"F"'
765nvGUformat='"G"'
766nveformat='"e"'
767nvfformat='"f"'
768nvgformat='"g"'
769nvsize='8'
770nvtype='double'
771o_nonblock='O_NONBLOCK'
772obj_ext='.o'
773old_pthread_create_joinable=''
774optimize='-O2'
775orderlib='false'
776osname='linux'
777otherlibdirs=' '
778package='perl5'
779pager='/usr/bin/less -isr'
780passcat='cat /etc/passwd'
781patchlevel='8'
782path_sep=':'
783perl5='hostperl'
784perl=''
785perl_patchlevel=''
786perladmin='root@localhost'
787perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
788perlpath='hostperl'
789pg='pg'
790phostname=''
791pidtype='pid_t'
792plibpth=''
793pmake=''
794pr=''
795prefix='/usr'
796prefixexp='/usr'
797privlib='/usr/share/perl/5.8'
798privlibexp='/usr/share/perl/5.8'
799procselfexe='"/proc/self/exe"'
800prototype='define'
801randbits='48'
802randfunc='drand48'
803random_r_proto='REENTRANT_PROTO_I_St'
804randseedtype='long'
805ranlib=':'
806rd_nodata='-1'
807readdir64_r_proto='REENTRANT_PROTO_I_TSR'
808readdir_r_proto='REENTRANT_PROTO_I_TSR'
809revision='5'
810rm='rm'
811rmail=''
812run=''
813runnm='false'
814sPRIEUldbl='"LE"'
815sPRIFUldbl='"LF"'
816sPRIGUldbl='"LG"'
817sPRIeldbl='"Le"'
818sPRIfldbl='"Lf"'
819sPRIgldbl='"Lg"'
820sSCNfldbl='"Lf"'
821sched_yield='sched_yield()'
822scriptdir='/usr/bin'
823scriptdirexp='/usr/bin'
824sed='sed'
825seedfunc='srand48'
826selecttype='fd_set *'
827sendmail=''
828setgrent_r_proto='0'
829sethostent_r_proto='0'
830setlocale_r_proto='0'
831setnetent_r_proto='0'
832setprotoent_r_proto='0'
833setpwent_r_proto='0'
834setservent_r_proto='0'
835sh='/bin/sh'
836shar=''
837sharpbang='#!'
838shmattype='void *'
839shortsize='2'
840shrpenv=''
841shsharp='true'
842sig_count='65'
843sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 6 17 29 31 '
844sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
845sig_size='69'
846sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL UNUSED '
847sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
848signal_t='void'
849sitearch='/usr/local/lib/perl/5.8.8'
850sitearchexp='/usr/local/lib/perl/5.8.8'
851sitebin='/usr/local/bin'
852sitebinexp='/usr/local/bin'
853sitehtml1dir=''
854sitehtml1direxp=''
855sitehtml3dir=''
856sitehtml3direxp=''
857sitelib='/usr/local/share/perl/5.8.8'
858sitelib_stem=''
859sitelibexp='/usr/local/share/perl/5.8.8'
860siteman1dir='/usr/local/man/man1'
861siteman1direxp='/usr/local/man/man1'
862siteman3dir='/usr/local/man/man3'
863siteman3direxp='/usr/local/man/man3'
864siteprefix='/usr/local'
865siteprefixexp='/usr/local'
866sitescript='/usr/local/bin'
867sitescriptexp='/usr/local/bin'
868sizetype='size_t'
869sleep=''
870smail=''
871so='so'
872sockethdr=''
873socketlib=''
874socksizetype='socklen_t'
875sort='sort'
876spackage='Perl5'
877spitshell='cat'
878srand48_r_proto='REENTRANT_PROTO_I_LS'
879srandom_r_proto='REENTRANT_PROTO_I_TS'
880src='.'
881ssizetype='ssize_t'
882startperl='#!/usr/bin/perl'
883startsh='#!/bin/sh'
884static_ext=' '
885stdchar='char'
886stdio_base='((fp)->_IO_read_base)'
887stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
888stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
889stdio_filbuf=''
890stdio_ptr='((fp)->_IO_read_ptr)'
891stdio_stream_array=''
892strerror_r_proto='REENTRANT_PROTO_B_IBW'
893strings='/usr/include/string.h'
894submit=''
895subversion='8'
896sysman='/usr/share/man/man1'
897tail=''
898tar=''
899targetarch=''
900tbl=''
901tee=''
902test='test'
903timeincl='/usr/include/sys/time.h /usr/include/time.h '
904timetype='time_t'
905tmpnam_r_proto='REENTRANT_PROTO_B_B'
906to=':'
907touch='touch'
908tr='tr'
909trnl='\n'
910troff=''
911ttyname_r_proto='REENTRANT_PROTO_I_IBW'
912u16size='2'
913u16type='unsigned short'
914u32size='4'
915u64size='8'
916u8size='1'
917u8type='unsigned char'
918uidsign='1'
919uidsize='4'
920uidtype='uid_t'
921uname='uname'
922uniq='uniq'
923use5005threads='undef'
924usecrosscompile='undef'
925usedl='define'
926usefaststdio='define'
927useithreads='define'
928uselargefiles='define'
929uselongdouble='undef'
930usemallocwrap='define'
931usemorebits='undef'
932usemultiplicity='define'
933usemymalloc='n'
934usenm='false'
935useopcode='true'
936useperlio='define'
937useposix='true'
938usereentrant='undef'
939usesfio='false'
940useshrplib='true'
941usesitecustomize='undef'
942usesocks='undef'
943usethreads='define'
944usevendorprefix='define'
945usevfork='false'
946usrinc='/usr/include'
947uuname=''
948uvXUformat='"lX"'
949uvoformat='"lo"'
950uvtype='unsigned long'
951uvuformat='"lu"'
952uvxformat='"lx"'
953vendorarch='/usr/lib/perl5'
954vendorarchexp='/usr/lib/perl5'
955vendorbin='/usr/bin'
956vendorbinexp='/usr/bin'
957vendorhtml1dir=' '
958vendorhtml1direxp=''
959vendorhtml3dir=' '
960vendorhtml3direxp=''
961vendorlib='/usr/share/perl5'
962vendorlib_stem=''
963vendorlibexp='/usr/share/perl5'
964vendorman1dir='/usr/share/man/man1'
965vendorman1direxp='/usr/share/man/man1'
966vendorman3dir='/usr/share/man/man3'
967vendorman3direxp='/usr/share/man/man3'
968vendorprefix='/usr'
969vendorprefixexp='/usr'
970vendorscript='/usr/bin'
971vendorscriptexp='/usr/bin'
972version='5.8.8'
973version_patchlevel_string='version 8 subversion 8'
974versiononly='undef'
975vi=''
976voidflags='15'
977xlibpth='/usr/lib/386 /lib/386'
978yacc='yacc'
979yaccflags=''
980zcat=''
981zip='zip'
982# Configure command line arguments.
983config_arg0='Configure'
984config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.8 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
985config_argc=27
986config_arg1='-des'
987config_arg2='-Doptimize=-O2'
988config_arg3='-Dmyhostname=localhost'
989config_arg4='-Dperladmin=root@localhost'
990config_arg5='-Dcc=gcc'
991config_arg6='-Dcf_by=Open Embedded'
992config_arg7='-Dprefix=/usr'
993config_arg8='-Dvendorprefix=/usr'
994config_arg9='-Dsiteprefix=/usr'
995config_arg10='-Dotherlibdirs=/usr/lib/perl5/5.8.8'
996config_arg11='-Duseshrplib'
997config_arg12='-Dusethreads'
998config_arg13='-Duseithreads'
999config_arg14='-Duselargefiles'
1000config_arg15='-Ud_dosuid'
1001config_arg16='-Dd_semctl_semun'
1002config_arg17='-Ui_db'
1003config_arg18='-Ui_ndbm'
1004config_arg19='-Ui_gdbm'
1005config_arg20='-Di_shadow'
1006config_arg21='-Di_syslog'
1007config_arg22='-Dman3ext=3pm'
1008config_arg23='-Duseperlio'
1009config_arg24='-Dinstallusrbinperl'
1010config_arg25='-Ubincompat5005'
1011config_arg26='-Uversiononly'
1012config_arg27='-Dpager=/usr/bin/less -isr'
1013PERL_REVISION=5
1014PERL_VERSION=8
1015PERL_SUBVERSION=8
1016PERL_API_REVISION=5
1017PERL_API_VERSION=8
1018PERL_API_SUBVERSION=0
1019PERL_PATCHLEVEL=
1020PERL_CONFIG_SH=true
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32 b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32
new file mode 100644
index 0000000000..e22d71d8ee
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32
@@ -0,0 +1,58 @@
1alignbytes='4'
2ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
3ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
4yaccflags=''
5ccsymbols='__GNUC_PATCHLEVEL__=5'
6cppccsymbols='__GNUC__=3 __GNUC_MINOR__=3'
7cppccsymbols='__GNUC__=3 __GNUC_MINOR__=3'
8cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include'
9cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=3 __GNU_LIBRARY__=6 _GNU_SOURCE=1 i386=1 __i386=1 __i386__=1 __i486=1 __i486__=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 linux=1 __linux=1 __linux__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 _REENTRANT=1 __STDC__=1 unix=1 __unix=1 __unix__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE=1 __USE_LARGEFILE64=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED=1'
10d_nv_preserves_uv='define'
11d_u32align='undef'
12gccversion='3.3.5 (Debian 1:3.3.5-13)'
13getspnam_r_proto='0'
14gidformat='"lu"'
15gnulibc_version='2.3.2'
16i32type='long'
17i64type='long long'
18ivsize='4'
19gnulibc_version='2.3.2'
20libc='/lib/libc-2.3.2.so'
21libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
22libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
23ignore_versioned_solibs='y'
24libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
25libsdirs=' /usr/lib'
26libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
27libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
28libspath=' /usr/local/lib /lib /usr/lib'
29libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
30libswanted_uselargefiles=''
31perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
32libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
33libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
34longdblsize='12'
35longlongsize='8'
36longsize='4'
37myuname='linux birgitte 2.6.21-rc5 #63 tue mar 27 14:41:54 est 2007 i686 gnulinux '
38nv_preserves_uv_bits='32'
39osvers='2.6.21-rc5'
40ptrsize='4'
41quadkind='3'
42quadtype='long long'
43uquadtype='unsigned long long'
44sPRIXU64='"LX"'
45sPRId64='"Ld"'
46sPRIi64='"Li"'
47sPRIo64='"Lo"'
48sPRIu64='"Lu"'
49sPRIx64='"Lx"'
50selectminbits='32'
51sizesize='4'
52u32type='unsigned long'
53u64type='unsigned long long'
54uidformat='"lu"'
55uquadtype='unsigned long long'
56use64bitall='undef'
57use64bitint='undef'
58uvsize='4'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-be b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-be
new file mode 100644
index 0000000000..a59a9abb5e
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-be
@@ -0,0 +1 @@
byteorder='4321'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-le b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-le
new file mode 100644
index 0000000000..10e4226567
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32-le
@@ -0,0 +1 @@
byteorder='1234'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64 b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64
new file mode 100644
index 0000000000..6e58fa71a3
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64
@@ -0,0 +1,58 @@
1alignbytes='8'
2ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
3ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
4yaccflags=''
5ccsymbols=''
6cppccsymbols=''
7cppccsymbols=''
8cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
9cppsymbols='__amd64=1 __amd64__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=4 __GNUC__=4 __GNUC_MINOR__=1 __GNU_LIBRARY__=6 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 linux=1 __linux=1 __linux__=1 _LP64=1 __LP64__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 _REENTRANT=1 __STDC__=1 unix=1 __unix=1 __unix__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE=1 __USE_LARGEFILE64=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_REENTRANT=1 __USE_SVID=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __x86_64=1 __x86_64__=1 _XOPEN_SOURCE=600 _XOPEN_SOURCE_EXTENDED=1'
10d_nv_preserves_uv='undef'
11d_u32align='define'
12gccversion='4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)'
13getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
14gidformat='"u"'
15gnulibc_version='2.4'
16i32type='int'
17i64type='long'
18ivsize='8'
19gnulibc_version='2.4'
20libc='/lib/libc-2.4.so'
21libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
22libsfound=' /usr/lib/libnsl.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
23ignore_versioned_solibs='y'
24libs='-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc'
25libsdirs=' /usr/lib'
26libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
27libsfound=' /usr/lib/libnsl.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
28libspath=' /usr/local/lib /lib /usr/lib'
29libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
30libswanted_uselargefiles=''
31perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
32libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
33libsfound=' /usr/lib/libnsl.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libpthread.so /usr/lib/libc.so'
34longdblsize='16'
35longlongsize='8'
36longsize='8'
37myuname='linux nynaeve 2.6.20.4 #29 smp thu mar 29 15:35:30 est 2007 x86_64 gnulinux '
38nv_preserves_uv_bits='53'
39osvers='2.6.20.4'
40ptrsize='8'
41quadkind='2'
42quadtype='long'
43uquadtype='unsigned long'
44sPRIXU64='"lX"'
45sPRId64='"ld"'
46sPRIi64='"li"'
47sPRIo64='"lo"'
48sPRIu64='"lu"'
49sPRIx64='"lx"'
50selectminbits='64'
51sizesize='8'
52u32type='unsigned int'
53u64type='unsigned long'
54uidformat='"u"'
55uquadtype='unsigned long'
56use64bitall='define'
57use64bitint='define'
58uvsize='8'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-be b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-be
new file mode 100644
index 0000000000..c08ce3c431
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-be
@@ -0,0 +1 @@
byteorder='87654321'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-le b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-le
new file mode 100644
index 0000000000..277d2a9bee
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64-le
@@ -0,0 +1 @@
byteorder='12345678'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch b/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch
new file mode 100644
index 0000000000..ceb74196d6
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch
@@ -0,0 +1,46 @@
1Use the ld flags from the supplied configuration file. For sh we need the
2flags that specify to build PIC code so that the shared libraries work.
3
4Index: perl-5.8.8/Cross/generate_config_sh
5===================================================================
6--- perl-5.8.8.orig/Cross/generate_config_sh 2003-09-05 18:31:08.000000000 +1000
7+++ perl-5.8.8/Cross/generate_config_sh 2007-05-30 09:12:50.000000000 +1000
8@@ -19,10 +19,10 @@
9 $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]];
10 $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
11 $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
12-$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
13-$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
14-$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
15-$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
16+#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
17+#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
18+$callbacks->{'ccflags'} = [\&simple_process_insert, ["CFLAGS", "-fno-strict-aliasing -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
19+$callbacks->{'ccflags_uselargefiles'} = [\&simple_process_insert, ["CFLAGS", "-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
20 $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
21 $callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]];
22 $callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]];
23@@ -105,6 +105,23 @@
24
25 }
26
27+# Insert env var into the variables value
28+sub simple_process_insert {
29+ my $key = shift;
30+ my $value = shift;
31+ my $envvar = $callbacks->{$key}->[1][0];
32+
33+ if ($ENV{$envvar}) {
34+ # Strip quotes from value
35+ $value =~ s/^\'//;
36+ $value =~ s/\'$//;
37+ # Remove -I/usr/local/... from the value
38+ $value =~ s#\W-I/usr/local/\w+\W# #g;
39+ # Prepend env var (OE setting) to value
40+ print("$key=\'$ENV{$envvar} $value\'\n");
41+ }
42+}
43+
44 sub library_munge {
45 my $key = shift;
46 my $value = shift;
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/installperl.patch b/meta/recipes-devtools/perl/perl-5.8.8/installperl.patch
new file mode 100644
index 0000000000..ff52bc3a9c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/installperl.patch
@@ -0,0 +1,15 @@
1Index: perl-5.8.8/installperl
2===================================================================
3--- perl-5.8.8.orig/installperl 2007-06-14 12:36:23.000000000 +1000
4+++ perl-5.8.8/installperl 2007-06-14 12:38:39.000000000 +1000
5@@ -3,8 +3,8 @@
6 BEGIN {
7 require 5.004;
8 chdir '..' if !-d 'lib' and -d '../lib';
9- @INC = 'lib';
10- $ENV{PERL5LIB} = 'lib';
11+# @INC = 'lib';
12+# $ENV{PERL5LIB} = 'lib';
13 }
14
15 use strict;
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/makedepend-dash.patch b/meta/recipes-devtools/perl/perl-5.8.8/makedepend-dash.patch
new file mode 100644
index 0000000000..1f15474377
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/makedepend-dash.patch
@@ -0,0 +1,13 @@
1Index: perl-5.8.8/makedepend.SH
2===================================================================
3--- perl-5.8.8.orig/makedepend.SH 2007-05-24 12:06:52.000000000 +1000
4+++ perl-5.8.8/makedepend.SH 2007-05-24 12:27:33.000000000 +1000
5@@ -128,7 +128,7 @@
6 *.y) filebase=`basename $file .y` ;;
7 esac
8 case "$file" in
9- */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
10+ */*) finc="-I`echo $file | sed 's#/[^/]*$##'`" ;;
11 *) finc= ;;
12 esac
13 $echo "Finding dependencies for $filebase$_o."
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/native-no-gdbminc.patch b/meta/recipes-devtools/perl/perl-5.8.8/native-no-gdbminc.patch
new file mode 100644
index 0000000000..f00fa2cc17
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-no-gdbminc.patch
@@ -0,0 +1,18 @@
1If you have a /usr/include/gdbm/ndbm.h host on the header then the configure
2script adds -I/usr/include/gdbm to the ccflags even though gdbm support is
3disabled. Prevent perl from doing this so we don't get cross compile badness
4errors while building perl.
5
6--- perl-5.8.8/Configure 2007/05/06 23:42:18 1.1
7+++ perl-5.8.8/Configure 2007/05/06 23:42:48
8@@ -20033,8 +20033,8 @@
9 # ndbm.h header in /usr/include/gdbm/ndbm.h.
10 if $test -f /usr/include/gdbm/ndbm.h; then
11 echo '<gdbm/ndbm.h> found.'
12- ccflags="$ccflags -I/usr/include/gdbm"
13- cppflags="$cppflags -I/usr/include/gdbm"
14+# ccflags="$ccflags -I/usr/include/gdbm"
15+# cppflags="$cppflags -I/usr/include/gdbm"
16 t_ndbm=$define
17 fi
18 ;;
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/native-nopacklist.patch b/meta/recipes-devtools/perl/perl-5.8.8/native-nopacklist.patch
new file mode 100644
index 0000000000..a0ba269e00
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-nopacklist.patch
@@ -0,0 +1,84 @@
1Part of 52_debian_extutils_hacks.patch just to exclude the installation of .packlist files
2
3diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
4--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
5+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
6@@ -2054,9 +2054,7 @@
7 $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
8
9 pure_perl_install ::
10- $(NOECHO) $(MOD_INSTALL) \
11- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
12- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
13+ $(NOECHO) $(MOD_INSTALL) \
14 $(INST_LIB) $(DESTINSTALLPRIVLIB) \
15 $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
16 $(INST_BIN) $(DESTINSTALLBIN) \
17@@ -2081,9 +2079,7 @@
18 }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
19
20 pure_vendor_install ::
21- $(NOECHO) $(MOD_INSTALL) \
22- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
23- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
24+ $(NOECHO) $(MOD_INSTALL) \
25 $(INST_LIB) $(DESTINSTALLVENDORLIB) \
26 $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
27 $(INST_BIN) $(DESTINSTALLVENDORBIN) \
28@@ -2092,37 +2088,19 @@
29 $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
30
31 doc_perl_install ::
32- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
33- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
34- -$(NOECHO) $(DOC_INSTALL) \
35- "Module" "$(NAME)" \
36- "installed into" "$(INSTALLPRIVLIB)" \
37- LINKTYPE "$(LINKTYPE)" \
38- VERSION "$(VERSION)" \
39- EXE_FILES "$(EXE_FILES)" \
40- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
41
42 doc_site_install ::
43- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
44- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
45- -$(NOECHO) $(DOC_INSTALL) \
46+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
47+ -$(NOECHO) $(MKPATH) $(DESTINSTALLSITEARCH)
48+ -$(NOECHO) $(DOC_INSTALL) \
49 "Module" "$(NAME)" \
50 "installed into" "$(INSTALLSITELIB)" \
51 LINKTYPE "$(LINKTYPE)" \
52 VERSION "$(VERSION)" \
53 EXE_FILES "$(EXE_FILES)" \
54- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
55+ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
56
57 doc_vendor_install ::
58- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
59- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
60- -$(NOECHO) $(DOC_INSTALL) \
61- "Module" "$(NAME)" \
62- "installed into" "$(INSTALLVENDORLIB)" \
63- LINKTYPE "$(LINKTYPE)" \
64- VERSION "$(VERSION)" \
65- EXE_FILES "$(EXE_FILES)" \
66- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
67
68 };
69
70@@ -2131,13 +2109,12 @@
71 $(NOECHO) $(NOOP)
72
73 uninstall_from_perldirs ::
74- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
75
76 uninstall_from_sitedirs ::
77 $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
78
79 uninstall_from_vendordirs ::
80- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
81+
82 };
83
84 join("",@m);
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/native-perlinc.patch b/meta/recipes-devtools/perl/perl-5.8.8/native-perlinc.patch
new file mode 100644
index 0000000000..6dc4b9538d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-perlinc.patch
@@ -0,0 +1,24 @@
1Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
2===================================================================
3--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
4+++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2008-11-08 16:01:12.000000000 +0000
5@@ -1597,6 +1597,19 @@
6 $self->{PERL_LIB} ||= $Config{privlibexp};
7 $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
8 $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
9+ # Check for environment override so we'll find the headers in the correct place
10+ if (defined $ENV{PERL_LIB})
11+ {
12+ $self->{PERL_LIB} = $ENV{PERL_LIB};
13+ }
14+ if (defined $ENV{PERL_ARCHLIB})
15+ {
16+ $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
17+ }
18+ if (defined $ENV{PERL_INC})
19+ {
20+ $self->{PERL_INC} = $ENV{PERL_INC};
21+ }
22 my $perl_h;
23
24 if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/native-ssp.patch b/meta/recipes-devtools/perl/perl-5.8.8/native-ssp.patch
new file mode 100644
index 0000000000..1c825f50d0
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-ssp.patch
@@ -0,0 +1,14 @@
1Fix for compiling with ssp enabled gcc:
2See http://bugs.openembedded.net/show_bug.cgi?id=1980
3
4diff -Naur perl-5.8.7.orig/cflags.SH perl-5.8.7/cflags.SH
5--- perl-5.8.7.orig/cflags.SH 2002-09-30 10:59:07.000000000 +0000
6+++ perl-5.8.7/cflags.SH 2005-10-02 04:08:39.000000000 +0000
7@@ -165,6 +165,8 @@
8 esac
9
10 : Can we perhaps use $ansi2knr here
11+ [[ $file == regcomp ]] && export ccflags="${ccflags} -fno-stack-protector"
12+ [[ $file == regexec ]] && export ccflags="${ccflags} -fno-stack-protector"
13 echo "$cc -c -DPERL_CORE $ccflags $optimize $warn"
14 eval "$also "'"$cc -DPERL_CORE -c $ccflags $optimize $warn"'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch b/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
new file mode 100644
index 0000000000..ac519a0271
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
@@ -0,0 +1,43 @@
1This patch is used for perl-native only. It enables the switching of
2configuration files between Config_heavy.pl and
3Config_heavy-target.pl by setting the environment variables
4PERLCONFIGTARGET - the later containing settings for the target while
5the former contains those for the host. This will allow cpan.bbclass
6to use the settings appropriate for the native and/or target builds
7as required. This also disables the use of the cache since the cached
8values would be valid for the host only.
9
10--- perl-5.8.8/configpm 2007/04/30 03:10:43 1.1
11+++ perl-5.8.8/configpm 2007/04/30 03:11:56
12@@ -374,7 +374,7 @@
13 my($self, $key) = @_;
14
15 # check for cached value (which may be undef so we use exists not defined)
16- return $self->{$key} if exists $self->{$key};
17+ #return $self->{$key} if exists $self->{$key};
18
19 return $self->fetch_string($key);
20 }
21@@ -530,7 +530,21 @@
22 sub DESTROY { }
23
24 sub AUTOLOAD {
25- require 'Config_heavy.pl';
26+ my $cfgfile = 'Config_heavy.pl';
27+ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
28+ {
29+ $cfgfile = 'Config_heavy-target.pl';
30+ }
31+ if (defined $ENV{PERL_ARCHLIB})
32+ {
33+ push @INC, $ENV{PERL_ARCHLIB};
34+ require $cfgfile;
35+ pop @INC;
36+ }
37+ else
38+ {
39+ require $cfgfile;
40+ }
41 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
42 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
43 }
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/perl-configure.sh b/meta/recipes-devtools/perl/perl-5.8.8/perl-configure.sh
new file mode 100755
index 0000000000..9800394b63
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-configure.sh
@@ -0,0 +1,43 @@
1ls#! /bin/sh
2
3#
4# Generate the common perl configuration
5# Needs to be run on a host that matches the bitsize of the target platform
6#
7
8echo sh Configure -des \
9 -Doptimize=-O2 \
10 -Dmyhostname=localhost \
11 -Dperladmin=root@localhost \
12 -Dcc=gcc \
13 -Dcf_by='Open Embedded' \
14 -Dinstallprefix=@DESTDIR@ \
15 -Dprefix=/usr \
16 -Dvendorprefix=/usr \
17 -Dsiteprefix=/usr \
18 -Dotherlibdirs=/usr/lib/perl5/5.8.8 \
19 -Duseshrplib \
20 -Dusethreads \
21 -Duseithreads \
22 -Duselargefiles \
23 -Ud_dosuid \
24 -Dd_semctl_semun \
25 -Ui_db \
26 -Ui_ndbm \
27 -Ui_gdbm \
28 -Di_shadow \
29 -Di_syslog \
30 -Dman3ext=3pm \
31 -Duseperlio \
32 -Dinstallusrbinperl \
33 -Ubincompat5005 \
34 -Uversiononly \
35 -Dpager='/usr/bin/less -isr'
36
37cp -f config.sh config.sh.COMMON
38
39TARGETOS=$(grep myarchname config.sh.COMMON | sed "s#.*'\(.*\)'.*#\1#")
40
41sed -r -i config.sh.COMMON \
42 -e "s#(install.*=')(/usr)/local(.*')#\1@DESTDIR@\2\3#g" \
43 -e 's#'$TARGETOS'#@ARCH@#g'
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/perl-dynloader.patch b/meta/recipes-devtools/perl/perl-5.8.8/perl-dynloader.patch
new file mode 100644
index 0000000000..e2dc774d5e
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-dynloader.patch
@@ -0,0 +1,23 @@
1Allow the location that .so files are searched for for dynamic
2loading to be changed via an environment variable. This is to allow
3us to load .so's from the host system while building for the target
4system.
5
6--- perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1
7+++ perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:41:28
8@@ -65,6 +65,15 @@
9 print OUT <<'EOT';
10 my $modpname = join('/',@modparts);
11 my $modlibname = (caller())[1];
12+ # OE: Allow env to form dynamic loader to look in a different place
13+ # This is so it finds the host .so files, not the targets
14+ if (defined $ENV{PERLHOSTLIB})
15+ {
16+ my $hostlib = $ENV{PERLHOSTLIB};
17+ print STDERR "*** Module name IN: $modlibname\n";
18+ $modlibname =~ s#(?<!/)(\.\./)*lib/#$hostlib#g;
19+ print STDERR "*** Module name OUT: $modlibname\n";
20+ }
21 my $c = @modparts;
22 $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
23 my $file = "$modlibname/auto/$modpname/$modfname.$dl_dlext";
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/perl-moreconfig.patch b/meta/recipes-devtools/perl/perl-5.8.8/perl-moreconfig.patch
new file mode 100644
index 0000000000..590c72536b
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-moreconfig.patch
@@ -0,0 +1,16 @@
1We need ld in the fake config library, but it's not included by default. So
2expand the number of items included. While this works it indicates that the
3rest of the config items are not being picked up and/or are being picked up
4from the host. More investigation needed.
5
6--- perl-5.8.8/configpm 2007/04/20 09:48:05 1.1
7+++ perl-5.8.8/configpm 2007/04/20 09:57:12
8@@ -2,7 +2,7 @@
9 use strict;
10 use vars qw(%Config $Config_SH_expanded);
11
12-my $how_many_common = 22;
13+my $how_many_common = 50;
14
15 # commonly used names to precache (and hence lookup fastest)
16 my %Common;
diff --git a/meta/recipes-devtools/perl/perl-native_5.8.8.bb b/meta/recipes-devtools/perl/perl-native_5.8.8.bb
new file mode 100644
index 0000000000..534b6700df
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-native_5.8.8.bb
@@ -0,0 +1,93 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "libs"
4LICENSE = "Artistic|GPL"
5DEPENDS = "virtual/db-native gdbm-native"
6PR = "r14"
7
8SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
9 file://perl-5.8.8-gcc-4.2.patch;patch=1 \
10 file://Configure-multilib.patch;patch=1 \
11 file://perl-configpm-switch.patch;patch=1 \
12 file://native-nopacklist.patch;patch=1 \
13 file://native-no-gdbminc.patch;patch=1 \
14 file://native-perlinc.patch;patch=1 \
15 file://makedepend-dash.patch;patch=1 \
16 file://asm-pageh-fix.patch;patch=1"
17
18S = "${WORKDIR}/perl-${PV}"
19
20inherit native
21
22do_configure () {
23 ./Configure \
24 -Dcc="${CC}" \
25 -Dcflags="${CFLAGS}" \
26 -Dldflags="${LDFLAGS}" \
27 -Dcf_by="Open Embedded" \
28 -Dprefix=${prefix} \
29 -Dvendorprefix=${prefix} \
30 -Dvendorprefix=${prefix} \
31 -Dsiteprefix=${prefix} \
32 \
33 -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
34 -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
35 -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
36 -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
37 -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
38 -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
39 \
40 -Duseshrplib \
41 -Dusethreads \
42 -Duseithreads \
43 -Duselargefiles \
44 -Dnoextensions=ODBM_File \
45 -Ud_dosuid \
46 -Ui_db \
47 -Ui_ndbm \
48 -Ui_gdbm \
49 -Di_shadow \
50 -Di_syslog \
51 -Duseperlio \
52 -Dman3ext=3pm \
53 -Uafs \
54 -Ud_csh \
55 -Uusesfio \
56 -Uusenm -des
57}
58
59do_install () {
60 oe_runmake 'DESTDIR=${D}' install
61
62 # We need a hostperl link for building perl
63 ln -sf perl${PV} ${D}${bindir}/hostperl
64
65 install -d ${D}${libdir}/perl/${PV}/CORE \
66 ${D}${datadir}/perl/${PV}/ExtUtils
67
68 # Save native config
69 install config.sh ${D}${libdir}/perl
70 install lib/Config.pm ${D}${libdir}/perl/${PV}/
71 install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
72
73 # perl shared library headers
74 for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
75 uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
76 perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
77 hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
78 cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
79 reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
80 nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
81 dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
82 thread.h warnings.h; do
83 install $i ${D}${libdir}/perl/${PV}/CORE
84 done
85}
86do_install_append_nylon() {
87 # get rid of definitions not supported by the gcc version we use for nylon...
88 for i in ${D}${libdir}/perl/${PV}/Config_heavy.pl ${D}${libdir}/perl/config.sh; do
89 perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
90 done
91}
92
93PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.8.8.inc b/meta/recipes-devtools/perl/perl-rdepends_5.8.8.inc
new file mode 100644
index 0000000000..1ce5ad0375
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.8.8.inc
@@ -0,0 +1,1145 @@
1# To create/update the perl-rdepends_${PV}.inc use this piece of ugly script (modified for your arch/paths etc):
2# daka@DaKa2:/home/slug/slugos/tmp/work/perl-5.8.7-r14/install$ egrep -r "use|require" * | grep ";$" | egrep ".pm:use |.pm:require " | grep -v v5.6.0 | grep -v 5.00 | grep -v \$module | sed -e "s, \+, ,g" | cut -f1,2 -d" " | sed -e "s,;, ,g" | sed -e "s,(), ,g" | sed -e "s,::,-,g" | sort | uniq | tr [:upper:] [:lower:] | sed -e "s,/[^ ]\+ , += \"perl-module-,g" | sed -e "s, \?$, \",g" | sed -e "s,_,-,g" | sed -e "s,^,RDEPENDS_,g" | sed -e "s,armeb-linux,\$\{TARGET_ARCH\}-\$\{TARGET_OS\},g" | egrep -v "perl-module-5|perl-module-tk|perl-module-mac-internetconfig|perl-module-ndbm-file|perl-module-html-treebuilder|perl-module-lwp-simple|perl-module-vms-filespec|perl-module-fcgi|perl-module-vms-stdio|perl-module-mac-buildtools" > /home/slug/openembedded/packages/perl/rdepends.tmp
3
4# Some additional dependencies that the above doesn't manage to figure out
5RDEPENDS_perl-module-math-bigint += "perl-module-math-bigint-calc "
6RDEPENDS_perl-module-math-bigint-calc += "perl-module-integer "
7
8# Depends list
9RDEPENDS_perl-misc += "perl-module-exporter "
10RDEPENDS_perl-misc += "perl-module-strict "
11RDEPENDS_perl-misc += "perl-module-warnings "
12RDEPENDS_perl-module-attribute-handlers-demo-demo += "perl-module-attribute-handlers "
13RDEPENDS_perl-module-attribute-handlers-demo-descriptions += "perl-module-attribute-handlers "
14RDEPENDS_perl-module-attribute-handlers-demo-myclass += "perl-module-base "
15RDEPENDS_perl-module-attribute-handlers += "perl-module-carp "
16RDEPENDS_perl-module-attribute-handlers += "perl-module-warnings "
17RDEPENDS_perl-module-attributes += "perl-module-strict "
18RDEPENDS_perl-module-attrs += "perl-module-xsloader "
19RDEPENDS_perl-module-autoloader += "perl-module-strict "
20RDEPENDS_perl-module-autosplit += "perl-module-carp "
21RDEPENDS_perl-module-autosplit += "perl-module-config "
22RDEPENDS_perl-module-autosplit += "perl-module-exporter "
23RDEPENDS_perl-module-autosplit += "perl-module-file-basename "
24RDEPENDS_perl-module-autosplit += "perl-module-file-path "
25RDEPENDS_perl-module-autosplit += "perl-module-file-spec-functions "
26RDEPENDS_perl-module-autosplit += "perl-module-strict "
27RDEPENDS_perl-module-base += "perl-module-strict "
28RDEPENDS_perl-module-base += "perl-module-vars "
29RDEPENDS_perl-module-b-asmdata += "perl-module-exporter "
30RDEPENDS_perl-module-b-assembler += "perl-module-b "
31RDEPENDS_perl-module-b-assembler += "perl-module-b-asmdata "
32RDEPENDS_perl-module-b-assembler += "perl-module-config "
33RDEPENDS_perl-module-b-assembler += "perl-module-exporter "
34RDEPENDS_perl-module-b-assembler += "perl-module-strict "
35RDEPENDS_perl-module-b-bblock += "perl-module-b-concise "
36RDEPENDS_perl-module-b-bblock += "perl-module-exporter "
37RDEPENDS_perl-module-b-bblock += "perl-module-strict "
38RDEPENDS_perl-module-b-bytecode += "perl-module-b-asmdata "
39RDEPENDS_perl-module-b-bytecode += "perl-module-b-assembler "
40RDEPENDS_perl-module-b-bytecode += "perl-module-config "
41RDEPENDS_perl-module-b-bytecode += "perl-module-strict "
42RDEPENDS_perl-module-b-cc += "perl-module-b-bblock "
43RDEPENDS_perl-module-b-cc += "perl-module-b-stackobj "
44RDEPENDS_perl-module-b-cc += "perl-module-config "
45RDEPENDS_perl-module-b-cc += "perl-module-strict "
46RDEPENDS_perl-module-b-c += "perl-module-b "
47RDEPENDS_perl-module-b-c += "perl-module-base "
48RDEPENDS_perl-module-b-c += "perl-module-b-asmdata "
49RDEPENDS_perl-module-b-c += "perl-module-carp "
50RDEPENDS_perl-module-b-c += "perl-module-config "
51RDEPENDS_perl-module-b-c += "perl-module-exporter "
52RDEPENDS_perl-module-b-c += "perl-module-filehandle "
53RDEPENDS_perl-module-b-c += "perl-module-strict "
54RDEPENDS_perl-module-b-debug += "perl-module-b-asmdata "
55RDEPENDS_perl-module-b-debug += "perl-module-strict "
56RDEPENDS_perl-module-b-deparse += "perl-module-bytes "
57RDEPENDS_perl-module-b-deparse += "perl-module-carp "
58RDEPENDS_perl-module-b-deparse += "perl-module-integer "
59RDEPENDS_perl-module-b-deparse += "perl-module-re "
60RDEPENDS_perl-module-b-deparse += "perl-module-strict "
61RDEPENDS_perl-module-b-deparse += "perl-module-utf8 "
62RDEPENDS_perl-module-b-deparse += "perl-module-warnings "
63RDEPENDS_perl-module-b-deparse += "perl-module-warnings "
64RDEPENDS_perl-module-b-deparse += "perl-module-vars "
65RDEPENDS_perl-module-b-disassembler += "perl-module-b "
66RDEPENDS_perl-module-b-disassembler += "perl-module-b-asmdata "
67RDEPENDS_perl-module-b-disassembler += "perl-module-carp "
68RDEPENDS_perl-module-b-disassembler += "perl-module-config "
69RDEPENDS_perl-module-b-disassembler += "perl-module-exporter "
70RDEPENDS_perl-module-b-disassembler += "perl-module-filehandle "
71RDEPENDS_perl-module-b-disassembler += "perl-module-strict "
72RDEPENDS_perl-module-benchmark += "perl-module-carp "
73RDEPENDS_perl-module-benchmark += "perl-module-exporter "
74RDEPENDS_perl-module-benchmark += "perl-module-strict "
75RDEPENDS_perl-module-bigint += "perl-module-exporter "
76RDEPENDS_perl-module-bigint += "perl-module-overload "
77RDEPENDS_perl-module-bigint += "perl-module-strict "
78RDEPENDS_perl-module-bignum += "perl-module-exporter "
79RDEPENDS_perl-module-bignum += "perl-module-strict "
80RDEPENDS_perl-module-bigrat += "perl-module-exporter "
81RDEPENDS_perl-module-bigrat += "perl-module-strict "
82RDEPENDS_perl-module-blib += "perl-module-cwd "
83RDEPENDS_perl-module-blib += "perl-module-file-spec "
84RDEPENDS_perl-module-blib += "perl-module-vars "
85RDEPENDS_perl-module-b-lint += "perl-module-strict "
86RDEPENDS_perl-module-b-showlex += "perl-module-b "
87RDEPENDS_perl-module-b-showlex += "perl-module-b-concise "
88RDEPENDS_perl-module-b-showlex += "perl-module-b-terse "
89RDEPENDS_perl-module-b-showlex += "perl-module-strict "
90RDEPENDS_perl-module-b-stackobj += "perl-module-b "
91RDEPENDS_perl-module-b-stackobj += "perl-module-carp "
92RDEPENDS_perl-module-b-stackobj += "perl-module-exporter "
93RDEPENDS_perl-module-b-stackobj += "perl-module-strict "
94RDEPENDS_perl-module-b-terse += "perl-module-b "
95RDEPENDS_perl-module-b-terse += "perl-module-b-asmdata "
96RDEPENDS_perl-module-b-terse += "perl-module-b-concise "
97RDEPENDS_perl-module-b-terse += "perl-module-carp "
98RDEPENDS_perl-module-b-terse += "perl-module-strict "
99RDEPENDS_perl-module-b += "perl-module-exporter "
100RDEPENDS_perl-module-b += "perl-module-strict "
101RDEPENDS_perl-module-b += "perl-module-xsloader "
102RDEPENDS_perl-module-b-xref += "perl-module-config "
103RDEPENDS_perl-module-b-xref += "perl-module-strict "
104RDEPENDS_perl-module-byteloader += "perl-module-xsloader "
105RDEPENDS_perl-module-carp-heavy += "perl-module-carp "
106RDEPENDS_perl-module-carp += "perl-module-exporter "
107RDEPENDS_perl-module-cgi-apache += "perl-module-cgi "
108RDEPENDS_perl-module-cgi-carp += "perl-module-exporter "
109RDEPENDS_perl-module-cgi-carp += "perl-module-file-spec "
110RDEPENDS_perl-module-cgi-cookie += "perl-module-cgi-util "
111RDEPENDS_perl-module-cgi-fast += "perl-module-cgi "
112RDEPENDS_perl-module-cgi-fast += "perl-module-vars "
113RDEPENDS_perl-module-cgi-pretty += "perl-module-cgi "
114RDEPENDS_perl-module-cgi-pretty += "perl-module-strict "
115RDEPENDS_perl-module-cgi-push += "perl-module-cgi "
116RDEPENDS_perl-module-cgi-push += "perl-module-cgi-util "
117RDEPENDS_perl-module-cgi-switch += "perl-module-cgi "
118RDEPENDS_perl-module-cgi += "perl-module-carp "
119RDEPENDS_perl-module-cgi += "perl-module-cgi-util "
120RDEPENDS_perl-module-cgi += "perl-module-constant "
121RDEPENDS_perl-module-cgi-util += "perl-module-exporter "
122RDEPENDS_perl-module-cgi-util += "perl-module-strict "
123RDEPENDS_perl-module-cgi-util += "perl-module-vars "
124RDEPENDS_perl-module-charnames += "perl-module-carp "
125RDEPENDS_perl-module-charnames += "perl-module-file-spec "
126RDEPENDS_perl-module-charnames += "perl-module-strict "
127RDEPENDS_perl-module-charnames += "perl-module-warnings "
128RDEPENDS_perl-module-class-isa += "perl-module-strict "
129RDEPENDS_perl-module-class-isa += "perl-module-vars "
130RDEPENDS_perl-module-class-struct += "perl-module-exporter "
131RDEPENDS_perl-module-class-struct += "perl-module-carp "
132RDEPENDS_perl-module-class-struct += "perl-module-strict "
133RDEPENDS_perl-module-class-struct += "perl-module-warnings-register "
134RDEPENDS_perl-module-config += "perl-module-strict "
135RDEPENDS_perl-module-constant += "perl-module-strict "
136RDEPENDS_perl-module-constant += "perl-module-warnings-register "
137RDEPENDS_perl-module-cpan-firsttime += "perl-module-extutils-makemaker "
138RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-basename "
139RDEPENDS_perl-module-cpan-firsttime += "perl-module-filehandle "
140RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-path "
141RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-spec "
142RDEPENDS_perl-module-cpan-firsttime += "perl-module-strict "
143RDEPENDS_perl-module-cpan-firsttime += "perl-module-vars "
144RDEPENDS_perl-module-cpan-nox += "perl-module-base "
145RDEPENDS_perl-module-cpan-nox += "perl-module-cpan "
146RDEPENDS_perl-module-cpan-nox += "perl-module-strict "
147RDEPENDS_perl-module-cpan-nox += "perl-module-vars "
148RDEPENDS_perl-module-cpan += "perl-module-carp "
149RDEPENDS_perl-module-cpan += "perl-module-config "
150RDEPENDS_perl-module-cpan += "perl-module-cwd "
151RDEPENDS_perl-module-cpan += "perl-module-dirhandle "
152RDEPENDS_perl-module-cpan += "perl-module-exporter "
153RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker "
154RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker "
155RDEPENDS_perl-module-cpan += "perl-module-file-basename "
156RDEPENDS_perl-module-cpan += "perl-module-file-copy "
157RDEPENDS_perl-module-cpan += "perl-module-file-find "
158RDEPENDS_perl-module-cpan += "perl-module-filehandle "
159RDEPENDS_perl-module-cpan += "perl-module-file-path "
160RDEPENDS_perl-module-cpan += "perl-module-file-spec "
161RDEPENDS_perl-module-cpan += "perl-module-overload "
162RDEPENDS_perl-module-cpan += "perl-module-safe "
163RDEPENDS_perl-module-cpan += "perl-module-strict "
164RDEPENDS_perl-module-cpan += "perl-module-sys-hostname "
165RDEPENDS_perl-module-cpan += "perl-module-text-parsewords "
166RDEPENDS_perl-module-cpan += "perl-module-text-wrap "
167RDEPENDS_perl-module-cpan += "perl-module-vars "
168RDEPENDS_perl-module-cwd += "perl-module-exporter "
169RDEPENDS_perl-module-cwd += "perl-module-strict "
170RDEPENDS_perl-module-cwd += "perl-module-vars "
171RDEPENDS_perl-module-data-dumper += "perl-module-exporter "
172RDEPENDS_perl-module-data-dumper += "perl-module-overload "
173RDEPENDS_perl-module-data-dumper += "perl-module-carp "
174RDEPENDS_perl-module-dbm-filter-compress += "perl-module-carp "
175RDEPENDS_perl-module-dbm-filter-compress += "perl-module-strict "
176RDEPENDS_perl-module-dbm-filter-compress += "perl-module-warnings "
177RDEPENDS_perl-module-dbm-filter-encode += "perl-module-carp "
178RDEPENDS_perl-module-dbm-filter-encode += "perl-module-strict "
179RDEPENDS_perl-module-dbm-filter-encode += "perl-module-warnings "
180RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-strict "
181RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-warnings "
182RDEPENDS_perl-module-dbm-filter-null += "perl-module-strict "
183RDEPENDS_perl-module-dbm-filter-null += "perl-module-warnings "
184RDEPENDS_perl-module-dbm-filter += "perl-module-carp "
185RDEPENDS_perl-module-dbm-filter += "perl-module-strict "
186RDEPENDS_perl-module-dbm-filter += "perl-module-warnings "
187RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-carp "
188RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-strict "
189RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-warnings "
190RDEPENDS_perl-module-devel-dprof += "perl-module-xsloader "
191RDEPENDS_perl-module-devel-peek += "perl-module-exporter "
192RDEPENDS_perl-module-devel-peek += "perl-module-xsloader "
193RDEPENDS_perl-module-devel-ppport += "perl-module-dynaloader "
194RDEPENDS_perl-module-devel-ppport += "perl-module-strict "
195RDEPENDS_perl-module-devel-ppport += "perl-module-vars "
196RDEPENDS_perl-module-devel-selfstubber += "perl-module-selfloader "
197RDEPENDS_perl-module-devel-selfstubber += "perl-module-file-spec "
198RDEPENDS_perl-module-diagnostics += "perl-module-carp "
199RDEPENDS_perl-module-diagnostics += "perl-module-config "
200RDEPENDS_perl-module-diagnostics += "perl-module-strict "
201RDEPENDS_perl-module-digest-base += "perl-module-strict "
202RDEPENDS_perl-module-digest-base += "perl-module-vars "
203RDEPENDS_perl-module-digest-file += "perl-module-carp "
204RDEPENDS_perl-module-digest-file += "perl-module-digest "
205RDEPENDS_perl-module-digest-file += "perl-module-exporter "
206RDEPENDS_perl-module-digest-file += "perl-module-strict "
207RDEPENDS_perl-module-digest-file += "perl-module-vars "
208RDEPENDS_perl-module-digest-md5 += "perl-module-dynaloader "
209RDEPENDS_perl-module-digest-md5 += "perl-module-exporter "
210RDEPENDS_perl-module-digest-md5 += "perl-module-strict "
211RDEPENDS_perl-module-digest-md5 += "perl-module-vars "
212RDEPENDS_perl-module-digest += "perl-module-strict "
213RDEPENDS_perl-module-digest += "perl-module-vars "
214RDEPENDS_perl-module-dirhandle += "perl-module-carp "
215RDEPENDS_perl-module-dirhandle += "perl-module-symbol "
216RDEPENDS_perl-module-dumpvalue += "perl-module-strict "
217RDEPENDS_perl-module-dynaloader += "perl-module-autoloader "
218RDEPENDS_perl-module-dynaloader += "perl-module-config "
219RDEPENDS_perl-module-dynaloader += "perl-module-vars "
220RDEPENDS_perl-module-encode-alias += "perl-module-base "
221RDEPENDS_perl-module-encode-alias += "perl-module-encode "
222RDEPENDS_perl-module-encode-alias += "perl-module-strict "
223RDEPENDS_perl-module-encode-byte += "perl-module-encode "
224RDEPENDS_perl-module-encode-byte += "perl-module-xsloader "
225RDEPENDS_perl-module-encode-cjkconstants += "perl-module-exporter "
226RDEPENDS_perl-module-encode-cjkconstants += "perl-module-carp "
227RDEPENDS_perl-module-encode-cjkconstants += "perl-module-strict "
228RDEPENDS_perl-module-encode-cn-hz += "perl-module-base "
229RDEPENDS_perl-module-encode-cn-hz += "perl-module-encode "
230RDEPENDS_perl-module-encode-cn-hz += "perl-module-strict "
231RDEPENDS_perl-module-encode-cn-hz += "perl-module-vars "
232RDEPENDS_perl-module-encode-cn += "perl-module-encode "
233RDEPENDS_perl-module-encode-cn += "perl-module-encode-cn-hz "
234RDEPENDS_perl-module-encode-cn += "perl-module-xsloader "
235RDEPENDS_perl-module-encode-config += "perl-module-strict "
236RDEPENDS_perl-module-encode-ebcdic += "perl-module-encode "
237RDEPENDS_perl-module-encode-ebcdic += "perl-module-xsloader "
238RDEPENDS_perl-module-encode-encoder += "perl-module-exporter "
239RDEPENDS_perl-module-encode-encoder += "perl-module-carp "
240RDEPENDS_perl-module-encode-encoder += "perl-module-encode "
241RDEPENDS_perl-module-encode-encoder += "perl-module-strict "
242RDEPENDS_perl-module-encode-encoder += "perl-module-warnings "
243RDEPENDS_perl-module-encode-encoding += "perl-module-encode "
244RDEPENDS_perl-module-encode-encoding += "perl-module-strict "
245RDEPENDS_perl-module-encode-guess += "perl-module-base "
246RDEPENDS_perl-module-encode-guess += "perl-module-encode "
247RDEPENDS_perl-module-encode-guess += "perl-module-strict "
248RDEPENDS_perl-module-encode-jp-h2z += "perl-module-encode-cjkconstants "
249RDEPENDS_perl-module-encode-jp-h2z += "perl-module-strict "
250RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-base "
251RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode "
252RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-cjkconstants "
253RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-strict "
254RDEPENDS_perl-module-encode-jp += "perl-module-encode "
255RDEPENDS_perl-module-encode-jp += "perl-module-encode-jp-jis7 "
256RDEPENDS_perl-module-encode-jp += "perl-module-xsloader "
257RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-base "
258RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode "
259RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode-cjkconstants "
260RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-strict "
261RDEPENDS_perl-module-encode-kr += "perl-module-encode "
262RDEPENDS_perl-module-encode-kr += "perl-module-encode-kr-2022-kr "
263RDEPENDS_perl-module-encode-kr += "perl-module-xsloader "
264RDEPENDS_perl-module-encode-mime-header += "perl-module-base "
265RDEPENDS_perl-module-encode-mime-header += "perl-module-carp "
266RDEPENDS_perl-module-encode-mime-header += "perl-module-constant "
267RDEPENDS_perl-module-encode-mime-header += "perl-module-encode "
268RDEPENDS_perl-module-encode-mime-header += "perl-module-mime-base64 "
269RDEPENDS_perl-module-encode-mime-header += "perl-module-strict "
270RDEPENDS_perl-module-encode-symbol += "perl-module-encode "
271RDEPENDS_perl-module-encode-symbol += "perl-module-xsloader "
272RDEPENDS_perl-module-encode-tw += "perl-module-encode "
273RDEPENDS_perl-module-encode-tw += "perl-module-xsloader "
274RDEPENDS_perl-module-encode-unicode += "perl-module-encode "
275RDEPENDS_perl-module-encode-unicode += "perl-module-base "
276RDEPENDS_perl-module-encode-unicode += "perl-module-strict "
277RDEPENDS_perl-module-encode-unicode += "perl-module-warnings "
278RDEPENDS_perl-module-encode-unicode += "perl-module-xsloader "
279RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-base "
280RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-encode "
281RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-mime-base64 "
282RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-strict "
283RDEPENDS_perl-module-encode += "perl-module-encode-config "
284RDEPENDS_perl-module-encode += "perl-module-exporter "
285RDEPENDS_perl-module-encode += "perl-module-base "
286RDEPENDS_perl-module-encode += "perl-module-encode-alias "
287RDEPENDS_perl-module-encode += "perl-module-strict "
288RDEPENDS_perl-module-encode += "perl-module-xsloader "
289RDEPENDS_perl-module-encoding += "perl-module-encode "
290RDEPENDS_perl-module-encoding += "perl-module-strict "
291RDEPENDS_perl-module-english += "perl-module-exporter "
292RDEPENDS_perl-module-env += "perl-module-config "
293RDEPENDS_perl-module-env += "perl-module-tie-array "
294RDEPENDS_perl-module-errno += "perl-module-config "
295RDEPENDS_perl-module-errno += "perl-module-exporter "
296RDEPENDS_perl-module-errno += "perl-module-strict "
297RDEPENDS_perl-module-exporter-heavy += "perl-module-exporter "
298RDEPENDS_perl-module-exporter-heavy += "perl-module-strict "
299RDEPENDS_perl-module-extutils-command-mm += "perl-module-exporter "
300RDEPENDS_perl-module-extutils-command-mm += "perl-module-strict "
301RDEPENDS_perl-module-extutils-command-mm += "perl-module-vars "
302RDEPENDS_perl-module-extutils-command += "perl-module-exporter "
303RDEPENDS_perl-module-extutils-command += "perl-module-carp "
304RDEPENDS_perl-module-extutils-command += "perl-module-file-basename "
305RDEPENDS_perl-module-extutils-command += "perl-module-file-compare "
306RDEPENDS_perl-module-extutils-command += "perl-module-file-copy "
307RDEPENDS_perl-module-extutils-command += "perl-module-file-path "
308RDEPENDS_perl-module-extutils-command += "perl-module-strict "
309RDEPENDS_perl-module-extutils-command += "perl-module-vars "
310RDEPENDS_perl-module-extutils-constant-base += "perl-module-carp "
311RDEPENDS_perl-module-extutils-constant-base += "perl-module-extutils-constant-utils "
312RDEPENDS_perl-module-extutils-constant-base += "perl-module-strict "
313RDEPENDS_perl-module-extutils-constant-base += "perl-module-text-wrap "
314RDEPENDS_perl-module-extutils-constant-base += "perl-module-vars "
315RDEPENDS_perl-module-extutils-constant += "perl-module-carp "
316RDEPENDS_perl-module-extutils-constant += "perl-module-exporter "
317RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-utils "
318RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-xs "
319RDEPENDS_perl-module-extutils-constant += "perl-module-strict "
320RDEPENDS_perl-module-extutils-constant += "perl-module-vars "
321RDEPENDS_perl-module-extutils-constant-utils += "perl-module-carp "
322RDEPENDS_perl-module-extutils-constant-utils += "perl-module-strict "
323RDEPENDS_perl-module-extutils-constant-utils += "perl-module-vars "
324RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-base "
325RDEPENDS_perl-module-extutils-constant-xs += "perl-module-carp "
326RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant "
327RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-utils "
328RDEPENDS_perl-module-extutils-constant-xs += "perl-module-strict "
329RDEPENDS_perl-module-extutils-constant-xs += "perl-module-vars "
330RDEPENDS_perl-module-extutils-embed += "perl-module-exporter "
331RDEPENDS_perl-module-extutils-embed += "perl-module-filehandle "
332RDEPENDS_perl-module-extutils-embed += "perl-module-config "
333RDEPENDS_perl-module-extutils-embed += "perl-module-file-spec "
334RDEPENDS_perl-module-extutils-embed += "perl-module-getopt-std "
335RDEPENDS_perl-module-extutils-embed += "perl-module-strict "
336RDEPENDS_perl-module-extutils-installed += "perl-module-carp "
337RDEPENDS_perl-module-extutils-installed += "perl-module-config "
338RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-makemaker "
339RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-packlist "
340RDEPENDS_perl-module-extutils-installed += "perl-module-file-basename "
341RDEPENDS_perl-module-extutils-installed += "perl-module-file-find "
342RDEPENDS_perl-module-extutils-installed += "perl-module-file-spec "
343RDEPENDS_perl-module-extutils-installed += "perl-module-strict "
344RDEPENDS_perl-module-extutils-installed += "perl-module-vars "
345RDEPENDS_perl-module-extutils-install += "perl-module-carp "
346RDEPENDS_perl-module-extutils-install += "perl-module-config "
347RDEPENDS_perl-module-extutils-install += "perl-module-exporter "
348RDEPENDS_perl-module-extutils-install += "perl-module-file-spec "
349RDEPENDS_perl-module-extutils-install += "perl-module-vars "
350RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-config "
351RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-cwd "
352RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-basename "
353RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-spec "
354RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-strict "
355RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-vars "
356RDEPENDS_perl-module-extutils-liblist += "perl-module-extutils-liblist-kid "
357RDEPENDS_perl-module-extutils-liblist += "perl-module-file-spec "
358RDEPENDS_perl-module-extutils-liblist += "perl-module-vars "
359RDEPENDS_perl-module-extutils-makemaker-bytes += "perl-module-vars "
360RDEPENDS_perl-module-extutils-makemaker += "perl-module-exporter "
361RDEPENDS_perl-module-extutils-makemaker += "perl-module-carp "
362RDEPENDS_perl-module-extutils-makemaker += "perl-module-config "
363RDEPENDS_perl-module-extutils-makemaker += "perl-module-file-path "
364RDEPENDS_perl-module-extutils-makemaker += "perl-module-strict "
365RDEPENDS_perl-module-extutils-makemaker-vmsish += "perl-module-vmsish "
366RDEPENDS_perl-module-extutils-makemaker-vmsish += "perl-module-vars "
367RDEPENDS_perl-module-extutils-manifest += "perl-module-exporter "
368RDEPENDS_perl-module-extutils-manifest += "perl-module-carp "
369RDEPENDS_perl-module-extutils-manifest += "perl-module-config "
370RDEPENDS_perl-module-extutils-manifest += "perl-module-file-copy "
371RDEPENDS_perl-module-extutils-manifest += "perl-module-file-find "
372RDEPENDS_perl-module-extutils-manifest += "perl-module-file-spec "
373RDEPENDS_perl-module-extutils-manifest += "perl-module-strict "
374RDEPENDS_perl-module-extutils-miniperl += "perl-module-exporter "
375RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-config "
376RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-exporter "
377RDEPENDS_perl-module-extutils-mksymlists += "perl-module-carp "
378RDEPENDS_perl-module-extutils-mksymlists += "perl-module-config "
379RDEPENDS_perl-module-extutils-mksymlists += "perl-module-exporter "
380RDEPENDS_perl-module-extutils-mksymlists += "perl-module-strict "
381RDEPENDS_perl-module-extutils-mksymlists += "perl-module-vars "
382RDEPENDS_perl-module-extutils-mm-any += "perl-module-config "
383RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-spec "
384RDEPENDS_perl-module-extutils-mm-any += "perl-module-strict "
385RDEPENDS_perl-module-extutils-mm-any += "perl-module-vars "
386RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-any "
387RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-unix "
388RDEPENDS_perl-module-extutils-mm-beos += "perl-module-config "
389RDEPENDS_perl-module-extutils-mm-beos += "perl-module-file-spec "
390RDEPENDS_perl-module-extutils-mm-beos += "perl-module-vars "
391RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-any "
392RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-unix "
393RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-config "
394RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-file-spec "
395RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-strict "
396RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-vars "
397RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-any "
398RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-unix "
399RDEPENDS_perl-module-extutils-mm-dos += "perl-module-strict "
400RDEPENDS_perl-module-extutils-mm-dos += "perl-module-vars "
401RDEPENDS_perl-module-extutils-mm-macos += "perl-module-exporter "
402RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-mm-any "
403RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-mm-unix "
404RDEPENDS_perl-module-extutils-mm-macos += "perl-module-config "
405RDEPENDS_perl-module-extutils-mm-macos += "perl-module-cwd "
406RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-makemaker "
407RDEPENDS_perl-module-extutils-mm-macos += "perl-module-file-basename "
408RDEPENDS_perl-module-extutils-mm-macos += "perl-module-vars "
409RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-mm-win32 "
410RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-config "
411RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker "
412RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-file-basename "
413RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-strict "
414RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-vars "
415RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-any "
416RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-unix "
417RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-makemaker "
418RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-file-spec "
419RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-strict "
420RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-vars "
421RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-mm-any "
422RDEPENDS_perl-module-extutils-mm-unix += "perl-module-carp "
423RDEPENDS_perl-module-extutils-mm-unix += "perl-module-config "
424RDEPENDS_perl-module-extutils-mm-unix += "perl-module-dirhandle "
425RDEPENDS_perl-module-extutils-mm-unix += "perl-module-exporter "
426RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker "
427RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-basename "
428RDEPENDS_perl-module-extutils-mm-unix += "perl-module-strict "
429RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-liblist "
430RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker "
431RDEPENDS_perl-module-extutils-mm += "perl-module-config "
432RDEPENDS_perl-module-extutils-mm += "perl-module-strict "
433RDEPENDS_perl-module-extutils-mm += "perl-module-vars "
434RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-extutils-mm-unix "
435RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-strict "
436RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-vars "
437RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-any "
438RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-unix "
439RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-config "
440RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker "
441RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-basename "
442RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-spec "
443RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-strict "
444RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-vars "
445RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-mm-win32 "
446RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-config "
447RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-vars "
448RDEPENDS_perl-module-extutils-mm-vms += "perl-module-exporter "
449RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-any "
450RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-unix "
451RDEPENDS_perl-module-extutils-mm-vms += "perl-module-config "
452RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker "
453RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-basename "
454RDEPENDS_perl-module-extutils-mm-vms += "perl-module-strict "
455RDEPENDS_perl-module-extutils-mm-vms += "perl-module-vars "
456RDEPENDS_perl-module-extutils-my += "perl-module-extutils-mm "
457RDEPENDS_perl-module-extutils-my += "perl-module-strict "
458RDEPENDS_perl-module-extutils-my += "perl-module-vars "
459RDEPENDS_perl-module-extutils-packlist += "perl-module-carp "
460RDEPENDS_perl-module-extutils-packlist += "perl-module-strict "
461RDEPENDS_perl-module-extutils-packlist += "perl-module-vars "
462RDEPENDS_perl-module-extutils-testlib += "perl-module-cwd "
463RDEPENDS_perl-module-extutils-testlib += "perl-module-file-spec "
464RDEPENDS_perl-module-extutils-testlib += "perl-module-lib "
465RDEPENDS_perl-module-fatal += "perl-module-carp "
466RDEPENDS_perl-module-fatal += "perl-module-strict "
467RDEPENDS_perl-module-fcntl += "perl-module-exporter "
468RDEPENDS_perl-module-fcntl += "perl-module-xsloader "
469RDEPENDS_perl-module-fields += "perl-module-strict "
470RDEPENDS_perl-module-fields += "perl-module-vars "
471RDEPENDS_perl-module-file-basename += "perl-module-exporter "
472RDEPENDS_perl-module-file-basename += "perl-module-warnings "
473RDEPENDS_perl-module-filecache += "perl-module-base "
474RDEPENDS_perl-module-filecache += "perl-module-carp "
475RDEPENDS_perl-module-filecache += "perl-module-config "
476RDEPENDS_perl-module-filecache += "perl-module-strict "
477RDEPENDS_perl-module-filecache += "perl-module-vars "
478RDEPENDS_perl-module-file-checktree += "perl-module-cwd "
479RDEPENDS_perl-module-file-checktree += "perl-module-exporter "
480RDEPENDS_perl-module-file-checktree += "perl-module-file-spec "
481RDEPENDS_perl-module-file-checktree += "perl-module-strict "
482RDEPENDS_perl-module-file-checktree += "perl-module-warnings "
483RDEPENDS_perl-module-file-compare += "perl-module-exporter "
484RDEPENDS_perl-module-file-compare += "perl-module-carp "
485RDEPENDS_perl-module-file-compare += "perl-module-strict "
486RDEPENDS_perl-module-file-compare += "perl-module-warnings "
487RDEPENDS_perl-module-file-copy += "perl-module-exporter "
488RDEPENDS_perl-module-file-copy += "perl-module-carp "
489RDEPENDS_perl-module-file-copy += "perl-module-config "
490RDEPENDS_perl-module-file-copy += "perl-module-file-spec "
491RDEPENDS_perl-module-file-copy += "perl-module-strict "
492RDEPENDS_perl-module-file-copy += "perl-module-warnings "
493RDEPENDS_perl-module-file-dosglob += "perl-module-strict "
494RDEPENDS_perl-module-file-dosglob += "perl-module-warnings "
495RDEPENDS_perl-module-file-find += "perl-module-cwd "
496RDEPENDS_perl-module-file-find += "perl-module-exporter "
497RDEPENDS_perl-module-file-find += "perl-module-file-basename "
498RDEPENDS_perl-module-file-find += "perl-module-file-spec "
499RDEPENDS_perl-module-file-find += "perl-module-strict "
500RDEPENDS_perl-module-file-find += "perl-module-warnings "
501RDEPENDS_perl-module-file-find += "perl-module-warnings-register "
502RDEPENDS_perl-module-file-glob += "perl-module-strict "
503RDEPENDS_perl-module-file-glob += "perl-module-xsloader "
504RDEPENDS_perl-module-filehandle += "perl-module-io-file "
505RDEPENDS_perl-module-filehandle += "perl-module-strict "
506RDEPENDS_perl-module-file-path += "perl-module-carp "
507RDEPENDS_perl-module-file-path += "perl-module-exporter "
508RDEPENDS_perl-module-file-path += "perl-module-file-basename "
509RDEPENDS_perl-module-file-path += "perl-module-strict "
510RDEPENDS_perl-module-file-path += "perl-module-warnings "
511RDEPENDS_perl-module-file-spec-cygwin += "perl-module-file-spec-unix "
512RDEPENDS_perl-module-file-spec-cygwin += "perl-module-strict "
513RDEPENDS_perl-module-file-spec-cygwin += "perl-module-vars "
514RDEPENDS_perl-module-file-spec-epoc += "perl-module-file-spec-unix "
515RDEPENDS_perl-module-file-spec-epoc += "perl-module-strict "
516RDEPENDS_perl-module-file-spec-epoc += "perl-module-vars "
517RDEPENDS_perl-module-file-spec-functions += "perl-module-exporter "
518RDEPENDS_perl-module-file-spec-functions += "perl-module-file-spec "
519RDEPENDS_perl-module-file-spec-functions += "perl-module-strict "
520RDEPENDS_perl-module-file-spec-functions += "perl-module-vars "
521RDEPENDS_perl-module-file-spec-mac += "perl-module-file-spec-unix "
522RDEPENDS_perl-module-file-spec-mac += "perl-module-strict "
523RDEPENDS_perl-module-file-spec-mac += "perl-module-vars "
524RDEPENDS_perl-module-file-spec-os2 += "perl-module-file-spec-unix "
525RDEPENDS_perl-module-file-spec-os2 += "perl-module-strict "
526RDEPENDS_perl-module-file-spec-os2 += "perl-module-vars "
527RDEPENDS_perl-module-file-spec-unix += "perl-module-strict "
528RDEPENDS_perl-module-file-spec-unix += "perl-module-vars "
529RDEPENDS_perl-module-file-spec += "perl-module-strict "
530RDEPENDS_perl-module-file-spec += "perl-module-vars "
531RDEPENDS_perl-module-file-spec-win32 += "perl-module-file-spec-unix "
532RDEPENDS_perl-module-file-spec-win32 += "perl-module-strict "
533RDEPENDS_perl-module-file-spec-win32 += "perl-module-vars "
534RDEPENDS_perl-module-file-spec-vms += "perl-module-file-spec-unix "
535RDEPENDS_perl-module-file-spec-vms += "perl-module-file-basename "
536RDEPENDS_perl-module-file-spec-vms += "perl-module-strict "
537RDEPENDS_perl-module-file-spec-vms += "perl-module-vars "
538RDEPENDS_perl-module-file-stat += "perl-module-class-struct "
539RDEPENDS_perl-module-file-stat += "perl-module-strict "
540RDEPENDS_perl-module-file-stat += "perl-module-warnings "
541RDEPENDS_perl-module-file-stat += "perl-module-vars "
542RDEPENDS_perl-module-file-temp += "perl-module-base "
543RDEPENDS_perl-module-file-temp += "perl-module-carp "
544RDEPENDS_perl-module-file-temp += "perl-module-constant "
545RDEPENDS_perl-module-file-temp += "perl-module-errno "
546RDEPENDS_perl-module-file-temp += "perl-module-fcntl "
547RDEPENDS_perl-module-file-temp += "perl-module-file-path "
548RDEPENDS_perl-module-file-temp += "perl-module-file-spec "
549RDEPENDS_perl-module-file-temp += "perl-module-overload "
550RDEPENDS_perl-module-file-temp += "perl-module-strict "
551RDEPENDS_perl-module-file-temp += "perl-module-vars "
552RDEPENDS_perl-module-filter-simple += "perl-module-carp "
553RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call "
554RDEPENDS_perl-module-filter-simple += "perl-module-text-balanced "
555RDEPENDS_perl-module-filter-simple += "perl-module-vars "
556RDEPENDS_perl-module-filter-util-call += "perl-module-dynaloader "
557RDEPENDS_perl-module-filter-util-call += "perl-module-exporter "
558RDEPENDS_perl-module-filter-util-call += "perl-module-carp "
559RDEPENDS_perl-module-filter-util-call += "perl-module-strict "
560RDEPENDS_perl-module-filter-util-call += "perl-module-warnings "
561RDEPENDS_perl-module-filter-util-call += "perl-module-vars "
562RDEPENDS_perl-module-findbin += "perl-module-exporter "
563RDEPENDS_perl-module-findbin += "perl-module-carp "
564RDEPENDS_perl-module-findbin += "perl-module-config "
565RDEPENDS_perl-module-findbin += "perl-module-cwd "
566RDEPENDS_perl-module-findbin += "perl-module-file-basename "
567RDEPENDS_perl-module-findbin += "perl-module-file-spec "
568RDEPENDS_perl-module-getopt-long += "perl-module-constant "
569RDEPENDS_perl-module-getopt-long += "perl-module-exporter "
570RDEPENDS_perl-module-getopt-long += "perl-module-strict "
571RDEPENDS_perl-module-getopt-long += "perl-module-vars "
572RDEPENDS_perl-module-getopt-std += "perl-module-exporter "
573RDEPENDS_perl-module-hash-util += "perl-module-exporter "
574RDEPENDS_perl-module-hash-util += "perl-module-carp "
575RDEPENDS_perl-module-hash-util += "perl-module-strict "
576RDEPENDS_perl-module-i18n-collate += "perl-module-exporter "
577RDEPENDS_perl-module-i18n-collate += "perl-module-posix "
578RDEPENDS_perl-module-i18n-collate += "perl-module-strict "
579RDEPENDS_perl-module-i18n-collate += "perl-module-warnings-register "
580RDEPENDS_perl-module-i18n-langinfo += "perl-module-dynaloader "
581RDEPENDS_perl-module-i18n-langinfo += "perl-module-exporter "
582RDEPENDS_perl-module-i18n-langinfo += "perl-module-autoloader "
583RDEPENDS_perl-module-i18n-langinfo += "perl-module-carp "
584RDEPENDS_perl-module-i18n-langinfo += "perl-module-strict "
585RDEPENDS_perl-module-i18n-langinfo += "perl-module-warnings "
586RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-i18n-langtags "
587RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-strict "
588RDEPENDS_perl-module-i18n-langtags-list += "perl-module-strict "
589RDEPENDS_perl-module-i18n-langtags-list += "perl-module-vars "
590RDEPENDS_perl-module-i18n-langtags += "perl-module-exporter "
591RDEPENDS_perl-module-i18n-langtags += "perl-module-strict "
592RDEPENDS_perl-module-i18n-langtags += "perl-module-vars "
593RDEPENDS_perl-module-io-dir += "perl-module-carp "
594RDEPENDS_perl-module-io-dir += "perl-module-exporter "
595RDEPENDS_perl-module-io-dir += "perl-module-file-spec "
596RDEPENDS_perl-module-io-dir += "perl-module-file-stat "
597RDEPENDS_perl-module-io-dir += "perl-module-io-file "
598RDEPENDS_perl-module-io-dir += "perl-module-strict "
599RDEPENDS_perl-module-io-dir += "perl-module-symbol "
600RDEPENDS_perl-module-io-dir += "perl-module-tie-hash "
601RDEPENDS_perl-module-io-file += "perl-module-exporter "
602RDEPENDS_perl-module-io-file += "perl-module-carp "
603RDEPENDS_perl-module-io-file += "perl-module-file-spec "
604RDEPENDS_perl-module-io-file += "perl-module-io-seekable "
605RDEPENDS_perl-module-io-file += "perl-module-selectsaver "
606RDEPENDS_perl-module-io-file += "perl-module-strict "
607RDEPENDS_perl-module-io-file += "perl-module-symbol "
608RDEPENDS_perl-module-io-handle += "perl-module-exporter "
609RDEPENDS_perl-module-io-handle += "perl-module-carp "
610RDEPENDS_perl-module-io-handle += "perl-module-selectsaver "
611RDEPENDS_perl-module-io-handle += "perl-module-strict "
612RDEPENDS_perl-module-io-handle += "perl-module-symbol "
613RDEPENDS_perl-module-io-pipe += "perl-module-carp "
614RDEPENDS_perl-module-io-pipe += "perl-module-io-handle "
615RDEPENDS_perl-module-io-pipe += "perl-module-strict "
616RDEPENDS_perl-module-io-pipe += "perl-module-symbol "
617RDEPENDS_perl-module-io-poll += "perl-module-exporter "
618RDEPENDS_perl-module-io-poll += "perl-module-io-handle "
619RDEPENDS_perl-module-io-poll += "perl-module-strict "
620RDEPENDS_perl-module-io-seekable += "perl-module-exporter "
621RDEPENDS_perl-module-io-seekable += "perl-module-carp "
622RDEPENDS_perl-module-io-seekable += "perl-module-fcntl "
623RDEPENDS_perl-module-io-seekable += "perl-module-io-handle "
624RDEPENDS_perl-module-io-seekable += "perl-module-strict "
625RDEPENDS_perl-module-io-select += "perl-module-exporter "
626RDEPENDS_perl-module-io-select += "perl-module-strict "
627RDEPENDS_perl-module-io-select += "perl-module-warnings-register "
628RDEPENDS_perl-module-io-select += "perl-module-vars "
629RDEPENDS_perl-module-io-socket-inet += "perl-module-carp "
630RDEPENDS_perl-module-io-socket-inet += "perl-module-errno "
631RDEPENDS_perl-module-io-socket-inet += "perl-module-exporter "
632RDEPENDS_perl-module-io-socket-inet += "perl-module-io-socket "
633RDEPENDS_perl-module-io-socket-inet += "perl-module-socket "
634RDEPENDS_perl-module-io-socket-inet += "perl-module-strict "
635RDEPENDS_perl-module-io-socket-unix += "perl-module-carp "
636RDEPENDS_perl-module-io-socket-unix += "perl-module-io-socket "
637RDEPENDS_perl-module-io-socket-unix += "perl-module-socket "
638RDEPENDS_perl-module-io-socket-unix += "perl-module-strict "
639RDEPENDS_perl-module-io-socket += "perl-module-io-socket-inet "
640RDEPENDS_perl-module-io-socket += "perl-module-io-socket-unix "
641RDEPENDS_perl-module-io-socket += "perl-module-carp "
642RDEPENDS_perl-module-io-socket += "perl-module-errno "
643RDEPENDS_perl-module-io-socket += "perl-module-exporter "
644RDEPENDS_perl-module-io-socket += "perl-module-io-handle "
645RDEPENDS_perl-module-io-socket += "perl-module-socket "
646RDEPENDS_perl-module-io-socket += "perl-module-strict "
647RDEPENDS_perl-module-io += "perl-module-carp "
648RDEPENDS_perl-module-io += "perl-module-strict "
649RDEPENDS_perl-module-io += "perl-module-warnings "
650RDEPENDS_perl-module-io += "perl-module-xsloader "
651RDEPENDS_perl-module-ipc-msg += "perl-module-carp "
652RDEPENDS_perl-module-ipc-msg += "perl-module-ipc-sysv "
653RDEPENDS_perl-module-ipc-msg += "perl-module-strict "
654RDEPENDS_perl-module-ipc-msg += "perl-module-vars "
655RDEPENDS_perl-module-ipc-open2 += "perl-module-exporter "
656RDEPENDS_perl-module-ipc-open2 += "perl-module-ipc-open3 "
657RDEPENDS_perl-module-ipc-open2 += "perl-module-strict "
658RDEPENDS_perl-module-ipc-open3 += "perl-module-exporter "
659RDEPENDS_perl-module-ipc-open3 += "perl-module-carp "
660RDEPENDS_perl-module-ipc-open3 += "perl-module-strict "
661RDEPENDS_perl-module-ipc-open3 += "perl-module-symbol "
662RDEPENDS_perl-module-ipc-semaphore += "perl-module-carp "
663RDEPENDS_perl-module-ipc-semaphore += "perl-module-strict "
664RDEPENDS_perl-module-ipc-semaphore += "perl-module-vars "
665RDEPENDS_perl-module-ipc-sysv += "perl-module-exporter "
666RDEPENDS_perl-module-ipc-sysv += "perl-module-carp "
667RDEPENDS_perl-module-ipc-sysv += "perl-module-config "
668RDEPENDS_perl-module-ipc-sysv += "perl-module-strict "
669RDEPENDS_perl-module-ipc-sysv += "perl-module-vars "
670RDEPENDS_perl-module-lib += "perl-module-config "
671RDEPENDS_perl-module-lib += "perl-module-strict "
672RDEPENDS_perl-module-list-util += "perl-module-exporter "
673RDEPENDS_perl-module-list-util += "perl-module-vars "
674RDEPENDS_perl-module-locale-constants += "perl-module-exporter "
675RDEPENDS_perl-module-locale-constants += "perl-module-constant "
676RDEPENDS_perl-module-locale-constants += "perl-module-strict "
677RDEPENDS_perl-module-locale-constants += "perl-module-vars "
678RDEPENDS_perl-module-locale-country += "perl-module-exporter "
679RDEPENDS_perl-module-locale-country += "perl-module-carp "
680RDEPENDS_perl-module-locale-country += "perl-module-locale-constants "
681RDEPENDS_perl-module-locale-country += "perl-module-strict "
682RDEPENDS_perl-module-locale-country += "perl-module-vars "
683RDEPENDS_perl-module-locale-currency += "perl-module-exporter "
684RDEPENDS_perl-module-locale-currency += "perl-module-strict "
685RDEPENDS_perl-module-locale-currency += "perl-module-vars "
686RDEPENDS_perl-module-locale-language += "perl-module-exporter "
687RDEPENDS_perl-module-locale-language += "perl-module-strict "
688RDEPENDS_perl-module-locale-language += "perl-module-vars "
689RDEPENDS_perl-module-locale-maketext-gutsloader += "perl-module-strict "
690RDEPENDS_perl-module-locale-maketext-guts += "perl-module-strict "
691RDEPENDS_perl-module-locale-maketext-guts += "perl-module-utf8 "
692RDEPENDS_perl-module-locale-maketext-guts += "perl-module-vars "
693RDEPENDS_perl-module-locale-maketext += "perl-module-carp "
694RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags "
695RDEPENDS_perl-module-locale-maketext += "perl-module-locale-maketext-gutsloader "
696RDEPENDS_perl-module-locale-maketext += "perl-module-strict "
697RDEPENDS_perl-module-locale-script += "perl-module-exporter "
698RDEPENDS_perl-module-locale-script += "perl-module-carp "
699RDEPENDS_perl-module-locale-script += "perl-module-locale-constants "
700RDEPENDS_perl-module-locale-script += "perl-module-strict "
701RDEPENDS_perl-module-locale-script += "perl-module-vars "
702RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-exporter "
703RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-math-bigfloat "
704RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-strict "
705RDEPENDS_perl-module-math-bigfloat += "perl-module-exporter "
706RDEPENDS_perl-module-math-bigfloat += "perl-module-strict "
707RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-strict "
708RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-vars "
709RDEPENDS_perl-module-math-bigint-calc += "perl-module-strict "
710RDEPENDS_perl-module-math-bigint-calc += "perl-module-vars "
711RDEPENDS_perl-module-math-bigint-trace += "perl-module-exporter "
712RDEPENDS_perl-module-math-bigint-trace += "perl-module-math-bigint "
713RDEPENDS_perl-module-math-bigint-trace += "perl-module-strict "
714RDEPENDS_perl-module-math-bigint += "perl-module-strict "
715RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigfloat "
716RDEPENDS_perl-module-math-bigrat += "perl-module-strict "
717RDEPENDS_perl-module-math-complex += "perl-module-exporter "
718RDEPENDS_perl-module-math-complex += "perl-module-strict "
719RDEPENDS_perl-module-math-trig += "perl-module-exporter "
720RDEPENDS_perl-module-math-trig += "perl-module-math-complex "
721RDEPENDS_perl-module-math-trig += "perl-module-strict "
722RDEPENDS_perl-module-memoize-anydbm-file += "perl-module-vars "
723RDEPENDS_perl-module-memoize-expirefile += "perl-module-carp "
724RDEPENDS_perl-module-memoize-expire += "perl-module-carp "
725RDEPENDS_perl-module-memoize-sdbm-file += "perl-module-sdbm-file "
726RDEPENDS_perl-module-memoize-storable += "perl-module-storable "
727RDEPENDS_perl-module-memoize += "perl-module-carp "
728RDEPENDS_perl-module-memoize += "perl-module-exporter "
729RDEPENDS_perl-module-memoize += "perl-module-strict "
730RDEPENDS_perl-module-memoize += "perl-module-vars "
731RDEPENDS_perl-module-mime-base64 += "perl-module-dynaloader "
732RDEPENDS_perl-module-mime-base64 += "perl-module-exporter "
733RDEPENDS_perl-module-mime-base64 += "perl-module-strict "
734RDEPENDS_perl-module-mime-base64 += "perl-module-vars "
735RDEPENDS_perl-module-mime-quotedprint += "perl-module-exporter "
736RDEPENDS_perl-module-mime-quotedprint += "perl-module-strict "
737RDEPENDS_perl-module-mime-quotedprint += "perl-module-vars "
738RDEPENDS_perl-module-net-cmd += "perl-module-exporter "
739RDEPENDS_perl-module-net-cmd += "perl-module-carp "
740RDEPENDS_perl-module-net-cmd += "perl-module-strict "
741RDEPENDS_perl-module-net-cmd += "perl-module-symbol "
742RDEPENDS_perl-module-net-cmd += "perl-module-vars "
743RDEPENDS_perl-module-net-config += "perl-module-exporter "
744RDEPENDS_perl-module-net-config += "perl-module-socket "
745RDEPENDS_perl-module-net-config += "perl-module-strict "
746RDEPENDS_perl-module-net-config += "perl-module-vars "
747RDEPENDS_perl-module-net-domain += "perl-module-exporter "
748RDEPENDS_perl-module-net-domain += "perl-module-carp "
749RDEPENDS_perl-module-net-domain += "perl-module-net-config "
750RDEPENDS_perl-module-net-domain += "perl-module-strict "
751RDEPENDS_perl-module-net-domain += "perl-module-vars "
752RDEPENDS_perl-module-net-ftp-a += "perl-module-net-ftp-dataconn "
753RDEPENDS_perl-module-net-ftp-a += "perl-module-carp "
754RDEPENDS_perl-module-net-ftp-a += "perl-module-strict "
755RDEPENDS_perl-module-net-ftp-a += "perl-module-vars "
756RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-carp "
757RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-errno "
758RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-net-cmd "
759RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-vars "
760RDEPENDS_perl-module-net-ftp-e += "perl-module-net-ftp-i "
761RDEPENDS_perl-module-net-ftp-i += "perl-module-net-ftp-dataconn "
762RDEPENDS_perl-module-net-ftp-i += "perl-module-carp "
763RDEPENDS_perl-module-net-ftp-i += "perl-module-vars "
764RDEPENDS_perl-module-net-ftp-l += "perl-module-net-ftp-i "
765RDEPENDS_perl-module-net-ftp += "perl-module-carp "
766RDEPENDS_perl-module-net-ftp += "perl-module-fcntl "
767RDEPENDS_perl-module-net-ftp += "perl-module-io-socket "
768RDEPENDS_perl-module-net-ftp += "perl-module-net-cmd "
769RDEPENDS_perl-module-net-ftp += "perl-module-net-config "
770RDEPENDS_perl-module-net-ftp += "perl-module-socket "
771RDEPENDS_perl-module-net-ftp += "perl-module-strict "
772RDEPENDS_perl-module-net-ftp += "perl-module-time-local "
773RDEPENDS_perl-module-net-ftp += "perl-module-vars "
774RDEPENDS_perl-module-net-hostent += "perl-module-class-struct "
775RDEPENDS_perl-module-net-hostent += "perl-module-strict "
776RDEPENDS_perl-module-net-hostent += "perl-module-vars "
777RDEPENDS_perl-module-net-netent += "perl-module-class-struct "
778RDEPENDS_perl-module-net-netent += "perl-module-strict "
779RDEPENDS_perl-module-net-netent += "perl-module-vars "
780RDEPENDS_perl-module-net-netrc += "perl-module-carp "
781RDEPENDS_perl-module-net-netrc += "perl-module-filehandle "
782RDEPENDS_perl-module-net-netrc += "perl-module-strict "
783RDEPENDS_perl-module-net-netrc += "perl-module-vars "
784RDEPENDS_perl-module-net-nntp += "perl-module-carp "
785RDEPENDS_perl-module-net-nntp += "perl-module-io-socket "
786RDEPENDS_perl-module-net-nntp += "perl-module-net-cmd "
787RDEPENDS_perl-module-net-nntp += "perl-module-net-config "
788RDEPENDS_perl-module-net-nntp += "perl-module-strict "
789RDEPENDS_perl-module-net-nntp += "perl-module-time-local "
790RDEPENDS_perl-module-net-nntp += "perl-module-vars "
791RDEPENDS_perl-module-net-ping += "perl-module-exporter "
792RDEPENDS_perl-module-net-ping += "perl-module-carp "
793RDEPENDS_perl-module-net-ping += "perl-module-constant "
794RDEPENDS_perl-module-net-ping += "perl-module-fcntl "
795RDEPENDS_perl-module-net-ping += "perl-module-filehandle "
796RDEPENDS_perl-module-net-ping += "perl-module-posix "
797RDEPENDS_perl-module-net-ping += "perl-module-strict "
798RDEPENDS_perl-module-net-pop3 += "perl-module-carp "
799RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket "
800RDEPENDS_perl-module-net-pop3 += "perl-module-net-cmd "
801RDEPENDS_perl-module-net-pop3 += "perl-module-net-config "
802RDEPENDS_perl-module-net-pop3 += "perl-module-strict "
803RDEPENDS_perl-module-net-pop3 += "perl-module-vars "
804RDEPENDS_perl-module-net-protoent += "perl-module-class-struct "
805RDEPENDS_perl-module-net-protoent += "perl-module-strict "
806RDEPENDS_perl-module-net-protoent += "perl-module-vars "
807RDEPENDS_perl-module-net-servent += "perl-module-class-struct "
808RDEPENDS_perl-module-net-servent += "perl-module-strict "
809RDEPENDS_perl-module-net-servent += "perl-module-vars "
810RDEPENDS_perl-module-net-smtp += "perl-module-carp "
811RDEPENDS_perl-module-net-smtp += "perl-module-io-socket "
812RDEPENDS_perl-module-net-smtp += "perl-module-net-cmd "
813RDEPENDS_perl-module-net-smtp += "perl-module-net-config "
814RDEPENDS_perl-module-net-smtp += "perl-module-socket "
815RDEPENDS_perl-module-net-smtp += "perl-module-strict "
816RDEPENDS_perl-module-net-smtp += "perl-module-vars "
817RDEPENDS_perl-module-net-time += "perl-module-exporter "
818RDEPENDS_perl-module-net-time += "perl-module-carp "
819RDEPENDS_perl-module-net-time += "perl-module-io-select "
820RDEPENDS_perl-module-net-time += "perl-module-io-socket "
821RDEPENDS_perl-module-net-time += "perl-module-net-config "
822RDEPENDS_perl-module-net-time += "perl-module-strict "
823RDEPENDS_perl-module-net-time += "perl-module-vars "
824RDEPENDS_perl-module-next += "perl-module-carp "
825RDEPENDS_perl-module-next += "perl-module-strict "
826RDEPENDS_perl-module-opcode += "perl-module-carp "
827RDEPENDS_perl-module-opcode += "perl-module-exporter "
828RDEPENDS_perl-module-opcode += "perl-module-strict "
829RDEPENDS_perl-module-opcode += "perl-module-subs "
830RDEPENDS_perl-module-opcode += "perl-module-xsloader "
831RDEPENDS_perl-module-open += "perl-module-carp "
832RDEPENDS_perl-module-open += "perl-module-warnings "
833RDEPENDS_perl-module-ops += "perl-module-opcode "
834RDEPENDS_perl-module-o += "perl-module-b "
835RDEPENDS_perl-module-o += "perl-module-carp "
836RDEPENDS_perl-module-overload += "perl-module-warnings-register "
837RDEPENDS_perl-module-perlio-encoding += "perl-module-strict "
838RDEPENDS_perl-module-perlio-encoding += "perl-module-xsloader "
839RDEPENDS_perl-module-perlio-scalar += "perl-module-xsloader "
840RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-strict "
841RDEPENDS_perl-module-perlio-via += "perl-module-xsloader "
842RDEPENDS_perl-module-pod-checker += "perl-module-carp "
843RDEPENDS_perl-module-pod-checker += "perl-module-exporter "
844RDEPENDS_perl-module-pod-checker += "perl-module-pod-parser "
845RDEPENDS_perl-module-pod-checker += "perl-module-strict "
846RDEPENDS_perl-module-pod-checker += "perl-module-vars "
847RDEPENDS_perl-module-pod-find += "perl-module-carp "
848RDEPENDS_perl-module-pod-find += "perl-module-cwd "
849RDEPENDS_perl-module-pod-find += "perl-module-exporter "
850RDEPENDS_perl-module-pod-find += "perl-module-file-find "
851RDEPENDS_perl-module-pod-find += "perl-module-file-spec "
852RDEPENDS_perl-module-pod-find += "perl-module-strict "
853RDEPENDS_perl-module-pod-find += "perl-module-vars "
854RDEPENDS_perl-module-pod-functions += "perl-module-exporter "
855RDEPENDS_perl-module-pod-functions += "perl-module-strict "
856RDEPENDS_perl-module-pod-html += "perl-module-exporter "
857RDEPENDS_perl-module-pod-html += "perl-module-carp "
858RDEPENDS_perl-module-pod-html += "perl-module-config "
859RDEPENDS_perl-module-pod-html += "perl-module-cwd "
860RDEPENDS_perl-module-pod-html += "perl-module-file-spec "
861RDEPENDS_perl-module-pod-html += "perl-module-file-spec-unix "
862RDEPENDS_perl-module-pod-html += "perl-module-getopt-long "
863RDEPENDS_perl-module-pod-html += "perl-module-strict "
864RDEPENDS_perl-module-pod-html += "perl-module-vars "
865RDEPENDS_perl-module-pod-inputobjects += "perl-module-strict "
866RDEPENDS_perl-module-pod-inputobjects += "perl-module-vars "
867RDEPENDS_perl-module-pod-latex += "perl-module-pod-parseutils "
868RDEPENDS_perl-module-pod-latex += "perl-module-base "
869RDEPENDS_perl-module-pod-latex += "perl-module-carp "
870RDEPENDS_perl-module-pod-latex += "perl-module-strict "
871RDEPENDS_perl-module-pod-latex += "perl-module-vars "
872RDEPENDS_perl-module-pod-man += "perl-module-carp "
873RDEPENDS_perl-module-pod-man += "perl-module-pod-parselink "
874RDEPENDS_perl-module-pod-man += "perl-module-pod-parser "
875RDEPENDS_perl-module-pod-man += "perl-module-strict "
876RDEPENDS_perl-module-pod-man += "perl-module-subs "
877RDEPENDS_perl-module-pod-man += "perl-module-vars "
878RDEPENDS_perl-module-pod-parselink += "perl-module-exporter "
879RDEPENDS_perl-module-pod-parselink += "perl-module-strict "
880RDEPENDS_perl-module-pod-parselink += "perl-module-vars "
881RDEPENDS_perl-module-pod-parser += "perl-module-carp "
882RDEPENDS_perl-module-pod-parser += "perl-module-exporter "
883RDEPENDS_perl-module-pod-parser += "perl-module-pod-inputobjects "
884RDEPENDS_perl-module-pod-parser += "perl-module-strict "
885RDEPENDS_perl-module-pod-parser += "perl-module-vars "
886RDEPENDS_perl-module-pod-parseutils += "perl-module-carp "
887RDEPENDS_perl-module-pod-parseutils += "perl-module-vars "
888RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-strict "
889RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-warnings "
890RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-strict "
891RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-strict "
892RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-warnings "
893RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-vars "
894RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-base "
895RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-file-spec-functions "
896RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-strict "
897RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-warnings "
898RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-base "
899RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-pod-man "
900RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-strict "
901RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-warnings "
902RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-base "
903RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-strict "
904RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-warnings "
905RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-base "
906RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-strict "
907RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-warnings "
908RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-vars "
909RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-base "
910RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-pod-text "
911RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-strict "
912RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-warnings "
913RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-base "
914RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-file-spec-functions "
915RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-pod-perldoc "
916RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-strict "
917RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-warnings "
918RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-base "
919RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-strict "
920RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-warnings "
921RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-vars "
922RDEPENDS_perl-module-pod-perldoc += "perl-module-config "
923RDEPENDS_perl-module-pod-perldoc += "perl-module-file-spec-functions "
924RDEPENDS_perl-module-pod-perldoc += "perl-module-strict "
925RDEPENDS_perl-module-pod-perldoc += "perl-module-warnings "
926RDEPENDS_perl-module-pod-plainer += "perl-module-pod-parser "
927RDEPENDS_perl-module-pod-plainer += "perl-module-strict "
928RDEPENDS_perl-module-pod-plaintext += "perl-module-carp "
929RDEPENDS_perl-module-pod-plaintext += "perl-module-pod-select "
930RDEPENDS_perl-module-pod-plaintext += "perl-module-strict "
931RDEPENDS_perl-module-pod-plaintext += "perl-module-vars "
932RDEPENDS_perl-module-pod-select += "perl-module-carp "
933RDEPENDS_perl-module-pod-select += "perl-module-pod-parser "
934RDEPENDS_perl-module-pod-select += "perl-module-strict "
935RDEPENDS_perl-module-pod-select += "perl-module-vars "
936RDEPENDS_perl-module-pod-text-color += "perl-module-pod-text "
937RDEPENDS_perl-module-pod-text-color += "perl-module-strict "
938RDEPENDS_perl-module-pod-text-color += "perl-module-term-ansicolor "
939RDEPENDS_perl-module-pod-text-color += "perl-module-vars "
940RDEPENDS_perl-module-pod-text-overstrike += "perl-module-pod-text "
941RDEPENDS_perl-module-pod-text-overstrike += "perl-module-strict "
942RDEPENDS_perl-module-pod-text-overstrike += "perl-module-vars "
943RDEPENDS_perl-module-pod-text-termcap += "perl-module-pod-text "
944RDEPENDS_perl-module-pod-text-termcap += "perl-module-posix "
945RDEPENDS_perl-module-pod-text-termcap += "perl-module-strict "
946RDEPENDS_perl-module-pod-text-termcap += "perl-module-term-cap "
947RDEPENDS_perl-module-pod-text-termcap += "perl-module-vars "
948RDEPENDS_perl-module-pod-text += "perl-module-carp "
949RDEPENDS_perl-module-pod-text += "perl-module-exporter "
950RDEPENDS_perl-module-pod-text += "perl-module-pod-parselink "
951RDEPENDS_perl-module-pod-text += "perl-module-pod-select "
952RDEPENDS_perl-module-pod-text += "perl-module-strict "
953RDEPENDS_perl-module-pod-text += "perl-module-vars "
954RDEPENDS_perl-module-pod-usage += "perl-module-carp "
955RDEPENDS_perl-module-pod-usage += "perl-module-config "
956RDEPENDS_perl-module-pod-usage += "perl-module-exporter "
957RDEPENDS_perl-module-pod-usage += "perl-module-file-spec "
958RDEPENDS_perl-module-pod-usage += "perl-module-strict "
959RDEPENDS_perl-module-pod-usage += "perl-module-vars "
960RDEPENDS_perl-module-posix += "perl-module-exporter "
961RDEPENDS_perl-module-posix += "perl-module-autoloader "
962RDEPENDS_perl-module-posix += "perl-module-autoloader "
963RDEPENDS_perl-module-posix += "perl-module-xsloader "
964RDEPENDS_perl-module-safe += "perl-module-carp "
965RDEPENDS_perl-module-safe += "perl-module-carp-heavy "
966RDEPENDS_perl-module-safe += "perl-module-strict "
967RDEPENDS_perl-module-scalar-util += "perl-module-exporter "
968RDEPENDS_perl-module-sdbm-file += "perl-module-tie-hash "
969RDEPENDS_perl-module-sdbm-file += "perl-module-strict "
970RDEPENDS_perl-module-sdbm-file += "perl-module-warnings "
971RDEPENDS_perl-module-sdbm-file += "perl-module-xsloader "
972RDEPENDS_perl-module-search-dict += "perl-module-exporter "
973RDEPENDS_perl-module-search-dict += "perl-module-strict "
974RDEPENDS_perl-module-selectsaver += "perl-module-carp "
975RDEPENDS_perl-module-selectsaver += "perl-module-symbol "
976RDEPENDS_perl-module-selfloader += "perl-module-exporter "
977RDEPENDS_perl-module-shell += "perl-module-file-spec-functions "
978RDEPENDS_perl-module-shell += "perl-module-strict "
979RDEPENDS_perl-module-shell += "perl-module-warnings "
980RDEPENDS_perl-module-sigtrap += "perl-module-carp "
981RDEPENDS_perl-module-socket += "perl-module-exporter "
982RDEPENDS_perl-module-socket += "perl-module-carp "
983RDEPENDS_perl-module-socket += "perl-module-warnings-register "
984RDEPENDS_perl-module-socket += "perl-module-xsloader "
985RDEPENDS_perl-module-sort += "perl-module-strict "
986RDEPENDS_perl-module-storable += "perl-module-carp "
987RDEPENDS_perl-module-storable += "perl-module-dynaloader "
988RDEPENDS_perl-module-storable += "perl-module-exporter "
989RDEPENDS_perl-module-storable += "perl-module-autoloader "
990RDEPENDS_perl-module-storable += "perl-module-vars "
991RDEPENDS_perl-module-switch += "perl-module-carp "
992RDEPENDS_perl-module-switch += "perl-module-filter-util-call "
993RDEPENDS_perl-module-switch += "perl-module-strict "
994RDEPENDS_perl-module-switch += "perl-module-text-balanced "
995RDEPENDS_perl-module-switch += "perl-module-vars "
996RDEPENDS_perl-module-symbol += "perl-module-exporter "
997RDEPENDS_perl-module-sys-hostname += "perl-module-autoloader "
998RDEPENDS_perl-module-sys-hostname += "perl-module-exporter "
999RDEPENDS_perl-module-sys-hostname += "perl-module-carp "
1000RDEPENDS_perl-module-sys-hostname += "perl-module-strict "
1001RDEPENDS_perl-module-sys-syslog += "perl-module-dynaloader "
1002RDEPENDS_perl-module-sys-syslog += "perl-module-exporter "
1003RDEPENDS_perl-module-sys-syslog += "perl-module-carp "
1004RDEPENDS_perl-module-sys-syslog += "perl-module-socket "
1005RDEPENDS_perl-module-sys-syslog += "perl-module-strict "
1006RDEPENDS_perl-module-sys-syslog += "perl-module-sys-hostname "
1007RDEPENDS_perl-module-term-ansicolor += "perl-module-exporter "
1008RDEPENDS_perl-module-term-ansicolor += "perl-module-strict "
1009RDEPENDS_perl-module-term-cap += "perl-module-strict "
1010RDEPENDS_perl-module-term-cap += "perl-module-vars "
1011RDEPENDS_perl-module-term-complete += "perl-module-exporter "
1012RDEPENDS_perl-module-term-complete += "perl-module-strict "
1013RDEPENDS_perl-module-term-readline += "perl-module-strict "
1014RDEPENDS_perl-module-test-builder += "perl-module-strict "
1015RDEPENDS_perl-module-test-builder += "perl-module-vars "
1016RDEPENDS_perl-module-test-harness-assert += "perl-module-exporter "
1017RDEPENDS_perl-module-test-harness-assert += "perl-module-strict "
1018RDEPENDS_perl-module-test-harness-assert += "perl-module-vars "
1019RDEPENDS_perl-module-test-harness-iterator += "perl-module-strict "
1020RDEPENDS_perl-module-test-harness-iterator += "perl-module-vars "
1021RDEPENDS_perl-module-test-harness-point += "perl-module-strict "
1022RDEPENDS_perl-module-test-harness-point += "perl-module-vars "
1023RDEPENDS_perl-module-test-harness-straps += "perl-module-config "
1024RDEPENDS_perl-module-test-harness-straps += "perl-module-strict "
1025RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-assert "
1026RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-iterator "
1027RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-point "
1028RDEPENDS_perl-module-test-harness-straps += "perl-module-vars "
1029RDEPENDS_perl-module-test-harness += "perl-module-benchmark "
1030RDEPENDS_perl-module-test-harness += "perl-module-config "
1031RDEPENDS_perl-module-test-harness += "perl-module-exporter "
1032RDEPENDS_perl-module-test-harness += "perl-module-strict "
1033RDEPENDS_perl-module-test-harness += "perl-module-test-harness-assert "
1034RDEPENDS_perl-module-test-harness += "perl-module-test-harness-straps "
1035RDEPENDS_perl-module-test-more += "perl-module-exporter "
1036RDEPENDS_perl-module-test-more += "perl-module-strict "
1037RDEPENDS_perl-module-test-more += "perl-module-test-builder "
1038RDEPENDS_perl-module-test-more += "perl-module-vars "
1039RDEPENDS_perl-module-test-simple += "perl-module-strict "
1040RDEPENDS_perl-module-test-simple += "perl-module-test-builder "
1041RDEPENDS_perl-module-test-simple += "perl-module-vars "
1042RDEPENDS_perl-module-test += "perl-module-exporter "
1043RDEPENDS_perl-module-test += "perl-module-carp "
1044RDEPENDS_perl-module-test += "perl-module-strict "
1045RDEPENDS_perl-module-text-abbrev += "perl-module-exporter "
1046RDEPENDS_perl-module-text-balanced += "perl-module-exporter "
1047RDEPENDS_perl-module-text-balanced += "perl-module-overload "
1048RDEPENDS_perl-module-text-balanced += "perl-module-selfloader "
1049RDEPENDS_perl-module-text-balanced += "perl-module-strict "
1050RDEPENDS_perl-module-text-balanced += "perl-module-vars "
1051RDEPENDS_perl-module-text-parsewords += "perl-module-exporter "
1052RDEPENDS_perl-module-text-parsewords += "perl-module-vars "
1053RDEPENDS_perl-module-text-soundex += "perl-module-exporter "
1054RDEPENDS_perl-module-text-tabs += "perl-module-exporter "
1055RDEPENDS_perl-module-text-tabs += "perl-module-strict "
1056RDEPENDS_perl-module-text-tabs += "perl-module-vars "
1057RDEPENDS_perl-module-text-wrap += "perl-module-exporter "
1058RDEPENDS_perl-module-text-wrap += "perl-module-strict "
1059RDEPENDS_perl-module-text-wrap += "perl-module-text-tabs "
1060RDEPENDS_perl-module-thread-queue += "perl-module-strict "
1061RDEPENDS_perl-module-thread-queue += "perl-module-threads-shared "
1062RDEPENDS_perl-module-thread-semaphore += "perl-module-threads-shared "
1063RDEPENDS_perl-module-threads-shared += "perl-module-strict "
1064RDEPENDS_perl-module-threads-shared += "perl-module-warnings "
1065RDEPENDS_perl-module-threads += "perl-module-dynaloader "
1066RDEPENDS_perl-module-threads += "perl-module-exporter "
1067RDEPENDS_perl-module-threads += "perl-module-config "
1068RDEPENDS_perl-module-threads += "perl-module-strict "
1069RDEPENDS_perl-module-threads += "perl-module-warnings "
1070RDEPENDS_perl-module-thread += "perl-module-exporter "
1071RDEPENDS_perl-module-thread += "perl-module-strict "
1072RDEPENDS_perl-module-thread += "perl-module-xsloader "
1073RDEPENDS_perl-module-tie-array += "perl-module-carp "
1074RDEPENDS_perl-module-tie-array += "perl-module-strict "
1075RDEPENDS_perl-module-tie-array += "perl-module-vars "
1076RDEPENDS_perl-module-tie-file += "perl-module-carp "
1077RDEPENDS_perl-module-tie-file += "perl-module-fcntl "
1078RDEPENDS_perl-module-tie-file += "perl-module-posix "
1079RDEPENDS_perl-module-tie-file += "perl-module-strict "
1080RDEPENDS_perl-module-tie-handle += "perl-module-carp "
1081RDEPENDS_perl-module-tie-handle += "perl-module-warnings-register "
1082RDEPENDS_perl-module-tie-hash += "perl-module-carp "
1083RDEPENDS_perl-module-tie-hash += "perl-module-warnings-register "
1084RDEPENDS_perl-module-tie-memoize += "perl-module-strict "
1085RDEPENDS_perl-module-tie-memoize += "perl-module-tie-hash "
1086RDEPENDS_perl-module-tie-refhash += "perl-module-strict "
1087RDEPENDS_perl-module-tie-refhash += "perl-module-tie-hash "
1088RDEPENDS_perl-module-tie-refhash += "perl-module-vars "
1089RDEPENDS_perl-module-tie-scalar += "perl-module-carp "
1090RDEPENDS_perl-module-tie-scalar += "perl-module-warnings-register "
1091RDEPENDS_perl-module-tie-substrhash += "perl-module-carp "
1092RDEPENDS_perl-module-time-gmtime += "perl-module-strict "
1093RDEPENDS_perl-module-time-gmtime += "perl-module-time-tm "
1094RDEPENDS_perl-module-time-gmtime += "perl-module-vars "
1095RDEPENDS_perl-module-time-hires += "perl-module-dynaloader "
1096RDEPENDS_perl-module-time-hires += "perl-module-exporter "
1097RDEPENDS_perl-module-time-hires += "perl-module-strict "
1098RDEPENDS_perl-module-time-hires += "perl-module-vars "
1099RDEPENDS_perl-module-time-localtime += "perl-module-strict "
1100RDEPENDS_perl-module-time-localtime += "perl-module-time-tm "
1101RDEPENDS_perl-module-time-localtime += "perl-module-vars "
1102RDEPENDS_perl-module-time-local += "perl-module-exporter "
1103RDEPENDS_perl-module-time-local += "perl-module-carp "
1104RDEPENDS_perl-module-time-local += "perl-module-config "
1105RDEPENDS_perl-module-time-local += "perl-module-integer "
1106RDEPENDS_perl-module-time-local += "perl-module-strict "
1107RDEPENDS_perl-module-time-local += "perl-module-vars "
1108RDEPENDS_perl-module-time-tm += "perl-module-class-struct "
1109RDEPENDS_perl-module-time-tm += "perl-module-strict "
1110RDEPENDS_perl-module-unicode-collate += "perl-module-carp "
1111RDEPENDS_perl-module-unicode-collate += "perl-module-constant "
1112RDEPENDS_perl-module-unicode-collate += "perl-module-file-spec "
1113RDEPENDS_perl-module-unicode-collate += "perl-module-strict "
1114RDEPENDS_perl-module-unicode-collate += "perl-module-warnings "
1115RDEPENDS_perl-module-unicode-normalize += "perl-module-dynaloader "
1116RDEPENDS_perl-module-unicode-normalize += "perl-module-exporter "
1117RDEPENDS_perl-module-unicode-normalize += "perl-module-carp "
1118RDEPENDS_perl-module-unicode-normalize += "perl-module-constant "
1119RDEPENDS_perl-module-unicode-normalize += "perl-module-strict "
1120RDEPENDS_perl-module-unicode-normalize += "perl-module-warnings "
1121RDEPENDS_perl-module-unicode-ucd += "perl-module-exporter "
1122RDEPENDS_perl-module-unicode-ucd += "perl-module-carp "
1123RDEPENDS_perl-module-unicode-ucd += "perl-module-storable "
1124RDEPENDS_perl-module-unicode-ucd += "perl-module-strict "
1125RDEPENDS_perl-module-unicode-ucd += "perl-module-warnings "
1126RDEPENDS_perl-module-universal += "perl-module-exporter "
1127RDEPENDS_perl-module-user-grent += "perl-module-class-struct "
1128RDEPENDS_perl-module-user-grent += "perl-module-strict "
1129RDEPENDS_perl-module-user-grent += "perl-module-vars "
1130RDEPENDS_perl-module-user-pwent += "perl-module-carp "
1131RDEPENDS_perl-module-user-pwent += "perl-module-class-struct "
1132RDEPENDS_perl-module-user-pwent += "perl-module-config "
1133RDEPENDS_perl-module-user-pwent += "perl-module-strict "
1134RDEPENDS_perl-module-user-pwent += "perl-module-warnings "
1135RDEPENDS_perl-module-user-pwent += "perl-module-vars "
1136RDEPENDS_perl-module-warnings-register += "perl-module-warnings "
1137RDEPENDS_perl-module-warnings += "perl-module-carp "
1138RDEPENDS_perl-module-vars += "perl-module-strict "
1139RDEPENDS_perl-module-vars += "perl-module-warnings-register "
1140RDEPENDS_perl-module-xs-apitest += "perl-module-base "
1141RDEPENDS_perl-module-xs-apitest += "perl-module-carp "
1142RDEPENDS_perl-module-xs-apitest += "perl-module-strict "
1143RDEPENDS_perl-module-xs-apitest += "perl-module-warnings "
1144RDEPENDS_perl-module-xs-typemap += "perl-module-base "
1145RDEPENDS_perl-module-xs-typemap += "perl-module-vars "
diff --git a/meta/recipes-devtools/perl/perl-rprovides.inc b/meta/recipes-devtools/perl/perl-rprovides.inc
new file mode 100644
index 0000000000..637c993156
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-rprovides.inc
@@ -0,0 +1,45 @@
1#
2# Some packages changed names in 5.8.7-r14, RPROVIDE them for things that
3# depend on the old name
4#
5RPROVIDES_perl-module-b-asmdata = "perl-module-${TARGET_SYS}-b-asmdata"
6RPROVIDES_perl-module-b-assembler = "perl-module-${TARGET_SYS}-b-assembler"
7RPROVIDES_perl-module-b-bblock = "perl-module-${TARGET_SYS}-b-bblock"
8RPROVIDES_perl-module-b-bytecode = "perl-module-${TARGET_SYS}-b-bytecode"
9RPROVIDES_perl-module-b-cc = "perl-module-${TARGET_SYS}-b-cc"
10RPROVIDES_perl-module-b-concise = "perl-module-${TARGET_SYS}-b-concise"
11RPROVIDES_perl-module-b-debug = "perl-module-${TARGET_SYS}-b-debug"
12RPROVIDES_perl-module-b-deparse = "perl-module-${TARGET_SYS}-b-deparse"
13RPROVIDES_perl-module-b-disassembler = "perl-module-${TARGET_SYS}-b-disassembler"
14RPROVIDES_perl-module-b-lint = "perl-module-${TARGET_SYS}-b-lint"
15RPROVIDES_perl-module-b-showlex = "perl-module-${TARGET_SYS}-b-showlex"
16RPROVIDES_perl-module-b-stackobj = "perl-module-${TARGET_SYS}-b-stackobj"
17RPROVIDES_perl-module-b-stash = "perl-module-${TARGET_SYS}-b-stash"
18RPROVIDES_perl-module-b-terse = "perl-module-${TARGET_SYS}-b-terse"
19RPROVIDES_perl-module-b-xref = "perl-module-${TARGET_SYS}-b-xref"
20RPROVIDES_perl-module-config = "perl-module-${TARGET_SYS}-config"
21RPROVIDES_perl-module-config-heavy = "perl-module-${TARGET_SYS}-config-heavy"
22RPROVIDES_perl-module-encode-alias = "perl-module-${TARGET_SYS}-encode-alias"
23RPROVIDES_perl-module-encode-cjkconstants = "perl-module-${TARGET_SYS}-encode-cjkconstants"
24RPROVIDES_perl-module-encode-config = "perl-module-${TARGET_SYS}-encode-config"
25RPROVIDES_perl-module-encode-encoder = "perl-module-${TARGET_SYS}-encode-encoder"
26RPROVIDES_perl-module-encode-encoding = "perl-module-${TARGET_SYS}-encode-encoding"
27RPROVIDES_perl-module-encode-guess = "perl-module-${TARGET_SYS}-encode-guess"
28RPROVIDES_perl-module-encoding = "perl-module-${TARGET_SYS}-encoding"
29RPROVIDES_perl-module-errno = "perl-module-${TARGET_SYS}-errno"
30RPROVIDES_perl-module-io-dir = "perl-module-${TARGET_SYS}-io-dir"
31RPROVIDES_perl-module-io-file = "perl-module-${TARGET_SYS}-io-file"
32RPROVIDES_perl-module-io-handle = "perl-module-${TARGET_SYS}-io-handle"
33RPROVIDES_perl-module-io-pipe = "perl-module-${TARGET_SYS}-io-pipe"
34RPROVIDES_perl-module-io-poll = "perl-module-${TARGET_SYS}-io-poll"
35RPROVIDES_perl-module-io-seekable = "perl-module-${TARGET_SYS}-io-seekable"
36RPROVIDES_perl-module-io-select = "perl-module-${TARGET_SYS}-io-select"
37RPROVIDES_perl-module-io-socket = "perl-module-${TARGET_SYS}-io-socket"
38RPROVIDES_perl-module-ipc-msg = "perl-module-${TARGET_SYS}-ipc-msg"
39RPROVIDES_perl-module-ipc-semaphore = "perl-module-${TARGET_SYS}-ipc-semaphore"
40RPROVIDES_perl-module-lib = "perl-module-${TARGET_SYS}-lib"
41RPROVIDES_perl-module-mime-quotedprint = "perl-module-${TARGET_SYS}-mime-quotedprint"
42RPROVIDES_perl-module-o = "perl-module-${TARGET_SYS}-o"
43RPROVIDES_perl-module-ops = "perl-module-${TARGET_SYS}-ops"
44RPROVIDES_perl-module-safe = "perl-module-${TARGET_SYS}-safe"
45RPROVIDES_perl-module-xsloader = "perl-module-${TARGET_SYS}-xsloader"
diff --git a/meta/recipes-devtools/perl/perl_5.8.8.bb b/meta/recipes-devtools/perl/perl_5.8.8.bb
new file mode 100644
index 0000000000..5060705372
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.8.8.bb
@@ -0,0 +1,218 @@
1DESCRIPTION = "Perl is a popular scripting language."
2HOMEPAGE = "http://www.perl.org/"
3SECTION = "devel"
4LICENSE = "Artistic|GPL"
5PRIORITY = "optional"
6# We need gnugrep (for -I)
7DEPENDS = "virtual/db perl-native grep-native"
8PR = "r20"
9
10# Major part of version
11PVM = "5.8"
12
13SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
14 file://Makefile.patch;patch=1 \
15 file://Makefile.SH.patch;patch=1 \
16 file://makedepend-dash.patch;patch=1 \
17 file://installperl.patch;patch=1 \
18 file://perl-dynloader.patch;patch=1 \
19 file://perl-moreconfig.patch;patch=1 \
20 file://letgcc-find-errno.patch;patch=1 \
21 file://generate-sh.patch;patch=1 \
22 file://perl-5.8.8-gcc-4.2.patch;patch=1 \
23 file://09_fix_installperl.patch;patch=1 \
24 file://52_debian_extutils_hacks.patch;patch=1 \
25 file://53_debian_mod_paths.patch;patch=1 \
26 file://54_debian_perldoc-r.patch;patch=1 \
27 file://58_debian_cpan_config_path.patch;patch=1 \
28 file://60_debian_libnet_config_path.patch;patch=1 \
29 file://62_debian_cpan_definstalldirs.patch;patch=1 \
30 file://64_debian_enc2xs_inc.patch;patch=1 \
31 file://asm-pageh-fix.patch;patch=1 \
32 file://native-perlinc.patch;patch=1 \
33 file://config.sh \
34 file://config.sh-32 \
35 file://config.sh-32-le \
36 file://config.sh-32-be \
37 file://config.sh-64 \
38 file://config.sh-64-le \
39 file://config.sh-64-be"
40
41inherit siteinfo
42
43# Where to find the native perl
44HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}"
45
46# Where to find .so files - use the -native versions not those from the target build
47export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
48
49do_configure() {
50 # Make hostperl in build directory be the native perl
51 ln -s ${HOSTPERL} hostperl
52
53 # Do our work in the cross subdir
54 cd Cross
55
56 # Generate configuration
57 rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
58 for i in ${WORKDIR}/config.sh \
59 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)} \
60 ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)}-${@siteinfo_get_endianess(d)}; do
61 cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
62 done
63
64 # Fixups for uclibc
65 if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
66 sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
67 -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
68 -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
69 -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
70 -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
71 -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
72 -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
73 -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
74 -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
75 -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
76 config.sh-${TARGET_ARCH}-${TARGET_OS}
77 fi
78
79 # Update some paths in the configuration
80 sed -i -e 's,@LIBDIR@,${libdir},g' \
81 -e 's,@BINDIR@,${bindir},g' \
82 -e 's,@MANDIR@,${mandir},g' \
83 -e 's,@PREFIX@,${prefix},g' \
84 -e 's,@DATADIR@,${datadir},g' \
85 -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
86 -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
87 -e 's,/usr/,${exec_prefix}/,g' \
88 config.sh-${TARGET_ARCH}-${TARGET_OS}
89
90
91 # These are strewn all over the source tree
92 for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
93 echo Fixing: $foo
94 sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
95 done
96
97 rm -f config
98 echo "ARCH = ${TARGET_ARCH}" > config
99 echo "OS = ${TARGET_OS}" >> config
100}
101
102do_compile() {
103 if test "${MACHINE}" != "native"; then
104 sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
105 fi
106 cd Cross
107 oe_runmake perl LD="${TARGET_SYS}-gcc"
108}
109
110do_install() {
111 oe_runmake 'DESTDIR=${D}' install
112
113 # Add perl pointing at current version
114 ln -sf perl${PV} ${D}${bindir}/perl
115
116 # Fix up versioned directories
117 mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
118 mv ${D}/${datadir}/perl/${PVM} ${D}/${datadir}/perl/${PV}
119 ln -sf ${PV} ${D}/${libdir}/perl/${PVM}
120 ln -sf ${PV} ${D}/${datadir}/perl/${PVM}
121
122 # Remove unwanted file
123 rm -f ${D}/${libdir}/perl/${PV}/.packlist
124
125 # Fix up shared library
126 mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
127 ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
128
129 # target config, used by cpan.bbclass to extract version information
130 install config.sh ${D}${libdir}/perl/
131
132 install -d ${D}${datadir}/perl/${PV}/ExtUtils
133 install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
134
135 ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
136}
137
138PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
139
140perl_package_preprocess () {
141 # Fix up installed configuration
142 sed -i -e "s,${D},,g" \
143 -e "s,-isystem${STAGING_INCDIR} ,,g" \
144 -e "s,${STAGING_LIBDIR},${libdir},g" \
145 -e "s,${STAGING_BINDIR},${bindir},g" \
146 -e "s,${STAGING_INCDIR},${includedir},g" \
147 -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
148 ${PKGD}${bindir}/h2xs \
149 ${PKGD}${bindir}/h2ph \
150 ${PKGD}${datadir}/perl/${PV}/pod/*.pod \
151 ${PKGD}${datadir}/perl/${PV}/cacheout.pl \
152 ${PKGD}${datadir}/perl/${PV}/FileCache.pm \
153 ${PKGD}${libdir}/perl/config.sh \
154 ${PKGD}${libdir}/perl/${PV}/Config.pm \
155 ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
156 ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
157 ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
158}
159
160PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"
161FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}"
162FILES_${PN}-lib = "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}"
163FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
164FILES_${PN}-pod = "${datadir}/perl/${PV}/pod \
165 ${datadir}/perl/${PV}/*/*.pod \
166 ${datadir}/perl/${PV}/*/*/*.pod \
167 ${libdir}/perl/${PV}/*.pod"
168FILES_perl-misc = "${bindir}/*"
169FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
170 ${libdir}/perl/${PV}/auto/*/*/.debug \
171 ${libdir}/perl/${PV}/auto/*/*/*/.debug \
172 ${datadir}/perl/${PV}/auto/*/.debug \
173 ${datadir}/perl/${PV}/auto/*/*/.debug \
174 ${datadir}/perl/${PV}/auto/*/*/*/.debug \
175 ${libdir}/perl/${PV}/CORE/.debug"
176FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \
177 ${datadir}/perl/${PV}/*/*/*.txt \
178 ${datadir}/perl/${PV}/Net/*.eg \
179 ${datadir}/perl/${PV}/CGI/eg \
180 ${datadir}/perl/${PV}/ExtUtils/PATCHING \
181 ${datadir}/perl/${PV}/ExtUtils/NOTES \
182 ${datadir}/perl/${PV}/ExtUtils/typemap \
183 ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
184 ${datadir}/perl/${PV}/CPAN/SIGNATURE \
185 ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \
186 ${datadir}/perl/${PV}/B/assemble \
187 ${datadir}/perl/${PV}/B/makeliblinks \
188 ${datadir}/perl/${PV}/B/disassemble \
189 ${datadir}/perl/${PV}/B/cc_harness \
190 ${datadir}/perl/${PV}/ExtUtils/xsubpp \
191 ${datadir}/perl/${PV}/Encode/encode.h \
192 ${datadir}/perl/${PV}/unicore/mktables \
193 ${datadir}/perl/${PV}/unicore/mktables.lst \
194 ${datadir}/perl/${PV}/unicore/version"
195
196RPROVIDES_perl-lib = "perl-lib"
197
198# Create a perl-modules package recommending all the other perl
199# packages (actually the non modules packages and not created too)
200ALLOW_EMPTY_perl-modules = "1"
201PACKAGES_append = " perl-modules "
202RRECOMMENDS_perl-modules = "${@bb.data.getVar('PACKAGES', d, 1).replace('perl-modules ', '').replace('perl-dbg ', '').replace('perl-misc ', '').replace('perl-dev ', '').replace('perl-pod ', '').replace('perl-doc ', '')}"
203
204python populate_packages_prepend () {
205 libdir = bb.data.expand('${libdir}/perl/${PV}', d)
206 do_split_packages(d, libdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
207 do_split_packages(d, libdir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
208 datadir = bb.data.expand('${datadir}/perl/${PV}', d)
209 do_split_packages(d, datadir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
210 do_split_packages(d, datadir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
211}
212
213PACKAGES_DYNAMIC = "perl-module-*"
214
215require perl-rdepends_${PV}.inc
216require perl-rprovides.inc
217
218PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/autofoo.patch b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/autofoo.patch
new file mode 100644
index 0000000000..97895387f5
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/autofoo.patch
@@ -0,0 +1,526 @@
1---
2 glib-1.2.10/acglib.m4 | 12 +-
3 glib-1.2.10/configure.in | 212 ++++++++++++++++++++++++++++++------------------
4 2 files changed, 140 insertions(+), 84 deletions(-)
5
6Index: pkg-config-0.23/glib-1.2.10/acglib.m4
7===================================================================
8--- pkg-config-0.23.orig/glib-1.2.10/acglib.m4 2008-01-16 22:52:24.000000000 +0000
9+++ pkg-config-0.23/glib-1.2.10/acglib.m4 2008-03-26 20:59:12.000000000 +0000
10@@ -10,7 +10,7 @@
11 AC_DIVERT_POP()])])])
12
13 dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
14-AC_DEFUN(GLIB_IF_VAR_EQ,[
15+AC_DEFUN([GLIB_IF_VAR_EQ],[
16 case "$[$1]" in
17 "[$2]"[)]
18 [$3]
19@@ -21,7 +21,7 @@
20 esac
21 ])
22 dnl GLIB_STR_CONTAINS (SRC_STRING, SUB_STRING [, CONTAINS_ACTION] [, ELSE_ACTION])
23-AC_DEFUN(GLIB_STR_CONTAINS,[
24+AC_DEFUN([GLIB_STR_CONTAINS],[
25 case "[$1]" in
26 *"[$2]"*[)]
27 [$3]
28@@ -32,12 +32,12 @@
29 esac
30 ])
31 dnl GLIB_ADD_TO_VAR (ENV_VARIABLE, CHECK_STRING, ADD_STRING)
32-AC_DEFUN(GLIB_ADD_TO_VAR,[
33+AC_DEFUN([GLIB_ADD_TO_VAR],[
34 GLIB_STR_CONTAINS($[$1], [$2], [$1]="$[$1]", [$1]="$[$1] [$3]")
35 ])
36
37 dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
38-AC_DEFUN(GLIB_SIZEOF,
39+AC_DEFUN([GLIB_SIZEOF],
40 [changequote(<<, >>)dnl
41 dnl The name to #define.
42 define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
43@@ -62,7 +62,7 @@
44 ])
45
46 dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
47-AC_DEFUN(GLIB_BYTE_CONTENTS,
48+AC_DEFUN([GLIB_BYTE_CONTENTS],
49 [changequote(<<, >>)dnl
50 dnl The name to #define.
51 define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
52@@ -92,7 +92,7 @@
53 ])
54
55 dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
56-AC_DEFUN(GLIB_SYSDEFS,
57+AC_DEFUN([GLIB_SYSDEFS],
58 [glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
59 glib_sysdef_msg=`echo $2 | sed 's/:[[^ ]]*//g'`
60 if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
61Index: pkg-config-0.23/glib-1.2.10/configure.in
62===================================================================
63--- pkg-config-0.23.orig/glib-1.2.10/configure.in 2008-01-16 22:52:24.000000000 +0000
64+++ pkg-config-0.23/glib-1.2.10/configure.in 2008-03-26 20:59:12.000000000 +0000
65@@ -1,10 +1,11 @@
66 dnl ***********************************
67 dnl *** include special GLib macros ***
68 dnl ***********************************
69-builtin(include, acglib.m4)dnl
70+dnl no need, just use aclocal -I . --CL
71+dnl builtin(include, acglib.m4)dnl
72
73 # require autoconf 2.13
74-AC_PREREQ(2.13)
75+AC_PREREQ(2.53)
76
77 # init autoconf (and check for presence of glist.c)
78 AC_INIT(glist.c)
79@@ -13,11 +14,48 @@
80 cflags_set=${CFLAGS+set}
81
82 # we rewrite this file
83+if test "x$cross_compiling" != "xyes"; then
84 rm -f glibconfig-sysdefs.h
85+fi
86+
87+# config defines
88+
89+AH_TEMPLATE([ENABLE_MEM_CHECK],
90+ [Define if enabling memory checking])
91+AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
92+AH_TEMPLATE([GLIB_BINARY_AGE], [])
93+AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
94+AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
95+AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
96+AH_TEMPLATE([GLIB_MINOR_VERSION], [])
97+AH_TEMPLATE([GLIB_MICRO_VERSION], [])
98+AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
99+AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
100+AH_TEMPLATE([G_HAVE_INLINE], [])
101+AH_TEMPLATE([G_HAVE___INLINE], [])
102+AH_TEMPLATE([G_HAVE___INLINE__], [])
103+AH_TEMPLATE([G_THREAD_SOURCE], [])
104+AH_TEMPLATE([G_VA_COPY], [])
105+AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
106+AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
107+AH_TEMPLATE([HAVE_GETPWUID_R], [])
108+AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
109+AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
110+AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
111+AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
112+AH_TEMPLATE([HAVE_WCHAR_H], [])
113+AH_TEMPLATE([HAVE_WCTYPE_H], [])
114+AH_TEMPLATE([NO_FD_SET], [])
115+AH_TEMPLATE([NO_SYS_ERRLIST], [])
116+AH_TEMPLATE([NO_SYS_SIGLIST], [])
117+AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
118+AH_TEMPLATE([REALLOC_0_WORKS], [])
119+
120
121 dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
122 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
123-GLIB_AC_DIVERT_BEFORE_HELP([
124+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
125+#dnl
126 #
127 # The following version number definitions apply to GLib, GModule and GThread
128 # as a whole, so if changes occoured in any of them, they are all
129@@ -38,7 +76,7 @@
130 GLIB_BINARY_AGE=10
131 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
132 dnl
133-])
134+#AC_DIVERT_POP()dnl
135
136 AC_SUBST(GLIB_MAJOR_VERSION)
137 AC_SUBST(GLIB_MINOR_VERSION)
138@@ -72,22 +110,20 @@
139 AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
140
141 dnl Initialize libtool
142-AC_PROG_LIBTOOL
143+AM_PROG_LIBTOOL
144
145 dnl Initialize maintainer mode
146 AM_MAINTAINER_MODE
147
148-AC_CANONICAL_HOST
149-
150 dnl figure debugging default, prior to $ac_help setup
151 dnl
152-GLIB_AC_DIVERT_BEFORE_HELP([
153+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
154 if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
155 debug_default=yes
156 else
157 debug_default=minimum
158 fi
159-]) dnl
160+#AC_DIVERT_POP()dnl
161
162 dnl declare --enable-* args and collect ac_help strings
163 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
164@@ -194,7 +230,9 @@
165 CFLAGS=$glib_save_CFLAGS
166 AC_MSG_WARN(
167 [No ANSI prototypes found in library. (-std1 didn't work.)])
168+ , AC_MSG_WARN([Skipping test due to crosscompilation])
169 )
170+ , AC_MSG_WARN([Skipping test due to crosscompilation])
171 )
172 LIBS=$glib_save_LIBS
173
174@@ -336,7 +374,7 @@
175 if test $gtk_ok = yes; then
176 AC_MSG_RESULT([yes, found in sys/types.h])
177 else
178- AC_HEADER_EGREP(fd_set, sys/select.h, gtk_ok=yes)
179+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
180 if test $gtk_ok = yes; then
181 AC_DEFINE(HAVE_SYS_SELECT_H)
182 AC_MSG_RESULT([yes, found in sys/select.h])
183@@ -409,7 +447,7 @@
184 glib_cv_sane_realloc=no
185 ,)
186 ])
187-if test x$glib_cv_sane_realloc = xyes; then
188+if test "x$glib_cv_sane_realloc" = "xyes"; then
189 AC_DEFINE(REALLOC_0_WORKS)
190 fi
191 AC_MSG_RESULT($glib_cv_sane_realloc)
192@@ -487,7 +525,8 @@
193 ])
194 if test "x$glib_cv_va_copy" = "xyes"; then
195 AC_DEFINE(G_VA_COPY, va_copy)
196-else if test "x$glib_cv___va_copy" = "xyes"; then
197+else
198+if test "x$glib_cv___va_copy" = "xyes"; then
199 AC_DEFINE(G_VA_COPY, __va_copy)
200 fi
201 fi
202@@ -496,6 +535,7 @@
203 fi
204 AC_MSG_RESULT($glib_cv_va_val_copy)
205
206+AC_MSG_WARN([hi mom])
207
208 dnl ***********************
209 dnl *** g_module checks ***
210@@ -507,23 +547,27 @@
211 G_MODULE_BROKEN_RTLD_GLOBAL=0
212 G_MODULE_HAVE_DLERROR=0
213 dnl *** dlopen() and dlsym() in system libraries
214+AC_CHECK_FUNC(dlopen,[
215+ AC_CHECK_FUNC(dlsym,[
216+ G_MODULE_IMPL=G_MODULE_IMPL_DL
217+ ],
218+ )],
219+)
220 if test -z "$G_MODULE_IMPL"; then
221- AC_CHECK_FUNC(dlopen,
222- [AC_CHECK_FUNC(dlsym,
223+ AC_CHECK_FUNC(dlopen,[
224+ AC_CHECK_FUNC(dlsym,[
225 G_MODULE_IMPL=G_MODULE_IMPL_DL
226- ,)]
227- ,)
228-
229+ ])],
230+ )
231 fi
232-
233 dnl *** dlopen() and dlsym() in libdl
234 if test -z "$G_MODULE_IMPL"; then
235- AC_CHECK_LIB(dl, dlopen,
236- [AC_CHECK_LIB(dl, dlsym,
237+ AC_CHECK_LIB(dl, dlopen,[
238+ AC_CHECK_LIB(dl, dlsym,[
239 G_MODULE_LIBS=-ldl
240 G_MODULE_IMPL=G_MODULE_IMPL_DL
241- ,)]
242- ,)
243+ ])]
244+ )
245 fi
246 dnl *** shl_load() in libdld (HP-UX)
247 if test -z "$G_MODULE_IMPL"; then
248@@ -633,6 +677,7 @@
249 AC_SUBST(G_MODULE_NEED_USCORE)
250 AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
251 AC_SUBST(GLIB_DEBUG_FLAGS)
252+AC_MSG_WARN([hi mom])
253
254
255 dnl ***********************
256@@ -869,40 +914,50 @@
257 fi
258 if test x"$have_threads" = xposix; then
259 LIBS="$LIBS $G_THREAD_LIBS"
260- AC_MSG_CHECKING(whether pthread_getspecific is posix like)
261 # PCThreads has pthread_getspecific(pthread_key_t, void **);
262- AC_TRY_COMPILE([#include <pthread.h>],
263- [pthread_getspecific(0,NULL);],
264- [AC_MSG_RESULT(no)],
265- [AC_MSG_RESULT(yes)
266- AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
267- AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
268+ AC_CACHE_CHECK([whether pthread_getspecific is posix like],
269+ [glib_cv_sys_pthread_getspecific_posix],
270+ AC_TRY_COMPILE([#include <pthread.h>],
271+ [pthread_getspecific(0,NULL);],
272+ [glib_cv_sys_pthread_getspecific_posix=no],
273+ [glib_cv_sys_pthread_getspecific_posix=yes])
274+ )
275+ if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
276+ AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
277+ fi
278 # DCE Threads return 1 as success, posix 0. what a mess.
279- AC_TRY_RUN([#include <pthread.h>
280- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
281- int main () {
282- return !pthread_mutex_trylock (&mutex); }],
283- [AC_MSG_RESULT(no)],
284- [AC_MSG_RESULT(yes)
285- AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
286- AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
287+ AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
288+ [glib_cv_sys_pthread_mutex_trylock_posix],
289+ AC_TRY_RUN([#include <pthread.h>
290+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
291+ int main () {
292+ return !pthread_mutex_trylock (&mutex); }],
293+ [glib_cv_sys_pthread_mutex_trylock_posix=no],
294+ [glib_cv_sys_pthread_mutex_trylock_posix=yes])
295+ )
296+ if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
297+ AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
298+ fi
299 # DCE Threads return -1 as failure, posix ETIMEDOUT.
300- AC_TRY_RUN([#include <pthread.h>
301- #include <sys/time.h>
302- int main () {
303- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
304- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
305- struct timeval tval;
306- struct timespec tspec;
307- gettimeofday (&tval, NULL);
308- tspec.tv_sec = tval.tv_sec;
309- tspec.tv_nsec = 0;
310- pthread_mutex_lock (&mutex);
311- return pthread_cond_timedwait (&cond,&mutex,&tspec)
312- != -1;}],
313- [AC_MSG_RESULT(no)],
314- [AC_MSG_RESULT(yes)
315- AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
316+ AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
317+ [glib_cv_sys_pthread_cond_timedwait_posix],
318+ AC_TRY_RUN([#include <pthread.h>
319+ int main () {
320+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
321+ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
322+ struct timeval tval;
323+ struct timespec tspec;
324+ gettimeofday (&tval, NULL);
325+ tspec.tv_sec = tval.tv_sec;
326+ tspec.tv_nsec = 0;
327+ return pthread_cond_timedwait (&cond,&mutex,&tspec)
328+ != -1;}],
329+ [glib_cv_sys_pthread_cond_timedwait_posix=no],
330+ [glib_cv_sys_pthread_cond_timedwait_posix=yes])
331+ )
332+ if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
333+ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
334+ fi
335 fi
336 LIBS="$glib_save_LIBS"
337 CFLAGS="$glib_save_CFLAGS"
338@@ -946,13 +1001,14 @@
339 dnl ****************************************
340 dnl *** GLib POLL* compatibility defines ***
341 dnl ****************************************
342+if test x"$cross_compiling" != xyes; then
343 GLIB_SYSDEFS(
344 [#include <sys/types.h>
345 #include <sys/poll.h>],
346 POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
347 glibconfig-sysdefs.h,
348 =)
349-
350+fi
351
352 dnl ******************************
353 dnl *** output the whole stuff ***
354@@ -1005,7 +1061,7 @@
355 echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
356 fi
357
358- cat >> $outfile <<_______EOF
359+ cat >> $outfile <<EOF
360
361 #ifdef __cplusplus
362 extern "C" {
363@@ -1022,60 +1078,60 @@
364 #define G_MINLONG $glib_ml
365 #define G_MAXLONG $glib_Ml
366
367-_______EOF
368+EOF
369
370
371 ### this should always be true in a modern C/C++ compiler
372- cat >>$outfile <<_______EOF
373+ cat >>$outfile <<EOF
374 typedef signed char gint8;
375 typedef unsigned char guint8;
376-_______EOF
377+EOF
378
379
380 if test -n "$gint16"; then
381- cat >>$outfile <<_______EOF
382+ cat >>$outfile <<EOF
383 typedef signed $gint16 gint16;
384 typedef unsigned $gint16 guint16;
385-_______EOF
386+EOF
387 fi
388
389
390 if test -n "$gint32"; then
391- cat >>$outfile <<_______EOF
392+ cat >>$outfile <<EOF
393 typedef signed $gint32 gint32;
394 typedef unsigned $gint32 guint32;
395-_______EOF
396+EOF
397 fi
398
399
400 if test -n "$gint64"; then
401- cat >>$outfile <<_______EOF
402+ cat >>$outfile <<EOF
403 ${glib_warning_guard}#define G_HAVE_GINT64 1
404
405 ${glib_extension}typedef signed $gint64 gint64;
406 ${glib_extension}typedef unsigned $gint64 guint64;
407
408 #define G_GINT64_CONSTANT(val) $gint64_constant
409-_______EOF
410+EOF
411 fi
412
413
414 if test -z "$glib_unknown_void_p"; then
415- cat >>$outfile <<_______EOF
416+ cat >>$outfile <<EOF
417
418 #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
419 #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
420
421 #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
422 #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
423-_______EOF
424+EOF
425 else
426 echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
427 fi
428
429
430
431- cat >>$outfile <<_______EOF
432+ cat >>$outfile <<EOF
433 $glib_atexit
434 $glib_memmove
435 $glib_defines
436@@ -1087,11 +1143,11 @@
437 #else /* !__cplusplus */
438 $glib_inline
439 #endif /* !__cplusplus */
440-_______EOF
441+EOF
442
443 echo >>$outfile
444 if test x$g_mutex_has_default = xyes; then
445- cat >>$outfile <<_______EOF
446+ cat >>$outfile <<EOF
447 $g_enable_threads_def G_THREADS_ENABLED
448 #define G_THREADS_IMPL_$g_threads_impl_def
449 typedef struct _GStaticMutex GStaticMutex;
450@@ -1109,15 +1165,15 @@
451 #define g_static_mutex_get_mutex(mutex) \
452 (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
453 g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
454-_______EOF
455+EOF
456 else
457- cat >>$outfile <<_______EOF
458+ cat >>$outfile <<EOF
459 $g_enable_threads_def G_THREADS_ENABLED
460 #define G_THREADS_IMPL_$g_threads_impl_def
461 typedef struct _GMutex* GStaticMutex;
462 #define G_STATIC_MUTEX_INIT NULL
463 #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
464-_______EOF
465+EOF
466 fi
467
468 echo >>$outfile
469@@ -1126,15 +1182,15 @@
470 g_bit_sizes="$g_bit_sizes 64"
471 fi
472 for bits in $g_bit_sizes; do
473- cat >>$outfile <<_______EOF
474+ cat >>$outfile <<EOF
475 #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
476 #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
477 #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
478 #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
479-_______EOF
480+EOF
481 done
482
483- cat >>$outfile <<_______EOF
484+ cat >>$outfile <<EOF
485 #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
486 #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
487 #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
488@@ -1145,14 +1201,14 @@
489 #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
490 #define G_BYTE_ORDER $g_byte_order
491
492-_______EOF
493+EOF
494
495 if test -r glibconfig-sysdefs.h; then
496 cat glibconfig-sysdefs.h >>$outfile
497 fi
498
499
500- cat >>$outfile <<_______EOF
501+ cat >>$outfile <<EOF
502
503 $glib_wc
504
505@@ -1162,7 +1218,7 @@
506 #endif /* __cplusplus */
507
508 #endif /* GLIBCONFIG_H */
509-_______EOF
510+EOF
511
512
513 if cmp -s $outfile glibconfig.h; then
514Index: pkg-config-0.23/glib-1.2.10/glib.m4
515===================================================================
516--- pkg-config-0.23.orig/glib-1.2.10/glib.m4 2008-04-14 23:34:39.000000000 +0100
517+++ pkg-config-0.23/glib-1.2.10/glib.m4 2008-04-14 09:26:29.000000000 +0100
518@@ -5,7 +5,7 @@
519 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
520 dnl gthread is specified in MODULES, pass to glib-config
521 dnl
522-AC_DEFUN(AM_PATH_GLIB,
523+AC_DEFUN([AM_PATH_GLIB],
524 [dnl
525 dnl Get the cflags and libraries from the glib-config script
526 dnl
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/glibconfig-sysdefs.h b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/glibconfig-sysdefs.h
new file mode 100644
index 0000000000..1329e7f21c
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/glibconfig-sysdefs.h
@@ -0,0 +1,6 @@
1#define GLIB_SYSDEF_POLLIN =1
2#define GLIB_SYSDEF_POLLOUT =4
3#define GLIB_SYSDEF_POLLPRI =2
4#define GLIB_SYSDEF_POLLERR =8
5#define GLIB_SYSDEF_POLLHUP =16
6#define GLIB_SYSDEF_POLLNVAL =32
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
new file mode 100644
index 0000000000..c0e748173d
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -0,0 +1,34 @@
1DESCRIPTION = "pkg-config is a system for managing library \
2compile/link flags that works with automake and autoconf. \
3It replaces the ubiquitous *-config scripts you may have \
4seen with a single tool."
5HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
6BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config"
7SECTION = "console/utils"
8
9LICENSE = "GPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
11
12DEPENDS = "glib-2.0 popt"
13DEPENDS_virtclass-native = ""
14DEPENDS_virtclass-nativesdk = ""
15
16SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \
17 file://autofoo.patch \
18 file://glibconfig-sysdefs.h \
19 file://disable-legacy.patch"
20
21S = "${WORKDIR}/pkg-config-${PV}/"
22
23inherit autotools
24
25EXTRA_OECONF = "--with-installed-glib --with-installed-popt --disable-legacy-scripts"
26EXTRA_OECONF_virtclass-native = "--disable-legacy-scripts"
27EXTRA_OECONF_virtclass-nativesdk = "--disable-legacy-scripts"
28
29acpaths = "-I ."
30do_configure_prepend () {
31 install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h glib-1.2.10/
32}
33
34BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/autofoo.patch b/meta/recipes-devtools/pkgconfig/pkgconfig/autofoo.patch
new file mode 100644
index 0000000000..97895387f5
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/autofoo.patch
@@ -0,0 +1,526 @@
1---
2 glib-1.2.10/acglib.m4 | 12 +-
3 glib-1.2.10/configure.in | 212 ++++++++++++++++++++++++++++++------------------
4 2 files changed, 140 insertions(+), 84 deletions(-)
5
6Index: pkg-config-0.23/glib-1.2.10/acglib.m4
7===================================================================
8--- pkg-config-0.23.orig/glib-1.2.10/acglib.m4 2008-01-16 22:52:24.000000000 +0000
9+++ pkg-config-0.23/glib-1.2.10/acglib.m4 2008-03-26 20:59:12.000000000 +0000
10@@ -10,7 +10,7 @@
11 AC_DIVERT_POP()])])])
12
13 dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
14-AC_DEFUN(GLIB_IF_VAR_EQ,[
15+AC_DEFUN([GLIB_IF_VAR_EQ],[
16 case "$[$1]" in
17 "[$2]"[)]
18 [$3]
19@@ -21,7 +21,7 @@
20 esac
21 ])
22 dnl GLIB_STR_CONTAINS (SRC_STRING, SUB_STRING [, CONTAINS_ACTION] [, ELSE_ACTION])
23-AC_DEFUN(GLIB_STR_CONTAINS,[
24+AC_DEFUN([GLIB_STR_CONTAINS],[
25 case "[$1]" in
26 *"[$2]"*[)]
27 [$3]
28@@ -32,12 +32,12 @@
29 esac
30 ])
31 dnl GLIB_ADD_TO_VAR (ENV_VARIABLE, CHECK_STRING, ADD_STRING)
32-AC_DEFUN(GLIB_ADD_TO_VAR,[
33+AC_DEFUN([GLIB_ADD_TO_VAR],[
34 GLIB_STR_CONTAINS($[$1], [$2], [$1]="$[$1]", [$1]="$[$1] [$3]")
35 ])
36
37 dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
38-AC_DEFUN(GLIB_SIZEOF,
39+AC_DEFUN([GLIB_SIZEOF],
40 [changequote(<<, >>)dnl
41 dnl The name to #define.
42 define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
43@@ -62,7 +62,7 @@
44 ])
45
46 dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
47-AC_DEFUN(GLIB_BYTE_CONTENTS,
48+AC_DEFUN([GLIB_BYTE_CONTENTS],
49 [changequote(<<, >>)dnl
50 dnl The name to #define.
51 define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
52@@ -92,7 +92,7 @@
53 ])
54
55 dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
56-AC_DEFUN(GLIB_SYSDEFS,
57+AC_DEFUN([GLIB_SYSDEFS],
58 [glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
59 glib_sysdef_msg=`echo $2 | sed 's/:[[^ ]]*//g'`
60 if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
61Index: pkg-config-0.23/glib-1.2.10/configure.in
62===================================================================
63--- pkg-config-0.23.orig/glib-1.2.10/configure.in 2008-01-16 22:52:24.000000000 +0000
64+++ pkg-config-0.23/glib-1.2.10/configure.in 2008-03-26 20:59:12.000000000 +0000
65@@ -1,10 +1,11 @@
66 dnl ***********************************
67 dnl *** include special GLib macros ***
68 dnl ***********************************
69-builtin(include, acglib.m4)dnl
70+dnl no need, just use aclocal -I . --CL
71+dnl builtin(include, acglib.m4)dnl
72
73 # require autoconf 2.13
74-AC_PREREQ(2.13)
75+AC_PREREQ(2.53)
76
77 # init autoconf (and check for presence of glist.c)
78 AC_INIT(glist.c)
79@@ -13,11 +14,48 @@
80 cflags_set=${CFLAGS+set}
81
82 # we rewrite this file
83+if test "x$cross_compiling" != "xyes"; then
84 rm -f glibconfig-sysdefs.h
85+fi
86+
87+# config defines
88+
89+AH_TEMPLATE([ENABLE_MEM_CHECK],
90+ [Define if enabling memory checking])
91+AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
92+AH_TEMPLATE([GLIB_BINARY_AGE], [])
93+AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
94+AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
95+AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
96+AH_TEMPLATE([GLIB_MINOR_VERSION], [])
97+AH_TEMPLATE([GLIB_MICRO_VERSION], [])
98+AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
99+AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
100+AH_TEMPLATE([G_HAVE_INLINE], [])
101+AH_TEMPLATE([G_HAVE___INLINE], [])
102+AH_TEMPLATE([G_HAVE___INLINE__], [])
103+AH_TEMPLATE([G_THREAD_SOURCE], [])
104+AH_TEMPLATE([G_VA_COPY], [])
105+AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
106+AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
107+AH_TEMPLATE([HAVE_GETPWUID_R], [])
108+AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
109+AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
110+AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
111+AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
112+AH_TEMPLATE([HAVE_WCHAR_H], [])
113+AH_TEMPLATE([HAVE_WCTYPE_H], [])
114+AH_TEMPLATE([NO_FD_SET], [])
115+AH_TEMPLATE([NO_SYS_ERRLIST], [])
116+AH_TEMPLATE([NO_SYS_SIGLIST], [])
117+AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
118+AH_TEMPLATE([REALLOC_0_WORKS], [])
119+
120
121 dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
122 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
123-GLIB_AC_DIVERT_BEFORE_HELP([
124+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
125+#dnl
126 #
127 # The following version number definitions apply to GLib, GModule and GThread
128 # as a whole, so if changes occoured in any of them, they are all
129@@ -38,7 +76,7 @@
130 GLIB_BINARY_AGE=10
131 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
132 dnl
133-])
134+#AC_DIVERT_POP()dnl
135
136 AC_SUBST(GLIB_MAJOR_VERSION)
137 AC_SUBST(GLIB_MINOR_VERSION)
138@@ -72,22 +110,20 @@
139 AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
140
141 dnl Initialize libtool
142-AC_PROG_LIBTOOL
143+AM_PROG_LIBTOOL
144
145 dnl Initialize maintainer mode
146 AM_MAINTAINER_MODE
147
148-AC_CANONICAL_HOST
149-
150 dnl figure debugging default, prior to $ac_help setup
151 dnl
152-GLIB_AC_DIVERT_BEFORE_HELP([
153+#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
154 if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
155 debug_default=yes
156 else
157 debug_default=minimum
158 fi
159-]) dnl
160+#AC_DIVERT_POP()dnl
161
162 dnl declare --enable-* args and collect ac_help strings
163 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
164@@ -194,7 +230,9 @@
165 CFLAGS=$glib_save_CFLAGS
166 AC_MSG_WARN(
167 [No ANSI prototypes found in library. (-std1 didn't work.)])
168+ , AC_MSG_WARN([Skipping test due to crosscompilation])
169 )
170+ , AC_MSG_WARN([Skipping test due to crosscompilation])
171 )
172 LIBS=$glib_save_LIBS
173
174@@ -336,7 +374,7 @@
175 if test $gtk_ok = yes; then
176 AC_MSG_RESULT([yes, found in sys/types.h])
177 else
178- AC_HEADER_EGREP(fd_set, sys/select.h, gtk_ok=yes)
179+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
180 if test $gtk_ok = yes; then
181 AC_DEFINE(HAVE_SYS_SELECT_H)
182 AC_MSG_RESULT([yes, found in sys/select.h])
183@@ -409,7 +447,7 @@
184 glib_cv_sane_realloc=no
185 ,)
186 ])
187-if test x$glib_cv_sane_realloc = xyes; then
188+if test "x$glib_cv_sane_realloc" = "xyes"; then
189 AC_DEFINE(REALLOC_0_WORKS)
190 fi
191 AC_MSG_RESULT($glib_cv_sane_realloc)
192@@ -487,7 +525,8 @@
193 ])
194 if test "x$glib_cv_va_copy" = "xyes"; then
195 AC_DEFINE(G_VA_COPY, va_copy)
196-else if test "x$glib_cv___va_copy" = "xyes"; then
197+else
198+if test "x$glib_cv___va_copy" = "xyes"; then
199 AC_DEFINE(G_VA_COPY, __va_copy)
200 fi
201 fi
202@@ -496,6 +535,7 @@
203 fi
204 AC_MSG_RESULT($glib_cv_va_val_copy)
205
206+AC_MSG_WARN([hi mom])
207
208 dnl ***********************
209 dnl *** g_module checks ***
210@@ -507,23 +547,27 @@
211 G_MODULE_BROKEN_RTLD_GLOBAL=0
212 G_MODULE_HAVE_DLERROR=0
213 dnl *** dlopen() and dlsym() in system libraries
214+AC_CHECK_FUNC(dlopen,[
215+ AC_CHECK_FUNC(dlsym,[
216+ G_MODULE_IMPL=G_MODULE_IMPL_DL
217+ ],
218+ )],
219+)
220 if test -z "$G_MODULE_IMPL"; then
221- AC_CHECK_FUNC(dlopen,
222- [AC_CHECK_FUNC(dlsym,
223+ AC_CHECK_FUNC(dlopen,[
224+ AC_CHECK_FUNC(dlsym,[
225 G_MODULE_IMPL=G_MODULE_IMPL_DL
226- ,)]
227- ,)
228-
229+ ])],
230+ )
231 fi
232-
233 dnl *** dlopen() and dlsym() in libdl
234 if test -z "$G_MODULE_IMPL"; then
235- AC_CHECK_LIB(dl, dlopen,
236- [AC_CHECK_LIB(dl, dlsym,
237+ AC_CHECK_LIB(dl, dlopen,[
238+ AC_CHECK_LIB(dl, dlsym,[
239 G_MODULE_LIBS=-ldl
240 G_MODULE_IMPL=G_MODULE_IMPL_DL
241- ,)]
242- ,)
243+ ])]
244+ )
245 fi
246 dnl *** shl_load() in libdld (HP-UX)
247 if test -z "$G_MODULE_IMPL"; then
248@@ -633,6 +677,7 @@
249 AC_SUBST(G_MODULE_NEED_USCORE)
250 AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
251 AC_SUBST(GLIB_DEBUG_FLAGS)
252+AC_MSG_WARN([hi mom])
253
254
255 dnl ***********************
256@@ -869,40 +914,50 @@
257 fi
258 if test x"$have_threads" = xposix; then
259 LIBS="$LIBS $G_THREAD_LIBS"
260- AC_MSG_CHECKING(whether pthread_getspecific is posix like)
261 # PCThreads has pthread_getspecific(pthread_key_t, void **);
262- AC_TRY_COMPILE([#include <pthread.h>],
263- [pthread_getspecific(0,NULL);],
264- [AC_MSG_RESULT(no)],
265- [AC_MSG_RESULT(yes)
266- AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
267- AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
268+ AC_CACHE_CHECK([whether pthread_getspecific is posix like],
269+ [glib_cv_sys_pthread_getspecific_posix],
270+ AC_TRY_COMPILE([#include <pthread.h>],
271+ [pthread_getspecific(0,NULL);],
272+ [glib_cv_sys_pthread_getspecific_posix=no],
273+ [glib_cv_sys_pthread_getspecific_posix=yes])
274+ )
275+ if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
276+ AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
277+ fi
278 # DCE Threads return 1 as success, posix 0. what a mess.
279- AC_TRY_RUN([#include <pthread.h>
280- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
281- int main () {
282- return !pthread_mutex_trylock (&mutex); }],
283- [AC_MSG_RESULT(no)],
284- [AC_MSG_RESULT(yes)
285- AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
286- AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
287+ AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
288+ [glib_cv_sys_pthread_mutex_trylock_posix],
289+ AC_TRY_RUN([#include <pthread.h>
290+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
291+ int main () {
292+ return !pthread_mutex_trylock (&mutex); }],
293+ [glib_cv_sys_pthread_mutex_trylock_posix=no],
294+ [glib_cv_sys_pthread_mutex_trylock_posix=yes])
295+ )
296+ if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
297+ AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
298+ fi
299 # DCE Threads return -1 as failure, posix ETIMEDOUT.
300- AC_TRY_RUN([#include <pthread.h>
301- #include <sys/time.h>
302- int main () {
303- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
304- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
305- struct timeval tval;
306- struct timespec tspec;
307- gettimeofday (&tval, NULL);
308- tspec.tv_sec = tval.tv_sec;
309- tspec.tv_nsec = 0;
310- pthread_mutex_lock (&mutex);
311- return pthread_cond_timedwait (&cond,&mutex,&tspec)
312- != -1;}],
313- [AC_MSG_RESULT(no)],
314- [AC_MSG_RESULT(yes)
315- AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
316+ AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
317+ [glib_cv_sys_pthread_cond_timedwait_posix],
318+ AC_TRY_RUN([#include <pthread.h>
319+ int main () {
320+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
321+ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
322+ struct timeval tval;
323+ struct timespec tspec;
324+ gettimeofday (&tval, NULL);
325+ tspec.tv_sec = tval.tv_sec;
326+ tspec.tv_nsec = 0;
327+ return pthread_cond_timedwait (&cond,&mutex,&tspec)
328+ != -1;}],
329+ [glib_cv_sys_pthread_cond_timedwait_posix=no],
330+ [glib_cv_sys_pthread_cond_timedwait_posix=yes])
331+ )
332+ if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
333+ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
334+ fi
335 fi
336 LIBS="$glib_save_LIBS"
337 CFLAGS="$glib_save_CFLAGS"
338@@ -946,13 +1001,14 @@
339 dnl ****************************************
340 dnl *** GLib POLL* compatibility defines ***
341 dnl ****************************************
342+if test x"$cross_compiling" != xyes; then
343 GLIB_SYSDEFS(
344 [#include <sys/types.h>
345 #include <sys/poll.h>],
346 POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
347 glibconfig-sysdefs.h,
348 =)
349-
350+fi
351
352 dnl ******************************
353 dnl *** output the whole stuff ***
354@@ -1005,7 +1061,7 @@
355 echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
356 fi
357
358- cat >> $outfile <<_______EOF
359+ cat >> $outfile <<EOF
360
361 #ifdef __cplusplus
362 extern "C" {
363@@ -1022,60 +1078,60 @@
364 #define G_MINLONG $glib_ml
365 #define G_MAXLONG $glib_Ml
366
367-_______EOF
368+EOF
369
370
371 ### this should always be true in a modern C/C++ compiler
372- cat >>$outfile <<_______EOF
373+ cat >>$outfile <<EOF
374 typedef signed char gint8;
375 typedef unsigned char guint8;
376-_______EOF
377+EOF
378
379
380 if test -n "$gint16"; then
381- cat >>$outfile <<_______EOF
382+ cat >>$outfile <<EOF
383 typedef signed $gint16 gint16;
384 typedef unsigned $gint16 guint16;
385-_______EOF
386+EOF
387 fi
388
389
390 if test -n "$gint32"; then
391- cat >>$outfile <<_______EOF
392+ cat >>$outfile <<EOF
393 typedef signed $gint32 gint32;
394 typedef unsigned $gint32 guint32;
395-_______EOF
396+EOF
397 fi
398
399
400 if test -n "$gint64"; then
401- cat >>$outfile <<_______EOF
402+ cat >>$outfile <<EOF
403 ${glib_warning_guard}#define G_HAVE_GINT64 1
404
405 ${glib_extension}typedef signed $gint64 gint64;
406 ${glib_extension}typedef unsigned $gint64 guint64;
407
408 #define G_GINT64_CONSTANT(val) $gint64_constant
409-_______EOF
410+EOF
411 fi
412
413
414 if test -z "$glib_unknown_void_p"; then
415- cat >>$outfile <<_______EOF
416+ cat >>$outfile <<EOF
417
418 #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
419 #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
420
421 #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
422 #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
423-_______EOF
424+EOF
425 else
426 echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
427 fi
428
429
430
431- cat >>$outfile <<_______EOF
432+ cat >>$outfile <<EOF
433 $glib_atexit
434 $glib_memmove
435 $glib_defines
436@@ -1087,11 +1143,11 @@
437 #else /* !__cplusplus */
438 $glib_inline
439 #endif /* !__cplusplus */
440-_______EOF
441+EOF
442
443 echo >>$outfile
444 if test x$g_mutex_has_default = xyes; then
445- cat >>$outfile <<_______EOF
446+ cat >>$outfile <<EOF
447 $g_enable_threads_def G_THREADS_ENABLED
448 #define G_THREADS_IMPL_$g_threads_impl_def
449 typedef struct _GStaticMutex GStaticMutex;
450@@ -1109,15 +1165,15 @@
451 #define g_static_mutex_get_mutex(mutex) \
452 (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
453 g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
454-_______EOF
455+EOF
456 else
457- cat >>$outfile <<_______EOF
458+ cat >>$outfile <<EOF
459 $g_enable_threads_def G_THREADS_ENABLED
460 #define G_THREADS_IMPL_$g_threads_impl_def
461 typedef struct _GMutex* GStaticMutex;
462 #define G_STATIC_MUTEX_INIT NULL
463 #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
464-_______EOF
465+EOF
466 fi
467
468 echo >>$outfile
469@@ -1126,15 +1182,15 @@
470 g_bit_sizes="$g_bit_sizes 64"
471 fi
472 for bits in $g_bit_sizes; do
473- cat >>$outfile <<_______EOF
474+ cat >>$outfile <<EOF
475 #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
476 #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
477 #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
478 #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
479-_______EOF
480+EOF
481 done
482
483- cat >>$outfile <<_______EOF
484+ cat >>$outfile <<EOF
485 #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
486 #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
487 #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
488@@ -1145,14 +1201,14 @@
489 #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
490 #define G_BYTE_ORDER $g_byte_order
491
492-_______EOF
493+EOF
494
495 if test -r glibconfig-sysdefs.h; then
496 cat glibconfig-sysdefs.h >>$outfile
497 fi
498
499
500- cat >>$outfile <<_______EOF
501+ cat >>$outfile <<EOF
502
503 $glib_wc
504
505@@ -1162,7 +1218,7 @@
506 #endif /* __cplusplus */
507
508 #endif /* GLIBCONFIG_H */
509-_______EOF
510+EOF
511
512
513 if cmp -s $outfile glibconfig.h; then
514Index: pkg-config-0.23/glib-1.2.10/glib.m4
515===================================================================
516--- pkg-config-0.23.orig/glib-1.2.10/glib.m4 2008-04-14 23:34:39.000000000 +0100
517+++ pkg-config-0.23/glib-1.2.10/glib.m4 2008-04-14 09:26:29.000000000 +0100
518@@ -5,7 +5,7 @@
519 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
520 dnl gthread is specified in MODULES, pass to glib-config
521 dnl
522-AC_DEFUN(AM_PATH_GLIB,
523+AC_DEFUN([AM_PATH_GLIB],
524 [dnl
525 dnl Get the cflags and libraries from the glib-config script
526 dnl
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch b/meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch
new file mode 100644
index 0000000000..fea2d3d501
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch
@@ -0,0 +1,42 @@
1On an Fedora host with glib-config installed pkgconfig-native can get into a
2horrible state with recursive calls between pkg-config and glib-config.
3The patch adds a configure time option to disable legacy script support in
4pkgconfig with the --disable-legacy-scripts option, to maintain compatibility
5the default is to leave the scripts enabled.
6
7JL - 22/06/10
8Index: pkg-config-0.23/configure.in
9===================================================================
10--- pkg-config-0.23.orig/configure.in 2008-01-16 22:48:07.000000000 +0000
11+++ pkg-config-0.23/configure.in 2010-06-22 13:05:58.951984140 +0100
12@@ -125,6 +125,14 @@
13 AC_CONFIG_SUBDIRS(glib-1.2.10)
14 fi # !native_win32
15
16+# legacy *-configure scripts can cause headaches, add option to disable
17+AC_ARG_ENABLE(legacy-scripts,
18+ [AC_HELP_STRING([--enable-legacy-scripts=@<:@no/yes@:>@],
19+ [Whether pkg-config will try and use legacy scripts such as glib-config and gnome-config @<:@default=yes@:>@])],
20+ [],
21+ [enable_legacy=yes])
22+AM_CONDITIONAL([LEGACY_SCRIPTS], [test x$enable_legacy = xyes])
23+
24 AC_FUNC_ALLOCA
25
26 AC_CHECK_FUNCS(setresuid setreuid,break)
27Index: pkg-config-0.23/parse.c
28===================================================================
29--- pkg-config-0.23.orig/parse.c 2008-01-16 20:42:49.000000000 +0000
30+++ pkg-config-0.23/parse.c 2010-06-22 13:09:10.410129471 +0100
31@@ -1195,6 +1195,11 @@
32 * messages.
33 */
34 return NULL;
35+#elif defined(LEGACY_SCRIPTS)
36+ /* There are scenarios where we might not want to use these legacy
37+ * scripts even if they are available.
38+ */
39+ return NULL;
40 #else
41
42 Package *pkg;
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/glibconfig-sysdefs.h b/meta/recipes-devtools/pkgconfig/pkgconfig/glibconfig-sysdefs.h
new file mode 100644
index 0000000000..1329e7f21c
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/glibconfig-sysdefs.h
@@ -0,0 +1,6 @@
1#define GLIB_SYSDEF_POLLIN =1
2#define GLIB_SYSDEF_POLLOUT =4
3#define GLIB_SYSDEF_POLLPRI =2
4#define GLIB_SYSDEF_POLLERR =8
5#define GLIB_SYSDEF_POLLHUP =16
6#define GLIB_SYSDEF_POLLNVAL =32
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
new file mode 100644
index 0000000000..09b28a5bd5
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
@@ -0,0 +1,3 @@
1require pkgconfig.inc
2
3PR = "r0"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
new file mode 100644
index 0000000000..73acb9e14a
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -0,0 +1,39 @@
1require pkgconfig.inc
2
3SRC_URI = "git://anongit.freedesktop.org/pkg-config;protocol=git \
4 file://autofoo.patch;patch=1 \
5 file://glibconfig-sysdefs.h"
6
7S = "${WORKDIR}/git/"
8
9PV = "0.23+git${SRCPV}"
10
11DEFAULT_PREFERENCE = "-1"
12
13# Can't do native version with git since git-native depends on pkgconfig-native
14BBCLASSEXTEND = "nativesdk"
15
16do_fixsource() {
17 # Adapted from autogen.sh
18 cd ${S}
19 tar -xvzf glib-1.2.10.tar.gz
20
21 chmod +w `find glib-1.2.10 -name Makefile.am`
22 perl -p -i.bak -e "s/lib_LTLIBRARIES/noinst_LTLIBRARIES/g" `find glib-1.2.10 -name Makefile.am`
23 perl -p -i.bak -e "s/bin_SCRIPTS/noinst_SCRIPTS/g" `find glib-1.2.10 -name Makefile.am`
24 perl -p -i.bak -e "s/include_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
25 perl -p -i.bak -e "s/glibnoinst_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
26 perl -p -i.bak -e 's/([a-zA-Z0-9]+)_DATA/noinst_DATA/g' `find glib-1.2.10 -name Makefile.am`
27 perl -p -i.bak -e "s/info_TEXINFOS/noinst_TEXINFOS/g" `find glib-1.2.10 -name Makefile.am`
28 perl -p -i.bak -e "s/man_MANS/noinst_MANS/g" `find glib-1.2.10 -name Makefile.am`
29
30 ## patch gslist.c to have stable sort
31 perl -p -w -i.bak -e 's/if \(compare_func\(l1->data,l2->data\) < 0\)/if \(compare_func\(l1->data,l2->data\) <= 0\)/g' glib-1.2.10/gslist.c
32
33 # Update random auto* files to actually have something which have a snowball's
34 # chance in a hot place of working with modern auto* tools.
35
36 (cd glib-1.2.10 && for p in ../glib-patches/*.diff; do echo $p; patch -p1 < $p || exit 1; done ) || exit 1
37}
38
39addtask fixsource before do_patch after do_unpack
diff --git a/meta/recipes-devtools/prelink/prelink/prelink.conf b/meta/recipes-devtools/prelink/prelink/prelink.conf
new file mode 100644
index 0000000000..c5a4f4adc3
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.conf
@@ -0,0 +1,18 @@
1# This config file contains a list of directories both with binaries
2# and libraries prelink should consider by default.
3# If a directory name is prefixed with `-l ', the directory hierarchy
4# will be walked as long as filesystem boundaries are not crossed.
5# If a directory name is prefixed with `-h ', symbolic links in a
6# directory hierarchy are followed.
7-l /usr/local/sbin
8-l /sbin
9-l /usr/sbin
10-l /usr/local/bin
11-l /bin
12-l /usr/bin
13-l /usr/X11R6/bin
14-l /usr/games
15-l /usr/local/lib
16-l /lib
17-l /usr/lib
18-l /usr/X11R6/lib
diff --git a/meta/recipes-devtools/prelink/prelink/prelink.cron.daily b/meta/recipes-devtools/prelink/prelink/prelink.cron.daily
new file mode 100644
index 0000000000..0b3c07322c
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.cron.daily
@@ -0,0 +1,40 @@
1#!/bin/sh
2
3. /etc/default/prelink
4
5renice +19 -p $$ >/dev/null 2>&1
6
7if [ "$PRELINKING" != yes ]; then
8 if [ -f /etc/prelink.cache ]; then
9 echo /usr/sbin/prelink -uav > /var/log/prelink.log
10 /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1
11 rm -f /etc/prelink.cache
12 # Restart init if needed
13 [ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
14 fi
15 exit 0
16fi
17
18if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \
19 || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then
20 # If cache does not exist or is from older prelink versions or
21 # if we were asked to explicitely, force full prelinking
22 rm -f /etc/prelink.cache /var/lib/misc/prelink.force
23 PRELINK_OPTS="$PRELINK_OPTS -f"
24 date > /var/lib/misc/prelink.full
25elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \
26 -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \
27 = /var/lib/misc/prelink.full ]; then
28 # If prelink without -q has been run in the last
29 # PRELINK_FULL_TIME_INTERVAL days, just use quick mode
30 PRELINK_OPTS="$PRELINK_OPTS -q"
31else
32 date > /var/lib/misc/prelink.full
33fi
34
35echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink.log
36/usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink.log 2>&1
37# Restart init if needed
38[ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
39
40exit 0
diff --git a/meta/recipes-devtools/prelink/prelink/prelink.default b/meta/recipes-devtools/prelink/prelink/prelink.default
new file mode 100644
index 0000000000..901258ed2a
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.default
@@ -0,0 +1,22 @@
1# Set this to no to disable prelinking altogether
2# or to yes to enable it.
3# (if you change this from yes to no prelink -ua
4# will be run next night to undo prelinking)
5PRELINKING=unknown
6
7# Options to pass to prelink
8# -m Try to conserve virtual memory by allowing overlapping
9# assigned virtual memory slots for libraries which
10# never appear together in one binary
11# -R Randomize virtual memory slot assignments for libraries.
12# This makes it slightly harder for various buffer overflow
13# attacks, since library addresses will be different on each
14# host using -R.
15PRELINK_OPTS=-mR
16
17# How often should full prelink be run (in days)
18# Normally, prelink will be run in quick mode, every
19# $PRELINK_FULL_TIME_INTERVAL days it will be run
20# in normal mode. Comment this line out if prelink
21# should be run in normal mode always.
22PRELINK_FULL_TIME_INTERVAL=14
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
new file mode 100644
index 0000000000..06078ed68b
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -0,0 +1,50 @@
1SECTION = "devel"
2# Need binutils for libiberty.a
3DEPENDS = "elfutils binutils"
4DESCRIPTION = " The prelink package contains a utility which modifies ELF shared libraries \
5and executables, so that far fewer relocations need to be resolved at \
6runtime and thus programs come up faster."
7LICENSE = "GPLv2"
8PV = "1.0+git${SRCPV}"
9PR = "r0"
10
11SRC_URI = "git://git.pokylinux.org/prelink-cross.git;protocol=git \
12 file://prelink.conf \
13 file://prelink.cron.daily \
14 file://prelink.default"
15
16TARGET_OS_ORIG := "${TARGET_OS}"
17OVERRIDES_append = ":${TARGET_OS_ORIG}"
18
19S = "${WORKDIR}/git/trunk"
20
21inherit autotools
22
23BBCLASSEXTEND = "native"
24
25EXTRA_OECONF = "--disable-selinux --with-pkgversion=${PV}-${PR} \
26 --with-bugurl=http://bugzilla.pokylinux.org/"
27
28do_install_append () {
29 install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default
30 install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf
31 install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink
32 install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink
33}
34
35pkg_postinst_prelink() {
36#!/bin/sh
37
38if [ "x$D" != "x" ]; then
39 exit 1
40fi
41
42prelink -a
43}
44
45pkg_postrm_prelink() {
46#!/bin/sh
47
48prelink -au
49}
50
diff --git a/meta/recipes-devtools/pseudo/pseudo/static_sqlite.patch b/meta/recipes-devtools/pseudo/pseudo/static_sqlite.patch
new file mode 100644
index 0000000000..0a2fa28d79
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo/static_sqlite.patch
@@ -0,0 +1,15 @@
1Due to disabling the LD_LIBRARY_PATH handling, we need to use a static
2libsqlite.
3
4diff -ur git.orig/Makefile.in git/Makefile.in
5--- git.orig/Makefile.in 2010-07-20 17:13:56.000000000 -0700
6+++ git/Makefile.in 2010-07-20 17:12:14.000000000 -0700
7@@ -45,7 +45,7 @@
8 GLOB_PATTERN=guts/*.c
9 GUTS=$(filter-out "$(GLOB_PATTERN)",$(wildcard $(GLOB_PATTERN)))
10
11-DBLDFLAGS=-lsqlite3
12+DBLDFLAGS=$(SQLITE)/lib/libsqlite3.a
13 USE_64=wrapfuncs64.in
14
15 SHOBJS=pseudo_table.o pseudo_util.o
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
new file mode 100644
index 0000000000..4cb483ea60
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -0,0 +1,47 @@
1DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
2HOMEPAGE = "http://wiki.github.com/wrpseudo/pseudo/"
3LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
4SECTION = "base"
5LICENSE = "LGPL2.1"
6DEPENDS = "sqlite3"
7
8PV = "0.0+git${SRCPV}"
9PR = "r14"
10
11SRC_URI = "git://github.com/wrpseudo/pseudo.git;protocol=git \
12 file://static_sqlite.patch"
13
14FILES_${PN} = "${libdir}/libpseudo.so ${bindir}/* ${localstatedir}/pseudo"
15PROVIDES += "virtual/fakeroot"
16
17S = "${WORKDIR}/git"
18
19inherit siteinfo
20
21do_configure () {
22 :
23}
24
25do_compile () {
26 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" ]; then
27 # We need the 32-bit libpseudo on a 64-bit machine...
28 ./configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
29 oe_runmake 'CFLAGS=-m32' 'LIB=lib/pseudo/lib' libpseudo
30 # prevent it from removing the lib, but remove everything else
31 make 'LIB=foo' distclean
32 fi
33 ${S}/configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
34 oe_runmake 'LIB=lib/pseudo/lib$(MARK64)'
35}
36
37do_install () {
38 oe_runmake 'DESTDIR=${D}' 'LIB=lib/pseudo/lib$(MARK64)' install
39 if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" ]; then
40 mkdir -p ${D}${prefix}/lib/pseudo/lib
41 cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
42 fi
43}
44
45BBCLASSEXTEND = "native nativesdk"
46
47
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc
new file mode 100644
index 0000000000..0738c59ada
--- /dev/null
+++ b/meta/recipes-devtools/python/fix-path.inc
@@ -0,0 +1,22 @@
1do_install_append() {
2 for i in `find ${D} -name "*.py"` ; do \
3 sed -i -e s:${D}::g $i
4 done
5
6 for i in `find ${D} -name "*.la"` ; do \
7 sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
8 done
9
10 if test -e ${D}${bindir} ; then
11 for i in ${D}${bindir}/* ; do \
12 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
13 done
14 fi
15
16 if test -e ${D}${sbindir} ; then
17 for i in ${D}${sbindir}/* ; do \
18 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
19 done
20 fi
21}
22
diff --git a/meta/recipes-devtools/python/python-2.6-manifest.inc b/meta/recipes-devtools/python/python-2.6-manifest.inc
new file mode 100644
index 0000000000..cee12c866c
--- /dev/null
+++ b/meta/recipes-devtools/python/python-2.6-manifest.inc
@@ -0,0 +1,268 @@
1
2# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
3# Generator: '../../contrib/python/generate-manifest-2.6.py' Version 20091004 (C) 2002-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
4# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
5
6
7
8PROVIDES+="python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
9
10PACKAGES="python-core-dbg python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio python-modules"
11
12DESCRIPTION_python-profile="Python Basic Profiling Support"
13RDEPENDS_python-profile="python-core python-textutils"
14FILES_python-profile="${libdir}/python2.6/profile.* ${libdir}/python2.6/pstats.* ${libdir}/python2.6/cProfile.* ${libdir}/python2.6/lib-dynload/_lsprof.so "
15
16DESCRIPTION_python-threading="Python Threading & Synchronization Support"
17RDEPENDS_python-threading="python-core python-lang"
18FILES_python-threading="${libdir}/python2.6/_threading_local.* ${libdir}/python2.6/dummy_thread.* ${libdir}/python2.6/dummy_threading.* ${libdir}/python2.6/mutex.* ${libdir}/python2.6/threading.* ${libdir}/python2.6/Queue.* "
19
20DESCRIPTION_python-distutils="Python Distribution Utilities"
21RDEPENDS_python-distutils="python-core"
22FILES_python-distutils="${libdir}/python2.6/config ${libdir}/python2.6/distutils "
23
24DESCRIPTION_python-doctest="Python framework for running examples in docstrings."
25RDEPENDS_python-doctest="python-core python-lang python-io python-re python-unittest python-debugger python-difflib"
26FILES_python-doctest="${libdir}/python2.6/doctest.* "
27
28DESCRIPTION_python-stringold="Python String APIs [deprecated]"
29RDEPENDS_python-stringold="python-core python-re"
30FILES_python-stringold="${libdir}/python2.6/lib-dynload/strop.so ${libdir}/python2.6/string.* "
31
32DESCRIPTION_python-codecs="Python Codecs, Encodings & i18n Support"
33RDEPENDS_python-codecs="python-core python-lang"
34FILES_python-codecs="${libdir}/python2.6/codecs.* ${libdir}/python2.6/encodings ${libdir}/python2.6/gettext.* ${libdir}/python2.6/locale.* ${libdir}/python2.6/lib-dynload/_locale.so ${libdir}/python2.6/lib-dynload/unicodedata.so ${libdir}/python2.6/stringprep.* ${libdir}/python2.6/xdrlib.* "
35
36DESCRIPTION_python-ctypes="Python C Types Support"
37RDEPENDS_python-ctypes="python-core"
38FILES_python-ctypes="${libdir}/python2.6/ctypes ${libdir}/python2.6/lib-dynload/_ctypes.so "
39
40DESCRIPTION_python-pickle="Python Persistence Support"
41RDEPENDS_python-pickle="python-core python-codecs python-io python-re"
42FILES_python-pickle="${libdir}/python2.6/pickle.* ${libdir}/python2.6/shelve.* ${libdir}/python2.6/lib-dynload/cPickle.so "
43
44DESCRIPTION_python-datetime="Python Calendar and Time support"
45RDEPENDS_python-datetime="python-core python-codecs"
46FILES_python-datetime="${libdir}/python2.6/_strptime.* ${libdir}/python2.6/calendar.* ${libdir}/python2.6/lib-dynload/datetime.so "
47
48DESCRIPTION_python-core="Python Interpreter and core modules (needed!)"
49RDEPENDS_python-core=""
50FILES_python-core="${libdir}/python2.6/__future__.* ${libdir}/python2.6/_abcoll.* ${libdir}/python2.6/abc.* ${libdir}/python2.6/copy.* ${libdir}/python2.6/copy_reg.* ${libdir}/python2.6/ConfigParser.* ${libdir}/python2.6/genericpath.* ${libdir}/python2.6/getopt.* ${libdir}/python2.6/linecache.* ${libdir}/python2.6/new.* ${libdir}/python2.6/os.* ${libdir}/python2.6/posixpath.* ${libdir}/python2.6/struct.* ${libdir}/python2.6/warnings.* ${libdir}/python2.6/site.* ${libdir}/python2.6/stat.* ${libdir}/python2.6/UserDict.* ${libdir}/python2.6/UserList.* ${libdir}/python2.6/UserString.* ${libdir}/python2.6/lib-dynload/binascii.so ${libdir}/python2.6/lib-dynload/_struct.so ${libdir}/python2.6/lib-dynload/time.so ${libdir}/python2.6/lib-dynload/xreadlines.so ${libdir}/python2.6/types.* ${bindir}/python* "
51
52DESCRIPTION_python-io="Python Low-Level I/O"
53RDEPENDS_python-io="python-core python-math"
54FILES_python-io="${libdir}/python2.6/lib-dynload/_socket.so ${libdir}/python2.6/lib-dynload/_ssl.so ${libdir}/python2.6/lib-dynload/select.so ${libdir}/python2.6/lib-dynload/termios.so ${libdir}/python2.6/lib-dynload/cStringIO.so ${libdir}/python2.6/pipes.* ${libdir}/python2.6/socket.* ${libdir}/python2.6/tempfile.* ${libdir}/python2.6/StringIO.* "
55
56DESCRIPTION_python-compiler="Python Compiler Support"
57RDEPENDS_python-compiler="python-core"
58FILES_python-compiler="${libdir}/python2.6/compiler "
59
60DESCRIPTION_python-compression="Python High Level Compression Support"
61RDEPENDS_python-compression="python-core python-zlib"
62FILES_python-compression="${libdir}/python2.6/gzip.* ${libdir}/python2.6/zipfile.* ${libdir}/python2.6/tarfile.* ${libdir}/python2.6/lib-dynload/bz2.so "
63
64DESCRIPTION_python-re="Python Regular Expression APIs"
65RDEPENDS_python-re="python-core"
66FILES_python-re="${libdir}/python2.6/re.* ${libdir}/python2.6/sre.* ${libdir}/python2.6/sre_compile.* ${libdir}/python2.6/sre_constants* ${libdir}/python2.6/sre_parse.* "
67
68DESCRIPTION_python-xmlrpc="Python XMLRPC Support"
69RDEPENDS_python-xmlrpc="python-core python-xml python-netserver python-lang"
70FILES_python-xmlrpc="${libdir}/python2.6/xmlrpclib.* ${libdir}/python2.6/SimpleXMLRPCServer.* "
71
72DESCRIPTION_python-terminal="Python Terminal Controlling Support"
73RDEPENDS_python-terminal="python-core python-io"
74FILES_python-terminal="${libdir}/python2.6/pty.* ${libdir}/python2.6/tty.* "
75
76DESCRIPTION_python-email="Python Email Support"
77RDEPENDS_python-email="python-core python-io python-re python-mime python-audio python-image python-netclient"
78FILES_python-email="${libdir}/python2.6/imaplib.* ${libdir}/python2.6/email "
79
80DESCRIPTION_python-image="Python Graphical Image Handling"
81RDEPENDS_python-image="python-core"
82FILES_python-image="${libdir}/python2.6/colorsys.* ${libdir}/python2.6/imghdr.* ${libdir}/python2.6/lib-dynload/imageop.so ${libdir}/python2.6/lib-dynload/rgbimg.so "
83
84DESCRIPTION_python-tests="Python Tests"
85RDEPENDS_python-tests="python-core"
86FILES_python-tests="${libdir}/python2.6/test "
87
88DESCRIPTION_python-core-dbg="Python core module debug information"
89RDEPENDS_python-core-dbg="python-core"
90FILES_python-core-dbg="${libdir}/python2.6/config/.debug ${libdir}/python2.6/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug "
91
92DESCRIPTION_python-resource="Python Resource Control Interface"
93RDEPENDS_python-resource="python-core"
94FILES_python-resource="${libdir}/python2.6/lib-dynload/resource.so "
95
96DESCRIPTION_python-json="Python JSON Support"
97RDEPENDS_python-json="python-core python-math python-re"
98FILES_python-json="${libdir}/python2.6/json "
99
100DESCRIPTION_python-devel="Python Development Package"
101RDEPENDS_python-devel="python-core"
102FILES_python-devel="${includedir} ${libdir}/libpython2.6.so ${libdir}/python2.6/config "
103
104DESCRIPTION_python-difflib="Python helpers for computing deltas between objects."
105RDEPENDS_python-difflib="python-lang python-re"
106FILES_python-difflib="${libdir}/python2.6/difflib.* "
107
108DESCRIPTION_python-math="Python Math Support"
109RDEPENDS_python-math="python-core"
110FILES_python-math="${libdir}/python2.6/lib-dynload/cmath.so ${libdir}/python2.6/lib-dynload/math.so ${libdir}/python2.6/lib-dynload/_random.so ${libdir}/python2.6/random.* ${libdir}/python2.6/sets.* "
111
112DESCRIPTION_python-syslog="Python Syslog Interface"
113RDEPENDS_python-syslog="python-core"
114FILES_python-syslog="${libdir}/python2.6/lib-dynload/syslog.so "
115
116DESCRIPTION_python-hotshot="Python Hotshot Profiler"
117RDEPENDS_python-hotshot="python-core"
118FILES_python-hotshot="${libdir}/python2.6/hotshot ${libdir}/python2.6/lib-dynload/_hotshot.so "
119
120DESCRIPTION_python-unixadmin="Python Unix Administration Support"
121RDEPENDS_python-unixadmin="python-core"
122FILES_python-unixadmin="${libdir}/python2.6/lib-dynload/nis.so ${libdir}/python2.6/lib-dynload/grp.so ${libdir}/python2.6/lib-dynload/pwd.so ${libdir}/python2.6/getpass.* "
123
124DESCRIPTION_python-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support"
125RDEPENDS_python-textutils="python-core python-io python-re python-stringold"
126FILES_python-textutils="${libdir}/python2.6/lib-dynload/_csv.so ${libdir}/python2.6/csv.* ${libdir}/python2.6/optparse.* ${libdir}/python2.6/textwrap.* "
127
128DESCRIPTION_python-tkinter="Python Tcl/Tk Bindings"
129RDEPENDS_python-tkinter="python-core"
130FILES_python-tkinter="${libdir}/python2.6/lib-dynload/_tkinter.so ${libdir}/python2.6/lib-tk "
131
132DESCRIPTION_python-gdbm="Python GNU Database Support"
133RDEPENDS_python-gdbm="python-core"
134FILES_python-gdbm="${libdir}/python2.6/lib-dynload/gdbm.so "
135
136DESCRIPTION_python-elementtree="Python elementree"
137RDEPENDS_python-elementtree="python-core"
138FILES_python-elementtree="${libdir}/python2.6/lib-dynload/_elementtree.so "
139
140DESCRIPTION_python-fcntl="Python's fcntl Interface"
141RDEPENDS_python-fcntl="python-core"
142FILES_python-fcntl="${libdir}/python2.6/lib-dynload/fcntl.so "
143
144DESCRIPTION_python-netclient="Python Internet Protocol Clients"
145RDEPENDS_python-netclient="python-core python-crypt python-datetime python-io python-lang python-logging python-mime"
146FILES_python-netclient="${libdir}/python2.6/*Cookie*.* ${libdir}/python2.6/base64.* ${libdir}/python2.6/cookielib.* ${libdir}/python2.6/ftplib.* ${libdir}/python2.6/gopherlib.* ${libdir}/python2.6/hmac.* ${libdir}/python2.6/httplib.* ${libdir}/python2.6/mimetypes.* ${libdir}/python2.6/nntplib.* ${libdir}/python2.6/poplib.* ${libdir}/python2.6/smtplib.* ${libdir}/python2.6/telnetlib.* ${libdir}/python2.6/urllib.* ${libdir}/python2.6/urllib2.* ${libdir}/python2.6/urlparse.* ${libdir}/python2.6/uuid.* ${libdir}/python2.6/rfc822.* ${libdir}/python2.6/mimetools.* "
147
148DESCRIPTION_python-pprint="Python Pretty-Print Support"
149RDEPENDS_python-pprint="python-core"
150FILES_python-pprint="${libdir}/python2.6/pprint.* "
151
152DESCRIPTION_python-netserver="Python Internet Protocol Servers"
153RDEPENDS_python-netserver="python-core python-netclient"
154FILES_python-netserver="${libdir}/python2.6/cgi.* ${libdir}/python2.6/*HTTPServer.* ${libdir}/python2.6/SocketServer.* "
155
156DESCRIPTION_python-curses="Python Curses Support"
157RDEPENDS_python-curses="python-core"
158FILES_python-curses="${libdir}/python2.6/curses ${libdir}/python2.6/lib-dynload/_curses.so ${libdir}/python2.6/lib-dynload/_curses_panel.so "
159
160DESCRIPTION_python-smtpd="Python Simple Mail Transport Daemon"
161RDEPENDS_python-smtpd="python-core python-netserver python-email python-mime"
162FILES_python-smtpd="${bindir}/smtpd.* "
163
164DESCRIPTION_python-html="Python HTML Processing"
165RDEPENDS_python-html="python-core"
166FILES_python-html="${libdir}/python2.6/formatter.* ${libdir}/python2.6/htmlentitydefs.* ${libdir}/python2.6/htmllib.* ${libdir}/python2.6/markupbase.* ${libdir}/python2.6/sgmllib.* "
167
168DESCRIPTION_python-readline="Python Readline Support"
169RDEPENDS_python-readline="python-core"
170FILES_python-readline="${libdir}/python2.6/lib-dynload/readline.so ${libdir}/python2.6/rlcompleter.* "
171
172DESCRIPTION_python-subprocess="Python Subprocess Support"
173RDEPENDS_python-subprocess="python-core python-io python-re python-fcntl python-pickle"
174FILES_python-subprocess="${libdir}/python2.6/subprocess.* "
175
176DESCRIPTION_python-pydoc="Python Interactive Help Support"
177RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re"
178FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.6/pydoc.* "
179
180DESCRIPTION_python-logging="Python Logging Support"
181RDEPENDS_python-logging="python-core python-io python-lang python-pickle python-stringold"
182FILES_python-logging="${libdir}/python2.6/logging "
183
184DESCRIPTION_python-mailbox="Python Mailbox Format Support"
185RDEPENDS_python-mailbox="python-core python-mime"
186FILES_python-mailbox="${libdir}/python2.6/mailbox.* "
187
188DESCRIPTION_python-xml="Python basic XML support."
189RDEPENDS_python-xml="python-core python-re"
190FILES_python-xml="${libdir}/python2.6/lib-dynload/pyexpat.so ${libdir}/python2.6/xml ${libdir}/python2.6/xmllib.* "
191
192DESCRIPTION_python-mime="Python MIME Handling APIs"
193RDEPENDS_python-mime="python-core python-io"
194FILES_python-mime="${libdir}/python2.6/mimetools.* ${libdir}/python2.6/uu.* ${libdir}/python2.6/quopri.* ${libdir}/python2.6/rfc822.* "
195
196DESCRIPTION_python-sqlite3="Python Sqlite3 Database Support"
197RDEPENDS_python-sqlite3="python-core python-datetime python-lang python-crypt python-io python-threading python-zlib"
198FILES_python-sqlite3="${libdir}/python2.6/lib-dynload/_sqlite3.so ${libdir}/python2.6/sqlite3/dbapi2.* ${libdir}/python2.6/sqlite3/__init__.* ${libdir}/python2.6/sqlite3/dump.* "
199
200DESCRIPTION_python-sqlite3-tests="Python Sqlite3 Database Support Tests"
201RDEPENDS_python-sqlite3-tests="python-core python-sqlite3"
202FILES_python-sqlite3-tests="${libdir}/python2.6/sqlite3/test "
203
204DESCRIPTION_python-unittest="Python Unit Testing Framework"
205RDEPENDS_python-unittest="python-core python-stringold python-lang"
206FILES_python-unittest="${libdir}/python2.6/unittest.* "
207
208DESCRIPTION_python-multiprocessing="Python Multiprocessing Support"
209RDEPENDS_python-multiprocessing="python-core python-io python-lang"
210FILES_python-multiprocessing="${libdir}/python2.6/lib-dynload/_multiprocessing.so ${libdir}/python2.6/multiprocessing "
211
212DESCRIPTION_python-robotparser="Python robots.txt parser"
213RDEPENDS_python-robotparser="python-core python-netclient"
214FILES_python-robotparser="${libdir}/python2.6/robotparser.* "
215
216DESCRIPTION_python-compile="Python Bytecode Compilation Support"
217RDEPENDS_python-compile="python-core"
218FILES_python-compile="${libdir}/python2.6/py_compile.* ${libdir}/python2.6/compileall.* "
219
220DESCRIPTION_python-debugger="Python Debugger"
221RDEPENDS_python-debugger="python-core python-io python-lang python-re python-stringold python-shell python-pprint"
222FILES_python-debugger="${libdir}/python2.6/bdb.* ${libdir}/python2.6/pdb.* "
223
224DESCRIPTION_python-pkgutil="Python Package Extension Utility Support"
225RDEPENDS_python-pkgutil="python-core"
226FILES_python-pkgutil="${libdir}/python2.6/pkgutil.* "
227
228DESCRIPTION_python-shell="Python Shell-Like Functionality"
229RDEPENDS_python-shell="python-core python-re"
230FILES_python-shell="${libdir}/python2.6/cmd.* ${libdir}/python2.6/commands.* ${libdir}/python2.6/dircache.* ${libdir}/python2.6/fnmatch.* ${libdir}/python2.6/glob.* ${libdir}/python2.6/popen2.* ${libdir}/python2.6/shlex.* ${libdir}/python2.6/shutil.* "
231
232DESCRIPTION_python-bsddb="Python Berkeley Database Bindings"
233RDEPENDS_python-bsddb="python-core"
234FILES_python-bsddb="${libdir}/python2.6/bsddb ${libdir}/python2.6/lib-dynload/_bsddb.so "
235
236DESCRIPTION_python-mmap="Python Memory-Mapped-File Support"
237RDEPENDS_python-mmap="python-core python-io"
238FILES_python-mmap="${libdir}/python2.6/lib-dynload/mmap.so "
239
240DESCRIPTION_python-zlib="Python zlib Support."
241RDEPENDS_python-zlib="python-core"
242FILES_python-zlib="${libdir}/python2.6/lib-dynload/zlib.so "
243
244DESCRIPTION_python-db="Python File-Based Database Support"
245RDEPENDS_python-db="python-core"
246FILES_python-db="${libdir}/python2.6/anydbm.* ${libdir}/python2.6/dumbdbm.* ${libdir}/python2.6/whichdb.* "
247
248DESCRIPTION_python-crypt="Python Basic Cryptographic and Hashing Support"
249RDEPENDS_python-crypt="python-core"
250FILES_python-crypt="${libdir}/python2.6/hashlib.* ${libdir}/python2.6/md5.* ${libdir}/python2.6/sha.* ${libdir}/python2.6/lib-dynload/crypt.so ${libdir}/python2.6/lib-dynload/_hashlib.so ${libdir}/python2.6/lib-dynload/_sha256.so ${libdir}/python2.6/lib-dynload/_sha512.so "
251
252DESCRIPTION_python-idle="Python Integrated Development Environment"
253RDEPENDS_python-idle="python-core python-tkinter"
254FILES_python-idle="${bindir}/idle ${libdir}/python2.6/idlelib "
255
256DESCRIPTION_python-lang="Python Low-Level Language Support"
257RDEPENDS_python-lang="python-core"
258FILES_python-lang="${libdir}/python2.6/lib-dynload/_bisect.so ${libdir}/python2.6/lib-dynload/_collections.so ${libdir}/python2.6/lib-dynload/_heapq.so ${libdir}/python2.6/lib-dynload/_weakref.so ${libdir}/python2.6/lib-dynload/_functools.so ${libdir}/python2.6/lib-dynload/array.so ${libdir}/python2.6/lib-dynload/itertools.so ${libdir}/python2.6/lib-dynload/operator.so ${libdir}/python2.6/lib-dynload/parser.so ${libdir}/python2.6/atexit.* ${libdir}/python2.6/bisect.* ${libdir}/python2.6/code.* ${libdir}/python2.6/codeop.* ${libdir}/python2.6/collections.* ${libdir}/python2.6/dis.* ${libdir}/python2.6/functools.* ${libdir}/python2.6/heapq.* ${libdir}/python2.6/inspect.* ${libdir}/python2.6/keyword.* ${libdir}/python2.6/opcode.* ${libdir}/python2.6/symbol.* ${libdir}/python2.6/repr.* ${libdir}/python2.6/token.* ${libdir}/python2.6/tokenize.* ${libdir}/python2.6/traceback.* ${libdir}/python2.6/linecache.* ${libdir}/python2.6/weakref.* "
259
260DESCRIPTION_python-audio="Python Audio Handling"
261RDEPENDS_python-audio="python-core"
262FILES_python-audio="${libdir}/python2.6/wave.* ${libdir}/python2.6/chunk.* ${libdir}/python2.6/sndhdr.* ${libdir}/python2.6/lib-dynload/ossaudiodev.so ${libdir}/python2.6/lib-dynload/audioop.so "
263
264DESCRIPTION_python-modules="All Python modules"
265RDEPENDS_python-modules="python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
266ALLOW_EMPTY_python-modules = "1"
267
268
diff --git a/meta/recipes-devtools/python/python-dbus_0.83.1.bb b/meta/recipes-devtools/python/python-dbus_0.83.1.bb
new file mode 100644
index 0000000000..b30e82be6a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-dbus_0.83.1.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Python bindings for DBus, a socket-based message bus system for interprocess communication"
2SECTION = "devel/python"
3HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
4LICENSE = "MIT"
5DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
6PR = "ml0"
7
8SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
9S = "${WORKDIR}/dbus-python-${PV}"
10
11inherit distutils-base autotools pkgconfig
12
13export BUILD_SYS
14export HOST_SYS
15
16export STAGING_LIBDIR
17export STAGING_INCDIR
18
19RDEPENDS = "python-io python-logging python-stringold python-threading python-xml"
20
21FILES_${PN}-dev += "${libdir}/pkgconfig
diff --git a/meta/recipes-devtools/python/python-gst/python-path.patch b/meta/recipes-devtools/python/python-gst/python-path.patch
new file mode 100644
index 0000000000..af5badd4d9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-gst/python-path.patch
@@ -0,0 +1,25 @@
1Index: gst-python-0.10.18/acinclude.m4
2===================================================================
3--- gst-python-0.10.18.orig/acinclude.m4
4+++ gst-python-0.10.18/acinclude.m4
5@@ -43,6 +43,12 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
6 [AC_REQUIRE([AM_PATH_PYTHON])
7 AC_MSG_CHECKING(for headers required to compile python extensions)
8 dnl deduce PYTHON_INCLUDES
9+
10+AC_ARG_WITH(python-includes,
11+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
12+if test x$py_exec_prefix != x; then
13+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
14+else
15 py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
16 py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
17 if $PYTHON-config --help 2>/dev/null; then
18@@ -53,6 +59,7 @@ else
19 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
20 fi
21 fi
22+fi
23 AC_SUBST(PYTHON_INCLUDES)
24 dnl check if the headers exist:
25 save_CPPFLAGS="$CPPFLAGS"
diff --git a/meta/recipes-devtools/python/python-gst_0.10.18.bb b/meta/recipes-devtools/python/python-gst_0.10.18.bb
new file mode 100644
index 0000000000..9de07b3c4f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-gst_0.10.18.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Python Gstreamer bindings"
2SECTION = "devel/python"
3LICENSE = "LGPL"
4DEPENDS = "gstreamer gst-plugins-base python-pygobject"
5PR = "ml1"
6
7SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \
8 file://python-path.patch"
9S = "${WORKDIR}/gst-python-${PV}"
10
11inherit autotools distutils-base pkgconfig
12
13EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
14
15FILES_${PN} += "${datadir}/gst-python"
16FILES_${PN}-dev += "${datadir}/gst-python/0.10/defs"
17FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/gst-0.10/gst/.debug/"
diff --git a/meta/recipes-devtools/python/python-imaging/path.patch b/meta/recipes-devtools/python/python-imaging/path.patch
new file mode 100644
index 0000000000..264dcc09b8
--- /dev/null
+++ b/meta/recipes-devtools/python/python-imaging/path.patch
@@ -0,0 +1,33 @@
1Index: Imaging-1.1.7/setup.py
2===================================================================
3--- Imaging-1.1.7.orig/setup.py
4+++ Imaging-1.1.7/setup.py
5@@ -34,10 +34,10 @@ def libinclude(root):
6 # TIFF_ROOT = libinclude("/opt/tiff")
7
8 TCL_ROOT = None
9-JPEG_ROOT = None
10-ZLIB_ROOT = None
11+JPEG_ROOT = os.environ['STAGING_LIBDIR']
12+ZLIB_ROOT = os.environ['STAGING_LIBDIR']
13 TIFF_ROOT = None
14-FREETYPE_ROOT = None
15+FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
16 LCMS_ROOT = None
17
18 # FIXME: add mechanism to explicitly *disable* the use of a library
19@@ -207,14 +207,6 @@ class pil_build_ext(build_ext):
20 if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
21 add_directory(include_dirs, tcl_dir)
22
23- # standard locations
24- add_directory(library_dirs, "/usr/local/lib")
25- add_directory(include_dirs, "/usr/local/include")
26-
27- add_directory(library_dirs, "/usr/lib")
28- add_directory(include_dirs, "/usr/include")
29-
30- #
31 # insert new dirs *before* default libs, to avoid conflicts
32 # between Python PYD stub libs and real libraries
33
diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
new file mode 100644
index 0000000000..98120432ac
--- /dev/null
+++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Python Imaging Library"
2SECTION = "devel/python"
3PRIORITY = "optional"
4LICENSE = "GPL"
5DEPENDS = "freetype jpeg tiff"
6RDEPENDS = "python-lang python-stringold"
7SRCNAME = "Imaging"
8PR = "ml0"
9
10SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
11 file://path.patch"
12S = "${WORKDIR}/${SRCNAME}-${PV}"
13
14inherit distutils
15
16do_compile() {
17 export STAGING_LIBDIR=${STAGING_LIBDIR}
18 export STAGING_INCDIR=${STAGING_INCDIR}
19 distutils_do_compile
20}
21
22do_install() {
23 export STAGING_LIBDIR=${STAGING_LIBDIR}
24 export STAGING_INCDIR=${STAGING_INCDIR}
25 distutils_do_install
26 install -d ${D}${datadir}/doc/${PN}/html/
27 install -m 0644 ${S}/README ${D}${datadir}/doc/${PN}/
28 install -m 0644 ${S}/Docs/* ${D}${datadir}/doc/${PN}/html/
29
30}
diff --git a/meta/recipes-devtools/python/python-iniparse-native_0.3.2.bb b/meta/recipes-devtools/python/python-iniparse-native_0.3.2.bb
new file mode 100644
index 0000000000..41aa13d97a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse-native_0.3.2.bb
@@ -0,0 +1,6 @@
1require python-iniparse_${PV}.bb
2inherit native
3DEPENDS = "python-native"
4RDEPENDS = ""
5PR = "r0"
6
diff --git a/meta/recipes-devtools/python/python-iniparse_0.3.2.bb b/meta/recipes-devtools/python/python-iniparse_0.3.2.bb
new file mode 100644
index 0000000000..27a38f4249
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse_0.3.2.bb
@@ -0,0 +1,11 @@
1DESCRIPTION = "iniparse is a INI parser for Python"
2HOMEPAGE = "http://code.google.com/p/iniparse/"
3SECTION = "devel/python"
4PRIORITY = "optional"
5LICENSE = "GPL"
6PR = "r0"
7
8SRC_URI = "http://iniparse.googlecode.com/files/iniparse-${PV}.tar.gz"
9S = "${WORKDIR}/iniparse-${PV}"
10
11inherit distutils
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch b/meta/recipes-devtools/python/python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch
new file mode 100644
index 0000000000..2559e3a0e4
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch
@@ -0,0 +1,20 @@
1# $(exec_prefix) points to the wrong directory, when installing
2# a cross-build. @bindir@ and @libdir@ works better and doesn't
3# affect the native build.
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5
6Index: Python-2.6.1/Makefile.pre.in
7===================================================================
8--- Python-2.6.1.orig/Makefile.pre.in
9+++ Python-2.6.1/Makefile.pre.in
10@@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@
11 datarootdir= @datarootdir@
12
13 # Expanded directories
14-BINDIR= $(exec_prefix)/bin
15-LIBDIR= $(exec_prefix)/lib
16+BINDIR= @bindir@
17+LIBDIR= @libdir@
18 MANDIR= @mandir@
19 INCLUDEDIR= @includedir@
20 CONFINCLUDEDIR= $(exec_prefix)/include
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/04-default-is-optimized.patch b/meta/recipes-devtools/python/python-native-2.6.5/04-default-is-optimized.patch
new file mode 100644
index 0000000000..5131e0ba69
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/04-default-is-optimized.patch
@@ -0,0 +1,18 @@
1# When compiling for an embedded system, we need every bit of
2# performance we can get. default to optimized with the option
3# of opt-out.
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5
6Index: Python-2.6.1/Python/compile.c
7===================================================================
8--- Python-2.6.1.orig/Python/compile.c
9+++ Python-2.6.1/Python/compile.c
10@@ -32,7 +32,7 @@
11 #include "symtable.h"
12 #include "opcode.h"
13
14-int Py_OptimizeFlag = 0;
15+int Py_OptimizeFlag = 1;
16
17 #define DEFAULT_BLOCK_SIZE 16
18 #define DEFAULT_BLOCKS 8
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/10-distutils-fix-swig-parameter.patch b/meta/recipes-devtools/python/python-native-2.6.5/10-distutils-fix-swig-parameter.patch
new file mode 100644
index 0000000000..f5e852a118
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/10-distutils-fix-swig-parameter.patch
@@ -0,0 +1,16 @@
1# Some versions of SWIG do not use the extension parameter.
2# Make it optional.
3# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
4Index: Python-2.6.1/Lib/distutils/command/build_ext.py
5===================================================================
6--- Python-2.6.1.orig/Lib/distutils/command/build_ext.py
7+++ Python-2.6.1/Lib/distutils/command/build_ext.py
8@@ -566,7 +566,7 @@ class build_ext (Command):
9 target_lang=language)
10
11
12- def swig_sources (self, sources, extension):
13+ def swig_sources (self, sources, extension=None):
14
15 """Walk the list of source files in 'sources', looking for SWIG
16 interface (.i) files. Run SWIG on all that are found, and
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/11-distutils-never-modify-shebang-line.patch b/meta/recipes-devtools/python/python-native-2.6.5/11-distutils-never-modify-shebang-line.patch
new file mode 100644
index 0000000000..8354e266fa
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/11-distutils-never-modify-shebang-line.patch
@@ -0,0 +1,18 @@
1# Don't modify the she-bang line for a cross-build.
2# Otherwise it points to our hostpython (which we do not want)
3#
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5
6Index: Python-2.6.1/Lib/distutils/command/build_scripts.py
7===================================================================
8--- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py
9+++ Python-2.6.1/Lib/distutils/command/build_scripts.py
10@@ -87,7 +87,7 @@ class build_scripts (Command):
11 continue
12
13 match = first_line_re.match(first_line)
14- if match:
15+ if False: #match:
16 adjust = 1
17 post_interp = match.group(1) or ''
18
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
new file mode 100644
index 0000000000..aa4393679f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
@@ -0,0 +1,60 @@
1# The proper prefix is inside our staging area.
2# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
3
4Index: Python-2.6.1/Lib/distutils/sysconfig.py
5===================================================================
6--- Python-2.6.1.orig/Lib/distutils/sysconfig.py
7+++ Python-2.6.1/Lib/distutils/sysconfig.py
8@@ -19,8 +19,8 @@ import sys
9 from distutils.errors import DistutilsPlatformError
10
11 # These are needed in a couple of spots, so just compute them once.
12-PREFIX = os.path.normpath(sys.prefix)
13-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
14+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
15+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
16
17 # Path to the base directory of the project. On Windows the binary may
18 # live in project/PCBuild9. If we're dealing with an x64 Windows build,
19@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
20 sys.exec_prefix -- i.e., ignore 'plat_specific'.
21 """
22 if prefix is None:
23- prefix = plat_specific and EXEC_PREFIX or PREFIX
24+ if plat_specific:
25+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
26+ else:
27+ prefix = plat_specific and EXEC_PREFIX or PREFIX
28 if os.name == "posix":
29 if python_build:
30 base = os.path.dirname(os.path.abspath(sys.executable))
31@@ -112,7 +115,10 @@ def get_python_lib(plat_specific=0, stan
32 sys.exec_prefix -- i.e., ignore 'plat_specific'.
33 """
34 if prefix is None:
35- prefix = plat_specific and EXEC_PREFIX or PREFIX
36+ if plat_specific:
37+ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib')
38+ else:
39+ prefix = plat_specific and EXEC_PREFIX or PREFIX
40
41 if os.name == "posix":
42 libpython = os.path.join(prefix,
43@@ -218,7 +218,7 @@ def get_config_h_filename():
44 else:
45 # The name of the config.h file changed in 2.2
46 config_h = 'pyconfig.h'
47- return os.path.join(inc_dir, config_h)
48+ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
49
50
51 def get_makefile_filename():
52@@ -226,7 +226,7 @@ def get_makefile_filename():
53 if python_build:
54 return os.path.join(os.path.dirname(sys.executable), "Makefile")
55 lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
56- return os.path.join(lib_dir, "config", "Makefile")
57+ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
58
59
60 def parse_config_h(fp, g=None):
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/debug.patch b/meta/recipes-devtools/python/python-native-2.6.5/debug.patch
new file mode 100644
index 0000000000..beb3adc6db
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/debug.patch
@@ -0,0 +1,27 @@
1Index: Python-2.6.1/Lib/distutils/unixccompiler.py
2===================================================================
3--- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000
4+++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000
5@@ -300,6 +300,8 @@
6 dylib_f = self.library_filename(lib, lib_type='dylib')
7 static_f = self.library_filename(lib, lib_type='static')
8
9+ print "Looking in %s for %s" % (lib, dirs)
10+
11 for dir in dirs:
12 shared = os.path.join(dir, shared_f)
13 dylib = os.path.join(dir, dylib_f)
14@@ -309,10 +311,13 @@
15 # assuming that *all* Unix C compilers do. And of course I'm
16 # ignoring even GCC's "-static" option. So sue me.
17 if os.path.exists(dylib):
18+ print "Found %s" % (dylib)
19 return dylib
20 elif os.path.exists(shared):
21+ print "Found %s" % (shared)
22 return shared
23 elif os.path.exists(static):
24+ print "Found %s" % (static)
25 return static
26
27 # Oops, didn't find it in *any* of 'dirs'
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/nohostlibs.patch b/meta/recipes-devtools/python/python-native-2.6.5/nohostlibs.patch
new file mode 100644
index 0000000000..7020f3c2a9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/nohostlibs.patch
@@ -0,0 +1,53 @@
1Index: Python-2.6.1/setup.py
2===================================================================
3--- Python-2.6.1.orig/setup.py 2009-11-13 16:20:47.000000000 +0000
4+++ Python-2.6.1/setup.py 2009-11-13 16:28:00.000000000 +0000
5@@ -310,8 +310,8 @@
6
7 def detect_modules(self):
8 # Ensure that /usr/local is always used
9- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
10- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
11+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
12+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
13
14 # Add paths specified in the environment variables LDFLAGS and
15 # CPPFLAGS for header and library files.
16@@ -347,10 +347,10 @@
17 for directory in reversed(options.dirs):
18 add_dir_to_list(dir_list, directory)
19
20- if os.path.normpath(sys.prefix) != '/usr':
21- add_dir_to_list(self.compiler.library_dirs,
22+
23+ add_dir_to_list(self.compiler.library_dirs,
24 sysconfig.get_config_var("LIBDIR"))
25- add_dir_to_list(self.compiler.include_dirs,
26+ add_dir_to_list(self.compiler.include_dirs,
27 sysconfig.get_config_var("INCLUDEDIR"))
28
29 try:
30@@ -361,11 +361,8 @@
31 # lib_dirs and inc_dirs are used to search for files;
32 # if a file is found in one of those directories, it can
33 # be assumed that no additional -I,-L directives are needed.
34- lib_dirs = self.compiler.library_dirs + [
35- '/lib64', '/usr/lib64',
36- '/lib', '/usr/lib',
37- ]
38- inc_dirs = self.compiler.include_dirs + ['/usr/include']
39+ lib_dirs = self.compiler.library_dirs
40+ inc_dirs = self.compiler.include_dirs
41 exts = []
42 missing = []
43
44@@ -583,8 +580,7 @@
45 readline_libs.append('ncurses')
46 elif self.compiler.find_library_file(lib_dirs, 'curses'):
47 readline_libs.append('curses')
48- elif self.compiler.find_library_file(lib_dirs +
49- ['/usr/lib/termcap'],
50+ elif self.compiler.find_library_file(lib_dirs,
51 'termcap'):
52 readline_libs.append('termcap')
53 exts.append( Extension('readline', ['readline.c'],
diff --git a/meta/recipes-devtools/python/python-native-2.6.5/sitecustomize.py b/meta/recipes-devtools/python/python-native-2.6.5/sitecustomize.py
new file mode 100644
index 0000000000..273901898a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/sitecustomize.py
@@ -0,0 +1,45 @@
1# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
2# GPLv2 or later
3# Version: 20081123
4# Features:
5# * set proper default encoding
6# * enable readline completion in the interactive interpreter
7# * load command line history on startup
8# * save command line history on exit
9
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __enableReadlineSupport():
23 readline.set_history_length( 1000 )
24 readline.parse_and_bind( "tab: complete" )
25 try:
26 readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
27 except IOError:
28 pass
29
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys
38try:
39 import rlcompleter, readline
40except ImportError:
41 pass
42else:
43 __enableDefaultEncoding()
44 __registerExitHandler()
45 __enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python-native_2.6.5.bb b/meta/recipes-devtools/python/python-native_2.6.5.bb
new file mode 100644
index 0000000000..cb95e4b964
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native_2.6.5.bb
@@ -0,0 +1,30 @@
1require python.inc
2DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
3PR = "${INC_PR}.3"
4
5SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
6 file://00-fix-bindir-libdir-for-cross.patch \
7 file://04-default-is-optimized.patch \
8 file://05-enable-ctypes-cross-build.patch \
9 file://10-distutils-fix-swig-parameter.patch \
10 file://11-distutils-never-modify-shebang-line.patch \
11 file://12-distutils-prefix-is-inside-staging-area.patch \
12 file://debug.patch \
13 file://nohostlibs.patch"
14S = "${WORKDIR}/Python-${PV}"
15
16inherit native
17
18EXTRA_OEMAKE = '\
19 BUILD_SYS="" \
20 HOST_SYS="" \
21 LIBC="" \
22 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
23 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
24'
25
26do_install() {
27 oe_runmake 'DESTDIR=${D}' install
28 install -d ${D}${bindir}/
29 install -m 0755 Parser/pgen ${D}${bindir}/
30}
diff --git a/meta/recipes-devtools/python/python-pycairo_1.8.10.bb b/meta/recipes-devtools/python/python-pycairo_1.8.10.bb
new file mode 100644
index 0000000000..1ff603875a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycairo_1.8.10.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "Python Bindings for the Cairo canvas library"
2HOMEPAGE = "http://cairographics.org/pycairo"
3BUGTRACKER = "http://bugs.freedesktop.org"
4SECTION = "python-devel"
5LICENSE = "LGPLv2.1 & MPLv1.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421"
7# cairo >= 1.8.8
8DEPENDS = "cairo"
9PR = "ml0"
10
11SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.gz"
12S = "${WORKDIR}/pycairo-${PV}"
13
14inherit distutils pkgconfig
15
16do_install_append () {
17 install -d ${D}${includedir}
18 install -d ${D}${libdir}
19 mv ${D}${datadir}/include/* ${D}${includedir}
20 mv ${D}${datadir}/lib/* ${D}${libdir}
21 sed -i -e 's#prefix=.*#prefix=${prefix}#' ${D}${libdir}/pkgconfig/pycairo.pc
22}
diff --git a/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
new file mode 100644
index 0000000000..b7c5ab9c9c
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
@@ -0,0 +1,14 @@
1Index: pycurl-7.18.2/setup.py
2===================================================================
3--- pycurl-7.18.2.orig/setup.py
4+++ pycurl-7.18.2/setup.py
5@@ -97,8 +97,7 @@ else:
6 else:
7 extra_compile_args.append(e)
8 libs = split_quoted(
9- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
10- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
11+ os.popen("'%s' --libs" % CURL_CONFIG).read())
12 for e in libs:
13 if e[:2] == "-l":
14 libraries.append(e[2:])
diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
new file mode 100644
index 0000000000..1a04767266
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "libcurl python bindings."
2HOMEPAGE = "http://pycurl.sourceforge.net/"
3SECTION = "devel/python"
4PRIORITY = "optional"
5LICENSE = "LGPLv2.1+ | MIT"
6LIC_FILES_CHKSUM = "file://README;endline=13;md5=fbfe545b1869617123a08c0983ef17b2 \
7 file://COPYING;md5=3579a9fd0221d49a237aaa33492f988c \
8 file://COPYING2;md5=ffaa1e283b7f9bf5aafd8d45db6f7518"
9
10DEPENDS = "curl python"
11RDEPENDS = "python-core curl"
12SRCNAME = "pycurl"
13PR = "r0"
14
15SRC_URI = "\
16 http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
17 file://no-static-link.patch;patch=1 \
18"
19S = "${WORKDIR}/${SRCNAME}-${PV}"
20
21inherit distutils
22
23# need to export these variables for python-config to work
24export BUILD_SYS
25export HOST_SYS
26export STAGING_INCDIR
27export STAGING_LIBDIR
28
29BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python-pygobject-native_2.21.1.bb b/meta/recipes-devtools/python/python-pygobject-native_2.21.1.bb
new file mode 100644
index 0000000000..d3602277a4
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject-native_2.21.1.bb
@@ -0,0 +1,15 @@
1require python-pygobject_${PV}.bb
2
3DEPENDS = "python-native glib-2.0-native"
4PR = "r0"
5
6PARALLEL_MAKE = ""
7
8inherit native
9
10SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2"
11
12do_install_append() {
13 install -d ${D}${bindir}
14 install -m 0755 gobject/generate-constants ${D}${bindir}/gobject-generate-constants
15}
diff --git a/meta/recipes-devtools/python/python-pygobject/generate-constants.patch b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch
new file mode 100644
index 0000000000..57a9380620
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch
@@ -0,0 +1,18 @@
1Index: pygobject-2.14.2/gobject/Makefile.am
2===================================================================
3--- pygobject-2.14.2.orig/gobject/Makefile.am
4+++ pygobject-2.14.2/gobject/Makefile.am
5@@ -21,11 +21,11 @@ if PLATFORM_WIN32
6 common_ldflags += -no-undefined
7 endif
8
9-constants.py: generate-constants$(EXEEXT) constants.py.in
10+constants.py: constants.py.in
11 rm -f constants.py
12 cp $(srcdir)/constants.py.in constants.py
13 chmod 644 constants.py
14- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
15+ gobject-generate-constants$(EXEEXT) >> constants.py
16 chmod 444 constants.py
17
18 generate_constants_CFLAGS = $(GLIB_CFLAGS)
diff --git a/meta/recipes-devtools/python/python-pygobject_2.21.1.bb b/meta/recipes-devtools/python/python-pygobject_2.21.1.bb
new file mode 100644
index 0000000000..b815e4c0f2
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject_2.21.1.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Python GObject bindings"
2SECTION = "devel/python"
3LICENSE = "LGPL"
4DEPENDS = "python-pygobject-native-${PV} glib-2.0"
5PR = "ml0"
6
7MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
8
9SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
10 file://generate-constants.patch"
11S = "${WORKDIR}/pygobject-${PV}"
12
13FILESPATH = "${FILE_DIRNAME}/python-pygobject:${FILE_DIRNAME}/files"
14
15inherit autotools distutils-base pkgconfig
16
17# necessary to let the call for python-config succeed
18export BUILD_SYS
19export HOST_SYS
20export STAGING_INCDIR
21export STAGING_LIBDIR
22
23PACKAGES += "${PN}-lib"
24
25RDEPENDS_${PN} += "python-textutils"
26
27FILES_${PN} = "${libdir}/python*"
28FILES_${PN}-lib = "${libdir}/lib*.so.*"
29FILES_${PN}-dev += "${bindir} ${datadir}"
30FILES_${PN}-dbg += "${libdir}/.debug"
diff --git a/meta/recipes-devtools/python/python-pygtk/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/acinclude.m4
new file mode 100644
index 0000000000..53518fb2eb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/acinclude.m4
@@ -0,0 +1,90 @@
1## this one is commonly used with AM_PATH_PYTHONDIR ...
2dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
3dnl Check if a module containing a given symbol is visible to python.
4AC_DEFUN(AM_CHECK_PYMOD,
5[AC_REQUIRE([AM_PATH_PYTHON])
6py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
7AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
8AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
9ifelse([$2],[], [prog="
10import sys
11try:
12 import $1
13except ImportError:
14 sys.exit(1)
15except:
16 sys.exit(0)
17sys.exit(0)"], [prog="
18import $1
19$1.$2"])
20if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
21 then
22 eval "py_cv_mod_$py_mod_var=yes"
23 else
24 eval "py_cv_mod_$py_mod_var=no"
25 fi
26])
27py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
28if test "x$py_val" != xno; then
29 AC_MSG_RESULT(yes)
30 ifelse([$3], [],, [$3
31])dnl
32else
33 AC_MSG_RESULT(no)
34 ifelse([$4], [],, [$4
35])dnl
36fi
37])
38
39dnl a macro to check for ability to create python extensions
40dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
41dnl function also defines PYTHON_INCLUDES
42AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
43[AC_REQUIRE([AM_PATH_PYTHON])
44AC_MSG_CHECKING(for headers required to compile python extensions)
45dnl deduce PYTHON_INCLUDES
46AC_ARG_WITH(python-includes,
47 [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
48if test x$py_exec_prefix != x; then
49PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
50else
51py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
52py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
53PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
54if test "$py_prefix" != "$py_exec_prefix"; then
55 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
56fi
57fi
58AC_SUBST(PYTHON_INCLUDES)
59dnl check if the headers exist:
60save_CPPFLAGS="$CPPFLAGS"
61CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
62AC_TRY_CPP([#include <Python.h>],dnl
63[AC_MSG_RESULT(found)
64$1],dnl
65[AC_MSG_RESULT(not found)
66$2])
67CPPFLAGS="$save_CPPFLAGS"
68])
69
70dnl
71dnl JH_ADD_CFLAG(FLAG)
72dnl checks whether the C compiler supports the given flag, and if so, adds
73dnl it to $CFLAGS. If the flag is already present in the list, then the
74dnl check is not performed.
75AC_DEFUN([JH_ADD_CFLAG],
76[
77case " $CFLAGS " in
78*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
79 ;;
80*)
81 save_CFLAGS="$CFLAGS"
82 CFLAGS="$CFLAGS $1"
83 AC_MSG_CHECKING([whether [$]CC understands $1])
84 AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
85 AC_MSG_RESULT($jh_has_option)
86 if test $jh_has_option = no; then
87 CFLAGS="$save_CFLAGS"
88 fi
89 ;;
90esac])
diff --git a/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
new file mode 100644
index 0000000000..dca19ce5ed
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
@@ -0,0 +1,16 @@
1Index: pygtk-2.10.0/gtk/gtkunixprint.override
2===================================================================
3--- pygtk-2.10.0.orig/gtk/gtkunixprint.override
4+++ pygtk-2.10.0/gtk/gtkunixprint.override
5@@ -105,11 +105,7 @@ _wrap_gtk_print_job_get_surface(PyGObjec
6 if (pyg_error_check(&error))
7 return NULL;
8
9-#if PYCAIRO_VERSION_HEX >= 0x1010600
10 return PycairoSurface_FromSurface(surface, NULL);
11-#else
12- return PycairoSurface_FromSurface(surface, NULL, NULL);
13-#endif
14 }
15 %%
16 override gtk_print_job_send kwargs
diff --git a/meta/recipes-devtools/python/python-pygtk/nodocs.patch b/meta/recipes-devtools/python/python-pygtk/nodocs.patch
new file mode 100644
index 0000000000..c3581043c3
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/nodocs.patch
@@ -0,0 +1,13 @@
1Index: pygtk-2.17.0/Makefile.am
2===================================================================
3--- pygtk-2.17.0.orig/Makefile.am
4+++ pygtk-2.17.0/Makefile.am
5@@ -4,7 +4,7 @@ if BUILD_GTK
6 GTK_SUBDIR = gtk
7 endif
8
9-SUBDIRS = . $(GTK_SUBDIR) examples tests docs
10+SUBDIRS = . $(GTK_SUBDIR) examples tests
11
12 PLATFORM_VERSION = 2.0
13
diff --git a/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
new file mode 100644
index 0000000000..9340f8244d
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
@@ -0,0 +1,14 @@
1Index: pygtk-2.10.4/gtk/__init__.py
2===================================================================
3--- pygtk-2.10.4.orig/gtk/__init__.py 2007-11-27 19:27:05.000000000 -0300
4+++ pygtk-2.10.4/gtk/__init__.py 2007-11-27 19:28:22.000000000 -0300
5@@ -78,7 +78,8 @@
6
7 keysyms = LazyModule('keysyms', locals())
8
9-_init()
10+if not hasattr(sys.modules['__main__'], 'python_launcher_enabled'):
11+ _init()
12
13 # CAPI
14 _PyGtk_API = _gtk._PyGtk_API
diff --git a/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
new file mode 100644
index 0000000000..53518fb2eb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
@@ -0,0 +1,90 @@
1## this one is commonly used with AM_PATH_PYTHONDIR ...
2dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
3dnl Check if a module containing a given symbol is visible to python.
4AC_DEFUN(AM_CHECK_PYMOD,
5[AC_REQUIRE([AM_PATH_PYTHON])
6py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
7AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
8AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
9ifelse([$2],[], [prog="
10import sys
11try:
12 import $1
13except ImportError:
14 sys.exit(1)
15except:
16 sys.exit(0)
17sys.exit(0)"], [prog="
18import $1
19$1.$2"])
20if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
21 then
22 eval "py_cv_mod_$py_mod_var=yes"
23 else
24 eval "py_cv_mod_$py_mod_var=no"
25 fi
26])
27py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
28if test "x$py_val" != xno; then
29 AC_MSG_RESULT(yes)
30 ifelse([$3], [],, [$3
31])dnl
32else
33 AC_MSG_RESULT(no)
34 ifelse([$4], [],, [$4
35])dnl
36fi
37])
38
39dnl a macro to check for ability to create python extensions
40dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
41dnl function also defines PYTHON_INCLUDES
42AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
43[AC_REQUIRE([AM_PATH_PYTHON])
44AC_MSG_CHECKING(for headers required to compile python extensions)
45dnl deduce PYTHON_INCLUDES
46AC_ARG_WITH(python-includes,
47 [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
48if test x$py_exec_prefix != x; then
49PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
50else
51py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
52py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
53PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
54if test "$py_prefix" != "$py_exec_prefix"; then
55 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
56fi
57fi
58AC_SUBST(PYTHON_INCLUDES)
59dnl check if the headers exist:
60save_CPPFLAGS="$CPPFLAGS"
61CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
62AC_TRY_CPP([#include <Python.h>],dnl
63[AC_MSG_RESULT(found)
64$1],dnl
65[AC_MSG_RESULT(not found)
66$2])
67CPPFLAGS="$save_CPPFLAGS"
68])
69
70dnl
71dnl JH_ADD_CFLAG(FLAG)
72dnl checks whether the C compiler supports the given flag, and if so, adds
73dnl it to $CFLAGS. If the flag is already present in the list, then the
74dnl check is not performed.
75AC_DEFUN([JH_ADD_CFLAG],
76[
77case " $CFLAGS " in
78*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
79 ;;
80*)
81 save_CFLAGS="$CFLAGS"
82 CFLAGS="$CFLAGS $1"
83 AC_MSG_CHECKING([whether [$]CC understands $1])
84 AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
85 AC_MSG_RESULT($jh_has_option)
86 if test $jh_has_option = no; then
87 CFLAGS="$save_CFLAGS"
88 fi
89 ;;
90esac])
diff --git a/meta/recipes-devtools/python/python-pygtk_2.17.0.bb b/meta/recipes-devtools/python/python-pygtk_2.17.0.bb
new file mode 100644
index 0000000000..ef63b51038
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk_2.17.0.bb
@@ -0,0 +1,42 @@
1DESCRIPTION = "Python GTK+ 2.17.x Bindings"
2SECTION = "devel/python"
3# needs gtk+ 2.17.x
4DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
5RDEPENDS = "python-shell python-pycairo python-pygobject"
6PROVIDES = "python-pygtk2"
7SRCNAME = "pygtk"
8LICENSE = "LGPL"
9PR = "ml8.2"
10
11SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.17/${SRCNAME}-${PV}.tar.bz2 \
12 file://fix-gtkunixprint.patch \
13 file://prevent_to_get_display_during_import.patch \
14 file://nodocs.patch \
15 file://acinclude.m4"
16S = "${WORKDIR}/${SRCNAME}-${PV}"
17
18EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../"
19
20inherit autotools pkgconfig distutils-base
21
22do_configure_prepend() {
23 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
24}
25
26# dirty fix #1: remove dependency on python-pygobject-dev
27do_install_append() {
28 find ${D} -name "*.la"|xargs rm -f
29 rm -f ${D}/${bindir}/pygtk-codegen-2.0
30 rm -rf ${D}/${libdir}/pkgconfig
31}
32
33# dirty fix #2: fix build system paths leaking in
34require fix-path.inc
35
36PACKAGES =+ "${PN}-demo"
37FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk "
38RDEPENDS_${PN}-demo = "python-pygtk python-stringold python-lang"
39
40# todo: revamp packaging, package demo seperatly
41FILES_${PN}-dev += " ${libdir}/pygtk/2.0 ${bindir}/pygtk-* ${datadir}/pygtk/2.0"
42
diff --git a/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
new file mode 100644
index 0000000000..90b6b16836
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
@@ -0,0 +1,5 @@
1require python-pyrex_${PV}.bb
2inherit native
3DEPENDS = "python-native"
4RDEPENDS = ""
5PR = "r0"
diff --git a/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch b/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
new file mode 100644
index 0000000000..a1f5bb29ba
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
@@ -0,0 +1,13 @@
1Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
2===================================================================
3--- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py
4+++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
5@@ -15,7 +15,7 @@ except ImportError:
6 warnings = None
7
8 class Extension(_Extension.Extension):
9- _Extension.Extension.__doc__ + \
10+ _Extension.Extension.__doc__ or "" + \
11 """pyrex_include_dirs : [string]
12 list of directories to search for Pyrex header files (.pxd) (in
13 Unix form for portability)
diff --git a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
new file mode 100644
index 0000000000..6c57af50d5
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "Pyrex is a language specially designed for writing Python extension modules. \
2It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
3and the messy, low-level world of C."
4SECTION = "devel/python"
5PRIORITY = "optional"
6LICENSE = "GPL"
7SRCNAME = "Pyrex"
8PR = "ml0"
9
10SRC_URI = "\
11 http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
12 file://pyrex-fix-optimized-mode.patch \
13"
14S = "${WORKDIR}/${SRCNAME}-${PV}"
15
16inherit distutils
diff --git a/meta/recipes-devtools/python/python-scons-native_1.3.0.bb b/meta/recipes-devtools/python/python-scons-native_1.3.0.bb
new file mode 100644
index 0000000000..a4bcd4258a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-scons-native_1.3.0.bb
@@ -0,0 +1,6 @@
1require python-scons_${PV}.bb
2inherit native
3DEPENDS = "python-native"
4RDEPENDS = ""
5PR = "r0"
6
diff --git a/meta/recipes-devtools/python/python-scons_1.3.0.bb b/meta/recipes-devtools/python/python-scons_1.3.0.bb
new file mode 100644
index 0000000000..f5d11eb925
--- /dev/null
+++ b/meta/recipes-devtools/python/python-scons_1.3.0.bb
@@ -0,0 +1,12 @@
1DESCRIPTION = "A Software Construction Tool"
2SECTION = "devel/python"
3PRIORITY = "optional"
4LICENSE = "GPL"
5SRCNAME = "scons"
6
7PR = "r0"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
10S = "${WORKDIR}/${SRCNAME}-${PV}"
11
12inherit distutils
diff --git a/meta/recipes-devtools/python/python-urlgrabber-native_3.9.1.bb b/meta/recipes-devtools/python/python-urlgrabber-native_3.9.1.bb
new file mode 100644
index 0000000000..ff8f02ecd7
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber-native_3.9.1.bb
@@ -0,0 +1,4 @@
1require python-urlgrabber_${PV}.bb
2inherit native
3DEPENDS = "python-native python-pycurl-native"
4RDEPENDS = ""
diff --git a/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-3.0.0-cleanup.patch b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-3.0.0-cleanup.patch
new file mode 100644
index 0000000000..7a1ee059d1
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-3.0.0-cleanup.patch
@@ -0,0 +1,28 @@
1diff -up urlgrabber-3.0.0/urlgrabber/grabber.py.cleanup urlgrabber-3.0.0/urlgrabber/grabber.py
2--- urlgrabber-3.0.0/urlgrabber/grabber.py.cleanup 2007-11-29 10:25:13.000000000 +0000
3+++ urlgrabber-3.0.0/urlgrabber/grabber.py 2007-11-29 10:26:15.000000000 +0000
4@@ -1204,16 +1204,18 @@ class URLGrabberFileObject:
5 bs = 1024*8
6 size = 0
7
8- if amount is not None: bs = min(bs, amount - size)
9- block = self.read(bs)
10- size = size + len(block)
11- while block:
12- new_fo.write(block)
13+ try:
14 if amount is not None: bs = min(bs, amount - size)
15 block = self.read(bs)
16 size = size + len(block)
17+ while block:
18+ new_fo.write(block)
19+ if amount is not None: bs = min(bs, amount - size)
20+ block = self.read(bs)
21+ size = size + len(block)
22+ finally:
23+ new_fo.close()
24
25- new_fo.close()
26 try:
27 modified_tuple = self.hdr.getdate_tz('last-modified')
28 modified_stamp = rfc822.mktime_tz(modified_tuple)
diff --git a/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-HEAD.patch b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-HEAD.patch
new file mode 100644
index 0000000000..90180d29a0
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-HEAD.patch
@@ -0,0 +1,142 @@
1diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
2index e090e90..a26880c 100644
3--- a/urlgrabber/grabber.py
4+++ b/urlgrabber/grabber.py
5@@ -439,6 +439,12 @@ try:
6 except:
7 __version__ = '???'
8
9+try:
10+ # this part isn't going to do much - need to talk to gettext
11+ from i18n import _
12+except ImportError, msg:
13+ def _(st): return st
14+
15 ########################################################################
16 # functions for debugging output. These functions are here because they
17 # are also part of the module initialization.
18@@ -1052,7 +1058,8 @@ class PyCurlFileObject():
19 self._reget_length = 0
20 self._prog_running = False
21 self._error = (None, None)
22- self.size = None
23+ self.size = 0
24+ self._hdr_ended = False
25 self._do_open()
26
27
28@@ -1085,9 +1092,14 @@ class PyCurlFileObject():
29 return -1
30
31 def _hdr_retrieve(self, buf):
32+ if self._hdr_ended:
33+ self._hdr_dump = ''
34+ self.size = 0
35+ self._hdr_ended = False
36+
37 if self._over_max_size(cur=len(self._hdr_dump),
38 max_size=self.opts.max_header_size):
39- return -1
40+ return -1
41 try:
42 self._hdr_dump += buf
43 # we have to get the size before we do the progress obj start
44@@ -1104,7 +1116,17 @@ class PyCurlFileObject():
45 s = parse150(buf)
46 if s:
47 self.size = int(s)
48-
49+
50+ if buf.lower().find('location') != -1:
51+ location = ':'.join(buf.split(':')[1:])
52+ location = location.strip()
53+ self.scheme = urlparse.urlsplit(location)[0]
54+ self.url = location
55+
56+ if len(self._hdr_dump) != 0 and buf == '\r\n':
57+ self._hdr_ended = True
58+ if DEBUG: DEBUG.info('header ended:')
59+
60 return len(buf)
61 except KeyboardInterrupt:
62 return pycurl.READFUNC_ABORT
63@@ -1136,6 +1158,7 @@ class PyCurlFileObject():
64 self.curl_obj.setopt(pycurl.PROGRESSFUNCTION, self._progress_update)
65 self.curl_obj.setopt(pycurl.FAILONERROR, True)
66 self.curl_obj.setopt(pycurl.OPT_FILETIME, True)
67+ self.curl_obj.setopt(pycurl.FOLLOWLOCATION, True)
68
69 if DEBUG:
70 self.curl_obj.setopt(pycurl.VERBOSE, True)
71@@ -1291,7 +1314,12 @@ class PyCurlFileObject():
72 raise err
73
74 elif str(e.args[1]) == '' and self.http_code != 0: # fake it until you make it
75- msg = 'HTTP Error %s : %s ' % (self.http_code, self.url)
76+ if self.scheme in ['http', 'https']:
77+ msg = 'HTTP Error %s : %s ' % (self.http_code, self.url)
78+ elif self.scheme in ['ftp']:
79+ msg = 'FTP Error %s : %s ' % (self.http_code, self.url)
80+ else:
81+ msg = "Unknown Error: URL=%s , scheme=%s" % (self.url, self.scheme)
82 else:
83 msg = 'PYCURL ERROR %s - "%s"' % (errcode, str(e.args[1]))
84 code = errcode
85@@ -1299,6 +1327,12 @@ class PyCurlFileObject():
86 err.code = code
87 err.exception = e
88 raise err
89+ else:
90+ if self._error[1]:
91+ msg = self._error[1]
92+ err = URLGRabError(14, msg)
93+ err.url = self.url
94+ raise err
95
96 def _do_open(self):
97 self.curl_obj = _curl_cache
98@@ -1532,11 +1566,14 @@ class PyCurlFileObject():
99 def _over_max_size(self, cur, max_size=None):
100
101 if not max_size:
102- max_size = self.size
103- if self.opts.size: # if we set an opts size use that, no matter what
104- max_size = self.opts.size
105+ if not self.opts.size:
106+ max_size = self.size
107+ else:
108+ max_size = self.opts.size
109+
110 if not max_size: return False # if we have None for all of the Max then this is dumb
111- if cur > max_size + max_size*.10:
112+
113+ if cur > int(float(max_size) * 1.10):
114
115 msg = _("Downloaded more than max size for %s: %s > %s") \
116 % (self.url, cur, max_size)
117@@ -1582,7 +1619,11 @@ class PyCurlFileObject():
118 self.opts.progress_obj.end(self._amount_read)
119 self.fo.close()
120
121-
122+ def geturl(self):
123+ """ Provide the geturl() method, used to be got from
124+ urllib.addinfourl, via. urllib.URLopener.* """
125+ return self.url
126+
127 _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
128
129
130diff --git a/urlgrabber/progress.py b/urlgrabber/progress.py
131index dd07c6a..45eb248 100644
132--- a/urlgrabber/progress.py
133+++ b/urlgrabber/progress.py
134@@ -658,6 +658,8 @@ def format_time(seconds, use_hours=0):
135 if seconds is None or seconds < 0:
136 if use_hours: return '--:--:--'
137 else: return '--:--'
138+ elif seconds == float('inf'):
139+ return 'Infinite'
140 else:
141 seconds = int(seconds)
142 minutes = seconds / 60
diff --git a/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-reset.patch b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-reset.patch
new file mode 100644
index 0000000000..b63e7c33ac
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-reset.patch
@@ -0,0 +1,15 @@
1--- a/urlgrabber/grabber.py 2010-02-19 14:50:45.000000000 -0500
2+++ b/urlgrabber/grabber.py 2010-02-19 14:51:28.000000000 -0500
3@@ -1626,6 +1626,12 @@
4
5 _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
6
7+def reset_curl_obj():
8+ """To make sure curl has reread the network/dns info we force a reload"""
9+ global _curl_cache
10+ _curl_cache.close()
11+ _curl_cache = pycurl.Curl()
12+
13
14 #####################################################################
15 # DEPRECATED FUNCTIONS
diff --git a/meta/recipes-devtools/python/python-urlgrabber_3.9.1.bb b/meta/recipes-devtools/python/python-urlgrabber_3.9.1.bb
new file mode 100644
index 0000000000..9f3a4cc6a7
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber_3.9.1.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "urlgrabber is a pure python package that drastically simplifies the fetching of files."
2
3HOMEPAGE = "http://urlgrabber.baseurl.org/"
4SECTION = "devel/python"
5PRIORITY = "optional"
6LICENSE = "GPL"
7PR = "r1"
8
9SRC_URI = "http://urlgrabber.baseurl.org/download/urlgrabber-${PV}.tar.gz \
10 file://urlgrabber-HEAD.patch;patch=1 \
11 file://urlgrabber-reset.patch;patch=1"
12S = "${WORKDIR}/urlgrabber-${PV}"
13
14DEPENDS = "python-pycurl"
15
16inherit distutils \ No newline at end of file
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
new file mode 100644
index 0000000000..682bd5a2da
--- /dev/null
+++ b/meta/recipes-devtools/python/python.inc
@@ -0,0 +1,25 @@
1DESCRIPTION = "The Python Programming Language"
2HOMEPAGE = "http://www.python.org"
3LICENSE = "PSF"
4SECTION = "devel/python"
5PRIORITY = "optional"
6# bump this on every change in contrib/python/generate-manifest-2.6.py
7INC_PR = "ml8"
8
9DEFAULT_PREFERENCE = "-26"
10
11PYTHON_MAJMIN = "2.6"
12
13inherit autotools
14
15EXTRA_OECONF = "\
16 --with-threads \
17 --with-pymalloc \
18 --with-cyclic-gc \
19 --without-cxx \
20 --with-signal-module \
21 --with-wctype-functions \
22 --enable-shared \
23"
24
25PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/python/python/00-fix-bindir-libdir-for-cross.patch b/meta/recipes-devtools/python/python/00-fix-bindir-libdir-for-cross.patch
new file mode 100644
index 0000000000..2559e3a0e4
--- /dev/null
+++ b/meta/recipes-devtools/python/python/00-fix-bindir-libdir-for-cross.patch
@@ -0,0 +1,20 @@
1# $(exec_prefix) points to the wrong directory, when installing
2# a cross-build. @bindir@ and @libdir@ works better and doesn't
3# affect the native build.
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5
6Index: Python-2.6.1/Makefile.pre.in
7===================================================================
8--- Python-2.6.1.orig/Makefile.pre.in
9+++ Python-2.6.1/Makefile.pre.in
10@@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@
11 datarootdir= @datarootdir@
12
13 # Expanded directories
14-BINDIR= $(exec_prefix)/bin
15-LIBDIR= $(exec_prefix)/lib
16+BINDIR= @bindir@
17+LIBDIR= @libdir@
18 MANDIR= @mandir@
19 INCLUDEDIR= @includedir@
20 CONFINCLUDEDIR= $(exec_prefix)/include
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
new file mode 100644
index 0000000000..e89faa4fb0
--- /dev/null
+++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -0,0 +1,116 @@
1# We need to ensure our host tools get run during build, not the freshly
2# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
3# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
4
5Index: Python-2.6.1/Makefile.pre.in
6===================================================================
7--- Python-2.6.1.orig/Makefile.pre.in
8+++ Python-2.6.1/Makefile.pre.in
9@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
10
11 PYTHON= python$(EXE)
12 BUILDPYTHON= python$(BUILDEXE)
13+HOSTPYTHON= $(BUILDPYTHON)
14
15 # The task to run while instrument when building the profile-opt target
16 PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
17@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
18 ##########################################################################
19 # Parser
20 PGEN= Parser/pgen$(EXE)
21-
22+HOSTPGEN= $(PGEN)$(EXE)
23 POBJS= \
24 Parser/acceler.o \
25 Parser/grammar1.o \
26@@ -394,8 +395,8 @@ platform: $(BUILDPYTHON)
27 # Build the shared modules
28 sharedmods: $(BUILDPYTHON)
29 @case $$MAKEFLAGS in \
30- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
31- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
32+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
33+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
34 esac
35
36 # Build static library
37@@ -513,7 +514,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
38
39 $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
40 -@$(INSTALL) -d Include
41- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
42+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
43
44 $(PGEN): $(PGENOBJS)
45 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
46@@ -879,23 +880,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL
47 done
48 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
49 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
50- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
51+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
52 -d $(LIBDEST) -f \
53 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
54 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
55- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
56+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
57 -d $(LIBDEST) -f \
58 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
59 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
60- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
61+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
62 -d $(LIBDEST)/site-packages -f \
63 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
64 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
65- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
66+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
67 -d $(LIBDEST)/site-packages -f \
68 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
69 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
70- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
71+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
72
73 # Create the PLATDIR source directory, if one wasn't distributed..
74 $(srcdir)/Lib/$(PLATDIR):
75@@ -993,7 +994,7 @@ libainstall: all
76 # Install the dynamically loadable modules
77 # This goes into $(exec_prefix)
78 sharedinstall:
79- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
80+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
81 --prefix=$(prefix) \
82 --install-scripts=$(BINDIR) \
83 --install-platlib=$(DESTSHARED) \
84Index: Python-2.6.1/setup.py
85===================================================================
86--- Python-2.6.1.orig/setup.py
87+++ Python-2.6.1/setup.py
88@@ -276,6 +276,7 @@ class PyBuildExt(build_ext):
89 self.failed.append(ext.name)
90 self.announce('*** WARNING: renaming "%s" since importing it'
91 ' failed: %s' % (ext.name, why), level=3)
92+ return
93 assert not self.inplace
94 basename, tail = os.path.splitext(ext_filename)
95 newname = basename + "_failed" + tail
96@@ -310,8 +311,8 @@ class PyBuildExt(build_ext):
97
98 def detect_modules(self):
99 # Ensure that /usr/local is always used
100- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
101- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
102+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
103+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
104
105 # Add paths specified in the environment variables LDFLAGS and
106 # CPPFLAGS for header and library files.
107@@ -410,6 +411,9 @@ class PyBuildExt(build_ext):
108
109 # XXX Omitted modules: gl, pure, dl, SGI-specific modules
110
111+ lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ]
112+ inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ]
113+
114 #
115 # The following modules are all pretty straightforward, and compile
116 # on pretty much any POSIXish platform.
diff --git a/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch b/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch
new file mode 100644
index 0000000000..b1c0bfb859
--- /dev/null
+++ b/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch
@@ -0,0 +1,106 @@
1# OpenEmbedded prepopulates the autotools site cache, so if this
2# would be using AC_TRY_CACHE, we could patch it in a more sane way
3# Alas, I don't have enough autotalent to do that.
4#
5# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
6Index: Python-2.6.1/configure.in
7===================================================================
8--- Python-2.6.5.orig/configure.in 2010-07-06 04:37:09.000000000 -0700
9+++ Python-2.6.5/configure.in 2010-07-06 04:40:18.000000000 -0700
10@@ -2697,50 +2697,6 @@
11 AC_CHECK_LIB(resolv, inet_aton)
12 )
13
14-# On Tru64, chflags seems to be present, but calling it will
15-# exit Python
16-AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
17-AC_TRY_RUN([[
18-#include <sys/stat.h>
19-#include <unistd.h>
20-int main(int argc, char*argv[])
21-{
22- if(chflags(argv[0], 0) != 0)
23- return 1;
24- return 0;
25-}
26-]], ac_cv_have_chflags=yes,
27- ac_cv_have_chflags=no,
28- ac_cv_have_chflags=cross)
29-])
30-if test "$ac_cv_have_chflags" = cross ; then
31- AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
32-fi
33-if test "$ac_cv_have_chflags" = yes ; then
34- AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
35-fi
36-
37-AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
38-AC_TRY_RUN([[
39-#include <sys/stat.h>
40-#include <unistd.h>
41-int main(int argc, char*argv[])
42-{
43- if(lchflags(argv[0], 0) != 0)
44- return 1;
45- return 0;
46-}
47-]], ac_cv_have_lchflags=yes,
48- ac_cv_have_lchflags=no,
49- ac_cv_have_lchflags=cross)
50-])
51-if test "$ac_cv_have_lchflags" = cross ; then
52- AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
53-fi
54-if test "$ac_cv_have_lchflags" = yes ; then
55- AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
56-fi
57-
58 dnl Check if system zlib has *Copy() functions
59 dnl
60 dnl On MacOSX the linker will search for dylibs on the entire linker path
61@@ -3844,45 +3800,6 @@
62 AC_MSG_RESULT(no)
63 fi
64
65-AC_MSG_CHECKING(for %zd printf() format support)
66-AC_TRY_RUN([#include <stdio.h>
67-#include <stddef.h>
68-#include <string.h>
69-
70-#ifdef HAVE_SYS_TYPES_H
71-#include <sys/types.h>
72-#endif
73-
74-#ifdef HAVE_SSIZE_T
75-typedef ssize_t Py_ssize_t;
76-#elif SIZEOF_VOID_P == SIZEOF_LONG
77-typedef long Py_ssize_t;
78-#else
79-typedef int Py_ssize_t;
80-#endif
81-
82-int main()
83-{
84- char buffer[256];
85-
86- if(sprintf(buffer, "%zd", (size_t)123) < 0)
87- return 1;
88-
89- if (strcmp(buffer, "123"))
90- return 1;
91-
92- if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
93- return 1;
94-
95- if (strcmp(buffer, "-123"))
96- return 1;
97-
98- return 0;
99-}],
100-[AC_MSG_RESULT(yes)
101- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
102- AC_MSG_RESULT(no))
103-
104 AC_CHECK_TYPE(socklen_t,,
105 AC_DEFINE(socklen_t,int,
106 Define to `int' if <sys/socket.h> does not define.),[
diff --git a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
new file mode 100644
index 0000000000..a1a385a07c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
@@ -0,0 +1,40 @@
1# We need to supply STAGING_INCDIR here, otherwise the Tk headers
2# will not be found.
3# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de>
4
5Index: Python-2.6.1/setup.py
6===================================================================
7--- Python-2.6.1.orig/setup.py
8+++ Python-2.6.1/setup.py
9@@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext):
10 dotversion = dotversion[:-1] + '.' + dotversion[-1]
11 tcl_include_sub = []
12 tk_include_sub = []
13- for dir in inc_dirs:
14+ for dir in [os.getenv("STAGING_INCDIR")]:
15 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
16 tk_include_sub += [dir + os.sep + "tk" + dotversion]
17 tk_include_sub += tcl_include_sub
18@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext):
19 if dir not in include_dirs:
20 include_dirs.append(dir)
21
22- # Check for various platform-specific directories
23- if platform == 'sunos5':
24- include_dirs.append('/usr/openwin/include')
25- added_lib_dirs.append('/usr/openwin/lib')
26- elif os.path.exists('/usr/X11R6/include'):
27- include_dirs.append('/usr/X11R6/include')
28- added_lib_dirs.append('/usr/X11R6/lib64')
29- added_lib_dirs.append('/usr/X11R6/lib')
30- elif os.path.exists('/usr/X11R5/include'):
31- include_dirs.append('/usr/X11R5/include')
32- added_lib_dirs.append('/usr/X11R5/lib')
33- else:
34- # Assume default location for X11
35- include_dirs.append('/usr/X11/include')
36- added_lib_dirs.append('/usr/X11/lib')
37-
38 # If Cygwin, then verify that X is installed before proceeding
39 if platform == 'cygwin':
40 x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/meta/recipes-devtools/python/python/04-default-is-optimized.patch b/meta/recipes-devtools/python/python/04-default-is-optimized.patch
new file mode 100644
index 0000000000..805f4f696c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/04-default-is-optimized.patch
@@ -0,0 +1,52 @@
1# when compiling for an embedded system, we need every bit of
2# performance we can get. default to optimized with the option
3# of opt-out.
4# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
5
6Index: Python-2.6.1/Python/compile.c
7===================================================================
8--- Python-2.6.1.orig/Python/compile.c
9+++ Python-2.6.1/Python/compile.c
10@@ -32,7 +32,7 @@
11 #include "symtable.h"
12 #include "opcode.h"
13
14-int Py_OptimizeFlag = 0;
15+int Py_OptimizeFlag = 1;
16
17 #define DEFAULT_BLOCK_SIZE 16
18 #define DEFAULT_BLOCKS 8
19Index: Python-2.6.1/Modules/main.c
20===================================================================
21--- Python-2.6.1.orig/Modules/main.c
22+++ Python-2.6.1/Modules/main.c
23@@ -40,7 +40,7 @@ static char **orig_argv;
24 static int orig_argc;
25
26 /* command line options */
27-#define BASE_OPTS "3bBc:dEhiJm:OQ:sStuUvVW:xX?"
28+#define BASE_OPTS "3bBc:dEhiJm:NOQ:sStuUvVW:xX?"
29
30 #ifndef RISCOS
31 #define PROGRAM_OPTS BASE_OPTS
32@@ -69,8 +69,7 @@ Options and arguments (and corresponding
33 static char *usage_2 = "\
34 if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n\
35 -m mod : run library module as a script (terminates option list)\n\
36--O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
37--OO : remove doc-strings in addition to the -O optimizations\n\
38+-N : do NOT optimize generated bytecode\n\
39 -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\
40 -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
41 -S : don't imply 'import site' on initialization\n\
42@@ -353,8 +352,8 @@ Py_Main(int argc, char **argv)
43
44 /* case 'J': reserved for Jython */
45
46- case 'O':
47- Py_OptimizeFlag++;
48+ case 'N':
49+ Py_OptimizeFlag=0;
50 break;
51
52 case 'B':
diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
new file mode 100644
index 0000000000..58b8078068
--- /dev/null
+++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
@@ -0,0 +1,28 @@
1# CTypes need to know the actual host we are building on.
2# Signed-Off: Michael Dietrich <mdt@emdete.de>
3
4Index: Python-2.6.1/setup.py
5===================================================================
6--- Python-2.6.1.orig/setup.py
7+++ Python-2.6.1/setup.py
8@@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext):
9 ffi_configfile):
10 from distutils.dir_util import mkpath
11 mkpath(ffi_builddir)
12- config_args = []
13+ config_args = ['--host=%s' % os.environ["HOST_SYS"], ]
14
15 # Pass empty CFLAGS because we'll just append the resulting
16 # CFLAGS to Python's; -g or -O2 is to be avoided.
17- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
18- % (ffi_builddir, ffi_srcdir, " ".join(config_args))
19+ cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
20+ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
21
22 res = os.system(cmd)
23 if res or not os.path.exists(ffi_configfile):
24- print "Failed to configure _ctypes module"
25+ print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile )
26 return False
27
28 fficonfig = {}
diff --git a/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch b/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch
new file mode 100644
index 0000000000..02dc44c847
--- /dev/null
+++ b/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch
@@ -0,0 +1,19 @@
1# Reinstate the empty -O option to fix weird mixing of native and target
2# binaries and libraries with LD_LIBRARY_PATH when host==target
3#
4# Signed-off-by: Denys Dmytriyenko <denis@denix.org>
5
6Index: Python-2.6.1/Modules/main.c
7===================================================================
8--- Python-2.6.1-orig/Modules/main.c
9+++ Python-2.6.1/Modules/main.c
10@@ -352,6 +352,9 @@ Py_Main(int argc, char **argv)
11
12 /* case 'J': reserved for Jython */
13
14+ case 'O': /* ignore it */
15+ break;
16+
17 case 'N':
18 Py_OptimizeFlag=0;
19 break;
diff --git a/meta/recipes-devtools/python/python/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py
new file mode 100644
index 0000000000..273901898a
--- /dev/null
+++ b/meta/recipes-devtools/python/python/sitecustomize.py
@@ -0,0 +1,45 @@
1# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
2# GPLv2 or later
3# Version: 20081123
4# Features:
5# * set proper default encoding
6# * enable readline completion in the interactive interpreter
7# * load command line history on startup
8# * save command line history on exit
9
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __enableReadlineSupport():
23 readline.set_history_length( 1000 )
24 readline.parse_and_bind( "tab: complete" )
25 try:
26 readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
27 except IOError:
28 pass
29
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys
38try:
39 import rlcompleter, readline
40except ImportError:
41 pass
42else:
43 __enableDefaultEncoding()
44 __registerExitHandler()
45 __enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python_2.6.5.bb b/meta/recipes-devtools/python/python_2.6.5.bb
new file mode 100644
index 0000000000..9658fd48dc
--- /dev/null
+++ b/meta/recipes-devtools/python/python_2.6.5.bb
@@ -0,0 +1,121 @@
1require python.inc
2DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
3DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
4# set to .0 on every increase of INC_PR
5PR = "${INC_PR}.2"
6
7SRC_URI = "\
8 http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
9 file://00-fix-bindir-libdir-for-cross.patch \
10 file://01-use-proper-tools-for-cross-build.patch \
11 file://02-remove-test-for-cross.patch \
12 file://03-fix-tkinter-detection.patch \
13 file://04-default-is-optimized.patch \
14 file://05-enable-ctypes-cross-build.patch \
15 file://99-ignore-optimization-flag.patch \
16 file://sitecustomize.py \
17"
18S = "${WORKDIR}/Python-${PV}"
19
20inherit autotools
21
22# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
23#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
24TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
25TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
26
27do_configure_prepend() {
28 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || oenote "_ctypes failed to autoreconf"
29}
30
31#
32# Copy config.h and an appropriate Makefile for distutils.sysconfig,
33# which laters uses the information out of these to compile extensions
34#
35do_compile_prepend() {
36 install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
37 install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
38 install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
39 install -m 0644 Makefile Makefile.orig
40 install -m 0644 Makefile Makefile.backup
41 sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
42 install -m 0644 Makefile Makefile.backup
43 sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
44 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
45}
46
47do_compile() {
48 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
49 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
50 STAGING_LIBDIR=${STAGING_LIBDIR} \
51 STAGING_INCDIR=${STAGING_INCDIR} \
52 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
53 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
54
55 oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
56
57 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
58 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
59 STAGING_LIBDIR=${STAGING_LIBDIR} \
60 STAGING_INCDIR=${STAGING_INCDIR} \
61 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
62 OPT="${CFLAGS}"
63}
64
65do_install() {
66 install -m 0644 Makefile.orig Makefile
67
68 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
69 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
70 STAGING_LIBDIR=${STAGING_LIBDIR} \
71 STAGING_INCDIR=${STAGING_INCDIR} \
72 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
73 DESTDIR=${D} LIBDIR=${libdir} install
74
75 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
76
77 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
78 sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
79}
80
81require python-${PYTHON_MAJMIN}-manifest.inc
82
83# manual dependency additions
84RPROVIDES_python-core = "python"
85RRECOMMENDS_python-core = "python-readline"
86RRECOMMENDS_python-crypt = "openssl"
87
88# add sitecustomize
89FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
90# ship 2to3
91FILES_python-core += "${bindir}/2to3"
92
93# package libpython2
94PACKAGES =+ "libpython2"
95FILES_libpython2 = "${libdir}/libpython*.so*"
96
97# additional stuff -dev
98
99FILES_${PN}-dev = "\
100 ${includedir} \
101 ${libdir}/lib*${SOLIBSDEV} \
102 ${libdir}/*.la \
103 ${libdir}/*.a \
104 ${libdir}/*.o \
105 ${libdir}/pkgconfig \
106 ${base_libdir}/*.a \
107 ${base_libdir}/*.o \
108 ${datadir}/aclocal \
109 ${datadir}/pkgconfig \
110"
111
112# catch debug extensions (isn't that already in python-core-dbg?)
113FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
114
115# catch all the rest (unsorted)
116PACKAGES += "python-misc"
117FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
118
119# catch manpage
120PACKAGES += "python-man"
121FILES_python-man = "${datadir}/man"
diff --git a/meta/recipes-devtools/python/yum-metadata-parser-native_1.1.4.bb b/meta/recipes-devtools/python/yum-metadata-parser-native_1.1.4.bb
new file mode 100644
index 0000000000..0a44b99e2c
--- /dev/null
+++ b/meta/recipes-devtools/python/yum-metadata-parser-native_1.1.4.bb
@@ -0,0 +1,7 @@
1require yum-metadata-parser_${PV}.bb
2inherit native
3DEPENDS = "python-native sqlite3-native glib-2.0-native libxml2-native"
4RDEPENDS = ""
5PR = "r0"
6
7#BUILD_CFLAGS += "-I${STAGING_LIBDIR}/glib-2.0"
diff --git a/meta/recipes-devtools/python/yum-metadata-parser_1.1.4.bb b/meta/recipes-devtools/python/yum-metadata-parser_1.1.4.bb
new file mode 100644
index 0000000000..2e404a2bb1
--- /dev/null
+++ b/meta/recipes-devtools/python/yum-metadata-parser_1.1.4.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "C-based metadata parser to quickly parse xml metadata into sqlite databases."
2HOMEPAGE = "http://linux.duke.edu/projects/yum/download.ptml"
3SECTION = "devel/python"
4PRIORITY = "optional"
5DEPENDS = "python sqlite3 glib-2.0 libxml2"
6LICENSE = "GPL"
7
8PR = "r1"
9
10SRC_URI = "http://linux.duke.edu/projects/yum/download/yum-metadata-parser/yum-metadata-parser-${PV}.tar.gz"
11S = "${WORKDIR}/yum-metadata-parser-${PV}"
12
13TARGET_CFLAGS += "-I${STAGING_LIBDIR}/glib-2.0"
14
15inherit distutils
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch
new file mode 100644
index 0000000000..8bbfa0e88e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch
@@ -0,0 +1,12 @@
1Index: qemu/linux-user/syscall.c
2===================================================================
3--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
4+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
5@@ -26,6 +26,7 @@
6 #include <errno.h>
7 #include <unistd.h>
8 #include <fcntl.h>
9+#include <dirent.h>
10 #include <time.h>
11 #include <limits.h>
12 #include <sys/types.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch
new file mode 100644
index 0000000000..528b6f0d18
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch
@@ -0,0 +1,96 @@
1Index: qemu-0.12.4/Makefile.target
2===================================================================
3--- qemu-0.12.4.orig/Makefile.target 2010-06-24 07:59:15.669394205 +0100
4+++ qemu-0.12.4/Makefile.target 2010-06-24 08:07:38.739399512 +0100
5@@ -47,6 +47,10 @@
6 libobj-y += op_helper.o helper.o
7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o
12+libobj-$(TARGET_PPC) += dummygl.o
13 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
14 libobj-$(TARGET_ALPHA) += alpha_palcode.o
15
16Index: qemu-0.12.4/target-arm/dummygl.c
17===================================================================
18--- /dev/null 1970-01-01 00:00:00.000000000 +0000
19+++ qemu-0.12.4/target-arm/dummygl.c 2010-06-24 07:59:15.899401748 +0100
20@@ -0,0 +1,22 @@
21+#include <string.h>
22+#include <stdlib.h>
23+#include <assert.h>
24+#include <stdint.h>
25+#include <X11/Xlib.h>
26+#include <X11/Xutil.h>
27+
28+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
29+{
30+
31+}
32+
33+void opengl_process_enable(void)
34+{
35+
36+}
37+
38+
39+void mem_opengl(uint64_t ptr)
40+{
41+
42+}
43Index: qemu-0.12.4/target-mips/dummygl.c
44===================================================================
45--- /dev/null 1970-01-01 00:00:00.000000000 +0000
46+++ qemu-0.12.4/target-mips/dummygl.c 2010-06-24 07:59:15.899401748 +0100
47@@ -0,0 +1,22 @@
48+#include <string.h>
49+#include <stdlib.h>
50+#include <assert.h>
51+#include <stdint.h>
52+#include <X11/Xlib.h>
53+#include <X11/Xutil.h>
54+
55+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
56+{
57+
58+}
59+
60+void opengl_process_enable(void)
61+{
62+
63+}
64+
65+
66+void mem_opengl(uint64_t ptr)
67+{
68+
69+}
70Index: qemu-0.12.4/target-ppc/dummygl.c
71===================================================================
72--- /dev/null 1970-01-01 00:00:00.000000000 +0000
73+++ qemu-0.12.4/target-ppc/dummygl.c 2010-06-24 08:07:59.070712946 +0100
74@@ -0,0 +1,22 @@
75+#include <string.h>
76+#include <stdlib.h>
77+#include <assert.h>
78+#include <stdint.h>
79+#include <X11/Xlib.h>
80+#include <X11/Xutil.h>
81+
82+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
83+{
84+
85+}
86+
87+void opengl_process_enable(void)
88+{
89+
90+}
91+
92+
93+void mem_opengl(uint64_t ptr)
94+{
95+
96+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch
new file mode 100644
index 0000000000..0a27c2dee1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch
@@ -0,0 +1,13 @@
1Index: git/Makefile.target
2===================================================================
3--- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
4+++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
5@@ -326,7 +326,7 @@ vl.o: qemu-options.h
6
7 monitor.o: qemu-monitor.h
8
9-LIBS += -lGL -lGLU
10+LIBS += -lGL
11
12 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
13
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch
new file mode 100644
index 0000000000..8ba7d8ff4c
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch
@@ -0,0 +1,16 @@
1# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
2# makes info.info.x11.display zero and avoids the calls to
3# opengl_exec_set_parent_window, one of which is crashing.
4
5Index: qemu-0.12.4/sdl.c
6===================================================================
7--- qemu-0.12.4.orig/sdl.c
8+++ qemu-0.12.4/sdl.c
9@@ -871,6 +871,7 @@ void sdl_display_init(DisplayState *ds,
10 vi = SDL_GetVideoInfo();
11 host_format = *(vi->vfmt);
12
13+ bzero(&info, sizeof(info));
14 SDL_GetWMInfo(&info);
15 if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
16 opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch
new file mode 100644
index 0000000000..7b33aa4840
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch
@@ -0,0 +1,22 @@
1Fedora 13 switched the default behaviour of the linker to no longer
2indirectly link to required libraries (i.e. dependencies of a library
3already linked to). Therefore we need to explicitly pass the depended on
4libraries into the linker for building to work on Fedora 13.
5
6More information is available on the Fedora Wiki:
7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
8
9JL - 15/06/10
10Index: qemu-0.12.4/Makefile.target
11===================================================================
12--- qemu-0.12.4.orig/Makefile.target 2010-06-15 11:21:52.000000000 +0100
13+++ qemu-0.12.4/Makefile.target 2010-06-15 11:25:27.212852910 +0100
14@@ -178,7 +178,7 @@
15 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
17 obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
18-LIBS+=-lz
19+LIBS+=-lz -lX11 -ldl
20
21 sound-obj-y =
22 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch
new file mode 100644
index 0000000000..8a95a688b3
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch
@@ -0,0 +1,26 @@
1Index: qemu/Makefile
2===================================================================
3--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
4+++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
5@@ -300,7 +300,7 @@ endif
6 install: all $(if $(BUILD_DOCS),install-doc)
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
14Index: qemu/Makefile.target
15===================================================================
16--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
17+++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
18@@ -351,7 +351,7 @@ clean:
19
20 install: all
21 ifneq ($(PROGS),)
22- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
23+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
24 endif
25
26 # Include automatically generated dependency files
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin
new file mode 100644
index 0000000000..c4044296c5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
new file mode 100644
index 0000000000..ab31476218
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
@@ -0,0 +1,34376 @@
1Index: qemu-0.12.4/Makefile.target
2===================================================================
3--- qemu-0.12.4.orig/Makefile.target
4+++ qemu-0.12.4/Makefile.target
5@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
6 libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
7 libobj-y += op_helper.o helper.o
8 libobj-$(CONFIG_NEED_MMU) += mmu.o
9+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
11 libobj-$(TARGET_ALPHA) += alpha_palcode.o
12
13@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
14 # cpu_signal_handler() in cpu-exec.c.
15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
16
17+parse_gl_h: parse_gl_h.c
18+ $(HOST_CC) -g -o $@ $<
19+server_stub.c: parse_gl_h
20+ ./parse_gl_h
21+gl_func.h: parse_gl_h
22+ ./parse_gl_h
23+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
24+opengl_func.h: gl_func.h
25+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
26+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
27+gl_beginend.h: ../target-i386/beginend_funcs.sh
28+ $< > $@
29+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
30+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
31+
32 #########################################################
33 # Linux user emulator target
34
35@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
36 obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
37 obj-i386-y += ne2000-isa.o
38
39+ifeq ($(TARGET_BASE_ARCH), i386)
40+QEMU_CFLAGS += -DTARGET_OPENGL_OK
41+endif
42+
43 # shared objects
44 obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
45 obj-ppc-y += ide/cmd646.o
46@@ -303,6 +323,8 @@ vl.o: qemu-options.h
47
48 monitor.o: qemu-monitor.h
49
50+LIBS += -lGL -lGLU
51+
52 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
53
54 endif # CONFIG_SOFTMMU
55Index: qemu-0.12.4/hw/pixel_ops.h
56===================================================================
57--- qemu-0.12.4.orig/hw/pixel_ops.h
58+++ qemu-0.12.4/hw/pixel_ops.h
59@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
61 }
62
63+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
64+ unsigned int b)
65+{
66+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
67+}
68+
69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
70 unsigned int b)
71 {
72Index: qemu-0.12.4/hw/vmware_vga.c
73===================================================================
74--- qemu-0.12.4.orig/hw/vmware_vga.c
75+++ qemu-0.12.4/hw/vmware_vga.c
76@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
77
78 #define CMD(f) le32_to_cpu(s->cmd->f)
79
80+static uint32_t last_cmd;
81+
82 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
83 {
84 if (!s->config || !s->enable)
85@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
86
87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
88 {
89- uint32_t cmd = s->fifo[CMD(stop) >> 2];
90- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
91- if (CMD(stop) >= CMD(max))
92+ int offset = CMD(stop);
93+
94+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
95+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
96+ __FUNCTION__, last_cmd);
97+ return 0x00000000;
98+ }
99+
100+ s->cmd->stop = cpu_to_le32(offset + 4);
101+ if (offset + 4 >= CMD(max))
102 s->cmd->stop = s->cmd->min;
103- return cmd;
104+ return s->fifo[offset >> 2];
105 }
106
107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
108@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
109
110 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
111 {
112- uint32_t cmd, colour;
113+ uint32_t colour;
114 int args = 0;
115 int x, y, dx, dy, width, height;
116 struct vmsvga_cursor_definition_s cursor;
117 while (!vmsvga_fifo_empty(s))
118- switch (cmd = vmsvga_fifo_read(s)) {
119+ switch (last_cmd = vmsvga_fifo_read(s)) {
120 case SVGA_CMD_UPDATE:
121 case SVGA_CMD_UPDATE_VERBOSE:
122 x = vmsvga_fifo_read(s);
123@@ -624,7 +633,7 @@ static void vmsvga_fifo_run(struct vmsvg
124 while (args --)
125 vmsvga_fifo_read(s);
126 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
127- __FUNCTION__, cmd);
128+ __FUNCTION__, last_cmd);
129 break;
130 }
131
132@@ -1143,6 +1152,12 @@ static void vmsvga_init(struct vmsvga_st
133
134 vga_init_vbe(&s->vga);
135
136+#ifdef EMBED_STDVGA
137+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
138+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
139+ vga_dirty_log_start(s);
140+#endif
141+
142 rom_add_vga(VGABIOS_FILENAME);
143
144 vmsvga_reset(s);
145Index: qemu-0.12.4/qemu-char.c
146===================================================================
147--- qemu-0.12.4.orig/qemu-char.c
148+++ qemu-0.12.4/qemu-char.c
149@@ -2235,6 +2235,69 @@ static CharDriverState *qemu_chr_open_so
150 return NULL;
151 }
152
153+#define TARGET_OPENGL_OK
154+#if defined(TARGET_OPENGL_OK)
155+static uint8_t buffer[32];
156+static int buffer_len;
157+static int hexdigit[128] = {
158+ ['0'] = 0x0,
159+ ['1'] = 0x1,
160+ ['2'] = 0x2,
161+ ['3'] = 0x3,
162+ ['4'] = 0x4,
163+ ['5'] = 0x5,
164+ ['6'] = 0x6,
165+ ['7'] = 0x7,
166+ ['8'] = 0x8,
167+ ['9'] = 0x9,
168+ ['a'] = 0xa,
169+ ['b'] = 0xb,
170+ ['c'] = 0xc,
171+ ['d'] = 0xd,
172+ ['e'] = 0xe,
173+ ['f'] = 0xf,
174+};
175+
176+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
177+{
178+ uint64_t ptr = 0;
179+ int i;
180+
181+ if (memchr(buf, 'x', len))
182+ opengl_process_enable();
183+ return len;
184+ memcpy(buffer + buffer_len, buf, len);
185+ buffer_len += len;
186+
187+ if (buffer_len >= 16) {
188+ for (i = 0; i < 16; i ++)
189+ ptr = (ptr << 4) + hexdigit[buffer[i]];
190+
191+ buffer_len -= 16;
192+ if (buffer_len)
193+ memcpy(buffer, buffer + 16, buffer_len);
194+
195+ mem_opengl(ptr);
196+ }
197+
198+ return len;
199+}
200+
201+CharDriverState *qemu_chr_open_opengl(void)
202+{
203+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
204+
205+ chr->opaque = chr;
206+ chr->chr_write = opengl_chr_write;
207+
208+ qemu_chr_generic_open(chr);
209+
210+ return chr;
211+}
212+#else
213+#define qemu_chr_open_opengl() 0
214+#endif
215+
216 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
217 {
218 char host[65], port[33], width[8], height[8];
219@@ -2353,6 +2416,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
220 qemu_opt_set(opts, "path", filename);
221 return opts;
222 }
223+ if (!strcmp(filename, "opengl")){
224+ qemu_opt_set(opts, "backend", "opengl");
225+ return opts;
226+ }
227
228 fail:
229 qemu_opts_del(opts);
230@@ -2368,6 +2435,7 @@ static const struct {
231 { .name = "udp", .open = qemu_chr_open_udp },
232 { .name = "msmouse", .open = qemu_chr_open_msmouse },
233 { .name = "vc", .open = text_console_init },
234+ { .name = "opengl", .open = qemu_chr_open_opengl },
235 #ifdef _WIN32
236 { .name = "file", .open = qemu_chr_open_win_file_out },
237 { .name = "pipe", .open = qemu_chr_open_win_pipe },
238Index: qemu-0.12.4/sdl.c
239===================================================================
240--- qemu-0.12.4.orig/sdl.c
241+++ qemu-0.12.4/sdl.c
242@@ -58,6 +58,8 @@ static uint8_t allocator;
243 static SDL_PixelFormat host_format;
244 static int scaling_active = 0;
245
246+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
247+
248 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
249 {
250 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
251@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
252
253 static void sdl_resize(DisplayState *ds)
254 {
255- if (!allocator) {
256+ SDL_SysWMinfo info;
257+ static Display *dpy;
258+
259+ if (!allocator) {
260 if (!scaling_active)
261 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
262 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
263 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
264 sdl_setdata(ds);
265+
266+ SDL_GetWMInfo(&info);
267+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
268+ (!dpy || dpy == info.info.x11.display)) {
269+ dpy = info.info.x11.display;
270+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
271+ }
272 } else {
273 if (guest_screen != NULL) {
274 SDL_FreeSurface(guest_screen);
275@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
276
277 if (!kbd_mouse_is_absolute()) {
278 SDL_ShowCursor(1);
279- if (guest_cursor &&
280+ if (guest_cursor && !force_pointer &&
281 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
282 SDL_SetCursor(guest_sprite);
283 else
284@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
285 static void sdl_grab_start(void)
286 {
287 if (guest_cursor) {
288- SDL_SetCursor(guest_sprite);
289+ if (!force_pointer)
290+ SDL_SetCursor(guest_sprite);
291 if (!kbd_mouse_is_absolute() && !absolute_enabled)
292 SDL_WarpMouse(guest_x, guest_y);
293 } else
294@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
295 absolute_enabled = 1;
296 }
297
298- dx = x * 0x7FFF / (width - 1);
299- dy = y * 0x7FFF / (height - 1);
300+ dx = x * 0x7FFF / (width - 1);
301+ dy = y * 0x7FFF / (height - 1);
302 } else if (absolute_enabled) {
303 sdl_show_cursor();
304 absolute_enabled = 0;
305@@ -761,7 +774,8 @@ static void sdl_mouse_warp(int x, int y,
306 if (!guest_cursor)
307 sdl_show_cursor();
308 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
309- SDL_SetCursor(guest_sprite);
310+ if (!force_pointer)
311+ SDL_SetCursor(guest_sprite);
312 if (!kbd_mouse_is_absolute() && !absolute_enabled)
313 SDL_WarpMouse(x, y);
314 }
315@@ -815,7 +829,7 @@ static void sdl_mouse_define(int width,
316 }
317 guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
318
319- if (guest_cursor &&
320+ if (guest_cursor && !force_pointer &&
321 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
322 SDL_SetCursor(guest_sprite);
323 }
324@@ -832,6 +846,7 @@ void sdl_display_init(DisplayState *ds,
325 int flags;
326 uint8_t data = 0;
327 DisplayAllocator *da;
328+ SDL_SysWMinfo info;
329 const SDL_VideoInfo *vi;
330
331 #if defined(__APPLE__)
332@@ -856,6 +871,12 @@ void sdl_display_init(DisplayState *ds,
333 vi = SDL_GetVideoInfo();
334 host_format = *(vi->vfmt);
335
336+ SDL_GetWMInfo(&info);
337+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
338+ opengl_exec_set_parent_window(info.info.x11.display,
339+ RootWindow(info.info.x11.display,
340+ DefaultScreen(info.info.x11.display)));
341+
342 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
343 dcl->dpy_update = sdl_update;
344 dcl->dpy_resize = sdl_resize;
345@@ -891,4 +912,9 @@ void sdl_display_init(DisplayState *ds,
346 gui_fullscreen_initial_grab = 1;
347 sdl_grab_start();
348 }
349+
350+ SDL_GetWMInfo(&info);
351+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
352+ opengl_exec_set_parent_window(info.info.x11.display,
353+ info.info.x11.window);
354 }
355Index: qemu-0.12.4/slirp/udp.c
356===================================================================
357--- qemu-0.12.4.orig/slirp/udp.c
358+++ qemu-0.12.4/slirp/udp.c
359@@ -40,6 +40,7 @@
360
361 #include <slirp.h>
362 #include "ip_icmp.h"
363+#include "bswap.h"
364
365 static u_int8_t udp_tos(struct socket *so);
366
367@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
368 goto bad;
369 }
370
371+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
372+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
373+ goto bad;
374+ }
375+
376 if (slirp->restricted) {
377 goto bad;
378 }
379Index: qemu-0.12.4/sysemu.h
380===================================================================
381--- qemu-0.12.4.orig/sysemu.h
382+++ qemu-0.12.4/sysemu.h
383@@ -141,6 +141,7 @@ extern int semihosting_enabled;
384 extern int old_param;
385 extern int boot_menu;
386 extern QEMUClock *rtc_clock;
387+extern int force_pointer;
388
389 #define MAX_NODES 64
390 extern int nb_numa_nodes;
391Index: qemu-0.12.4/target-i386/beginend_funcs.sh
392===================================================================
393--- /dev/null
394+++ qemu-0.12.4/target-i386/beginend_funcs.sh
395@@ -0,0 +1,23 @@
396+#! /bin/sh
397+# Copyright 2008 (C) Intel Corporation
398+#
399+# echo names of functions that are legal between a glBegin and glEnd pair.
400+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
401+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
402+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
403+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
404+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
405+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
406+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
407+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
408+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
409+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
410+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
411+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
412+echo -e MAGIC_MACRO\(glArrayElement\)\\n
413+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
414+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
415+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
416+echo -e MAGIC_MACRO\(glCallList\)\\n
417+echo -e MAGIC_MACRO\(glCallLists\)\\n
418+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
419Index: qemu-0.12.4/target-i386/ghash.c
420===================================================================
421--- /dev/null
422+++ qemu-0.12.4/target-i386/ghash.c
423@@ -0,0 +1,347 @@
424+/* This is a modified and simplified version of original ghash.c */
425+
426+/* GLIB - Library of useful routines for C programming
427+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
428+ *
429+ * This library is free software; you can redistribute it and/or
430+ * modify it under the terms of the GNU Lesser General Public
431+ * License as published by the Free Software Foundation; either
432+ * version 2 of the License, or (at your option) any later version.
433+ *
434+ * This library is distributed in the hope that it will be useful,
435+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
436+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
437+ * Lesser General Public License for more details.
438+ *
439+ * You should have received a copy of the GNU Lesser General Public
440+ * License along with this library; if not, write to the
441+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
442+ * Boston, MA 02111-1307, USA.
443+ */
444+
445+/*
446+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
447+ * file for a list of people on the GLib Team. See the ChangeLog
448+ * files for a list of changes. These files are distributed with
449+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
450+ */
451+
452+
453+#include <stdlib.h>
454+
455+#include "ghash.h"
456+
457+#define HASH_TABLE_MIN_SIZE 11
458+#define HASH_TABLE_MAX_SIZE 13845163
459+
460+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
461+
462+
463+typedef struct _SimpleHashNode SimpleHashNode;
464+
465+struct _SimpleHashNode
466+{
467+ int key;
468+ void* value;
469+ SimpleHashNode *next;
470+};
471+
472+struct _SimpleHashTable
473+{
474+ int size;
475+ int nnodes;
476+ SimpleHashNode **nodes;
477+ SimpleDestroyNotify value_destroy_func;
478+};
479+
480+static const unsigned int simple_primes[] =
481+{
482+ 11,
483+ 19,
484+ 37,
485+ 73,
486+ 109,
487+ 163,
488+ 251,
489+ 367,
490+ 557,
491+ 823,
492+ 1237,
493+ 1861,
494+ 2777,
495+ 4177,
496+ 6247,
497+ 9371,
498+ 14057,
499+ 21089,
500+ 31627,
501+ 47431,
502+ 71143,
503+ 106721,
504+ 160073,
505+ 240101,
506+ 360163,
507+ 540217,
508+ 810343,
509+ 1215497,
510+ 1823231,
511+ 2734867,
512+ 4102283,
513+ 6153409,
514+ 9230113,
515+ 13845163,
516+};
517+
518+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
519+
520+unsigned int simple_spaced_primes_closest (unsigned int num)
521+{
522+ int i;
523+
524+ for (i = 0; i < simple_nprimes; i++)
525+ if (simple_primes[i] > num)
526+ return simple_primes[i];
527+
528+ return simple_primes[simple_nprimes - 1];
529+}
530+
531+#define HASH_TABLE_RESIZE(hash_table) \
532+ do { \
533+ if ((hash_table->size >= 3 * hash_table->nnodes && \
534+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
535+ (3 * hash_table->size <= hash_table->nnodes && \
536+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
537+ simple_hash_table_resize (hash_table); \
538+ } while(0)
539+
540+static void simple_hash_table_resize (SimpleHashTable *hash_table);
541+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
542+ int key);
543+static SimpleHashNode* simple_hash_node_new (int key,
544+ void* value);
545+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
546+ SimpleDestroyNotify value_destroy_func);
547+
548+
549+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
550+
551+SimpleHashTable*
552+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
553+{
554+ SimpleHashTable *hash_table;
555+
556+ hash_table = alloc0(SimpleHashTable, 1);
557+ hash_table->size = HASH_TABLE_MIN_SIZE;
558+ hash_table->nnodes = 0;
559+ hash_table->value_destroy_func = value_destroy_func;
560+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
561+
562+ return hash_table;
563+}
564+
565+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
566+ SimpleCloneValue clone_value_func)
567+{
568+ SimpleHashTable *hash_table_new;
569+ SimpleHashNode *new_node;
570+ SimpleHashNode *node;
571+ int i;
572+
573+ hash_table_new = alloc0 (SimpleHashTable, 1);
574+ hash_table_new->size = hash_table->size;
575+ hash_table_new->nnodes = hash_table->nnodes;
576+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
577+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
578+ for (i = 0; i < hash_table->size; i++)
579+ {
580+ node = hash_table->nodes[i];
581+ while(node)
582+ {
583+ SimpleHashNode *next = hash_table_new->nodes[i];
584+ new_node = simple_hash_node_new(node->key,
585+ (clone_value_func)? clone_value_func(node->value) : node->value);
586+ new_node->next = next;
587+ hash_table_new->nodes[i] = new_node;
588+ node = node->next;
589+ }
590+ }
591+ return hash_table_new;
592+}
593+
594+void
595+simple_hash_table_destroy (SimpleHashTable *hash_table)
596+{
597+ int i;
598+
599+ for (i = 0; i < hash_table->size; i++)
600+ {
601+ simple_hash_nodes_destroy (hash_table->nodes[i],
602+ hash_table->value_destroy_func);
603+ hash_table->nodes[i] = NULL;
604+ }
605+ free (hash_table->nodes);
606+ free (hash_table);
607+}
608+
609+static inline SimpleHashNode**
610+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
611+ int key)
612+{
613+ SimpleHashNode **node;
614+
615+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
616+ while (*node && (*node)->key != key)
617+ node = &(*node)->next;
618+
619+ return node;
620+}
621+
622+void*
623+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
624+{
625+ SimpleHashNode *node;
626+
627+ node = *simple_hash_table_lookup_node (hash_table, key);
628+
629+ return node ? node->value : NULL;
630+}
631+
632+void**
633+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
634+{
635+ SimpleHashNode *node;
636+
637+ node = *simple_hash_table_lookup_node (hash_table, key);
638+
639+ return node ? &node->value : NULL;
640+}
641+
642+
643+void
644+simple_hash_table_insert (SimpleHashTable *hash_table,
645+ int key,
646+ void* value)
647+{
648+ SimpleHashNode **node;
649+
650+ node = simple_hash_table_lookup_node (hash_table, key);
651+
652+ if (*node)
653+ {
654+ /* do not reset node->key in this place, keeping
655+ * the old key is the intended behaviour.
656+ * simple_hash_table_replace() can be used instead.
657+ */
658+ if (hash_table->value_destroy_func)
659+ hash_table->value_destroy_func ((*node)->value);
660+
661+ (*node)->value = value;
662+ }
663+ else
664+ {
665+ *node = simple_hash_node_new (key, value);
666+ hash_table->nnodes++;
667+ HASH_TABLE_RESIZE (hash_table);
668+ }
669+}
670+int
671+simple_hash_table_remove (SimpleHashTable *hash_table,
672+ int key)
673+{
674+ SimpleHashNode **node, *dest;
675+
676+ node = simple_hash_table_lookup_node (hash_table, key);
677+ if (*node)
678+ {
679+ dest = *node;
680+ (*node) = dest->next;
681+ if (hash_table->value_destroy_func)
682+ hash_table->value_destroy_func (dest->value);
683+ free (dest);
684+ hash_table->nnodes--;
685+
686+ HASH_TABLE_RESIZE (hash_table);
687+
688+ return 1;
689+ }
690+
691+ return 0;
692+}
693+
694+
695+void
696+simple_hash_table_foreach (SimpleHashTable *hash_table,
697+ SimpleHFunc func,
698+ void* user_data)
699+{
700+ SimpleHashNode *node;
701+ int i;
702+
703+ for (i = 0; i < hash_table->size; i++)
704+ for (node = hash_table->nodes[i]; node; node = node->next)
705+ (* func) (node->key, node->value, user_data);
706+}
707+
708+unsigned int
709+simple_hash_table_size (SimpleHashTable *hash_table)
710+{
711+ return hash_table->nnodes;
712+}
713+
714+static void
715+simple_hash_table_resize (SimpleHashTable *hash_table)
716+{
717+ SimpleHashNode **new_nodes;
718+ SimpleHashNode *node;
719+ SimpleHashNode *next;
720+ unsigned int hash_val;
721+ int new_size;
722+ int i;
723+
724+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
725+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
726+
727+ new_nodes = alloc0 (SimpleHashNode*, new_size);
728+
729+ for (i = 0; i < hash_table->size; i++)
730+ for (node = hash_table->nodes[i]; node; node = next)
731+ {
732+ next = node->next;
733+
734+ hash_val = (unsigned int)(node->key) % new_size;
735+
736+ node->next = new_nodes[hash_val];
737+ new_nodes[hash_val] = node;
738+ }
739+
740+ free (hash_table->nodes);
741+ hash_table->nodes = new_nodes;
742+ hash_table->size = new_size;
743+}
744+
745+static SimpleHashNode*
746+simple_hash_node_new (int key,
747+ void* value)
748+{
749+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
750+
751+ hash_node->key = key;
752+ hash_node->value = value;
753+ hash_node->next = NULL;
754+
755+ return hash_node;
756+}
757+
758+static void
759+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
760+ SimpleDestroyNotify value_destroy_func)
761+{
762+ while (hash_node)
763+ {
764+ SimpleHashNode *next = hash_node->next;
765+ if (value_destroy_func)
766+ value_destroy_func (hash_node->value);
767+ free (hash_node);
768+ hash_node = next;
769+ }
770+}
771Index: qemu-0.12.4/target-i386/ghash.h
772===================================================================
773--- /dev/null
774+++ qemu-0.12.4/target-i386/ghash.h
775@@ -0,0 +1,59 @@
776+/* This is a modified and simplified version of original ghash.h */
777+
778+
779+/* GLIB - Library of useful routines for C programming
780+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
781+ *
782+ * This library is free software; you can redistribute it and/or
783+ * modify it under the terms of the GNU Lesser General Public
784+ * License as published by the Free Software Foundation; either
785+ * version 2 of the License, or (at your option) any later version.
786+ *
787+ * This library is distributed in the hope that it will be useful,
788+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
789+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
790+ * Lesser General Public License for more details.
791+ *
792+ * You should have received a copy of the GNU Lesser General Public
793+ * License along with this library; if not, write to the
794+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
795+ * Boston, MA 02111-1307, USA.
796+ */
797+
798+/*
799+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
800+ * file for a list of people on the GLib Team. See the ChangeLog
801+ * files for a list of changes. These files are distributed with
802+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
803+ */
804+
805+#ifndef __SIMPLE_HASH_H__
806+#define __SIMPLE_HASH_H__
807+
808+typedef struct _SimpleHashTable SimpleHashTable;
809+
810+typedef void (*SimpleDestroyNotify)(void*);
811+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
812+typedef void* (*SimpleCloneValue)(void* value);
813+
814+/* Hash tables
815+ */
816+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
817+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
818+ SimpleCloneValue clone_value_func);
819+void simple_hash_table_destroy (SimpleHashTable *hash_table);
820+void simple_hash_table_insert (SimpleHashTable *hash_table,
821+ int key,
822+ void* value);
823+int simple_hash_table_remove (SimpleHashTable *hash_table,
824+ int key);
825+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
826+ int key);
827+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
828+void simple_hash_table_foreach (SimpleHashTable *hash_table,
829+ SimpleHFunc func,
830+ void* user_data);
831+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
832+
833+#endif /* __SIMPLE_HASH_H__ */
834+
835Index: qemu-0.12.4/target-i386/gl_func_perso.h
836===================================================================
837--- /dev/null
838+++ qemu-0.12.4/target-i386/gl_func_perso.h
839@@ -0,0 +1,135 @@
840+/*
841+ * Hand-implemented GL/GLX API
842+ *
843+ * Copyright (c) 2006,2007 Even Rouault
844+ *
845+ * Permission is hereby granted, free of charge, to any person obtaining a copy
846+ * of this software and associated documentation files (the "Software"), to deal
847+ * in the Software without restriction, including without limitation the rights
848+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
849+ * copies of the Software, and to permit persons to whom the Software is
850+ * furnished to do so, subject to the following conditions:
851+ *
852+ * The above copyright notice and this permission notice shall be included in
853+ * all copies or substantial portions of the Software.
854+ *
855+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
856+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
857+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
858+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
859+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
860+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
861+ * THE SOFTWARE.
862+ */
863+
864+MAGIC_MACRO(_init32),
865+MAGIC_MACRO(_init64),
866+MAGIC_MACRO(_synchronize),
867+MAGIC_MACRO(_serialized_calls),
868+MAGIC_MACRO(_exit_process),
869+MAGIC_MACRO(_moveResizeWindow),
870+MAGIC_MACRO(_changeWindowState),
871+MAGIC_MACRO(_send_cursor),
872+
873+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
874+MAGIC_MACRO(glXChooseVisual),
875+MAGIC_MACRO(glXQueryExtensionsString),
876+MAGIC_MACRO(glXQueryServerString),
877+MAGIC_MACRO(glXCreateContext),
878+MAGIC_MACRO(glXCopyContext),
879+MAGIC_MACRO(glXDestroyContext),
880+MAGIC_MACRO(glXGetClientString),
881+MAGIC_MACRO(glXQueryVersion),
882+MAGIC_MACRO(glXMakeCurrent),
883+MAGIC_MACRO(glXGetConfig),
884+MAGIC_MACRO(glXGetConfig_extended),
885+MAGIC_MACRO(glXWaitGL),
886+MAGIC_MACRO(glXWaitX),
887+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
888+MAGIC_MACRO(glXChooseFBConfig),
889+MAGIC_MACRO(glXChooseFBConfigSGIX),
890+MAGIC_MACRO(glXGetFBConfigs),
891+MAGIC_MACRO(glXCreatePbuffer),
892+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
893+MAGIC_MACRO(glXDestroyPbuffer),
894+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
895+MAGIC_MACRO(glXCreateNewContext),
896+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
897+MAGIC_MACRO(glXGetVisualFromFBConfig),
898+MAGIC_MACRO(glXGetFBConfigAttrib),
899+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
900+MAGIC_MACRO(glXQueryContext),
901+MAGIC_MACRO(glXQueryDrawable),
902+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
903+MAGIC_MACRO(glXUseXFont),
904+MAGIC_MACRO(glXIsDirect),
905+MAGIC_MACRO(glXGetProcAddress_fake),
906+MAGIC_MACRO(glXGetProcAddress_global_fake),
907+MAGIC_MACRO(glXSwapBuffers),
908+MAGIC_MACRO(glXQueryExtension),
909+MAGIC_MACRO(glXGetScreenDriver),
910+MAGIC_MACRO(glXGetDriverConfig),
911+MAGIC_MACRO(glXSwapIntervalSGI),
912+MAGIC_MACRO(glXBindTexImageATI),
913+MAGIC_MACRO(glXReleaseTexImageATI),
914+MAGIC_MACRO(glXBindTexImageARB),
915+MAGIC_MACRO(glXReleaseTexImageARB),
916+
917+MAGIC_MACRO(glGetString),
918+
919+MAGIC_MACRO(glShaderSourceARB_fake),
920+MAGIC_MACRO(glShaderSource_fake),
921+MAGIC_MACRO(glVertexPointer_fake),
922+MAGIC_MACRO(glNormalPointer_fake),
923+MAGIC_MACRO(glColorPointer_fake),
924+MAGIC_MACRO(glSecondaryColorPointer_fake),
925+MAGIC_MACRO(glIndexPointer_fake),
926+MAGIC_MACRO(glTexCoordPointer_fake),
927+MAGIC_MACRO(glEdgeFlagPointer_fake),
928+MAGIC_MACRO(glVertexAttribPointerARB_fake),
929+MAGIC_MACRO(glVertexAttribPointerNV_fake),
930+MAGIC_MACRO(glWeightPointerARB_fake),
931+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
932+MAGIC_MACRO(glFogCoordPointer_fake),
933+MAGIC_MACRO(glVariantPointerEXT_fake),
934+MAGIC_MACRO(glInterleavedArrays_fake),
935+MAGIC_MACRO(glElementPointerATI_fake),
936+MAGIC_MACRO(glTuxRacerDrawElements_fake),
937+MAGIC_MACRO(glVertexAndNormalPointer_fake),
938+MAGIC_MACRO(glTexCoordPointer01_fake),
939+MAGIC_MACRO(glTexCoordPointer012_fake),
940+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
941+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
942+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
943+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
944+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
945+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
946+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
947+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
948+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
949+MAGIC_MACRO(glGenTextures_fake),
950+MAGIC_MACRO(glGenBuffersARB_fake),
951+MAGIC_MACRO(glGenLists_fake),
952+MAGIC_MACRO(_glDrawElements_buffer),
953+MAGIC_MACRO(_glDrawRangeElements_buffer),
954+MAGIC_MACRO(_glMultiDrawElements_buffer),
955+MAGIC_MACRO(_glVertexPointer_buffer),
956+MAGIC_MACRO(_glNormalPointer_buffer),
957+MAGIC_MACRO(_glColorPointer_buffer),
958+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
959+MAGIC_MACRO(_glIndexPointer_buffer),
960+MAGIC_MACRO(_glTexCoordPointer_buffer),
961+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
962+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
963+MAGIC_MACRO(_glWeightPointerARB_buffer),
964+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
965+MAGIC_MACRO(_glFogCoordPointer_buffer),
966+MAGIC_MACRO(_glVariantPointerEXT_buffer),
967+MAGIC_MACRO(_glGetError_fake),
968+MAGIC_MACRO(_glReadPixels_pbo),
969+MAGIC_MACRO(_glDrawPixels_pbo),
970+MAGIC_MACRO(_glMapBufferARB_fake),
971+MAGIC_MACRO(_glSelectBuffer_fake),
972+MAGIC_MACRO(_glGetSelectBuffer_fake),
973+MAGIC_MACRO(_glFeedbackBuffer_fake),
974+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
975Index: qemu-0.12.4/target-i386/helper.c
976===================================================================
977--- qemu-0.12.4.orig/target-i386/helper.c
978+++ qemu-0.12.4/target-i386/helper.c
979@@ -1435,7 +1435,7 @@ target_phys_addr_t cpu_get_phys_page_deb
980 }
981
982 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
983- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
984+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
985 return paddr;
986 }
987
988Index: qemu-0.12.4/target-i386/helper.h
989===================================================================
990--- qemu-0.12.4.orig/target-i386/helper.h
991+++ qemu-0.12.4/target-i386/helper.h
992@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
993 DEF_HELPER_2(rcrq, tl, tl, tl)
994 #endif
995
996+DEF_HELPER_0(opengl, void)
997+
998 #include "def-helper.h"
999Index: qemu-0.12.4/target-i386/helper_opengl.c
1000===================================================================
1001--- /dev/null
1002+++ qemu-0.12.4/target-i386/helper_opengl.c
1003@@ -0,0 +1,1207 @@
1004+/*
1005+ * Host-side implementation of GL/GLX API
1006+ *
1007+ * Copyright (c) 2006,2007 Even Rouault
1008+ *
1009+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1010+ * of this software and associated documentation files (the "Software"), to deal
1011+ * in the Software without restriction, including without limitation the rights
1012+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1013+ * copies of the Software, and to permit persons to whom the Software is
1014+ * furnished to do so, subject to the following conditions:
1015+ *
1016+ * The above copyright notice and this permission notice shall be included in
1017+ * all copies or substantial portions of the Software.
1018+ *
1019+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1020+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1021+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1022+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1023+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1024+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1025+ * THE SOFTWARE.
1026+ */
1027+#define _XOPEN_SOURCE 600
1028+#include <string.h>
1029+#include <stdlib.h>
1030+#include <assert.h>
1031+
1032+#include <X11/Xlib.h>
1033+#include <X11/Xutil.h>
1034+
1035+#include "exec.h"
1036+
1037+#if defined(CONFIG_USER_ONLY)
1038+void helper_opengl(void)
1039+{
1040+ /* TODO */
1041+}
1042+#else
1043+
1044+#include "opengl_func.h"
1045+
1046+#define ENABLE_GL_LOG
1047+
1048+extern FILE *stderr;
1049+
1050+extern void init_process_tab(void);
1051+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
1052+
1053+extern void sdl_set_opengl_window(int x, int y, int width, int height);
1054+
1055+static int last_process_id = 0;
1056+static int must_save = 0;
1057+
1058+static int allow_kernel = 0;
1059+
1060+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
1061+{
1062+ int is_user, index;
1063+
1064+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
1065+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
1066+ /* A sanity check for the int0x99 case */
1067+ if (unlikely(is_user == 0 && !allow_kernel)) {
1068+ fprintf(stderr, "not in userland !!!\n");
1069+ return NULL;
1070+ }
1071+ if (__builtin_expect
1072+ (env->tlb_table[is_user][index].addr_code !=
1073+ (addr & TARGET_PAGE_MASK), 0)) {
1074+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
1075+
1076+ if (ret == -1) {
1077+ fprintf(stderr,
1078+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1079+ TARGET_FMT_lx "\n", addr, ret);
1080+ fprintf(stderr,
1081+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
1082+ TARGET_FMT_lx ")\n", addr,
1083+ env->tlb_table[is_user][index].addr_code,
1084+ addr & TARGET_PAGE_MASK);
1085+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
1086+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
1087+ return NULL;
1088+ } else {
1089+ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
1090+ return qemu_get_ram_ptr(ret +
1091+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
1092+ } else {
1093+ fprintf(stderr,
1094+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1095+ TARGET_FMT_lx "\n", addr, ret);
1096+ fprintf(stderr,
1097+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
1098+ "\n", ret, (target_ulong) last_ram_offset);
1099+ return NULL;
1100+ }
1101+ }
1102+ } else
1103+ return (void *) (addr + env->tlb_table[is_user][index].addend);
1104+}
1105+
1106+#ifndef MIN
1107+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
1108+#endif
1109+
1110+enum {
1111+ NOT_MAPPED,
1112+ MAPPED_CONTIGUOUS,
1113+ MAPPED_NOT_CONTIGUOUS
1114+};
1115+
1116+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1117+
1118+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1119+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1120+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1121+static int get_target_mem_state(const CPUState *env,
1122+ target_ulong target_addr, int len)
1123+{
1124+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1125+ int to_end_page =
1126+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1127+ int ret = MAPPED_CONTIGUOUS;
1128+
1129+ if (aligned_target_addr != target_addr) {
1130+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1131+ void *last_phys_addr = phys_addr;
1132+
1133+ if (phys_addr == 0) {
1134+ return NOT_MAPPED;
1135+ }
1136+ if (len > to_end_page) {
1137+ len -= to_end_page;
1138+ aligned_target_addr += TARGET_PAGE_SIZE;
1139+ int i;
1140+
1141+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1142+ void *phys_addr =
1143+ get_phys_mem_addr(env, aligned_target_addr + i);
1144+ if (phys_addr == 0) {
1145+ return NOT_MAPPED;
1146+ }
1147+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1148+ ret = MAPPED_NOT_CONTIGUOUS;
1149+ last_phys_addr = phys_addr;
1150+ }
1151+ }
1152+ } else {
1153+ void *last_phys_addr = NULL;
1154+ int i;
1155+
1156+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1157+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1158+
1159+ if (phys_addr == 0) {
1160+ return NOT_MAPPED;
1161+ }
1162+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1163+ ret = MAPPED_NOT_CONTIGUOUS;
1164+ last_phys_addr = phys_addr;
1165+ }
1166+ }
1167+ return ret;
1168+}
1169+
1170+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1171+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1172+static int memcpy_host_to_target(const CPUState *env,
1173+ target_ulong target_addr,
1174+ const void *host_addr, int len)
1175+{
1176+ int i;
1177+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1178+ int to_end_page =
1179+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1180+ int ret = get_target_mem_state(env, target_addr, len);
1181+
1182+ if (ret == NOT_MAPPED) {
1183+ return 0;
1184+ }
1185+
1186+ if (ret == MAPPED_CONTIGUOUS) {
1187+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1188+
1189+ memcpy(phys_addr, host_addr, len);
1190+ } else {
1191+ if (aligned_target_addr != target_addr) {
1192+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1193+
1194+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1195+ if (len <= to_end_page) {
1196+ return 1;
1197+ }
1198+ len -= to_end_page;
1199+ host_addr += to_end_page;
1200+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1201+ }
1202+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1203+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1204+
1205+ memcpy(phys_addr, host_addr + i,
1206+ (i + TARGET_PAGE_SIZE <=
1207+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1208+ }
1209+ }
1210+
1211+ return 1;
1212+}
1213+
1214+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1215+ target_ulong target_addr, int len)
1216+{
1217+ int i;
1218+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1219+ int to_end_page =
1220+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1221+ int ret = get_target_mem_state(env, target_addr, len);
1222+
1223+ if (ret == NOT_MAPPED) {
1224+ return 0;
1225+ }
1226+
1227+ if (ret == MAPPED_CONTIGUOUS) {
1228+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1229+
1230+ memcpy(host_addr, phys_addr, len);
1231+ } else {
1232+ if (aligned_target_addr != target_addr) {
1233+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1234+
1235+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1236+ if (len <= to_end_page)
1237+ return 1;
1238+
1239+ len -= to_end_page;
1240+ host_addr += to_end_page;
1241+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1242+ }
1243+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1244+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1245+
1246+ memcpy(host_addr + i, phys_addr,
1247+ (i + TARGET_PAGE_SIZE <=
1248+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1249+ }
1250+ }
1251+
1252+ return 1;
1253+}
1254+
1255+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1256+ target_ulong target_addr, int nb_args)
1257+{
1258+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1259+}
1260+
1261+static int wordsize = 0;
1262+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1263+ target_ulong target_addr, int nb_args) =
1264+ memcpy_target_to_host_1_1;
1265+
1266+void do_disconnect_current(void);
1267+void do_context_switch(Display *dpy, pid_t pid, int call);
1268+
1269+static void disconnect_current(void)
1270+{
1271+ last_process_id = 0;
1272+
1273+ return do_disconnect_current();
1274+}
1275+
1276+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1277+ target_ulong target_addr, int nb_args)
1278+{
1279+ int ret;
1280+ uint32_t args_temp[nb_args], *src = args_temp;
1281+ arg_t *dest = host_addr;
1282+
1283+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1284+ if (!ret)
1285+ return ret;
1286+
1287+ while (nb_args) {
1288+ /* TODO: endianness */
1289+ *dest = 0;
1290+ *(uint32_t *) (dest++) = *src++;
1291+ nb_args--;
1292+ }
1293+
1294+ return ret;
1295+}
1296+
1297+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1298+ target_ulong target_addr, int nb_args)
1299+{
1300+ int ret;
1301+ uint64_t args_temp[nb_args], *src = args_temp;
1302+ arg_t *dest = host_addr;
1303+
1304+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1305+ if (!ret)
1306+ return ret;
1307+
1308+ while (nb_args) {
1309+ /* TODO: endianness */
1310+ *dest = 0;
1311+ *(uint64_t *) (dest++) = *src++;
1312+ nb_args--;
1313+ }
1314+
1315+ return ret;
1316+}
1317+
1318+static int host_offset = 0;
1319+static void reset_host_offset()
1320+{
1321+ host_offset = 0;
1322+}
1323+
1324+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1325+/* Do not free or modify */
1326+static const void *get_host_read_pointer(const CPUState *env,
1327+ const target_ulong target_addr, int len)
1328+{
1329+ int ret = get_target_mem_state(env, target_addr, len);
1330+
1331+ if (ret == NOT_MAPPED) {
1332+ return NULL;
1333+ } else if (ret == MAPPED_CONTIGUOUS) {
1334+ return get_phys_mem_addr(env, target_addr);
1335+ } else {
1336+ static int host_mem_size = 0;
1337+ static void *host_mem = NULL;
1338+ static void *ret;
1339+
1340+ if (host_mem_size < host_offset + len) {
1341+ host_mem_size = 2 * host_mem_size + host_offset + len;
1342+ host_mem = realloc(host_mem, host_mem_size);
1343+ }
1344+ ret = host_mem + host_offset;
1345+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1346+ host_offset += len;
1347+ return ret;
1348+ }
1349+}
1350+
1351+int doing_opengl = 0;
1352+static int last_func_number = -1;
1353+static size_t(*my_strlen) (const char *) = NULL;
1354+
1355+#ifdef ENABLE_GL_LOG
1356+static FILE *f = NULL;
1357+static int logger_pid = 0;
1358+
1359+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1360+
1361+void write_gl_debug_cmd_int(int my_int)
1362+{
1363+ write_gl_debug_init();
1364+ fwrite(&my_int, sizeof(int), 1, f);
1365+ fflush(f);
1366+}
1367+
1368+void write_gl_debug_cmd_short(short my_int)
1369+{
1370+ write_gl_debug_init();
1371+ fwrite(&my_int, sizeof(short), 1, f);
1372+ fflush(f);
1373+}
1374+
1375+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1376+{
1377+ write_gl_debug_init();
1378+ fwrite(&size, sizeof(int), 1, f);
1379+ if (size)
1380+ fwrite(buffer, size, 1, f);
1381+}
1382+
1383+static void inline write_gl_debug_cmd_buffer_without_size(
1384+ int size, void *buffer)
1385+{
1386+ write_gl_debug_init();
1387+ if (size)
1388+ fwrite(buffer, size, 1, f);
1389+}
1390+
1391+void write_gl_debug_end(void)
1392+{
1393+ write_gl_debug_init();
1394+ fclose(f);
1395+ f = NULL;
1396+ logger_pid = 0;
1397+ must_save = 0;
1398+}
1399+
1400+static inline int is_logging(int pid)
1401+{
1402+ return must_save && pid == logger_pid;
1403+}
1404+#endif
1405+
1406+#include <dlfcn.h>
1407+#include <signal.h>
1408+
1409+static void (*anticrash_handler) (void *) = NULL;
1410+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1411+
1412+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1413+{
1414+ static int counter = 0;
1415+
1416+ counter++;
1417+
1418+ printf("oops\n");
1419+
1420+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1421+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1422+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1423+ anticrash_handler(ptr);
1424+
1425+ counter--;
1426+}
1427+
1428+static int decode_call_int(CPUState *env, int func_number, int pid,
1429+ target_ulong target_ret_string,
1430+ target_ulong in_args, target_ulong in_args_size)
1431+{
1432+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1433+ int ret_type = signature->ret_type;
1434+ /* int has_out_parameters = signature->has_out_parameters; */
1435+ int nb_args = signature->nb_args;
1436+ int *args_type = signature->args_type;
1437+ int i;
1438+ int ret;
1439+ int *args_size = NULL;
1440+ target_ulong saved_out_ptr[50];
1441+ static char *ret_string = NULL;
1442+ static arg_t args[50];
1443+ static Display *dpy = NULL;
1444+
1445+ if (dpy == NULL) {
1446+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1447+
1448+ if (handle) {
1449+ anticrash_handler = dlsym(handle, "anticrash_handler");
1450+ if (anticrash_handler) {
1451+ fprintf(stderr, "anticrash handler enabled\n");
1452+ struct sigaction sigsegv_action;
1453+ struct sigaction old_sigsegv_action;
1454+
1455+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1456+ sigemptyset(&(sigsegv_action.sa_mask));
1457+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1458+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1459+ }
1460+ }
1461+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1462+ if (handle) {
1463+ show_stack_from_signal_handler =
1464+ dlsym(handle, "show_stack_from_signal_handler");
1465+ }
1466+
1467+ dpy = XOpenDisplay(NULL);
1468+ init_process_tab();
1469+ ret_string = malloc(32768);
1470+ my_strlen = strlen;
1471+ }
1472+
1473+ if (unlikely(last_func_number == _exit_process_func &&
1474+ func_number == _exit_process_func)) {
1475+ last_func_number = -1;
1476+ return 0;
1477+ }
1478+
1479+ if (last_process_id != pid) {
1480+ do_context_switch(dpy, pid, func_number);
1481+ last_process_id = pid;
1482+ }
1483+
1484+ if (unlikely(func_number == _exit_process_func))
1485+ last_process_id = 0;
1486+
1487+ if (!wordsize) {
1488+ if (func_number == _init32_func || func_number == _init64_func) {
1489+ if (func_number == _init32_func) {
1490+ wordsize = 32;
1491+ argcpy_target_to_host = memcpy_target32_to_host;
1492+ } else {
1493+ wordsize = 64;
1494+ argcpy_target_to_host = memcpy_target64_to_host;
1495+ }
1496+ } else
1497+ fprintf(stderr, "commands submitted before initialisation done\n");
1498+ }
1499+
1500+ reset_host_offset();
1501+
1502+ if (nb_args) {
1503+
1504+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1505+ fprintf(stderr, "call %s pid=%d\n",
1506+ tab_opengl_calls_name[func_number], pid);
1507+ fprintf(stderr, "cannot get call parameters\n");
1508+ disconnect_current();
1509+ return 0;
1510+ }
1511+
1512+ args_size =
1513+ (int *) get_host_read_pointer(env, in_args_size,
1514+ sizeof(int) * nb_args);
1515+ if (args_size == NULL) {
1516+ fprintf(stderr, "call %s pid=%d\n",
1517+ tab_opengl_calls_name[func_number], pid);
1518+ fprintf(stderr, "cannot get call parameters size\n");
1519+ disconnect_current();
1520+ return 0;
1521+ }
1522+ }
1523+
1524+ if (func_number == _serialized_calls_func) {
1525+ int command_buffer_size = args_size[0];
1526+ const void *command_buffer =
1527+ get_host_read_pointer(env, args[0], command_buffer_size);
1528+ int commmand_buffer_offset = 0;
1529+
1530+ args_size = NULL;
1531+#ifdef ENABLE_GL_LOG
1532+ if (is_logging(pid))
1533+ write_gl_debug_cmd_short(_serialized_calls_func);
1534+#endif
1535+
1536+ while (commmand_buffer_offset < command_buffer_size) {
1537+ func_number =
1538+ *(short *) (command_buffer + commmand_buffer_offset);
1539+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1540+ fprintf(stderr,
1541+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1542+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1543+ commmand_buffer_offset, command_buffer_size);
1544+ return 0;
1545+ }
1546+ commmand_buffer_offset += sizeof(short);
1547+#ifdef ENABLE_GL_LOG
1548+ if (is_logging(pid))
1549+ write_gl_debug_cmd_short(func_number);
1550+#endif
1551+
1552+ signature = (Signature *) tab_opengl_calls[func_number];
1553+ ret_type = signature->ret_type;
1554+ assert(ret_type == TYPE_NONE);
1555+ nb_args = signature->nb_args;
1556+ args_type = signature->args_type;
1557+
1558+ for (i = 0; i < nb_args; i++) {
1559+ switch (args_type[i]) {
1560+ case TYPE_UNSIGNED_INT:
1561+ case TYPE_INT:
1562+ case TYPE_UNSIGNED_CHAR:
1563+ case TYPE_CHAR:
1564+ case TYPE_UNSIGNED_SHORT:
1565+ case TYPE_SHORT:
1566+ case TYPE_FLOAT:
1567+ {
1568+ args[i] =
1569+ *(int *) (command_buffer +
1570+ commmand_buffer_offset);
1571+#ifdef ENABLE_GL_LOG
1572+ if (is_logging(pid))
1573+ write_gl_debug_cmd_int(args[i]);
1574+#endif
1575+ commmand_buffer_offset += sizeof(int);
1576+ break;
1577+ }
1578+
1579+ case TYPE_NULL_TERMINATED_STRING:
1580+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1581+ {
1582+ int arg_size =
1583+ *(int *) (command_buffer +
1584+ commmand_buffer_offset);
1585+ commmand_buffer_offset += sizeof(int);
1586+
1587+ if (arg_size == 0) {
1588+ args[i] = 0;
1589+ } else {
1590+ args[i] =
1591+ (long) (command_buffer +
1592+ commmand_buffer_offset);
1593+ }
1594+
1595+ if (args[i] == 0) {
1596+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1597+ fprintf(stderr, "call %s arg %d pid=%d\n",
1598+ tab_opengl_calls_name[func_number], i,
1599+ pid);
1600+ disconnect_current();
1601+ return 0;
1602+ }
1603+ } else {
1604+ if (arg_size == 0) {
1605+ fprintf(stderr, "call %s arg %d pid=%d\n",
1606+ tab_opengl_calls_name[func_number], i,
1607+ pid);
1608+ fprintf(stderr, "args_size[i] == 0 !!\n");
1609+ disconnect_current();
1610+ return 0;
1611+ }
1612+ }
1613+#ifdef ENABLE_GL_LOG
1614+ if (is_logging(pid))
1615+ write_gl_debug_cmd_buffer_with_size(arg_size,
1616+ (void *)
1617+ args[i]);
1618+#endif
1619+ commmand_buffer_offset += arg_size;
1620+
1621+ break;
1622+ }
1623+
1624+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1625+ {
1626+ int arg_size =
1627+ compute_arg_length(stderr, func_number, i, args);
1628+ args[i] =
1629+ (arg_size) ? (long) (command_buffer +
1630+ commmand_buffer_offset) : 0;
1631+#ifdef ENABLE_GL_LOG
1632+ if (is_logging(pid))
1633+ write_gl_debug_cmd_buffer_without_size(arg_size,
1634+ (void *)
1635+ args[i]);
1636+#endif
1637+ commmand_buffer_offset += arg_size;
1638+ break;
1639+ }
1640+
1641+ CASE_OUT_POINTERS:
1642+ {
1643+ fprintf(stderr,
1644+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1645+ tab_opengl_calls_name[func_number], i, pid);
1646+ disconnect_current();
1647+ return 0;
1648+ }
1649+
1650+ case TYPE_DOUBLE:
1651+ CASE_IN_KNOWN_SIZE_POINTERS:
1652+ args[i] =
1653+ (long) (command_buffer + commmand_buffer_offset);
1654+#ifdef ENABLE_GL_LOG
1655+ if (is_logging(pid))
1656+ write_gl_debug_cmd_buffer_without_size(
1657+ tab_args_type_length[args_type[i]],
1658+ (void *) args[i]);
1659+#endif
1660+ commmand_buffer_offset +=
1661+ tab_args_type_length[args_type[i]];
1662+ break;
1663+
1664+ case TYPE_IN_IGNORED_POINTER:
1665+ args[i] = 0;
1666+ break;
1667+
1668+ default:
1669+ fprintf(stderr,
1670+ "shouldn't happen : call %s arg %d pid=%d\n",
1671+ tab_opengl_calls_name[func_number], i, pid);
1672+ disconnect_current();
1673+ return 0;
1674+ }
1675+ }
1676+ do_function_call(func_number, args, ret_string);
1677+ }
1678+
1679+ ret = 0;
1680+ } else {
1681+#ifdef ENABLE_GL_LOG
1682+ if (is_logging(pid))
1683+ write_gl_debug_cmd_short(func_number);
1684+#endif
1685+
1686+ for (i = 0; i < nb_args; i++) {
1687+ switch (args_type[i]) {
1688+ case TYPE_UNSIGNED_INT:
1689+ case TYPE_INT:
1690+ case TYPE_UNSIGNED_CHAR:
1691+ case TYPE_CHAR:
1692+ case TYPE_UNSIGNED_SHORT:
1693+ case TYPE_SHORT:
1694+ case TYPE_FLOAT:
1695+#ifdef ENABLE_GL_LOG
1696+ if (is_logging(pid))
1697+ write_gl_debug_cmd_int(args[i]);
1698+#endif
1699+ break;
1700+
1701+ case TYPE_NULL_TERMINATED_STRING:
1702+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1703+ if (args[i] == 0 && args_size[i] == 0) {
1704+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1705+ fprintf(stderr, "call %s arg %d pid=%d\n",
1706+ tab_opengl_calls_name[func_number], i, pid);
1707+ disconnect_current();
1708+ return 0;
1709+ }
1710+ } else if (args[i] == 0 && args_size[i] != 0) {
1711+ fprintf(stderr, "call %s arg %d pid=%d\n",
1712+ tab_opengl_calls_name[func_number], i, pid);
1713+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1714+ disconnect_current();
1715+ return 0;
1716+ } else if (args[i] != 0 && args_size[i] == 0) {
1717+ fprintf(stderr, "call %s arg %d pid=%d\n",
1718+ tab_opengl_calls_name[func_number], i, pid);
1719+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1720+ disconnect_current();
1721+ return 0;
1722+ }
1723+ if (args[i]) {
1724+ args[i] =
1725+ (arg_t) get_host_read_pointer(env, args[i],
1726+ args_size[i]);
1727+ if (args[i] == 0) {
1728+ fprintf(stderr, "call %s arg %d pid=%d\n",
1729+ tab_opengl_calls_name[func_number], i, pid);
1730+ fprintf(stderr, "can not get %d bytes\n",
1731+ args_size[i]);
1732+ disconnect_current();
1733+ return 0;
1734+ }
1735+ }
1736+#ifdef ENABLE_GL_LOG
1737+ if (is_logging(pid))
1738+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1739+ (void *) args[i]);
1740+#endif
1741+ break;
1742+
1743+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1744+ {
1745+ args_size[i] =
1746+ compute_arg_length(stderr, func_number, i, args);
1747+ args[i] = (args_size[i]) ? (arg_t)
1748+ get_host_read_pointer(env,
1749+ args[i], args_size [i]) : 0;
1750+ if (args[i] == 0 && args_size[i] != 0) {
1751+ fprintf(stderr, "call %s arg %d pid=%d\n",
1752+ tab_opengl_calls_name[func_number], i, pid);
1753+ fprintf(stderr, "can not get %d bytes\n",
1754+ args_size[i]);
1755+ disconnect_current();
1756+ return 0;
1757+ }
1758+#ifdef ENABLE_GL_LOG
1759+ if (is_logging(pid))
1760+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1761+ (void *) args[i]);
1762+#endif
1763+ break;
1764+ }
1765+
1766+ CASE_OUT_POINTERS:
1767+ {
1768+ int mem_state;
1769+
1770+#ifdef ENABLE_GL_LOG
1771+ if (is_logging(pid))
1772+ switch (args_type[i]) {
1773+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1774+ write_gl_debug_cmd_int(args_size[i]);
1775+ break;
1776+
1777+ default:
1778+ break;
1779+ }
1780+#endif
1781+
1782+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1783+ saved_out_ptr[i] = 0;
1784+ continue;
1785+ }
1786+ if (args[i] == 0 && args_size[i] == 0) {
1787+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1788+ fprintf(stderr, "call %s arg %d pid=%d\n",
1789+ tab_opengl_calls_name[func_number], i,
1790+ pid);
1791+ disconnect_current();
1792+ return 0;
1793+ }
1794+ fprintf(stderr, "call %s arg %d pid=%d\n",
1795+ tab_opengl_calls_name[func_number], i, pid);
1796+ disconnect_current();
1797+ return 0;
1798+ } else if (args[i] == 0 && args_size[i] != 0) {
1799+ fprintf(stderr, "call %s arg %d pid=%d\n",
1800+ tab_opengl_calls_name[func_number], i, pid);
1801+ fprintf(stderr,
1802+ "args[i] == 0 && args_size[i] != 0 !!\n");
1803+ disconnect_current();
1804+ return 0;
1805+ } else if (args[i] != 0 && args_size[i] == 0) {
1806+ fprintf(stderr, "call %s arg %d pid=%d\n",
1807+ tab_opengl_calls_name[func_number], i, pid);
1808+ fprintf(stderr,
1809+ "args[i] != 0 && args_size[i] == 0 !!\n");
1810+ disconnect_current();
1811+ return 0;
1812+ }
1813+ if (args[i]) {
1814+ mem_state =
1815+ get_target_mem_state(env, args[i], args_size[i]);
1816+ if (mem_state == NOT_MAPPED) {
1817+ fprintf(stderr,
1818+ "call %s arg %d pid=%d addr="
1819+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1820+ tab_opengl_calls_name[func_number], i,
1821+ pid, args[i], args_size[i]);
1822+ disconnect_current();
1823+ return 0;
1824+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1825+ saved_out_ptr[i] = 0;
1826+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1827+ } else {
1828+ saved_out_ptr[i] = args[i];
1829+ args[i] = (arg_t) malloc(args_size[i]);
1830+ }
1831+ } else {
1832+ saved_out_ptr[i] = 0;
1833+ }
1834+ break;
1835+ }
1836+
1837+ case TYPE_DOUBLE:
1838+ CASE_IN_KNOWN_SIZE_POINTERS:
1839+ if (args[i] == 0) {
1840+ fprintf(stderr, "call %s arg %d pid=%d\n",
1841+ tab_opengl_calls_name[func_number], i, pid);
1842+ fprintf(stderr, "can not get %d bytes\n",
1843+ tab_args_type_length[args_type[i]]);
1844+ disconnect_current();
1845+ return 0;
1846+ }
1847+ args[i] = (arg_t) get_host_read_pointer(env,
1848+ args[i], tab_args_type_length[args_type[i]]);
1849+ if (args[i] == 0) {
1850+ fprintf(stderr, "call %s arg %d pid=%d\n",
1851+ tab_opengl_calls_name[func_number], i, pid);
1852+ fprintf(stderr, "can not get %d bytes\n",
1853+ tab_args_type_length[args_type[i]]);
1854+ disconnect_current();
1855+ return 0;
1856+ }
1857+#ifdef ENABLE_GL_LOG
1858+ if (is_logging(pid))
1859+ write_gl_debug_cmd_buffer_without_size
1860+ (tab_args_type_length[args_type[i]],
1861+ (void *) args[i]);
1862+#endif
1863+ break;
1864+
1865+ case TYPE_IN_IGNORED_POINTER:
1866+ args[i] = 0;
1867+ break;
1868+
1869+ default:
1870+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1871+ tab_opengl_calls_name[func_number], i, pid);
1872+ disconnect_current();
1873+ return 0;
1874+ }
1875+ }
1876+
1877+ if (ret_type == TYPE_CONST_CHAR) {
1878+ ret_string[0] = 0;
1879+ }
1880+
1881+ if (func_number == _init32_func || func_number == _init64_func) {
1882+ if (func_number == _init32_func) {
1883+ if (wordsize != 32) {
1884+ fprintf(stderr,
1885+ "clients with different ABIs not supported\n");
1886+ exit(-1);
1887+ }
1888+ } else {
1889+ if (wordsize != 64) {
1890+ fprintf(stderr,
1891+ "clients with different ABIs not supported\n");
1892+ exit(-1);
1893+ }
1894+ }
1895+
1896+ if (must_save && args[0])
1897+ fprintf(stderr, "error: pid %i is already recording\n",
1898+ logger_pid);
1899+ else if (args[0]) {
1900+ logger_pid = pid;
1901+ must_save = 1;
1902+ }
1903+#ifdef USE_KQEMU
1904+ if (env->kqemu_enabled)
1905+ *(int *) args[1] = 2;
1906+ else
1907+#endif
1908+ *(int *) args[1] = 1;
1909+ ret = 0;
1910+ } else {
1911+ ret = do_function_call(func_number, args, ret_string);
1912+ }
1913+#ifdef ENABLE_GL_LOG
1914+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1915+ write_gl_debug_cmd_int(ret);
1916+#endif
1917+ for (i = 0; i < nb_args; i++) {
1918+ switch (args_type[i]) {
1919+ CASE_OUT_POINTERS:
1920+ {
1921+ if (saved_out_ptr[i]) {
1922+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1923+ (void *) args[i],
1924+ args_size[i]) == 0) {
1925+ fprintf(stderr, "could not copy out parameters "
1926+ "back to user space\n");
1927+ disconnect_current();
1928+ return 0;
1929+ }
1930+ free((void *) args[i]);
1931+ }
1932+ break;
1933+ }
1934+
1935+ default:
1936+ break;
1937+ }
1938+ }
1939+
1940+ if (ret_type == TYPE_CONST_CHAR)
1941+ if (target_ret_string) {
1942+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1943+ * using directly strlen... */
1944+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1945+ my_strlen(ret_string) + 1) == 0) {
1946+ fprintf(stderr, "cannot copy out parameters "
1947+ "back to user space\n");
1948+ disconnect_current();
1949+ return 0;
1950+ }
1951+ }
1952+ }
1953+
1954+#ifdef ENABLE_GL_LOG
1955+ if (is_logging(pid) && func_number == _exit_process_func) {
1956+ write_gl_debug_end();
1957+ }
1958+#endif
1959+
1960+ return ret;
1961+}
1962+
1963+static int decode_call(CPUState *env, int func_number, int pid,
1964+ target_ulong target_ret_string, target_ulong in_args,
1965+ target_ulong in_args_size)
1966+{
1967+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1968+ fprintf(stderr,
1969+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1970+ return 0;
1971+ }
1972+
1973+ return decode_call_int(env, func_number, pid,
1974+ target_ret_string, in_args, in_args_size);
1975+}
1976+
1977+#define env first_cpu
1978+
1979+void helper_opengl(void)
1980+{
1981+ doing_opengl = 1;
1982+ env->regs[R_EAX] =
1983+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1984+ env->regs[R_EDX], env->regs[R_ESI]);
1985+ doing_opengl = 0;
1986+}
1987+
1988+void mem_opengl(uint64_t ptr)
1989+{
1990+ uint64_t *params = get_phys_mem_addr(env, ptr);
1991+ int ret;
1992+
1993+ /* Execute */
1994+ doing_opengl = 1;
1995+ ret = decode_call(env, le64_to_cpu(params[0]),
1996+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
1997+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
1998+ doing_opengl = 0;
1999+
2000+ params[0] = cpu_to_le64(ret);
2001+ params[5] = 0;
2002+}
2003+
2004+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
2005+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
2006+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
2007+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
2008+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
2009+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
2010+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
2011+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
2012+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
2013+#define CRED_CAPINH_OFFSET 0x28
2014+#define CRED_CAPPER_OFFSET 0x30
2015+#define CRED_CAPEFF_OFFSET 0x38
2016+#define CRED_CAPBST_OFFSET 0x40
2017+/* How to obtain the numbers:
2018+ * $ gbd vmlinux
2019+ * ...
2020+ * (gdb) print &((struct task_struct *) 0)->real_cred
2021+ * $22 = (const struct cred **) 0x29c
2022+ * (gdb) print &((struct task_struct *) 0)->cred
2023+ * $23 = (const struct cred **) 0x2a0
2024+ * (gbd) ...
2025+ * ...
2026+ * (gdb) ^D
2027+ * $ vim target-i386/helper_opengl.c
2028+ * ...
2029+ * :wq
2030+ * $ make
2031+ * ...
2032+ *
2033+ * Testing:
2034+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2035+ * ^Z
2036+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2037+ * $ bg
2038+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2039+ * $ gdb
2040+ * ...
2041+ * (gdb) target remote localhost:1234
2042+ * ...
2043+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
2044+ * 0x2c0
2045+ * $9 = 0xc094062c "swapper"
2046+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
2047+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
2048+ * $10 = 0xdf87cee0 "init"
2049+ * ...
2050+ */
2051+
2052+#define CAP_SYS_RAWIO 17
2053+
2054+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
2055+static ram_addr_t x86_current_thread(void)
2056+{
2057+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
2058+}
2059+
2060+static ram_addr_t x86_current_task(void)
2061+{
2062+ return *(uint32_t *) get_phys_mem_addr(env,
2063+ x86_current_thread() + THREADINFO_TASK_OFFSET);
2064+}
2065+
2066+static ram_addr_t x86_current_io_ctx(void)
2067+{
2068+ return *(uint32_t *) get_phys_mem_addr(env,
2069+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
2070+}
2071+
2072+static ram_addr_t x86_task_name(ram_addr_t proc)
2073+{
2074+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
2075+}
2076+
2077+static ram_addr_t x86_task_next(ram_addr_t proc)
2078+{
2079+ return *(uint32_t *) get_phys_mem_addr(env,
2080+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
2081+ TASKSTRUCT_NEXT_OFFSET;
2082+}
2083+
2084+static void x86_cap_set(ram_addr_t caps, int cap)
2085+{
2086+ int offset = cap >> 5;
2087+ int mask = 1 << (cap & 31);
2088+
2089+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
2090+}
2091+
2092+static void x86_cred_cap_set(ram_addr_t creds, int cap)
2093+{
2094+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
2095+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
2096+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
2097+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
2098+}
2099+
2100+static void x86_task_cap_set(ram_addr_t proc, int cap)
2101+{
2102+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2103+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
2104+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2105+ proc + TASKSTRUCT_CRED_OFFSET), cap);
2106+}
2107+
2108+#include "kvm.h"
2109+
2110+/* The putting and getting of the register set seems to incure a too
2111+ * high overhead. It's at least 4 ioctl's each. */
2112+#if 0
2113+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2114+{
2115+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2116+ if (val == (uint8_t) -1)
2117+ return;
2118+
2119+ if (kvm_enabled())
2120+ kvm_arch_get_registers(env);
2121+ doing_opengl = 1;
2122+ env->regs[R_EAX] =
2123+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2124+ env->regs[R_ESI], env->regs[R_EDI]);
2125+ doing_opengl = 0;
2126+ if (kvm_enabled())
2127+ kvm_arch_put_registers(env);
2128+}
2129+#else
2130+static void get_regs(void)
2131+{
2132+ /* We only really need the eflags and cr[0..4] */
2133+ if (kvm_enabled())
2134+ kvm_get_sregs(env);
2135+}
2136+
2137+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2138+{
2139+ uint64_t *params;
2140+ int ret;
2141+
2142+ /* Only need to fetch the registers after a guest's context switch...
2143+ * the problem is, to find out about context switches we already need
2144+ * to fetch rsp
2145+ * TODO: pass the pid in val. the params pointer doesn't need to be
2146+ * passed on all calls because it can be a global and be constant.
2147+ */
2148+ get_regs();
2149+
2150+ params = get_phys_mem_addr(env, (target_ulong) val);
2151+
2152+ /* Execute */
2153+ doing_opengl = 1;
2154+ ret = decode_call(env, le64_to_cpu(params[0]),
2155+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2156+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2157+ doing_opengl = 0;
2158+
2159+ params[0] = cpu_to_le64(ret);
2160+ params[5] = 0;
2161+}
2162+#endif
2163+
2164+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2165+{
2166+ if (val != (uint32_t) -1)
2167+ return;
2168+
2169+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2170+
2171+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2172+}
2173+
2174+void io_register(void)
2175+{
2176+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2177+}
2178+
2179+void opengl_process_enable(void)
2180+{
2181+ ram_addr_t task;
2182+ char *name;
2183+ int newlevel = 3;
2184+ uint32_t iopl = newlevel << 12;
2185+ void *ioplptr;
2186+
2187+ if (kvm_enabled())
2188+ kvm_arch_get_registers(env);
2189+ allow_kernel = 1;
2190+
2191+ task = x86_current_task();
2192+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2193+ name = get_phys_mem_addr(env, x86_task_name(task));
2194+
2195+ ioplptr = get_phys_mem_addr(env, task +
2196+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2197+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2198+
2199+ env->eflags &= ~0x3000;
2200+ env->eflags |= newlevel << 12;
2201+
2202+ allow_kernel = 0;
2203+ if (kvm_enabled())
2204+ kvm_arch_put_registers(env);
2205+
2206+ printf("Granted OpenGL access to process '%s'\n", name);
2207+
2208+ io_register();
2209+}
2210+#endif
2211Index: qemu-0.12.4/target-i386/kvm.c
2212===================================================================
2213--- qemu-0.12.4.orig/target-i386/kvm.c
2214+++ qemu-0.12.4/target-i386/kvm.c
2215@@ -529,7 +529,7 @@ static int kvm_get_fpu(CPUState *env)
2216 return 0;
2217 }
2218
2219-static int kvm_get_sregs(CPUState *env)
2220+int kvm_get_sregs(CPUState *env)
2221 {
2222 struct kvm_sregs sregs;
2223 uint32_t hflags;
2224Index: qemu-0.12.4/target-i386/mesa_enums.c
2225===================================================================
2226--- /dev/null
2227+++ qemu-0.12.4/target-i386/mesa_enums.c
2228@@ -0,0 +1,4890 @@
2229+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2230+
2231+/*
2232+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2233+ * All Rights Reserved.
2234+ *
2235+ * Permission is hereby granted, free of charge, to any person obtaining a
2236+ * copy of this software and associated documentation files (the "Software"),
2237+ * to deal in the Software without restriction, including without limitation
2238+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2239+ * and/or sell copies of the Software, and to permit persons to whom the
2240+ * Software is furnished to do so, subject to the following conditions:
2241+ *
2242+ * The above copyright notice and this permission notice (including the next
2243+ * paragraph) shall be included in all copies or substantial portions of the
2244+ * Software.
2245+ *
2246+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2247+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2248+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2249+ * BRIAN PAUL,
2250+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2251+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2252+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2253+ * SOFTWARE.
2254+ */
2255+
2256+#include "glheader.h"
2257+#include "enums.h"
2258+#include "imports.h"
2259+
2260+typedef struct {
2261+ size_t offset;
2262+ int n;
2263+} enum_elt;
2264+
2265+LONGSTRING static const char enum_string_table[] =
2266+ "GL_2D\0"
2267+ "GL_2_BYTES\0"
2268+ "GL_3D\0"
2269+ "GL_3D_COLOR\0"
2270+ "GL_3D_COLOR_TEXTURE\0"
2271+ "GL_3_BYTES\0"
2272+ "GL_4D_COLOR_TEXTURE\0"
2273+ "GL_4_BYTES\0"
2274+ "GL_ACCUM\0"
2275+ "GL_ACCUM_ALPHA_BITS\0"
2276+ "GL_ACCUM_BLUE_BITS\0"
2277+ "GL_ACCUM_BUFFER_BIT\0"
2278+ "GL_ACCUM_CLEAR_VALUE\0"
2279+ "GL_ACCUM_GREEN_BITS\0"
2280+ "GL_ACCUM_RED_BITS\0"
2281+ "GL_ACTIVE_ATTRIBUTES\0"
2282+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2283+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2284+ "GL_ACTIVE_TEXTURE\0"
2285+ "GL_ACTIVE_TEXTURE_ARB\0"
2286+ "GL_ACTIVE_UNIFORMS\0"
2287+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2288+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2289+ "GL_ADD\0"
2290+ "GL_ADD_SIGNED\0"
2291+ "GL_ADD_SIGNED_ARB\0"
2292+ "GL_ADD_SIGNED_EXT\0"
2293+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2294+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2295+ "GL_ALL_ATTRIB_BITS\0"
2296+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2297+ "GL_ALPHA\0"
2298+ "GL_ALPHA12\0"
2299+ "GL_ALPHA12_EXT\0"
2300+ "GL_ALPHA16\0"
2301+ "GL_ALPHA16_EXT\0"
2302+ "GL_ALPHA4\0"
2303+ "GL_ALPHA4_EXT\0"
2304+ "GL_ALPHA8\0"
2305+ "GL_ALPHA8_EXT\0"
2306+ "GL_ALPHA_BIAS\0"
2307+ "GL_ALPHA_BITS\0"
2308+ "GL_ALPHA_SCALE\0"
2309+ "GL_ALPHA_TEST\0"
2310+ "GL_ALPHA_TEST_FUNC\0"
2311+ "GL_ALPHA_TEST_REF\0"
2312+ "GL_ALWAYS\0"
2313+ "GL_AMBIENT\0"
2314+ "GL_AMBIENT_AND_DIFFUSE\0"
2315+ "GL_AND\0"
2316+ "GL_AND_INVERTED\0"
2317+ "GL_AND_REVERSE\0"
2318+ "GL_ARRAY_BUFFER\0"
2319+ "GL_ARRAY_BUFFER_ARB\0"
2320+ "GL_ARRAY_BUFFER_BINDING\0"
2321+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2322+ "GL_ATTACHED_SHADERS\0"
2323+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2324+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2325+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2326+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2327+ "GL_ATTRIB_STACK_DEPTH\0"
2328+ "GL_AUTO_NORMAL\0"
2329+ "GL_AUX0\0"
2330+ "GL_AUX1\0"
2331+ "GL_AUX2\0"
2332+ "GL_AUX3\0"
2333+ "GL_AUX_BUFFERS\0"
2334+ "GL_BACK\0"
2335+ "GL_BACK_LEFT\0"
2336+ "GL_BACK_RIGHT\0"
2337+ "GL_BGR\0"
2338+ "GL_BGRA\0"
2339+ "GL_BITMAP\0"
2340+ "GL_BITMAP_TOKEN\0"
2341+ "GL_BLEND\0"
2342+ "GL_BLEND_COLOR\0"
2343+ "GL_BLEND_COLOR_EXT\0"
2344+ "GL_BLEND_DST\0"
2345+ "GL_BLEND_DST_ALPHA\0"
2346+ "GL_BLEND_DST_RGB\0"
2347+ "GL_BLEND_EQUATION\0"
2348+ "GL_BLEND_EQUATION_ALPHA\0"
2349+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2350+ "GL_BLEND_EQUATION_EXT\0"
2351+ "GL_BLEND_EQUATION_RGB_EXT\0"
2352+ "GL_BLEND_SRC\0"
2353+ "GL_BLEND_SRC_ALPHA\0"
2354+ "GL_BLEND_SRC_RGB\0"
2355+ "GL_BLUE\0"
2356+ "GL_BLUE_BIAS\0"
2357+ "GL_BLUE_BITS\0"
2358+ "GL_BLUE_SCALE\0"
2359+ "GL_BOOL\0"
2360+ "GL_BOOL_ARB\0"
2361+ "GL_BOOL_VEC2\0"
2362+ "GL_BOOL_VEC2_ARB\0"
2363+ "GL_BOOL_VEC3\0"
2364+ "GL_BOOL_VEC3_ARB\0"
2365+ "GL_BOOL_VEC4\0"
2366+ "GL_BOOL_VEC4_ARB\0"
2367+ "GL_BUFFER_ACCESS\0"
2368+ "GL_BUFFER_ACCESS_ARB\0"
2369+ "GL_BUFFER_MAPPED\0"
2370+ "GL_BUFFER_MAPPED_ARB\0"
2371+ "GL_BUFFER_MAP_POINTER\0"
2372+ "GL_BUFFER_MAP_POINTER_ARB\0"
2373+ "GL_BUFFER_SIZE\0"
2374+ "GL_BUFFER_SIZE_ARB\0"
2375+ "GL_BUFFER_USAGE\0"
2376+ "GL_BUFFER_USAGE_ARB\0"
2377+ "GL_BYTE\0"
2378+ "GL_C3F_V3F\0"
2379+ "GL_C4F_N3F_V3F\0"
2380+ "GL_C4UB_V2F\0"
2381+ "GL_C4UB_V3F\0"
2382+ "GL_CCW\0"
2383+ "GL_CLAMP\0"
2384+ "GL_CLAMP_TO_BORDER\0"
2385+ "GL_CLAMP_TO_BORDER_ARB\0"
2386+ "GL_CLAMP_TO_BORDER_SGIS\0"
2387+ "GL_CLAMP_TO_EDGE\0"
2388+ "GL_CLAMP_TO_EDGE_SGIS\0"
2389+ "GL_CLEAR\0"
2390+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2391+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2392+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2393+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2394+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2395+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2396+ "GL_CLIP_PLANE0\0"
2397+ "GL_CLIP_PLANE1\0"
2398+ "GL_CLIP_PLANE2\0"
2399+ "GL_CLIP_PLANE3\0"
2400+ "GL_CLIP_PLANE4\0"
2401+ "GL_CLIP_PLANE5\0"
2402+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2403+ "GL_COEFF\0"
2404+ "GL_COLOR\0"
2405+ "GL_COLOR_ARRAY\0"
2406+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2407+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2408+ "GL_COLOR_ARRAY_POINTER\0"
2409+ "GL_COLOR_ARRAY_SIZE\0"
2410+ "GL_COLOR_ARRAY_STRIDE\0"
2411+ "GL_COLOR_ARRAY_TYPE\0"
2412+ "GL_COLOR_ATTACHMENT0_EXT\0"
2413+ "GL_COLOR_ATTACHMENT10_EXT\0"
2414+ "GL_COLOR_ATTACHMENT11_EXT\0"
2415+ "GL_COLOR_ATTACHMENT12_EXT\0"
2416+ "GL_COLOR_ATTACHMENT13_EXT\0"
2417+ "GL_COLOR_ATTACHMENT14_EXT\0"
2418+ "GL_COLOR_ATTACHMENT15_EXT\0"
2419+ "GL_COLOR_ATTACHMENT1_EXT\0"
2420+ "GL_COLOR_ATTACHMENT2_EXT\0"
2421+ "GL_COLOR_ATTACHMENT3_EXT\0"
2422+ "GL_COLOR_ATTACHMENT4_EXT\0"
2423+ "GL_COLOR_ATTACHMENT5_EXT\0"
2424+ "GL_COLOR_ATTACHMENT6_EXT\0"
2425+ "GL_COLOR_ATTACHMENT7_EXT\0"
2426+ "GL_COLOR_ATTACHMENT8_EXT\0"
2427+ "GL_COLOR_ATTACHMENT9_EXT\0"
2428+ "GL_COLOR_BUFFER_BIT\0"
2429+ "GL_COLOR_CLEAR_VALUE\0"
2430+ "GL_COLOR_INDEX\0"
2431+ "GL_COLOR_INDEXES\0"
2432+ "GL_COLOR_LOGIC_OP\0"
2433+ "GL_COLOR_MATERIAL\0"
2434+ "GL_COLOR_MATERIAL_FACE\0"
2435+ "GL_COLOR_MATERIAL_PARAMETER\0"
2436+ "GL_COLOR_MATRIX\0"
2437+ "GL_COLOR_MATRIX_SGI\0"
2438+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2439+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2440+ "GL_COLOR_SUM\0"
2441+ "GL_COLOR_SUM_ARB\0"
2442+ "GL_COLOR_TABLE\0"
2443+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2444+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2445+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2446+ "GL_COLOR_TABLE_BIAS\0"
2447+ "GL_COLOR_TABLE_BIAS_SGI\0"
2448+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2449+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2450+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2451+ "GL_COLOR_TABLE_FORMAT\0"
2452+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2453+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2454+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2455+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2456+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2457+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2458+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2459+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2460+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2461+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2462+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2463+ "GL_COLOR_TABLE_RED_SIZE\0"
2464+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2465+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2466+ "GL_COLOR_TABLE_SCALE\0"
2467+ "GL_COLOR_TABLE_SCALE_SGI\0"
2468+ "GL_COLOR_TABLE_WIDTH\0"
2469+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2470+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2471+ "GL_COLOR_WRITEMASK\0"
2472+ "GL_COMBINE\0"
2473+ "GL_COMBINE4\0"
2474+ "GL_COMBINE_ALPHA\0"
2475+ "GL_COMBINE_ALPHA_ARB\0"
2476+ "GL_COMBINE_ALPHA_EXT\0"
2477+ "GL_COMBINE_ARB\0"
2478+ "GL_COMBINE_EXT\0"
2479+ "GL_COMBINE_RGB\0"
2480+ "GL_COMBINE_RGB_ARB\0"
2481+ "GL_COMBINE_RGB_EXT\0"
2482+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2483+ "GL_COMPARE_R_TO_TEXTURE\0"
2484+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2485+ "GL_COMPILE\0"
2486+ "GL_COMPILE_AND_EXECUTE\0"
2487+ "GL_COMPILE_STATUS\0"
2488+ "GL_COMPRESSED_ALPHA\0"
2489+ "GL_COMPRESSED_ALPHA_ARB\0"
2490+ "GL_COMPRESSED_INTENSITY\0"
2491+ "GL_COMPRESSED_INTENSITY_ARB\0"
2492+ "GL_COMPRESSED_LUMINANCE\0"
2493+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2494+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2495+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2496+ "GL_COMPRESSED_RGB\0"
2497+ "GL_COMPRESSED_RGBA\0"
2498+ "GL_COMPRESSED_RGBA_ARB\0"
2499+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2500+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2501+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2502+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2503+ "GL_COMPRESSED_RGB_ARB\0"
2504+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2505+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2506+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2507+ "GL_CONSTANT\0"
2508+ "GL_CONSTANT_ALPHA\0"
2509+ "GL_CONSTANT_ALPHA_EXT\0"
2510+ "GL_CONSTANT_ARB\0"
2511+ "GL_CONSTANT_ATTENUATION\0"
2512+ "GL_CONSTANT_BORDER_HP\0"
2513+ "GL_CONSTANT_COLOR\0"
2514+ "GL_CONSTANT_COLOR_EXT\0"
2515+ "GL_CONSTANT_EXT\0"
2516+ "GL_CONVOLUTION_1D\0"
2517+ "GL_CONVOLUTION_2D\0"
2518+ "GL_CONVOLUTION_BORDER_COLOR\0"
2519+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2520+ "GL_CONVOLUTION_BORDER_MODE\0"
2521+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2522+ "GL_CONVOLUTION_FILTER_BIAS\0"
2523+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2524+ "GL_CONVOLUTION_FILTER_SCALE\0"
2525+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2526+ "GL_CONVOLUTION_FORMAT\0"
2527+ "GL_CONVOLUTION_FORMAT_EXT\0"
2528+ "GL_CONVOLUTION_HEIGHT\0"
2529+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2530+ "GL_CONVOLUTION_WIDTH\0"
2531+ "GL_CONVOLUTION_WIDTH_EXT\0"
2532+ "GL_COORD_REPLACE\0"
2533+ "GL_COORD_REPLACE_ARB\0"
2534+ "GL_COORD_REPLACE_NV\0"
2535+ "GL_COPY\0"
2536+ "GL_COPY_INVERTED\0"
2537+ "GL_COPY_PIXEL_TOKEN\0"
2538+ "GL_CULL_FACE\0"
2539+ "GL_CULL_FACE_MODE\0"
2540+ "GL_CULL_VERTEX_EXT\0"
2541+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2542+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2543+ "GL_CURRENT_ATTRIB_NV\0"
2544+ "GL_CURRENT_BIT\0"
2545+ "GL_CURRENT_COLOR\0"
2546+ "GL_CURRENT_FOG_COORD\0"
2547+ "GL_CURRENT_FOG_COORDINATE\0"
2548+ "GL_CURRENT_INDEX\0"
2549+ "GL_CURRENT_MATRIX_ARB\0"
2550+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2551+ "GL_CURRENT_MATRIX_NV\0"
2552+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2553+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2554+ "GL_CURRENT_NORMAL\0"
2555+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2556+ "GL_CURRENT_PROGRAM\0"
2557+ "GL_CURRENT_QUERY\0"
2558+ "GL_CURRENT_QUERY_ARB\0"
2559+ "GL_CURRENT_RASTER_COLOR\0"
2560+ "GL_CURRENT_RASTER_DISTANCE\0"
2561+ "GL_CURRENT_RASTER_INDEX\0"
2562+ "GL_CURRENT_RASTER_POSITION\0"
2563+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2564+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2565+ "GL_CURRENT_SECONDARY_COLOR\0"
2566+ "GL_CURRENT_TEXTURE_COORDS\0"
2567+ "GL_CURRENT_VERTEX_ATTRIB\0"
2568+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2569+ "GL_CURRENT_WEIGHT_ARB\0"
2570+ "GL_CW\0"
2571+ "GL_DEBUG_ASSERT_MESA\0"
2572+ "GL_DEBUG_OBJECT_MESA\0"
2573+ "GL_DEBUG_PRINT_MESA\0"
2574+ "GL_DECAL\0"
2575+ "GL_DECR\0"
2576+ "GL_DECR_WRAP\0"
2577+ "GL_DECR_WRAP_EXT\0"
2578+ "GL_DELETE_STATUS\0"
2579+ "GL_DEPTH\0"
2580+ "GL_DEPTH_ATTACHMENT_EXT\0"
2581+ "GL_DEPTH_BIAS\0"
2582+ "GL_DEPTH_BITS\0"
2583+ "GL_DEPTH_BOUNDS_EXT\0"
2584+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2585+ "GL_DEPTH_BUFFER_BIT\0"
2586+ "GL_DEPTH_CLAMP_NV\0"
2587+ "GL_DEPTH_CLEAR_VALUE\0"
2588+ "GL_DEPTH_COMPONENT\0"
2589+ "GL_DEPTH_COMPONENT16\0"
2590+ "GL_DEPTH_COMPONENT16_ARB\0"
2591+ "GL_DEPTH_COMPONENT16_SGIX\0"
2592+ "GL_DEPTH_COMPONENT24\0"
2593+ "GL_DEPTH_COMPONENT24_ARB\0"
2594+ "GL_DEPTH_COMPONENT24_SGIX\0"
2595+ "GL_DEPTH_COMPONENT32\0"
2596+ "GL_DEPTH_COMPONENT32_ARB\0"
2597+ "GL_DEPTH_COMPONENT32_SGIX\0"
2598+ "GL_DEPTH_FUNC\0"
2599+ "GL_DEPTH_RANGE\0"
2600+ "GL_DEPTH_SCALE\0"
2601+ "GL_DEPTH_STENCIL_NV\0"
2602+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2603+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2604+ "GL_DEPTH_TEST\0"
2605+ "GL_DEPTH_TEXTURE_MODE\0"
2606+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2607+ "GL_DEPTH_WRITEMASK\0"
2608+ "GL_DIFFUSE\0"
2609+ "GL_DITHER\0"
2610+ "GL_DOMAIN\0"
2611+ "GL_DONT_CARE\0"
2612+ "GL_DOT3_RGB\0"
2613+ "GL_DOT3_RGBA\0"
2614+ "GL_DOT3_RGBA_ARB\0"
2615+ "GL_DOT3_RGBA_EXT\0"
2616+ "GL_DOT3_RGB_ARB\0"
2617+ "GL_DOT3_RGB_EXT\0"
2618+ "GL_DOUBLE\0"
2619+ "GL_DOUBLEBUFFER\0"
2620+ "GL_DRAW_BUFFER\0"
2621+ "GL_DRAW_BUFFER0\0"
2622+ "GL_DRAW_BUFFER0_ARB\0"
2623+ "GL_DRAW_BUFFER0_ATI\0"
2624+ "GL_DRAW_BUFFER1\0"
2625+ "GL_DRAW_BUFFER10\0"
2626+ "GL_DRAW_BUFFER10_ARB\0"
2627+ "GL_DRAW_BUFFER10_ATI\0"
2628+ "GL_DRAW_BUFFER11\0"
2629+ "GL_DRAW_BUFFER11_ARB\0"
2630+ "GL_DRAW_BUFFER11_ATI\0"
2631+ "GL_DRAW_BUFFER12\0"
2632+ "GL_DRAW_BUFFER12_ARB\0"
2633+ "GL_DRAW_BUFFER12_ATI\0"
2634+ "GL_DRAW_BUFFER13\0"
2635+ "GL_DRAW_BUFFER13_ARB\0"
2636+ "GL_DRAW_BUFFER13_ATI\0"
2637+ "GL_DRAW_BUFFER14\0"
2638+ "GL_DRAW_BUFFER14_ARB\0"
2639+ "GL_DRAW_BUFFER14_ATI\0"
2640+ "GL_DRAW_BUFFER15\0"
2641+ "GL_DRAW_BUFFER15_ARB\0"
2642+ "GL_DRAW_BUFFER15_ATI\0"
2643+ "GL_DRAW_BUFFER1_ARB\0"
2644+ "GL_DRAW_BUFFER1_ATI\0"
2645+ "GL_DRAW_BUFFER2\0"
2646+ "GL_DRAW_BUFFER2_ARB\0"
2647+ "GL_DRAW_BUFFER2_ATI\0"
2648+ "GL_DRAW_BUFFER3\0"
2649+ "GL_DRAW_BUFFER3_ARB\0"
2650+ "GL_DRAW_BUFFER3_ATI\0"
2651+ "GL_DRAW_BUFFER4\0"
2652+ "GL_DRAW_BUFFER4_ARB\0"
2653+ "GL_DRAW_BUFFER4_ATI\0"
2654+ "GL_DRAW_BUFFER5\0"
2655+ "GL_DRAW_BUFFER5_ARB\0"
2656+ "GL_DRAW_BUFFER5_ATI\0"
2657+ "GL_DRAW_BUFFER6\0"
2658+ "GL_DRAW_BUFFER6_ARB\0"
2659+ "GL_DRAW_BUFFER6_ATI\0"
2660+ "GL_DRAW_BUFFER7\0"
2661+ "GL_DRAW_BUFFER7_ARB\0"
2662+ "GL_DRAW_BUFFER7_ATI\0"
2663+ "GL_DRAW_BUFFER8\0"
2664+ "GL_DRAW_BUFFER8_ARB\0"
2665+ "GL_DRAW_BUFFER8_ATI\0"
2666+ "GL_DRAW_BUFFER9\0"
2667+ "GL_DRAW_BUFFER9_ARB\0"
2668+ "GL_DRAW_BUFFER9_ATI\0"
2669+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2670+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2671+ "GL_DRAW_PIXEL_TOKEN\0"
2672+ "GL_DST_ALPHA\0"
2673+ "GL_DST_COLOR\0"
2674+ "GL_DYNAMIC_COPY\0"
2675+ "GL_DYNAMIC_COPY_ARB\0"
2676+ "GL_DYNAMIC_DRAW\0"
2677+ "GL_DYNAMIC_DRAW_ARB\0"
2678+ "GL_DYNAMIC_READ\0"
2679+ "GL_DYNAMIC_READ_ARB\0"
2680+ "GL_EDGE_FLAG\0"
2681+ "GL_EDGE_FLAG_ARRAY\0"
2682+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2683+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2684+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2685+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2686+ "GL_ELEMENT_ARRAY_BUFFER\0"
2687+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2688+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2689+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2690+ "GL_EMISSION\0"
2691+ "GL_ENABLE_BIT\0"
2692+ "GL_EQUAL\0"
2693+ "GL_EQUIV\0"
2694+ "GL_EVAL_BIT\0"
2695+ "GL_EXP\0"
2696+ "GL_EXP2\0"
2697+ "GL_EXTENSIONS\0"
2698+ "GL_EYE_LINEAR\0"
2699+ "GL_EYE_PLANE\0"
2700+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2701+ "GL_EYE_RADIAL_NV\0"
2702+ "GL_FALSE\0"
2703+ "GL_FASTEST\0"
2704+ "GL_FEEDBACK\0"
2705+ "GL_FEEDBACK_BUFFER_POINTER\0"
2706+ "GL_FEEDBACK_BUFFER_SIZE\0"
2707+ "GL_FEEDBACK_BUFFER_TYPE\0"
2708+ "GL_FILL\0"
2709+ "GL_FLAT\0"
2710+ "GL_FLOAT\0"
2711+ "GL_FLOAT_MAT2\0"
2712+ "GL_FLOAT_MAT2_ARB\0"
2713+ "GL_FLOAT_MAT3\0"
2714+ "GL_FLOAT_MAT3_ARB\0"
2715+ "GL_FLOAT_MAT4\0"
2716+ "GL_FLOAT_MAT4_ARB\0"
2717+ "GL_FLOAT_VEC2\0"
2718+ "GL_FLOAT_VEC2_ARB\0"
2719+ "GL_FLOAT_VEC3\0"
2720+ "GL_FLOAT_VEC3_ARB\0"
2721+ "GL_FLOAT_VEC4\0"
2722+ "GL_FLOAT_VEC4_ARB\0"
2723+ "GL_FOG\0"
2724+ "GL_FOG_BIT\0"
2725+ "GL_FOG_COLOR\0"
2726+ "GL_FOG_COORD\0"
2727+ "GL_FOG_COORDINATE\0"
2728+ "GL_FOG_COORDINATE_ARRAY\0"
2729+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2730+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2731+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2732+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2733+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2734+ "GL_FOG_COORDINATE_SOURCE\0"
2735+ "GL_FOG_COORD_ARRAY\0"
2736+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2737+ "GL_FOG_COORD_ARRAY_POINTER\0"
2738+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2739+ "GL_FOG_COORD_ARRAY_TYPE\0"
2740+ "GL_FOG_COORD_SRC\0"
2741+ "GL_FOG_DENSITY\0"
2742+ "GL_FOG_DISTANCE_MODE_NV\0"
2743+ "GL_FOG_END\0"
2744+ "GL_FOG_HINT\0"
2745+ "GL_FOG_INDEX\0"
2746+ "GL_FOG_MODE\0"
2747+ "GL_FOG_OFFSET_SGIX\0"
2748+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2749+ "GL_FOG_START\0"
2750+ "GL_FRAGMENT_DEPTH\0"
2751+ "GL_FRAGMENT_PROGRAM_ARB\0"
2752+ "GL_FRAGMENT_SHADER\0"
2753+ "GL_FRAGMENT_SHADER_ARB\0"
2754+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2755+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2756+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2757+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2758+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2759+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2760+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2761+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2762+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2763+ "GL_FRAMEBUFFER_EXT\0"
2764+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2765+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2766+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2767+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2768+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2769+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2770+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2771+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2772+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2773+ "GL_FRONT\0"
2774+ "GL_FRONT_AND_BACK\0"
2775+ "GL_FRONT_FACE\0"
2776+ "GL_FRONT_LEFT\0"
2777+ "GL_FRONT_RIGHT\0"
2778+ "GL_FUNC_ADD\0"
2779+ "GL_FUNC_ADD_EXT\0"
2780+ "GL_FUNC_REVERSE_SUBTRACT\0"
2781+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2782+ "GL_FUNC_SUBTRACT\0"
2783+ "GL_FUNC_SUBTRACT_EXT\0"
2784+ "GL_GENERATE_MIPMAP\0"
2785+ "GL_GENERATE_MIPMAP_HINT\0"
2786+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2787+ "GL_GENERATE_MIPMAP_SGIS\0"
2788+ "GL_GEQUAL\0"
2789+ "GL_GL_BLEND_EQUATION_RGB\0"
2790+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2791+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2792+ "GL_GL_COMPRESSED_SRGB\0"
2793+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2794+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2795+ "GL_GL_FLOAT_MAT2x3\0"
2796+ "GL_GL_FLOAT_MAT2x4\0"
2797+ "GL_GL_FLOAT_MAT3x2\0"
2798+ "GL_GL_FLOAT_MAT3x4\0"
2799+ "GL_GL_FLOAT_MAT4x2\0"
2800+ "GL_GL_FLOAT_MAT4x3\0"
2801+ "GL_GL_PIXEL_PACK_BUFFER\0"
2802+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2803+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2804+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2805+ "GL_GL_SLUMINANCE\0"
2806+ "GL_GL_SLUMINANCE8\0"
2807+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2808+ "GL_GL_SLUMINANCE_ALPHA\0"
2809+ "GL_GL_SRGB\0"
2810+ "GL_GL_SRGB8\0"
2811+ "GL_GL_SRGB8_ALPHA8\0"
2812+ "GL_GL_SRGB_ALPHA\0"
2813+ "GL_GREATER\0"
2814+ "GL_GREEN\0"
2815+ "GL_GREEN_BIAS\0"
2816+ "GL_GREEN_BITS\0"
2817+ "GL_GREEN_SCALE\0"
2818+ "GL_HINT_BIT\0"
2819+ "GL_HISTOGRAM\0"
2820+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2821+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2822+ "GL_HISTOGRAM_BLUE_SIZE\0"
2823+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2824+ "GL_HISTOGRAM_EXT\0"
2825+ "GL_HISTOGRAM_FORMAT\0"
2826+ "GL_HISTOGRAM_FORMAT_EXT\0"
2827+ "GL_HISTOGRAM_GREEN_SIZE\0"
2828+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2829+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2830+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2831+ "GL_HISTOGRAM_RED_SIZE\0"
2832+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2833+ "GL_HISTOGRAM_SINK\0"
2834+ "GL_HISTOGRAM_SINK_EXT\0"
2835+ "GL_HISTOGRAM_WIDTH\0"
2836+ "GL_HISTOGRAM_WIDTH_EXT\0"
2837+ "GL_IDENTITY_NV\0"
2838+ "GL_IGNORE_BORDER_HP\0"
2839+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2840+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2841+ "GL_INCR\0"
2842+ "GL_INCR_WRAP\0"
2843+ "GL_INCR_WRAP_EXT\0"
2844+ "GL_INDEX_ARRAY\0"
2845+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2846+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2847+ "GL_INDEX_ARRAY_POINTER\0"
2848+ "GL_INDEX_ARRAY_STRIDE\0"
2849+ "GL_INDEX_ARRAY_TYPE\0"
2850+ "GL_INDEX_BITS\0"
2851+ "GL_INDEX_CLEAR_VALUE\0"
2852+ "GL_INDEX_LOGIC_OP\0"
2853+ "GL_INDEX_MODE\0"
2854+ "GL_INDEX_OFFSET\0"
2855+ "GL_INDEX_SHIFT\0"
2856+ "GL_INDEX_WRITEMASK\0"
2857+ "GL_INFO_LOG_LENGTH\0"
2858+ "GL_INT\0"
2859+ "GL_INTENSITY\0"
2860+ "GL_INTENSITY12\0"
2861+ "GL_INTENSITY12_EXT\0"
2862+ "GL_INTENSITY16\0"
2863+ "GL_INTENSITY16_EXT\0"
2864+ "GL_INTENSITY4\0"
2865+ "GL_INTENSITY4_EXT\0"
2866+ "GL_INTENSITY8\0"
2867+ "GL_INTENSITY8_EXT\0"
2868+ "GL_INTENSITY_EXT\0"
2869+ "GL_INTERPOLATE\0"
2870+ "GL_INTERPOLATE_ARB\0"
2871+ "GL_INTERPOLATE_EXT\0"
2872+ "GL_INT_VEC2\0"
2873+ "GL_INT_VEC2_ARB\0"
2874+ "GL_INT_VEC3\0"
2875+ "GL_INT_VEC3_ARB\0"
2876+ "GL_INT_VEC4\0"
2877+ "GL_INT_VEC4_ARB\0"
2878+ "GL_INVALID_ENUM\0"
2879+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2880+ "GL_INVALID_OPERATION\0"
2881+ "GL_INVALID_VALUE\0"
2882+ "GL_INVERSE_NV\0"
2883+ "GL_INVERSE_TRANSPOSE_NV\0"
2884+ "GL_INVERT\0"
2885+ "GL_KEEP\0"
2886+ "GL_LEFT\0"
2887+ "GL_LEQUAL\0"
2888+ "GL_LESS\0"
2889+ "GL_LIGHT0\0"
2890+ "GL_LIGHT1\0"
2891+ "GL_LIGHT2\0"
2892+ "GL_LIGHT3\0"
2893+ "GL_LIGHT4\0"
2894+ "GL_LIGHT5\0"
2895+ "GL_LIGHT6\0"
2896+ "GL_LIGHT7\0"
2897+ "GL_LIGHTING\0"
2898+ "GL_LIGHTING_BIT\0"
2899+ "GL_LIGHT_MODEL_AMBIENT\0"
2900+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2901+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2902+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2903+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2904+ "GL_LINE\0"
2905+ "GL_LINEAR\0"
2906+ "GL_LINEAR_ATTENUATION\0"
2907+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2908+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2909+ "GL_LINEAR_MIPMAP_LINEAR\0"
2910+ "GL_LINEAR_MIPMAP_NEAREST\0"
2911+ "GL_LINES\0"
2912+ "GL_LINE_BIT\0"
2913+ "GL_LINE_LOOP\0"
2914+ "GL_LINE_RESET_TOKEN\0"
2915+ "GL_LINE_SMOOTH\0"
2916+ "GL_LINE_SMOOTH_HINT\0"
2917+ "GL_LINE_STIPPLE\0"
2918+ "GL_LINE_STIPPLE_PATTERN\0"
2919+ "GL_LINE_STIPPLE_REPEAT\0"
2920+ "GL_LINE_STRIP\0"
2921+ "GL_LINE_TOKEN\0"
2922+ "GL_LINE_WIDTH\0"
2923+ "GL_LINE_WIDTH_GRANULARITY\0"
2924+ "GL_LINE_WIDTH_RANGE\0"
2925+ "GL_LINK_STATUS\0"
2926+ "GL_LIST_BASE\0"
2927+ "GL_LIST_BIT\0"
2928+ "GL_LIST_INDEX\0"
2929+ "GL_LIST_MODE\0"
2930+ "GL_LOAD\0"
2931+ "GL_LOGIC_OP\0"
2932+ "GL_LOGIC_OP_MODE\0"
2933+ "GL_LOWER_LEFT\0"
2934+ "GL_LUMINANCE\0"
2935+ "GL_LUMINANCE12\0"
2936+ "GL_LUMINANCE12_ALPHA12\0"
2937+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2938+ "GL_LUMINANCE12_ALPHA4\0"
2939+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2940+ "GL_LUMINANCE12_EXT\0"
2941+ "GL_LUMINANCE16\0"
2942+ "GL_LUMINANCE16_ALPHA16\0"
2943+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2944+ "GL_LUMINANCE16_EXT\0"
2945+ "GL_LUMINANCE4\0"
2946+ "GL_LUMINANCE4_ALPHA4\0"
2947+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2948+ "GL_LUMINANCE4_EXT\0"
2949+ "GL_LUMINANCE6_ALPHA2\0"
2950+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2951+ "GL_LUMINANCE8\0"
2952+ "GL_LUMINANCE8_ALPHA8\0"
2953+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2954+ "GL_LUMINANCE8_EXT\0"
2955+ "GL_LUMINANCE_ALPHA\0"
2956+ "GL_MAP1_COLOR_4\0"
2957+ "GL_MAP1_GRID_DOMAIN\0"
2958+ "GL_MAP1_GRID_SEGMENTS\0"
2959+ "GL_MAP1_INDEX\0"
2960+ "GL_MAP1_NORMAL\0"
2961+ "GL_MAP1_TEXTURE_COORD_1\0"
2962+ "GL_MAP1_TEXTURE_COORD_2\0"
2963+ "GL_MAP1_TEXTURE_COORD_3\0"
2964+ "GL_MAP1_TEXTURE_COORD_4\0"
2965+ "GL_MAP1_VERTEX_3\0"
2966+ "GL_MAP1_VERTEX_4\0"
2967+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2968+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2969+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2970+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2971+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2972+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2973+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2974+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2975+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2976+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2977+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2978+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2979+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2980+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2981+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2982+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2983+ "GL_MAP2_COLOR_4\0"
2984+ "GL_MAP2_GRID_DOMAIN\0"
2985+ "GL_MAP2_GRID_SEGMENTS\0"
2986+ "GL_MAP2_INDEX\0"
2987+ "GL_MAP2_NORMAL\0"
2988+ "GL_MAP2_TEXTURE_COORD_1\0"
2989+ "GL_MAP2_TEXTURE_COORD_2\0"
2990+ "GL_MAP2_TEXTURE_COORD_3\0"
2991+ "GL_MAP2_TEXTURE_COORD_4\0"
2992+ "GL_MAP2_VERTEX_3\0"
2993+ "GL_MAP2_VERTEX_4\0"
2994+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2995+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2996+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2997+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2998+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2999+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
3000+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
3001+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
3002+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
3003+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
3004+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
3005+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
3006+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
3007+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
3008+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
3009+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
3010+ "GL_MAP_COLOR\0"
3011+ "GL_MAP_STENCIL\0"
3012+ "GL_MATRIX0_ARB\0"
3013+ "GL_MATRIX0_NV\0"
3014+ "GL_MATRIX10_ARB\0"
3015+ "GL_MATRIX11_ARB\0"
3016+ "GL_MATRIX12_ARB\0"
3017+ "GL_MATRIX13_ARB\0"
3018+ "GL_MATRIX14_ARB\0"
3019+ "GL_MATRIX15_ARB\0"
3020+ "GL_MATRIX16_ARB\0"
3021+ "GL_MATRIX17_ARB\0"
3022+ "GL_MATRIX18_ARB\0"
3023+ "GL_MATRIX19_ARB\0"
3024+ "GL_MATRIX1_ARB\0"
3025+ "GL_MATRIX1_NV\0"
3026+ "GL_MATRIX20_ARB\0"
3027+ "GL_MATRIX21_ARB\0"
3028+ "GL_MATRIX22_ARB\0"
3029+ "GL_MATRIX23_ARB\0"
3030+ "GL_MATRIX24_ARB\0"
3031+ "GL_MATRIX25_ARB\0"
3032+ "GL_MATRIX26_ARB\0"
3033+ "GL_MATRIX27_ARB\0"
3034+ "GL_MATRIX28_ARB\0"
3035+ "GL_MATRIX29_ARB\0"
3036+ "GL_MATRIX2_ARB\0"
3037+ "GL_MATRIX2_NV\0"
3038+ "GL_MATRIX30_ARB\0"
3039+ "GL_MATRIX31_ARB\0"
3040+ "GL_MATRIX3_ARB\0"
3041+ "GL_MATRIX3_NV\0"
3042+ "GL_MATRIX4_ARB\0"
3043+ "GL_MATRIX4_NV\0"
3044+ "GL_MATRIX5_ARB\0"
3045+ "GL_MATRIX5_NV\0"
3046+ "GL_MATRIX6_ARB\0"
3047+ "GL_MATRIX6_NV\0"
3048+ "GL_MATRIX7_ARB\0"
3049+ "GL_MATRIX7_NV\0"
3050+ "GL_MATRIX8_ARB\0"
3051+ "GL_MATRIX9_ARB\0"
3052+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
3053+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
3054+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
3055+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
3056+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
3057+ "GL_MATRIX_MODE\0"
3058+ "GL_MATRIX_PALETTE_ARB\0"
3059+ "GL_MAX\0"
3060+ "GL_MAX_3D_TEXTURE_SIZE\0"
3061+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
3062+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
3063+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
3064+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
3065+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3066+ "GL_MAX_CLIP_PLANES\0"
3067+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
3068+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
3069+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
3070+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
3071+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
3072+ "GL_MAX_CONVOLUTION_HEIGHT\0"
3073+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
3074+ "GL_MAX_CONVOLUTION_WIDTH\0"
3075+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
3076+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
3077+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
3078+ "GL_MAX_DRAW_BUFFERS\0"
3079+ "GL_MAX_DRAW_BUFFERS_ARB\0"
3080+ "GL_MAX_DRAW_BUFFERS_ATI\0"
3081+ "GL_MAX_ELEMENTS_INDICES\0"
3082+ "GL_MAX_ELEMENTS_VERTICES\0"
3083+ "GL_MAX_EVAL_ORDER\0"
3084+ "GL_MAX_EXT\0"
3085+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
3086+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
3087+ "GL_MAX_LIGHTS\0"
3088+ "GL_MAX_LIST_NESTING\0"
3089+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
3090+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
3091+ "GL_MAX_NAME_STACK_DEPTH\0"
3092+ "GL_MAX_PALETTE_MATRICES_ARB\0"
3093+ "GL_MAX_PIXEL_MAP_TABLE\0"
3094+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3095+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3096+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
3097+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
3098+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
3099+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
3100+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
3101+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
3102+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
3103+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
3104+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
3105+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
3106+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
3107+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3108+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3109+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3110+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3111+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3112+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3113+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3114+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3115+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
3116+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3117+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3118+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3119+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3120+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3121+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3122+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3123+ "GL_MAX_SHININESS_NV\0"
3124+ "GL_MAX_SPOT_EXPONENT_NV\0"
3125+ "GL_MAX_TEXTURE_COORDS\0"
3126+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3127+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3128+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3129+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3130+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3131+ "GL_MAX_TEXTURE_SIZE\0"
3132+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3133+ "GL_MAX_TEXTURE_UNITS\0"
3134+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3135+ "GL_MAX_TRACK_MATRICES_NV\0"
3136+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3137+ "GL_MAX_VARYING_FLOATS\0"
3138+ "GL_MAX_VARYING_FLOATS_ARB\0"
3139+ "GL_MAX_VERTEX_ATTRIBS\0"
3140+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3141+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3142+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3143+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3144+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3145+ "GL_MAX_VERTEX_UNITS_ARB\0"
3146+ "GL_MAX_VIEWPORT_DIMS\0"
3147+ "GL_MIN\0"
3148+ "GL_MINMAX\0"
3149+ "GL_MINMAX_EXT\0"
3150+ "GL_MINMAX_FORMAT\0"
3151+ "GL_MINMAX_FORMAT_EXT\0"
3152+ "GL_MINMAX_SINK\0"
3153+ "GL_MINMAX_SINK_EXT\0"
3154+ "GL_MIN_EXT\0"
3155+ "GL_MIRRORED_REPEAT\0"
3156+ "GL_MIRRORED_REPEAT_ARB\0"
3157+ "GL_MIRRORED_REPEAT_IBM\0"
3158+ "GL_MIRROR_CLAMP_ATI\0"
3159+ "GL_MIRROR_CLAMP_EXT\0"
3160+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3161+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3162+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3163+ "GL_MODELVIEW\0"
3164+ "GL_MODELVIEW0_ARB\0"
3165+ "GL_MODELVIEW10_ARB\0"
3166+ "GL_MODELVIEW11_ARB\0"
3167+ "GL_MODELVIEW12_ARB\0"
3168+ "GL_MODELVIEW13_ARB\0"
3169+ "GL_MODELVIEW14_ARB\0"
3170+ "GL_MODELVIEW15_ARB\0"
3171+ "GL_MODELVIEW16_ARB\0"
3172+ "GL_MODELVIEW17_ARB\0"
3173+ "GL_MODELVIEW18_ARB\0"
3174+ "GL_MODELVIEW19_ARB\0"
3175+ "GL_MODELVIEW1_ARB\0"
3176+ "GL_MODELVIEW20_ARB\0"
3177+ "GL_MODELVIEW21_ARB\0"
3178+ "GL_MODELVIEW22_ARB\0"
3179+ "GL_MODELVIEW23_ARB\0"
3180+ "GL_MODELVIEW24_ARB\0"
3181+ "GL_MODELVIEW25_ARB\0"
3182+ "GL_MODELVIEW26_ARB\0"
3183+ "GL_MODELVIEW27_ARB\0"
3184+ "GL_MODELVIEW28_ARB\0"
3185+ "GL_MODELVIEW29_ARB\0"
3186+ "GL_MODELVIEW2_ARB\0"
3187+ "GL_MODELVIEW30_ARB\0"
3188+ "GL_MODELVIEW31_ARB\0"
3189+ "GL_MODELVIEW3_ARB\0"
3190+ "GL_MODELVIEW4_ARB\0"
3191+ "GL_MODELVIEW5_ARB\0"
3192+ "GL_MODELVIEW6_ARB\0"
3193+ "GL_MODELVIEW7_ARB\0"
3194+ "GL_MODELVIEW8_ARB\0"
3195+ "GL_MODELVIEW9_ARB\0"
3196+ "GL_MODELVIEW_MATRIX\0"
3197+ "GL_MODELVIEW_PROJECTION_NV\0"
3198+ "GL_MODELVIEW_STACK_DEPTH\0"
3199+ "GL_MODULATE\0"
3200+ "GL_MODULATE_ADD_ATI\0"
3201+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3202+ "GL_MODULATE_SUBTRACT_ATI\0"
3203+ "GL_MULT\0"
3204+ "GL_MULTISAMPLE\0"
3205+ "GL_MULTISAMPLE_3DFX\0"
3206+ "GL_MULTISAMPLE_ARB\0"
3207+ "GL_MULTISAMPLE_BIT\0"
3208+ "GL_MULTISAMPLE_BIT_3DFX\0"
3209+ "GL_MULTISAMPLE_BIT_ARB\0"
3210+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3211+ "GL_N3F_V3F\0"
3212+ "GL_NAME_STACK_DEPTH\0"
3213+ "GL_NAND\0"
3214+ "GL_NEAREST\0"
3215+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3216+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3217+ "GL_NEAREST_MIPMAP_LINEAR\0"
3218+ "GL_NEAREST_MIPMAP_NEAREST\0"
3219+ "GL_NEVER\0"
3220+ "GL_NICEST\0"
3221+ "GL_NONE\0"
3222+ "GL_NOOP\0"
3223+ "GL_NOR\0"
3224+ "GL_NORMALIZE\0"
3225+ "GL_NORMAL_ARRAY\0"
3226+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3227+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3228+ "GL_NORMAL_ARRAY_POINTER\0"
3229+ "GL_NORMAL_ARRAY_STRIDE\0"
3230+ "GL_NORMAL_ARRAY_TYPE\0"
3231+ "GL_NORMAL_MAP\0"
3232+ "GL_NORMAL_MAP_ARB\0"
3233+ "GL_NORMAL_MAP_NV\0"
3234+ "GL_NOTEQUAL\0"
3235+ "GL_NO_ERROR\0"
3236+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3237+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3238+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3239+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3240+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3241+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3242+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3243+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3244+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3245+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3246+ "GL_OBJECT_LINEAR\0"
3247+ "GL_OBJECT_LINK_STATUS_ARB\0"
3248+ "GL_OBJECT_PLANE\0"
3249+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3250+ "GL_OBJECT_SUBTYPE_ARB\0"
3251+ "GL_OBJECT_TYPE_ARB\0"
3252+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3253+ "GL_OCCLUSION_TEST_HP\0"
3254+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3255+ "GL_ONE\0"
3256+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3257+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3258+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3259+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3260+ "GL_ONE_MINUS_DST_ALPHA\0"
3261+ "GL_ONE_MINUS_DST_COLOR\0"
3262+ "GL_ONE_MINUS_SRC_ALPHA\0"
3263+ "GL_ONE_MINUS_SRC_COLOR\0"
3264+ "GL_OPERAND0_ALPHA\0"
3265+ "GL_OPERAND0_ALPHA_ARB\0"
3266+ "GL_OPERAND0_ALPHA_EXT\0"
3267+ "GL_OPERAND0_RGB\0"
3268+ "GL_OPERAND0_RGB_ARB\0"
3269+ "GL_OPERAND0_RGB_EXT\0"
3270+ "GL_OPERAND1_ALPHA\0"
3271+ "GL_OPERAND1_ALPHA_ARB\0"
3272+ "GL_OPERAND1_ALPHA_EXT\0"
3273+ "GL_OPERAND1_RGB\0"
3274+ "GL_OPERAND1_RGB_ARB\0"
3275+ "GL_OPERAND1_RGB_EXT\0"
3276+ "GL_OPERAND2_ALPHA\0"
3277+ "GL_OPERAND2_ALPHA_ARB\0"
3278+ "GL_OPERAND2_ALPHA_EXT\0"
3279+ "GL_OPERAND2_RGB\0"
3280+ "GL_OPERAND2_RGB_ARB\0"
3281+ "GL_OPERAND2_RGB_EXT\0"
3282+ "GL_OPERAND3_ALPHA_NV\0"
3283+ "GL_OPERAND3_RGB_NV\0"
3284+ "GL_OR\0"
3285+ "GL_ORDER\0"
3286+ "GL_OR_INVERTED\0"
3287+ "GL_OR_REVERSE\0"
3288+ "GL_OUT_OF_MEMORY\0"
3289+ "GL_PACK_ALIGNMENT\0"
3290+ "GL_PACK_IMAGE_HEIGHT\0"
3291+ "GL_PACK_INVERT_MESA\0"
3292+ "GL_PACK_LSB_FIRST\0"
3293+ "GL_PACK_ROW_LENGTH\0"
3294+ "GL_PACK_SKIP_IMAGES\0"
3295+ "GL_PACK_SKIP_PIXELS\0"
3296+ "GL_PACK_SKIP_ROWS\0"
3297+ "GL_PACK_SWAP_BYTES\0"
3298+ "GL_PALETTE4_R5_G6_B5_OES\0"
3299+ "GL_PALETTE4_RGB5_A1_OES\0"
3300+ "GL_PALETTE4_RGB8_OES\0"
3301+ "GL_PALETTE4_RGBA4_OES\0"
3302+ "GL_PALETTE4_RGBA8_OES\0"
3303+ "GL_PALETTE8_R5_G6_B5_OES\0"
3304+ "GL_PALETTE8_RGB5_A1_OES\0"
3305+ "GL_PALETTE8_RGB8_OES\0"
3306+ "GL_PALETTE8_RGBA4_OES\0"
3307+ "GL_PALETTE8_RGBA8_OES\0"
3308+ "GL_PASS_THROUGH_TOKEN\0"
3309+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3310+ "GL_PIXEL_MAP_A_TO_A\0"
3311+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3312+ "GL_PIXEL_MAP_B_TO_B\0"
3313+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3314+ "GL_PIXEL_MAP_G_TO_G\0"
3315+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3316+ "GL_PIXEL_MAP_I_TO_A\0"
3317+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3318+ "GL_PIXEL_MAP_I_TO_B\0"
3319+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3320+ "GL_PIXEL_MAP_I_TO_G\0"
3321+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3322+ "GL_PIXEL_MAP_I_TO_I\0"
3323+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3324+ "GL_PIXEL_MAP_I_TO_R\0"
3325+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3326+ "GL_PIXEL_MAP_R_TO_R\0"
3327+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3328+ "GL_PIXEL_MAP_S_TO_S\0"
3329+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3330+ "GL_PIXEL_MODE_BIT\0"
3331+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3332+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3333+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3334+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3335+ "GL_POINT\0"
3336+ "GL_POINTS\0"
3337+ "GL_POINT_BIT\0"
3338+ "GL_POINT_DISTANCE_ATTENUATION\0"
3339+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3340+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3341+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3342+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3343+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3344+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3345+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3346+ "GL_POINT_SIZE\0"
3347+ "GL_POINT_SIZE_GRANULARITY\0"
3348+ "GL_POINT_SIZE_MAX\0"
3349+ "GL_POINT_SIZE_MAX_ARB\0"
3350+ "GL_POINT_SIZE_MAX_EXT\0"
3351+ "GL_POINT_SIZE_MAX_SGIS\0"
3352+ "GL_POINT_SIZE_MIN\0"
3353+ "GL_POINT_SIZE_MIN_ARB\0"
3354+ "GL_POINT_SIZE_MIN_EXT\0"
3355+ "GL_POINT_SIZE_MIN_SGIS\0"
3356+ "GL_POINT_SIZE_RANGE\0"
3357+ "GL_POINT_SMOOTH\0"
3358+ "GL_POINT_SMOOTH_HINT\0"
3359+ "GL_POINT_SPRITE\0"
3360+ "GL_POINT_SPRITE_ARB\0"
3361+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3362+ "GL_POINT_SPRITE_NV\0"
3363+ "GL_POINT_SPRITE_R_MODE_NV\0"
3364+ "GL_POINT_TOKEN\0"
3365+ "GL_POLYGON\0"
3366+ "GL_POLYGON_BIT\0"
3367+ "GL_POLYGON_MODE\0"
3368+ "GL_POLYGON_OFFSET_BIAS\0"
3369+ "GL_POLYGON_OFFSET_FACTOR\0"
3370+ "GL_POLYGON_OFFSET_FILL\0"
3371+ "GL_POLYGON_OFFSET_LINE\0"
3372+ "GL_POLYGON_OFFSET_POINT\0"
3373+ "GL_POLYGON_OFFSET_UNITS\0"
3374+ "GL_POLYGON_SMOOTH\0"
3375+ "GL_POLYGON_SMOOTH_HINT\0"
3376+ "GL_POLYGON_STIPPLE\0"
3377+ "GL_POLYGON_STIPPLE_BIT\0"
3378+ "GL_POLYGON_TOKEN\0"
3379+ "GL_POSITION\0"
3380+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3381+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3382+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3383+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3384+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3385+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3386+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3387+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3388+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3389+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3390+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3391+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3392+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3393+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3394+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3395+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3396+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3397+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3398+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3399+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3400+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3401+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3402+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3403+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3404+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3405+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3406+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3407+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3408+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3409+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3410+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3411+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3412+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3413+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3414+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3415+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3416+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3417+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3418+ "GL_PREVIOUS\0"
3419+ "GL_PREVIOUS_ARB\0"
3420+ "GL_PREVIOUS_EXT\0"
3421+ "GL_PRIMARY_COLOR\0"
3422+ "GL_PRIMARY_COLOR_ARB\0"
3423+ "GL_PRIMARY_COLOR_EXT\0"
3424+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3425+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3426+ "GL_PROGRAM_ATTRIBS_ARB\0"
3427+ "GL_PROGRAM_BINDING_ARB\0"
3428+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3429+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3430+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3431+ "GL_PROGRAM_FORMAT_ARB\0"
3432+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3433+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3434+ "GL_PROGRAM_LENGTH_ARB\0"
3435+ "GL_PROGRAM_LENGTH_NV\0"
3436+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3437+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3438+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3439+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3440+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3441+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3442+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3443+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3444+ "GL_PROGRAM_OBJECT_ARB\0"
3445+ "GL_PROGRAM_PARAMETERS_ARB\0"
3446+ "GL_PROGRAM_PARAMETER_NV\0"
3447+ "GL_PROGRAM_RESIDENT_NV\0"
3448+ "GL_PROGRAM_STRING_ARB\0"
3449+ "GL_PROGRAM_STRING_NV\0"
3450+ "GL_PROGRAM_TARGET_NV\0"
3451+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3452+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3453+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3454+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3455+ "GL_PROJECTION\0"
3456+ "GL_PROJECTION_MATRIX\0"
3457+ "GL_PROJECTION_STACK_DEPTH\0"
3458+ "GL_PROXY_COLOR_TABLE\0"
3459+ "GL_PROXY_HISTOGRAM\0"
3460+ "GL_PROXY_HISTOGRAM_EXT\0"
3461+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3462+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3463+ "GL_PROXY_TEXTURE_1D\0"
3464+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3465+ "GL_PROXY_TEXTURE_1D_EXT\0"
3466+ "GL_PROXY_TEXTURE_2D\0"
3467+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3468+ "GL_PROXY_TEXTURE_2D_EXT\0"
3469+ "GL_PROXY_TEXTURE_3D\0"
3470+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3471+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3472+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3473+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3474+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3475+ "GL_Q\0"
3476+ "GL_QUADRATIC_ATTENUATION\0"
3477+ "GL_QUADS\0"
3478+ "GL_QUAD_MESH_SUN\0"
3479+ "GL_QUAD_STRIP\0"
3480+ "GL_QUERY_COUNTER_BITS\0"
3481+ "GL_QUERY_COUNTER_BITS_ARB\0"
3482+ "GL_QUERY_RESULT\0"
3483+ "GL_QUERY_RESULT_ARB\0"
3484+ "GL_QUERY_RESULT_AVAILABLE\0"
3485+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3486+ "GL_R\0"
3487+ "GL_R3_G3_B2\0"
3488+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3489+ "GL_READ_BUFFER\0"
3490+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3491+ "GL_READ_FRAMEBUFFER_EXT\0"
3492+ "GL_READ_ONLY\0"
3493+ "GL_READ_ONLY_ARB\0"
3494+ "GL_READ_WRITE\0"
3495+ "GL_READ_WRITE_ARB\0"
3496+ "GL_RED\0"
3497+ "GL_REDUCE\0"
3498+ "GL_REDUCE_EXT\0"
3499+ "GL_RED_BIAS\0"
3500+ "GL_RED_BITS\0"
3501+ "GL_RED_SCALE\0"
3502+ "GL_REFLECTION_MAP\0"
3503+ "GL_REFLECTION_MAP_ARB\0"
3504+ "GL_REFLECTION_MAP_NV\0"
3505+ "GL_RENDER\0"
3506+ "GL_RENDERBUFFER_BINDING_EXT\0"
3507+ "GL_RENDERBUFFER_EXT\0"
3508+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3509+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3510+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3511+ "GL_RENDERER\0"
3512+ "GL_RENDER_MODE\0"
3513+ "GL_REPEAT\0"
3514+ "GL_REPLACE\0"
3515+ "GL_REPLACE_EXT\0"
3516+ "GL_REPLICATE_BORDER_HP\0"
3517+ "GL_RESCALE_NORMAL\0"
3518+ "GL_RESCALE_NORMAL_EXT\0"
3519+ "GL_RETURN\0"
3520+ "GL_RGB\0"
3521+ "GL_RGB10\0"
3522+ "GL_RGB10_A2\0"
3523+ "GL_RGB10_A2_EXT\0"
3524+ "GL_RGB10_EXT\0"
3525+ "GL_RGB12\0"
3526+ "GL_RGB12_EXT\0"
3527+ "GL_RGB16\0"
3528+ "GL_RGB16_EXT\0"
3529+ "GL_RGB2_EXT\0"
3530+ "GL_RGB4\0"
3531+ "GL_RGB4_EXT\0"
3532+ "GL_RGB4_S3TC\0"
3533+ "GL_RGB5\0"
3534+ "GL_RGB5_A1\0"
3535+ "GL_RGB5_A1_EXT\0"
3536+ "GL_RGB5_EXT\0"
3537+ "GL_RGB8\0"
3538+ "GL_RGB8_EXT\0"
3539+ "GL_RGBA\0"
3540+ "GL_RGBA12\0"
3541+ "GL_RGBA12_EXT\0"
3542+ "GL_RGBA16\0"
3543+ "GL_RGBA16_EXT\0"
3544+ "GL_RGBA2\0"
3545+ "GL_RGBA2_EXT\0"
3546+ "GL_RGBA4\0"
3547+ "GL_RGBA4_DXT5_S3TC\0"
3548+ "GL_RGBA4_EXT\0"
3549+ "GL_RGBA4_S3TC\0"
3550+ "GL_RGBA8\0"
3551+ "GL_RGBA8_EXT\0"
3552+ "GL_RGBA_DXT5_S3TC\0"
3553+ "GL_RGBA_MODE\0"
3554+ "GL_RGBA_S3TC\0"
3555+ "GL_RGB_S3TC\0"
3556+ "GL_RGB_SCALE\0"
3557+ "GL_RGB_SCALE_ARB\0"
3558+ "GL_RGB_SCALE_EXT\0"
3559+ "GL_RIGHT\0"
3560+ "GL_S\0"
3561+ "GL_SAMPLER_1D\0"
3562+ "GL_SAMPLER_1D_SHADOW\0"
3563+ "GL_SAMPLER_2D\0"
3564+ "GL_SAMPLER_2D_SHADOW\0"
3565+ "GL_SAMPLER_3D\0"
3566+ "GL_SAMPLER_CUBE\0"
3567+ "GL_SAMPLES\0"
3568+ "GL_SAMPLES_3DFX\0"
3569+ "GL_SAMPLES_ARB\0"
3570+ "GL_SAMPLES_PASSED\0"
3571+ "GL_SAMPLES_PASSED_ARB\0"
3572+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3573+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3574+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3575+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3576+ "GL_SAMPLE_BUFFERS\0"
3577+ "GL_SAMPLE_BUFFERS_3DFX\0"
3578+ "GL_SAMPLE_BUFFERS_ARB\0"
3579+ "GL_SAMPLE_COVERAGE\0"
3580+ "GL_SAMPLE_COVERAGE_ARB\0"
3581+ "GL_SAMPLE_COVERAGE_INVERT\0"
3582+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3583+ "GL_SAMPLE_COVERAGE_VALUE\0"
3584+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3585+ "GL_SCISSOR_BIT\0"
3586+ "GL_SCISSOR_BOX\0"
3587+ "GL_SCISSOR_TEST\0"
3588+ "GL_SECONDARY_COLOR_ARRAY\0"
3589+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3590+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3591+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3592+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3593+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3594+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3595+ "GL_SELECT\0"
3596+ "GL_SELECTION_BUFFER_POINTER\0"
3597+ "GL_SELECTION_BUFFER_SIZE\0"
3598+ "GL_SEPARABLE_2D\0"
3599+ "GL_SEPARATE_SPECULAR_COLOR\0"
3600+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3601+ "GL_SET\0"
3602+ "GL_SHADER_OBJECT_ARB\0"
3603+ "GL_SHADER_SOURCE_LENGTH\0"
3604+ "GL_SHADER_TYPE\0"
3605+ "GL_SHADE_MODEL\0"
3606+ "GL_SHADING_LANGUAGE_VERSION\0"
3607+ "GL_SHADOW_AMBIENT_SGIX\0"
3608+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3609+ "GL_SHININESS\0"
3610+ "GL_SHORT\0"
3611+ "GL_SINGLE_COLOR\0"
3612+ "GL_SINGLE_COLOR_EXT\0"
3613+ "GL_SLICE_ACCUM_SUN\0"
3614+ "GL_SMOOTH\0"
3615+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3616+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3617+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3618+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3619+ "GL_SOURCE0_ALPHA\0"
3620+ "GL_SOURCE0_ALPHA_ARB\0"
3621+ "GL_SOURCE0_ALPHA_EXT\0"
3622+ "GL_SOURCE0_RGB\0"
3623+ "GL_SOURCE0_RGB_ARB\0"
3624+ "GL_SOURCE0_RGB_EXT\0"
3625+ "GL_SOURCE1_ALPHA\0"
3626+ "GL_SOURCE1_ALPHA_ARB\0"
3627+ "GL_SOURCE1_ALPHA_EXT\0"
3628+ "GL_SOURCE1_RGB\0"
3629+ "GL_SOURCE1_RGB_ARB\0"
3630+ "GL_SOURCE1_RGB_EXT\0"
3631+ "GL_SOURCE2_ALPHA\0"
3632+ "GL_SOURCE2_ALPHA_ARB\0"
3633+ "GL_SOURCE2_ALPHA_EXT\0"
3634+ "GL_SOURCE2_RGB\0"
3635+ "GL_SOURCE2_RGB_ARB\0"
3636+ "GL_SOURCE2_RGB_EXT\0"
3637+ "GL_SOURCE3_ALPHA_NV\0"
3638+ "GL_SOURCE3_RGB_NV\0"
3639+ "GL_SPECULAR\0"
3640+ "GL_SPHERE_MAP\0"
3641+ "GL_SPOT_CUTOFF\0"
3642+ "GL_SPOT_DIRECTION\0"
3643+ "GL_SPOT_EXPONENT\0"
3644+ "GL_SRC0_ALPHA\0"
3645+ "GL_SRC0_RGB\0"
3646+ "GL_SRC1_ALPHA\0"
3647+ "GL_SRC1_RGB\0"
3648+ "GL_SRC2_ALPHA\0"
3649+ "GL_SRC2_RGB\0"
3650+ "GL_SRC_ALPHA\0"
3651+ "GL_SRC_ALPHA_SATURATE\0"
3652+ "GL_SRC_COLOR\0"
3653+ "GL_STACK_OVERFLOW\0"
3654+ "GL_STACK_UNDERFLOW\0"
3655+ "GL_STATIC_COPY\0"
3656+ "GL_STATIC_COPY_ARB\0"
3657+ "GL_STATIC_DRAW\0"
3658+ "GL_STATIC_DRAW_ARB\0"
3659+ "GL_STATIC_READ\0"
3660+ "GL_STATIC_READ_ARB\0"
3661+ "GL_STENCIL\0"
3662+ "GL_STENCIL_ATTACHMENT_EXT\0"
3663+ "GL_STENCIL_BACK_FAIL\0"
3664+ "GL_STENCIL_BACK_FUNC\0"
3665+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3666+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3667+ "GL_STENCIL_BACK_REF\0"
3668+ "GL_STENCIL_BACK_VALUE_MASK\0"
3669+ "GL_STENCIL_BACK_WRITEMASK\0"
3670+ "GL_STENCIL_BITS\0"
3671+ "GL_STENCIL_BUFFER_BIT\0"
3672+ "GL_STENCIL_CLEAR_VALUE\0"
3673+ "GL_STENCIL_FAIL\0"
3674+ "GL_STENCIL_FUNC\0"
3675+ "GL_STENCIL_INDEX\0"
3676+ "GL_STENCIL_INDEX16_EXT\0"
3677+ "GL_STENCIL_INDEX1_EXT\0"
3678+ "GL_STENCIL_INDEX4_EXT\0"
3679+ "GL_STENCIL_INDEX8_EXT\0"
3680+ "GL_STENCIL_INDEX_EXT\0"
3681+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3682+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3683+ "GL_STENCIL_REF\0"
3684+ "GL_STENCIL_TEST\0"
3685+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3686+ "GL_STENCIL_VALUE_MASK\0"
3687+ "GL_STENCIL_WRITEMASK\0"
3688+ "GL_STEREO\0"
3689+ "GL_STREAM_COPY\0"
3690+ "GL_STREAM_COPY_ARB\0"
3691+ "GL_STREAM_DRAW\0"
3692+ "GL_STREAM_DRAW_ARB\0"
3693+ "GL_STREAM_READ\0"
3694+ "GL_STREAM_READ_ARB\0"
3695+ "GL_SUBPIXEL_BITS\0"
3696+ "GL_SUBTRACT\0"
3697+ "GL_SUBTRACT_ARB\0"
3698+ "GL_T\0"
3699+ "GL_T2F_C3F_V3F\0"
3700+ "GL_T2F_C4F_N3F_V3F\0"
3701+ "GL_T2F_C4UB_V3F\0"
3702+ "GL_T2F_N3F_V3F\0"
3703+ "GL_T2F_V3F\0"
3704+ "GL_T4F_C4F_N3F_V4F\0"
3705+ "GL_T4F_V4F\0"
3706+ "GL_TABLE_TOO_LARGE_EXT\0"
3707+ "GL_TEXTURE\0"
3708+ "GL_TEXTURE0\0"
3709+ "GL_TEXTURE0_ARB\0"
3710+ "GL_TEXTURE1\0"
3711+ "GL_TEXTURE10\0"
3712+ "GL_TEXTURE10_ARB\0"
3713+ "GL_TEXTURE11\0"
3714+ "GL_TEXTURE11_ARB\0"
3715+ "GL_TEXTURE12\0"
3716+ "GL_TEXTURE12_ARB\0"
3717+ "GL_TEXTURE13\0"
3718+ "GL_TEXTURE13_ARB\0"
3719+ "GL_TEXTURE14\0"
3720+ "GL_TEXTURE14_ARB\0"
3721+ "GL_TEXTURE15\0"
3722+ "GL_TEXTURE15_ARB\0"
3723+ "GL_TEXTURE16\0"
3724+ "GL_TEXTURE16_ARB\0"
3725+ "GL_TEXTURE17\0"
3726+ "GL_TEXTURE17_ARB\0"
3727+ "GL_TEXTURE18\0"
3728+ "GL_TEXTURE18_ARB\0"
3729+ "GL_TEXTURE19\0"
3730+ "GL_TEXTURE19_ARB\0"
3731+ "GL_TEXTURE1_ARB\0"
3732+ "GL_TEXTURE2\0"
3733+ "GL_TEXTURE20\0"
3734+ "GL_TEXTURE20_ARB\0"
3735+ "GL_TEXTURE21\0"
3736+ "GL_TEXTURE21_ARB\0"
3737+ "GL_TEXTURE22\0"
3738+ "GL_TEXTURE22_ARB\0"
3739+ "GL_TEXTURE23\0"
3740+ "GL_TEXTURE23_ARB\0"
3741+ "GL_TEXTURE24\0"
3742+ "GL_TEXTURE24_ARB\0"
3743+ "GL_TEXTURE25\0"
3744+ "GL_TEXTURE25_ARB\0"
3745+ "GL_TEXTURE26\0"
3746+ "GL_TEXTURE26_ARB\0"
3747+ "GL_TEXTURE27\0"
3748+ "GL_TEXTURE27_ARB\0"
3749+ "GL_TEXTURE28\0"
3750+ "GL_TEXTURE28_ARB\0"
3751+ "GL_TEXTURE29\0"
3752+ "GL_TEXTURE29_ARB\0"
3753+ "GL_TEXTURE2_ARB\0"
3754+ "GL_TEXTURE3\0"
3755+ "GL_TEXTURE30\0"
3756+ "GL_TEXTURE30_ARB\0"
3757+ "GL_TEXTURE31\0"
3758+ "GL_TEXTURE31_ARB\0"
3759+ "GL_TEXTURE3_ARB\0"
3760+ "GL_TEXTURE4\0"
3761+ "GL_TEXTURE4_ARB\0"
3762+ "GL_TEXTURE5\0"
3763+ "GL_TEXTURE5_ARB\0"
3764+ "GL_TEXTURE6\0"
3765+ "GL_TEXTURE6_ARB\0"
3766+ "GL_TEXTURE7\0"
3767+ "GL_TEXTURE7_ARB\0"
3768+ "GL_TEXTURE8\0"
3769+ "GL_TEXTURE8_ARB\0"
3770+ "GL_TEXTURE9\0"
3771+ "GL_TEXTURE9_ARB\0"
3772+ "GL_TEXTURE_1D\0"
3773+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3774+ "GL_TEXTURE_2D\0"
3775+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3776+ "GL_TEXTURE_3D\0"
3777+ "GL_TEXTURE_ALPHA_SIZE\0"
3778+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3779+ "GL_TEXTURE_BASE_LEVEL\0"
3780+ "GL_TEXTURE_BINDING_1D\0"
3781+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3782+ "GL_TEXTURE_BINDING_2D\0"
3783+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3784+ "GL_TEXTURE_BINDING_3D\0"
3785+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3786+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3787+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3788+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3789+ "GL_TEXTURE_BIT\0"
3790+ "GL_TEXTURE_BLUE_SIZE\0"
3791+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3792+ "GL_TEXTURE_BORDER\0"
3793+ "GL_TEXTURE_BORDER_COLOR\0"
3794+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3795+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3796+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3797+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3798+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3799+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3800+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3801+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3802+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3803+ "GL_TEXTURE_COMPARE_FUNC\0"
3804+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3805+ "GL_TEXTURE_COMPARE_MODE\0"
3806+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3807+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3808+ "GL_TEXTURE_COMPARE_SGIX\0"
3809+ "GL_TEXTURE_COMPONENTS\0"
3810+ "GL_TEXTURE_COMPRESSED\0"
3811+ "GL_TEXTURE_COMPRESSED_ARB\0"
3812+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3813+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3814+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3815+ "GL_TEXTURE_COMPRESSION_HINT\0"
3816+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3817+ "GL_TEXTURE_COORD_ARRAY\0"
3818+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3819+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3820+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3821+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3822+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3823+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3824+ "GL_TEXTURE_CUBE_MAP\0"
3825+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3826+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3827+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3828+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3829+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3830+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3831+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3832+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3833+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3834+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3835+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3836+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3837+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3838+ "GL_TEXTURE_DEPTH\0"
3839+ "GL_TEXTURE_DEPTH_SIZE\0"
3840+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3841+ "GL_TEXTURE_ENV\0"
3842+ "GL_TEXTURE_ENV_COLOR\0"
3843+ "GL_TEXTURE_ENV_MODE\0"
3844+ "GL_TEXTURE_FILTER_CONTROL\0"
3845+ "GL_TEXTURE_GEN_MODE\0"
3846+ "GL_TEXTURE_GEN_Q\0"
3847+ "GL_TEXTURE_GEN_R\0"
3848+ "GL_TEXTURE_GEN_S\0"
3849+ "GL_TEXTURE_GEN_T\0"
3850+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3851+ "GL_TEXTURE_GREEN_SIZE\0"
3852+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3853+ "GL_TEXTURE_HEIGHT\0"
3854+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3855+ "GL_TEXTURE_INTENSITY_SIZE\0"
3856+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3857+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3858+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3859+ "GL_TEXTURE_LOD_BIAS\0"
3860+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3861+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3862+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3863+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3864+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3865+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3866+ "GL_TEXTURE_MAG_FILTER\0"
3867+ "GL_TEXTURE_MATRIX\0"
3868+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3869+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3870+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3871+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3872+ "GL_TEXTURE_MAX_LEVEL\0"
3873+ "GL_TEXTURE_MAX_LOD\0"
3874+ "GL_TEXTURE_MIN_FILTER\0"
3875+ "GL_TEXTURE_MIN_LOD\0"
3876+ "GL_TEXTURE_PRIORITY\0"
3877+ "GL_TEXTURE_RECTANGLE_ARB\0"
3878+ "GL_TEXTURE_RECTANGLE_NV\0"
3879+ "GL_TEXTURE_RED_SIZE\0"
3880+ "GL_TEXTURE_RED_SIZE_EXT\0"
3881+ "GL_TEXTURE_RESIDENT\0"
3882+ "GL_TEXTURE_STACK_DEPTH\0"
3883+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3884+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3885+ "GL_TEXTURE_WIDTH\0"
3886+ "GL_TEXTURE_WRAP_R\0"
3887+ "GL_TEXTURE_WRAP_S\0"
3888+ "GL_TEXTURE_WRAP_T\0"
3889+ "GL_TIME_ELAPSED_EXT\0"
3890+ "GL_TRACK_MATRIX_NV\0"
3891+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3892+ "GL_TRANSFORM_BIT\0"
3893+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3894+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3895+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3896+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3897+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3898+ "GL_TRANSPOSE_NV\0"
3899+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3900+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3901+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3902+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3903+ "GL_TRIANGLES\0"
3904+ "GL_TRIANGLE_FAN\0"
3905+ "GL_TRIANGLE_MESH_SUN\0"
3906+ "GL_TRIANGLE_STRIP\0"
3907+ "GL_TRUE\0"
3908+ "GL_UNPACK_ALIGNMENT\0"
3909+ "GL_UNPACK_IMAGE_HEIGHT\0"
3910+ "GL_UNPACK_LSB_FIRST\0"
3911+ "GL_UNPACK_ROW_LENGTH\0"
3912+ "GL_UNPACK_SKIP_IMAGES\0"
3913+ "GL_UNPACK_SKIP_PIXELS\0"
3914+ "GL_UNPACK_SKIP_ROWS\0"
3915+ "GL_UNPACK_SWAP_BYTES\0"
3916+ "GL_UNSIGNED_BYTE\0"
3917+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3918+ "GL_UNSIGNED_BYTE_3_3_2\0"
3919+ "GL_UNSIGNED_INT\0"
3920+ "GL_UNSIGNED_INT_10_10_10_2\0"
3921+ "GL_UNSIGNED_INT_24_8_NV\0"
3922+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3923+ "GL_UNSIGNED_INT_8_8_8_8\0"
3924+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3925+ "GL_UNSIGNED_SHORT\0"
3926+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3927+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3928+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3929+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3930+ "GL_UNSIGNED_SHORT_5_6_5\0"
3931+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3932+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3933+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3934+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3935+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3936+ "GL_UPPER_LEFT\0"
3937+ "GL_V2F\0"
3938+ "GL_V3F\0"
3939+ "GL_VALIDATE_STATUS\0"
3940+ "GL_VENDOR\0"
3941+ "GL_VERSION\0"
3942+ "GL_VERTEX_ARRAY\0"
3943+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3944+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3945+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3946+ "GL_VERTEX_ARRAY_POINTER\0"
3947+ "GL_VERTEX_ARRAY_SIZE\0"
3948+ "GL_VERTEX_ARRAY_STRIDE\0"
3949+ "GL_VERTEX_ARRAY_TYPE\0"
3950+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3951+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3952+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3953+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3954+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3955+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3956+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3957+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3958+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3959+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3960+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3961+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3962+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3963+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3964+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3965+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3966+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3967+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3968+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3969+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3970+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3971+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3972+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3973+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3974+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3975+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3976+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3977+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3978+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3979+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3980+ "GL_VERTEX_BLEND_ARB\0"
3981+ "GL_VERTEX_PROGRAM_ARB\0"
3982+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3983+ "GL_VERTEX_PROGRAM_NV\0"
3984+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3985+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3986+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3987+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3988+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3989+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3990+ "GL_VERTEX_SHADER\0"
3991+ "GL_VERTEX_SHADER_ARB\0"
3992+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3993+ "GL_VIEWPORT\0"
3994+ "GL_VIEWPORT_BIT\0"
3995+ "GL_WEIGHT_ARRAY_ARB\0"
3996+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3997+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3998+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3999+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
4000+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
4001+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
4002+ "GL_WEIGHT_SUM_UNITY_ARB\0"
4003+ "GL_WRAP_BORDER_SUN\0"
4004+ "GL_WRITE_ONLY\0"
4005+ "GL_WRITE_ONLY_ARB\0"
4006+ "GL_XOR\0"
4007+ "GL_YCBCR_422_APPLE\0"
4008+ "GL_YCBCR_MESA\0"
4009+ "GL_ZERO\0"
4010+ "GL_ZOOM_X\0"
4011+ "GL_ZOOM_Y\0"
4012+ ;
4013+
4014+static const enum_elt all_enums[1746] =
4015+{
4016+ { 0, 0x00000600 }, /* GL_2D */
4017+ { 6, 0x00001407 }, /* GL_2_BYTES */
4018+ { 17, 0x00000601 }, /* GL_3D */
4019+ { 23, 0x00000602 }, /* GL_3D_COLOR */
4020+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
4021+ { 55, 0x00001408 }, /* GL_3_BYTES */
4022+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
4023+ { 86, 0x00001409 }, /* GL_4_BYTES */
4024+ { 97, 0x00000100 }, /* GL_ACCUM */
4025+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
4026+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
4027+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
4028+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
4029+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
4030+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
4031+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
4032+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
4033+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
4034+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
4035+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
4036+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
4037+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
4038+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
4039+ { 418, 0x00000104 }, /* GL_ADD */
4040+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
4041+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
4042+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
4043+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
4044+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
4045+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
4046+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
4047+ { 576, 0x00001906 }, /* GL_ALPHA */
4048+ { 585, 0x0000803D }, /* GL_ALPHA12 */
4049+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
4050+ { 611, 0x0000803E }, /* GL_ALPHA16 */
4051+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
4052+ { 637, 0x0000803B }, /* GL_ALPHA4 */
4053+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
4054+ { 661, 0x0000803C }, /* GL_ALPHA8 */
4055+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
4056+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
4057+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
4058+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
4059+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
4060+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
4061+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
4062+ { 779, 0x00000207 }, /* GL_ALWAYS */
4063+ { 789, 0x00001200 }, /* GL_AMBIENT */
4064+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
4065+ { 823, 0x00001501 }, /* GL_AND */
4066+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
4067+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
4068+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
4069+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
4070+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
4071+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
4072+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
4073+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
4074+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
4075+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
4076+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
4077+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
4078+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
4079+ { 1107, 0x00000409 }, /* GL_AUX0 */
4080+ { 1115, 0x0000040A }, /* GL_AUX1 */
4081+ { 1123, 0x0000040B }, /* GL_AUX2 */
4082+ { 1131, 0x0000040C }, /* GL_AUX3 */
4083+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
4084+ { 1154, 0x00000405 }, /* GL_BACK */
4085+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
4086+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
4087+ { 1189, 0x000080E0 }, /* GL_BGR */
4088+ { 1196, 0x000080E1 }, /* GL_BGRA */
4089+ { 1204, 0x00001A00 }, /* GL_BITMAP */
4090+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
4091+ { 1230, 0x00000BE2 }, /* GL_BLEND */
4092+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
4093+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
4094+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
4095+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
4096+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
4097+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
4098+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
4099+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
4100+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
4101+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
4102+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
4103+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
4104+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
4105+ { 1489, 0x00001905 }, /* GL_BLUE */
4106+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
4107+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
4108+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
4109+ { 1537, 0x00008B56 }, /* GL_BOOL */
4110+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
4111+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
4112+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
4113+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
4114+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
4115+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
4116+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4117+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4118+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4119+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4120+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4121+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4122+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4123+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4124+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4125+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4126+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4127+ { 1841, 0x00001400 }, /* GL_BYTE */
4128+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4129+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4130+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4131+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4132+ { 1899, 0x00000901 }, /* GL_CCW */
4133+ { 1906, 0x00002900 }, /* GL_CLAMP */
4134+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4135+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4136+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4137+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4138+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4139+ { 2020, 0x00001500 }, /* GL_CLEAR */
4140+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4141+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4142+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4143+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4144+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4145+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4146+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4147+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4148+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4149+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4150+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4151+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4152+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4153+ { 2314, 0x00000A00 }, /* GL_COEFF */
4154+ { 2323, 0x00001800 }, /* GL_COLOR */
4155+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4156+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4157+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4158+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4159+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4160+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4161+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4162+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4163+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4164+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4165+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4166+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4167+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4168+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4169+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4170+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4171+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4172+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4173+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4174+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4175+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4176+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4177+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4178+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4179+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4180+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4181+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4182+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4183+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4184+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4185+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4186+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4187+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4188+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4189+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4190+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4191+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4192+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4193+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4194+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4195+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4196+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4197+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4198+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4199+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4200+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4201+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4202+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4203+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4204+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4205+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4206+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4207+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4208+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4209+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4210+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4211+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4212+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4213+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4214+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4215+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4216+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4217+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4218+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4219+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4220+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4221+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4222+ { 3988, 0x00008570 }, /* GL_COMBINE */
4223+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4224+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4225+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4226+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4227+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4228+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4229+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4230+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4231+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4232+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4233+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4234+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4235+ { 4241, 0x00001300 }, /* GL_COMPILE */
4236+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4237+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4238+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4239+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4240+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4241+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4242+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4243+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4244+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4245+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4246+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4247+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4248+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4249+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4250+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4251+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4252+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4253+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4254+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4255+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4256+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4257+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4258+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4259+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4260+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4261+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4262+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4263+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4264+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4265+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4266+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4267+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4268+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4269+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4270+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4271+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4272+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4273+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4274+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4275+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4276+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4277+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4278+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4279+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4280+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4281+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4282+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4283+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4284+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4285+ { 5446, 0x00001503 }, /* GL_COPY */
4286+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4287+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4288+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4289+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4290+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4291+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4292+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4293+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4294+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4295+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4296+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4297+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4298+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4299+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4300+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4301+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4302+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4303+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4304+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4305+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4306+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4307+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4308+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4309+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4310+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4311+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4312+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4313+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4314+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4315+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4316+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4317+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4318+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4319+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4320+ { 6265, 0x00000900 }, /* GL_CW */
4321+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4322+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4323+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4324+ { 6333, 0x00002101 }, /* GL_DECAL */
4325+ { 6342, 0x00001E03 }, /* GL_DECR */
4326+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4327+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4328+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4329+ { 6397, 0x00001801 }, /* GL_DEPTH */
4330+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4331+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4332+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4333+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4334+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4335+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4336+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4337+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4338+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4339+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4340+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4341+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4342+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4343+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4344+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4345+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4346+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4347+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4348+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4349+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4350+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4351+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4352+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4353+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4354+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4355+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4356+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4357+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4358+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4359+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4360+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4361+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4362+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4363+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4364+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4365+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4366+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4367+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4368+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4369+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4370+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4371+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4372+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4373+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4374+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4375+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4376+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4377+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4378+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4379+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4380+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4381+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4382+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4383+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4384+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4385+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4386+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4387+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4388+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4389+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4390+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4391+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4392+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4393+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4394+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4395+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4396+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4397+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4398+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4399+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4400+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4401+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4402+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4403+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4404+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4405+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4406+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4407+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4408+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4409+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4410+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4411+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4412+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4413+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4414+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4415+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4416+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4417+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4418+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4419+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4420+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4421+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4422+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4423+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4424+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4425+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4426+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4427+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4428+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4429+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4430+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4431+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4432+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4433+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4434+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4435+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4436+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4437+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4438+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4439+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4440+ { 8575, 0x00001600 }, /* GL_EMISSION */
4441+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4442+ { 8601, 0x00000202 }, /* GL_EQUAL */
4443+ { 8610, 0x00001509 }, /* GL_EQUIV */
4444+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4445+ { 8631, 0x00000800 }, /* GL_EXP */
4446+ { 8638, 0x00000801 }, /* GL_EXP2 */
4447+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4448+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4449+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4450+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4451+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4452+ { 8729, 0x00000000 }, /* GL_FALSE */
4453+ { 8738, 0x00001101 }, /* GL_FASTEST */
4454+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4455+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4456+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4457+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4458+ { 8836, 0x00001B02 }, /* GL_FILL */
4459+ { 8844, 0x00001D00 }, /* GL_FLAT */
4460+ { 8852, 0x00001406 }, /* GL_FLOAT */
4461+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4462+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4463+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4464+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4465+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4466+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4467+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4468+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4469+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4470+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4471+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4472+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4473+ { 9053, 0x00000B60 }, /* GL_FOG */
4474+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4475+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4476+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4477+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4478+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4479+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4480+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4481+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4482+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4483+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4484+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4485+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4486+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4487+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4488+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4489+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4490+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4491+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4492+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4493+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4494+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4495+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4496+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4497+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4498+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4499+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4500+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4501+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4502+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4503+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4504+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4505+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4506+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4507+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4508+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4509+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4510+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4511+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4512+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4513+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4514+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4515+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4516+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4517+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4518+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4519+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4520+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4521+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4522+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4523+ { 10462, 0x00000404 }, /* GL_FRONT */
4524+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4525+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4526+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4527+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4528+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4529+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4530+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4531+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4532+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4533+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4534+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4535+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4536+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4537+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4538+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4539+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4540+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4541+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4542+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4543+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4544+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4545+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4546+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4547+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4548+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4549+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4550+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4551+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4552+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4553+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4554+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4555+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4556+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4557+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4558+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4559+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4560+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4561+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4562+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4563+ { 11304, 0x00000204 }, /* GL_GREATER */
4564+ { 11315, 0x00001904 }, /* GL_GREEN */
4565+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4566+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4567+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4568+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4569+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4570+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4571+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4572+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4573+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4574+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4575+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4576+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4577+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4578+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4579+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4580+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4581+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4582+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4583+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4584+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4585+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4586+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4587+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4588+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4589+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4590+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4591+ { 11910, 0x00001E02 }, /* GL_INCR */
4592+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4593+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4594+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4595+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4596+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4597+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4598+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4599+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4600+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4601+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4602+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4603+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4604+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4605+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4606+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4607+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4608+ { 12228, 0x00001404 }, /* GL_INT */
4609+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4610+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4611+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4612+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4613+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4614+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4615+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4616+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4617+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4618+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4619+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4620+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4621+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4622+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4623+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4624+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4625+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4626+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4627+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4628+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4629+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4630+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4631+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4632+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4633+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4634+ { 12663, 0x0000150A }, /* GL_INVERT */
4635+ { 12673, 0x00001E00 }, /* GL_KEEP */
4636+ { 12681, 0x00000406 }, /* GL_LEFT */
4637+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4638+ { 12699, 0x00000201 }, /* GL_LESS */
4639+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4640+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4641+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4642+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4643+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4644+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4645+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4646+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4647+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4648+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4649+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4650+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4651+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4652+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4653+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4654+ { 12952, 0x00001B01 }, /* GL_LINE */
4655+ { 12960, 0x00002601 }, /* GL_LINEAR */
4656+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4657+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4658+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4659+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4660+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4661+ { 13102, 0x00000001 }, /* GL_LINES */
4662+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4663+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4664+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4665+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4666+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4667+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4668+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4669+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4670+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4671+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4672+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4673+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4674+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4675+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4676+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4677+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4678+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4679+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4680+ { 13409, 0x00000101 }, /* GL_LOAD */
4681+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4682+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4683+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4684+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4685+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4686+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4687+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4688+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4689+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4690+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4691+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4692+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4693+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4694+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4695+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4696+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4697+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4698+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4699+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4700+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4701+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4702+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4703+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4704+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4705+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4706+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4707+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4708+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4709+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4710+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4711+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4712+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4713+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4714+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4715+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4716+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4717+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4718+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4719+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4720+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4721+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4722+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4723+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4724+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4725+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4726+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4727+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4728+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4729+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4730+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4731+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4732+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4733+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4734+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4735+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4736+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4737+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4738+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4739+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4740+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4741+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4742+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4743+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4744+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4745+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4746+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4747+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4748+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4749+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4750+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4751+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4752+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4753+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4754+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4755+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4756+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4757+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4758+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4759+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4760+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4761+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4762+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4763+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4764+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4765+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4766+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4767+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4768+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4769+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4770+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4771+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4772+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4773+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4774+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4775+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4776+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4777+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4778+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4779+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4780+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4781+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4782+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4783+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4784+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4785+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4786+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4787+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4788+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4789+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4790+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4791+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4792+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4793+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4794+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4795+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4796+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4797+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4798+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4799+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4800+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4801+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4802+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4803+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4804+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4805+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4806+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4807+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4808+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4809+ { 16086, 0x00008008 }, /* GL_MAX */
4810+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4811+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4812+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4813+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4814+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4815+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4816+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4817+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4818+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4819+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4820+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4821+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4822+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4823+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4824+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4825+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4826+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4827+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4828+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4829+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4830+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4831+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4832+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4833+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4834+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4835+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4836+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4837+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4838+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4839+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4840+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4841+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4842+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4843+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4844+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4845+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4846+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4847+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4848+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4849+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4850+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4851+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4852+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4853+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4854+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4855+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4856+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4857+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4858+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4859+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4860+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4861+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4862+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4863+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4864+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4865+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4866+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4867+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4868+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4869+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4870+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4871+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4872+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4873+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4874+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4875+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4876+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4877+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4878+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4879+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4880+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4881+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4882+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4883+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4884+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4885+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4886+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4887+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4888+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4889+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4890+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4891+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4892+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4893+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4894+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4895+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4896+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4897+ { 18669, 0x00008007 }, /* GL_MIN */
4898+ { 18676, 0x0000802E }, /* GL_MINMAX */
4899+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4900+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4901+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4902+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4903+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4904+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4905+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4906+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4907+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4908+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4909+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4910+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4911+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4912+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4913+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4914+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4915+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4916+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4917+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4918+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4919+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4920+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4921+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4922+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4923+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4924+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4925+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4926+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4927+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4928+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4929+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4930+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4931+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4932+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4933+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4934+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4935+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4936+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4937+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4938+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4939+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4940+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4941+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4942+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4943+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4944+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4945+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4946+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4947+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4948+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4949+ { 19657, 0x00002100 }, /* GL_MODULATE */
4950+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4951+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4952+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4953+ { 19741, 0x00000103 }, /* GL_MULT */
4954+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4955+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4956+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4957+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4958+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4959+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4960+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4961+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4962+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4963+ { 19930, 0x0000150E }, /* GL_NAND */
4964+ { 19938, 0x00002600 }, /* GL_NEAREST */
4965+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4966+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4967+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4968+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4969+ { 20063, 0x00000200 }, /* GL_NEVER */
4970+ { 20072, 0x00001102 }, /* GL_NICEST */
4971+ { 20082, 0x00000000 }, /* GL_NONE */
4972+ { 20090, 0x00001505 }, /* GL_NOOP */
4973+ { 20098, 0x00001508 }, /* GL_NOR */
4974+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4975+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4976+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4977+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4978+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4979+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4980+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4981+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4982+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4983+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4984+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4985+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4986+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4987+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4988+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4989+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4990+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4991+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4992+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4993+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4994+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4995+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4996+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4997+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4998+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4999+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
5000+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
5001+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
5002+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
5003+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
5004+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
5005+ { 20889, 0x00000001 }, /* GL_ONE */
5006+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
5007+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
5008+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
5009+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
5010+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
5011+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
5012+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
5013+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
5014+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
5015+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
5016+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
5017+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
5018+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
5019+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
5020+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
5021+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
5022+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
5023+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
5024+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
5025+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
5026+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
5027+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
5028+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
5029+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
5030+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
5031+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
5032+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
5033+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
5034+ { 21502, 0x00001507 }, /* GL_OR */
5035+ { 21508, 0x00000A01 }, /* GL_ORDER */
5036+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
5037+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
5038+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
5039+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
5040+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
5041+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
5042+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
5043+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
5044+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
5045+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
5046+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
5047+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
5048+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
5049+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
5050+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
5051+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
5052+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
5053+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
5054+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
5055+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
5056+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
5057+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
5058+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
5059+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
5060+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
5061+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5062+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
5063+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5064+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
5065+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5066+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
5067+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5068+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
5069+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5070+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
5071+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5072+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
5073+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5074+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
5075+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5076+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
5077+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5078+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
5079+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5080+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
5081+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
5082+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
5083+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
5084+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
5085+ { 22605, 0x00001B00 }, /* GL_POINT */
5086+ { 22614, 0x00000000 }, /* GL_POINTS */
5087+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
5088+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
5089+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
5090+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
5091+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
5092+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
5093+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
5094+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
5095+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
5096+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
5097+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
5098+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
5099+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
5100+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
5101+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
5102+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
5103+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
5104+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
5105+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
5106+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
5107+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
5108+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
5109+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
5110+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
5111+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
5112+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
5113+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
5114+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
5115+ { 23291, 0x00000009 }, /* GL_POLYGON */
5116+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5117+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5118+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5119+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5120+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5121+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5122+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5123+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5124+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5125+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5126+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5127+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5128+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5129+ { 23575, 0x00001203 }, /* GL_POSITION */
5130+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5131+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5132+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5133+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5134+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5135+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5136+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5137+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5138+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5139+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5140+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5141+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5142+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5143+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5144+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5145+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5146+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5147+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5148+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5149+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5150+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5151+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5152+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5153+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5154+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5155+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5156+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5157+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5158+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5159+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5160+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5161+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5162+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5163+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5164+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5165+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5166+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5167+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5168+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5169+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5170+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5171+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5172+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5173+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5174+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5175+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5176+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5177+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5178+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5179+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5180+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5181+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5182+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5183+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5184+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5185+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5186+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5187+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5188+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5189+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5190+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5191+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5192+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5193+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5194+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5195+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5196+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5197+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5198+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5199+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5200+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5201+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5202+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5203+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5204+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5205+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5206+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5207+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5208+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5209+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5210+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5211+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5212+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5213+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5214+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5215+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5216+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5217+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5218+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5219+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5220+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5221+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5222+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5223+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5224+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5225+ { 26377, 0x00002003 }, /* GL_Q */
5226+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5227+ { 26407, 0x00000007 }, /* GL_QUADS */
5228+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5229+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5230+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5231+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5232+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5233+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5234+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5235+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5236+ { 26587, 0x00002002 }, /* GL_R */
5237+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5238+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5239+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5240+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5241+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5242+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5243+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5244+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5245+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5246+ { 26770, 0x00001903 }, /* GL_RED */
5247+ { 26777, 0x00008016 }, /* GL_REDUCE */
5248+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5249+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5250+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5251+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5252+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5253+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5254+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5255+ { 26899, 0x00001C00 }, /* GL_RENDER */
5256+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5257+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5258+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5259+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5260+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5261+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5262+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5263+ { 27073, 0x00002901 }, /* GL_REPEAT */
5264+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5265+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5266+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5267+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5268+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5269+ { 27172, 0x00000102 }, /* GL_RETURN */
5270+ { 27182, 0x00001907 }, /* GL_RGB */
5271+ { 27189, 0x00008052 }, /* GL_RGB10 */
5272+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5273+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5274+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5275+ { 27239, 0x00008053 }, /* GL_RGB12 */
5276+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5277+ { 27261, 0x00008054 }, /* GL_RGB16 */
5278+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5279+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5280+ { 27295, 0x0000804F }, /* GL_RGB4 */
5281+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5282+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5283+ { 27328, 0x00008050 }, /* GL_RGB5 */
5284+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5285+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5286+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5287+ { 27374, 0x00008051 }, /* GL_RGB8 */
5288+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5289+ { 27394, 0x00001908 }, /* GL_RGBA */
5290+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5291+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5292+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5293+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5294+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5295+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5296+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5297+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5298+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5299+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5300+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5301+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5302+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5303+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5304+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5305+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5306+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5307+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5308+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5309+ { 27652, 0x00000407 }, /* GL_RIGHT */
5310+ { 27661, 0x00002000 }, /* GL_S */
5311+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5312+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5313+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5314+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5315+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5316+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5317+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5318+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5319+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5320+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5321+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5322+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5323+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5324+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5325+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5326+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5327+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5328+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5329+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5330+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5331+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5332+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5333+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5334+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5335+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5336+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5337+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5338+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5339+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5340+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5341+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5342+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5343+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5344+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5345+ { 28453, 0x00001C02 }, /* GL_SELECT */
5346+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5347+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5348+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5349+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5350+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5351+ { 28590, 0x0000150F }, /* GL_SET */
5352+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5353+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5354+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5355+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5356+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5357+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5358+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5359+ { 28753, 0x00001601 }, /* GL_SHININESS */
5360+ { 28766, 0x00001402 }, /* GL_SHORT */
5361+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5362+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5363+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5364+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5365+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5366+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5367+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5368+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5369+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5370+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5371+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5372+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5373+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5374+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5375+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5376+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5377+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5378+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5379+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5380+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5381+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5382+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5383+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5384+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5385+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5386+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5387+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5388+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5389+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5390+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5391+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5392+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5393+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5394+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5395+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5396+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5397+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5398+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5399+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5400+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5401+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5402+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5403+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5404+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5405+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5406+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5407+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5408+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5409+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5410+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5411+ { 29675, 0x00001802 }, /* GL_STENCIL */
5412+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5413+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5414+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5415+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5416+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5417+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5418+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5419+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5420+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5421+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5422+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5423+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5424+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5425+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5426+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5427+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5428+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5429+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5430+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5431+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5432+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5433+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5434+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5435+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5436+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5437+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5438+ { 30268, 0x00000C33 }, /* GL_STEREO */
5439+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5440+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5441+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5442+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5443+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5444+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5445+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5446+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5447+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5448+ { 30425, 0x00002001 }, /* GL_T */
5449+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5450+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5451+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5452+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5453+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5454+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5455+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5456+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5457+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5458+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5459+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5460+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5461+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5462+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5463+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5464+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5465+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5466+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5467+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5468+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5469+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5470+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5471+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5472+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5473+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5474+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5475+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5476+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5477+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5478+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5479+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5480+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5481+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5482+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5483+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5484+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5485+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5486+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5487+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5488+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5489+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5490+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5491+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5492+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5493+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5494+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5495+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5496+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5497+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5498+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5499+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5500+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5501+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5502+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5503+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5504+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5505+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5506+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5507+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5508+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5509+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5510+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5511+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5512+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5513+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5514+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5515+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5516+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5517+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5518+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5519+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5520+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5521+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5522+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5523+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5524+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5525+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5526+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5527+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5528+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5529+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5530+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5531+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5532+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5533+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5534+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5535+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5536+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5537+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5538+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5539+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5540+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5541+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5542+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5543+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5544+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5545+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5546+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5547+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5548+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5549+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5550+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5551+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5552+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5553+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5554+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5555+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5556+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5557+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5558+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5559+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5560+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5561+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5562+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5563+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5564+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5565+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5566+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5567+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5568+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5569+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5570+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5571+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5572+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5573+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5574+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5575+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5576+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5577+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5578+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5579+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5580+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5581+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5582+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5583+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5584+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5585+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5586+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5587+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5588+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5589+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5590+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5591+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5592+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5593+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5594+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5595+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5596+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5597+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5598+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5599+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5600+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5601+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5602+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5603+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5604+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5605+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5606+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5607+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5608+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5609+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5610+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5611+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5612+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5613+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5614+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5615+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5616+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5617+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5618+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5619+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5620+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5621+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5622+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5623+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5624+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5625+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5626+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5627+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5628+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5629+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5630+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5631+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5632+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5633+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5634+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5635+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5636+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5637+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5638+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5639+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5640+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5641+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5642+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5643+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5644+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5645+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5646+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5647+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5648+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5649+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5650+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5651+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5652+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5653+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5654+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5655+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5656+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5657+ { 34980, 0x00000001 }, /* GL_TRUE */
5658+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5659+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5660+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5661+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5662+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5663+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5664+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5665+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5666+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5667+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5668+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5669+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5670+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5671+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5672+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5673+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5674+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5675+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5676+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5677+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5678+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5679+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5680+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5681+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5682+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5683+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5684+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5685+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5686+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5687+ { 35688, 0x00002A20 }, /* GL_V2F */
5688+ { 35695, 0x00002A21 }, /* GL_V3F */
5689+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5690+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5691+ { 35731, 0x00001F02 }, /* GL_VERSION */
5692+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5693+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5694+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5695+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5696+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5697+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5698+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5699+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5700+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5701+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5702+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5703+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5704+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5705+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5706+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5707+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5708+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5709+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5710+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5711+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5712+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5713+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5714+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5715+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5716+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5717+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5718+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5719+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5720+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5721+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5722+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5723+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5724+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5725+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5726+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5727+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5728+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5729+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5730+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5731+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5732+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5733+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5734+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5735+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5736+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5737+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5738+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5739+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5740+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5741+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5742+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5743+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5744+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5745+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5746+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5747+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5748+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5749+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5750+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5751+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5752+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5753+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5754+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5755+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5756+ { 37482, 0x00001506 }, /* GL_XOR */
5757+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5758+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5759+ { 37522, 0x00000000 }, /* GL_ZERO */
5760+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5761+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5762+};
5763+
5764+static const unsigned reduced_enums[1284] =
5765+{
5766+ 436, /* GL_FALSE */
5767+ 645, /* GL_LINES */
5768+ 647, /* GL_LINE_LOOP */
5769+ 654, /* GL_LINE_STRIP */
5770+ 1637, /* GL_TRIANGLES */
5771+ 1640, /* GL_TRIANGLE_STRIP */
5772+ 1638, /* GL_TRIANGLE_FAN */
5773+ 1211, /* GL_QUADS */
5774+ 1213, /* GL_QUAD_STRIP */
5775+ 1099, /* GL_POLYGON */
5776+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5777+ 1064, /* GL_PIXEL_MODE_BIT */
5778+ 632, /* GL_LIGHTING_BIT */
5779+ 458, /* GL_FOG_BIT */
5780+ 8, /* GL_ACCUM */
5781+ 664, /* GL_LOAD */
5782+ 1253, /* GL_RETURN */
5783+ 937, /* GL_MULT */
5784+ 23, /* GL_ADD */
5785+ 953, /* GL_NEVER */
5786+ 622, /* GL_LESS */
5787+ 426, /* GL_EQUAL */
5788+ 621, /* GL_LEQUAL */
5789+ 547, /* GL_GREATER */
5790+ 968, /* GL_NOTEQUAL */
5791+ 522, /* GL_GEQUAL */
5792+ 46, /* GL_ALWAYS */
5793+ 1386, /* GL_SRC_COLOR */
5794+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5795+ 1384, /* GL_SRC_ALPHA */
5796+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5797+ 406, /* GL_DST_ALPHA */
5798+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5799+ 407, /* GL_DST_COLOR */
5800+ 995, /* GL_ONE_MINUS_DST_COLOR */
5801+ 1385, /* GL_SRC_ALPHA_SATURATE */
5802+ 510, /* GL_FRONT_LEFT */
5803+ 511, /* GL_FRONT_RIGHT */
5804+ 69, /* GL_BACK_LEFT */
5805+ 70, /* GL_BACK_RIGHT */
5806+ 507, /* GL_FRONT */
5807+ 68, /* GL_BACK */
5808+ 620, /* GL_LEFT */
5809+ 1293, /* GL_RIGHT */
5810+ 508, /* GL_FRONT_AND_BACK */
5811+ 63, /* GL_AUX0 */
5812+ 64, /* GL_AUX1 */
5813+ 65, /* GL_AUX2 */
5814+ 66, /* GL_AUX3 */
5815+ 612, /* GL_INVALID_ENUM */
5816+ 615, /* GL_INVALID_VALUE */
5817+ 614, /* GL_INVALID_OPERATION */
5818+ 1387, /* GL_STACK_OVERFLOW */
5819+ 1388, /* GL_STACK_UNDERFLOW */
5820+ 1022, /* GL_OUT_OF_MEMORY */
5821+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5822+ 0, /* GL_2D */
5823+ 2, /* GL_3D */
5824+ 3, /* GL_3D_COLOR */
5825+ 4, /* GL_3D_COLOR_TEXTURE */
5826+ 6, /* GL_4D_COLOR_TEXTURE */
5827+ 1042, /* GL_PASS_THROUGH_TOKEN */
5828+ 1098, /* GL_POINT_TOKEN */
5829+ 655, /* GL_LINE_TOKEN */
5830+ 1112, /* GL_POLYGON_TOKEN */
5831+ 74, /* GL_BITMAP_TOKEN */
5832+ 405, /* GL_DRAW_PIXEL_TOKEN */
5833+ 271, /* GL_COPY_PIXEL_TOKEN */
5834+ 648, /* GL_LINE_RESET_TOKEN */
5835+ 429, /* GL_EXP */
5836+ 430, /* GL_EXP2 */
5837+ 304, /* GL_CW */
5838+ 116, /* GL_CCW */
5839+ 137, /* GL_COEFF */
5840+ 1019, /* GL_ORDER */
5841+ 344, /* GL_DOMAIN */
5842+ 279, /* GL_CURRENT_COLOR */
5843+ 282, /* GL_CURRENT_INDEX */
5844+ 288, /* GL_CURRENT_NORMAL */
5845+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5846+ 293, /* GL_CURRENT_RASTER_COLOR */
5847+ 295, /* GL_CURRENT_RASTER_INDEX */
5848+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5849+ 296, /* GL_CURRENT_RASTER_POSITION */
5850+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5851+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5852+ 1091, /* GL_POINT_SMOOTH */
5853+ 1080, /* GL_POINT_SIZE */
5854+ 1090, /* GL_POINT_SIZE_RANGE */
5855+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5856+ 649, /* GL_LINE_SMOOTH */
5857+ 656, /* GL_LINE_WIDTH */
5858+ 658, /* GL_LINE_WIDTH_RANGE */
5859+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5860+ 651, /* GL_LINE_STIPPLE */
5861+ 652, /* GL_LINE_STIPPLE_PATTERN */
5862+ 653, /* GL_LINE_STIPPLE_REPEAT */
5863+ 663, /* GL_LIST_MODE */
5864+ 822, /* GL_MAX_LIST_NESTING */
5865+ 660, /* GL_LIST_BASE */
5866+ 662, /* GL_LIST_INDEX */
5867+ 1101, /* GL_POLYGON_MODE */
5868+ 1108, /* GL_POLYGON_SMOOTH */
5869+ 1110, /* GL_POLYGON_STIPPLE */
5870+ 414, /* GL_EDGE_FLAG */
5871+ 272, /* GL_CULL_FACE */
5872+ 273, /* GL_CULL_FACE_MODE */
5873+ 509, /* GL_FRONT_FACE */
5874+ 631, /* GL_LIGHTING */
5875+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5876+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5877+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5878+ 1339, /* GL_SHADE_MODEL */
5879+ 168, /* GL_COLOR_MATERIAL_FACE */
5880+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5881+ 167, /* GL_COLOR_MATERIAL */
5882+ 457, /* GL_FOG */
5883+ 479, /* GL_FOG_INDEX */
5884+ 475, /* GL_FOG_DENSITY */
5885+ 483, /* GL_FOG_START */
5886+ 477, /* GL_FOG_END */
5887+ 480, /* GL_FOG_MODE */
5888+ 459, /* GL_FOG_COLOR */
5889+ 333, /* GL_DEPTH_RANGE */
5890+ 338, /* GL_DEPTH_TEST */
5891+ 341, /* GL_DEPTH_WRITEMASK */
5892+ 321, /* GL_DEPTH_CLEAR_VALUE */
5893+ 332, /* GL_DEPTH_FUNC */
5894+ 12, /* GL_ACCUM_CLEAR_VALUE */
5895+ 1418, /* GL_STENCIL_TEST */
5896+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5897+ 1408, /* GL_STENCIL_FUNC */
5898+ 1420, /* GL_STENCIL_VALUE_MASK */
5899+ 1407, /* GL_STENCIL_FAIL */
5900+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5901+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5902+ 1417, /* GL_STENCIL_REF */
5903+ 1421, /* GL_STENCIL_WRITEMASK */
5904+ 791, /* GL_MATRIX_MODE */
5905+ 958, /* GL_NORMALIZE */
5906+ 1727, /* GL_VIEWPORT */
5907+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5908+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5909+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5910+ 930, /* GL_MODELVIEW_MATRIX */
5911+ 1190, /* GL_PROJECTION_MATRIX */
5912+ 1601, /* GL_TEXTURE_MATRIX */
5913+ 61, /* GL_ATTRIB_STACK_DEPTH */
5914+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5915+ 43, /* GL_ALPHA_TEST */
5916+ 44, /* GL_ALPHA_TEST_FUNC */
5917+ 45, /* GL_ALPHA_TEST_REF */
5918+ 343, /* GL_DITHER */
5919+ 78, /* GL_BLEND_DST */
5920+ 86, /* GL_BLEND_SRC */
5921+ 75, /* GL_BLEND */
5922+ 666, /* GL_LOGIC_OP_MODE */
5923+ 586, /* GL_INDEX_LOGIC_OP */
5924+ 166, /* GL_COLOR_LOGIC_OP */
5925+ 67, /* GL_AUX_BUFFERS */
5926+ 354, /* GL_DRAW_BUFFER */
5927+ 1223, /* GL_READ_BUFFER */
5928+ 1320, /* GL_SCISSOR_BOX */
5929+ 1321, /* GL_SCISSOR_TEST */
5930+ 585, /* GL_INDEX_CLEAR_VALUE */
5931+ 590, /* GL_INDEX_WRITEMASK */
5932+ 163, /* GL_COLOR_CLEAR_VALUE */
5933+ 205, /* GL_COLOR_WRITEMASK */
5934+ 587, /* GL_INDEX_MODE */
5935+ 1287, /* GL_RGBA_MODE */
5936+ 353, /* GL_DOUBLEBUFFER */
5937+ 1422, /* GL_STEREO */
5938+ 1246, /* GL_RENDER_MODE */
5939+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5940+ 1092, /* GL_POINT_SMOOTH_HINT */
5941+ 650, /* GL_LINE_SMOOTH_HINT */
5942+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5943+ 478, /* GL_FOG_HINT */
5944+ 1582, /* GL_TEXTURE_GEN_S */
5945+ 1583, /* GL_TEXTURE_GEN_T */
5946+ 1581, /* GL_TEXTURE_GEN_R */
5947+ 1580, /* GL_TEXTURE_GEN_Q */
5948+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5949+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5950+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5951+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5952+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5953+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5954+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5955+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5956+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5957+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5958+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5959+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5960+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5961+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5962+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5963+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5964+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5965+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5966+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5967+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5968+ 1649, /* GL_UNPACK_SWAP_BYTES */
5969+ 1644, /* GL_UNPACK_LSB_FIRST */
5970+ 1645, /* GL_UNPACK_ROW_LENGTH */
5971+ 1648, /* GL_UNPACK_SKIP_ROWS */
5972+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5973+ 1642, /* GL_UNPACK_ALIGNMENT */
5974+ 1031, /* GL_PACK_SWAP_BYTES */
5975+ 1026, /* GL_PACK_LSB_FIRST */
5976+ 1027, /* GL_PACK_ROW_LENGTH */
5977+ 1030, /* GL_PACK_SKIP_ROWS */
5978+ 1029, /* GL_PACK_SKIP_PIXELS */
5979+ 1023, /* GL_PACK_ALIGNMENT */
5980+ 744, /* GL_MAP_COLOR */
5981+ 745, /* GL_MAP_STENCIL */
5982+ 589, /* GL_INDEX_SHIFT */
5983+ 588, /* GL_INDEX_OFFSET */
5984+ 1235, /* GL_RED_SCALE */
5985+ 1233, /* GL_RED_BIAS */
5986+ 1744, /* GL_ZOOM_X */
5987+ 1745, /* GL_ZOOM_Y */
5988+ 551, /* GL_GREEN_SCALE */
5989+ 549, /* GL_GREEN_BIAS */
5990+ 92, /* GL_BLUE_SCALE */
5991+ 90, /* GL_BLUE_BIAS */
5992+ 42, /* GL_ALPHA_SCALE */
5993+ 40, /* GL_ALPHA_BIAS */
5994+ 334, /* GL_DEPTH_SCALE */
5995+ 315, /* GL_DEPTH_BIAS */
5996+ 817, /* GL_MAX_EVAL_ORDER */
5997+ 821, /* GL_MAX_LIGHTS */
5998+ 800, /* GL_MAX_CLIP_PLANES */
5999+ 865, /* GL_MAX_TEXTURE_SIZE */
6000+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
6001+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
6002+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
6003+ 825, /* GL_MAX_NAME_STACK_DEPTH */
6004+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
6005+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
6006+ 880, /* GL_MAX_VIEWPORT_DIMS */
6007+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
6008+ 1429, /* GL_SUBPIXEL_BITS */
6009+ 584, /* GL_INDEX_BITS */
6010+ 1234, /* GL_RED_BITS */
6011+ 550, /* GL_GREEN_BITS */
6012+ 91, /* GL_BLUE_BITS */
6013+ 41, /* GL_ALPHA_BITS */
6014+ 316, /* GL_DEPTH_BITS */
6015+ 1404, /* GL_STENCIL_BITS */
6016+ 14, /* GL_ACCUM_RED_BITS */
6017+ 13, /* GL_ACCUM_GREEN_BITS */
6018+ 10, /* GL_ACCUM_BLUE_BITS */
6019+ 9, /* GL_ACCUM_ALPHA_BITS */
6020+ 946, /* GL_NAME_STACK_DEPTH */
6021+ 62, /* GL_AUTO_NORMAL */
6022+ 690, /* GL_MAP1_COLOR_4 */
6023+ 693, /* GL_MAP1_INDEX */
6024+ 694, /* GL_MAP1_NORMAL */
6025+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
6026+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
6027+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
6028+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
6029+ 699, /* GL_MAP1_VERTEX_3 */
6030+ 700, /* GL_MAP1_VERTEX_4 */
6031+ 717, /* GL_MAP2_COLOR_4 */
6032+ 720, /* GL_MAP2_INDEX */
6033+ 721, /* GL_MAP2_NORMAL */
6034+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
6035+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
6036+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
6037+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
6038+ 726, /* GL_MAP2_VERTEX_3 */
6039+ 727, /* GL_MAP2_VERTEX_4 */
6040+ 691, /* GL_MAP1_GRID_DOMAIN */
6041+ 692, /* GL_MAP1_GRID_SEGMENTS */
6042+ 718, /* GL_MAP2_GRID_DOMAIN */
6043+ 719, /* GL_MAP2_GRID_SEGMENTS */
6044+ 1506, /* GL_TEXTURE_1D */
6045+ 1508, /* GL_TEXTURE_2D */
6046+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
6047+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
6048+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
6049+ 1330, /* GL_SELECTION_BUFFER_POINTER */
6050+ 1331, /* GL_SELECTION_BUFFER_SIZE */
6051+ 1619, /* GL_TEXTURE_WIDTH */
6052+ 1587, /* GL_TEXTURE_HEIGHT */
6053+ 1543, /* GL_TEXTURE_COMPONENTS */
6054+ 1527, /* GL_TEXTURE_BORDER_COLOR */
6055+ 1526, /* GL_TEXTURE_BORDER */
6056+ 345, /* GL_DONT_CARE */
6057+ 437, /* GL_FASTEST */
6058+ 954, /* GL_NICEST */
6059+ 47, /* GL_AMBIENT */
6060+ 342, /* GL_DIFFUSE */
6061+ 1373, /* GL_SPECULAR */
6062+ 1113, /* GL_POSITION */
6063+ 1376, /* GL_SPOT_DIRECTION */
6064+ 1377, /* GL_SPOT_EXPONENT */
6065+ 1375, /* GL_SPOT_CUTOFF */
6066+ 245, /* GL_CONSTANT_ATTENUATION */
6067+ 640, /* GL_LINEAR_ATTENUATION */
6068+ 1210, /* GL_QUADRATIC_ATTENUATION */
6069+ 219, /* GL_COMPILE */
6070+ 220, /* GL_COMPILE_AND_EXECUTE */
6071+ 111, /* GL_BYTE */
6072+ 1650, /* GL_UNSIGNED_BYTE */
6073+ 1344, /* GL_SHORT */
6074+ 1659, /* GL_UNSIGNED_SHORT */
6075+ 592, /* GL_INT */
6076+ 1653, /* GL_UNSIGNED_INT */
6077+ 444, /* GL_FLOAT */
6078+ 1, /* GL_2_BYTES */
6079+ 5, /* GL_3_BYTES */
6080+ 7, /* GL_4_BYTES */
6081+ 352, /* GL_DOUBLE */
6082+ 123, /* GL_CLEAR */
6083+ 49, /* GL_AND */
6084+ 51, /* GL_AND_REVERSE */
6085+ 269, /* GL_COPY */
6086+ 50, /* GL_AND_INVERTED */
6087+ 956, /* GL_NOOP */
6088+ 1740, /* GL_XOR */
6089+ 1018, /* GL_OR */
6090+ 957, /* GL_NOR */
6091+ 427, /* GL_EQUIV */
6092+ 618, /* GL_INVERT */
6093+ 1021, /* GL_OR_REVERSE */
6094+ 270, /* GL_COPY_INVERTED */
6095+ 1020, /* GL_OR_INVERTED */
6096+ 947, /* GL_NAND */
6097+ 1335, /* GL_SET */
6098+ 424, /* GL_EMISSION */
6099+ 1343, /* GL_SHININESS */
6100+ 48, /* GL_AMBIENT_AND_DIFFUSE */
6101+ 165, /* GL_COLOR_INDEXES */
6102+ 897, /* GL_MODELVIEW */
6103+ 1189, /* GL_PROJECTION */
6104+ 1441, /* GL_TEXTURE */
6105+ 138, /* GL_COLOR */
6106+ 313, /* GL_DEPTH */
6107+ 1395, /* GL_STENCIL */
6108+ 164, /* GL_COLOR_INDEX */
6109+ 1409, /* GL_STENCIL_INDEX */
6110+ 322, /* GL_DEPTH_COMPONENT */
6111+ 1230, /* GL_RED */
6112+ 548, /* GL_GREEN */
6113+ 89, /* GL_BLUE */
6114+ 31, /* GL_ALPHA */
6115+ 1254, /* GL_RGB */
6116+ 1273, /* GL_RGBA */
6117+ 668, /* GL_LUMINANCE */
6118+ 689, /* GL_LUMINANCE_ALPHA */
6119+ 73, /* GL_BITMAP */
6120+ 1069, /* GL_POINT */
6121+ 638, /* GL_LINE */
6122+ 442, /* GL_FILL */
6123+ 1239, /* GL_RENDER */
6124+ 438, /* GL_FEEDBACK */
6125+ 1329, /* GL_SELECT */
6126+ 443, /* GL_FLAT */
6127+ 1348, /* GL_SMOOTH */
6128+ 619, /* GL_KEEP */
6129+ 1248, /* GL_REPLACE */
6130+ 575, /* GL_INCR */
6131+ 309, /* GL_DECR */
6132+ 1674, /* GL_VENDOR */
6133+ 1245, /* GL_RENDERER */
6134+ 1675, /* GL_VERSION */
6135+ 431, /* GL_EXTENSIONS */
6136+ 1294, /* GL_S */
6137+ 1432, /* GL_T */
6138+ 1220, /* GL_R */
6139+ 1209, /* GL_Q */
6140+ 933, /* GL_MODULATE */
6141+ 308, /* GL_DECAL */
6142+ 1577, /* GL_TEXTURE_ENV_MODE */
6143+ 1576, /* GL_TEXTURE_ENV_COLOR */
6144+ 1575, /* GL_TEXTURE_ENV */
6145+ 432, /* GL_EYE_LINEAR */
6146+ 980, /* GL_OBJECT_LINEAR */
6147+ 1374, /* GL_SPHERE_MAP */
6148+ 1579, /* GL_TEXTURE_GEN_MODE */
6149+ 982, /* GL_OBJECT_PLANE */
6150+ 433, /* GL_EYE_PLANE */
6151+ 948, /* GL_NEAREST */
6152+ 639, /* GL_LINEAR */
6153+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6154+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6155+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6156+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6157+ 1600, /* GL_TEXTURE_MAG_FILTER */
6158+ 1608, /* GL_TEXTURE_MIN_FILTER */
6159+ 1621, /* GL_TEXTURE_WRAP_S */
6160+ 1622, /* GL_TEXTURE_WRAP_T */
6161+ 117, /* GL_CLAMP */
6162+ 1247, /* GL_REPEAT */
6163+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6164+ 1106, /* GL_POLYGON_OFFSET_POINT */
6165+ 1105, /* GL_POLYGON_OFFSET_LINE */
6166+ 1221, /* GL_R3_G3_B2 */
6167+ 1671, /* GL_V2F */
6168+ 1672, /* GL_V3F */
6169+ 114, /* GL_C4UB_V2F */
6170+ 115, /* GL_C4UB_V3F */
6171+ 112, /* GL_C3F_V3F */
6172+ 945, /* GL_N3F_V3F */
6173+ 113, /* GL_C4F_N3F_V3F */
6174+ 1437, /* GL_T2F_V3F */
6175+ 1439, /* GL_T4F_V4F */
6176+ 1435, /* GL_T2F_C4UB_V3F */
6177+ 1433, /* GL_T2F_C3F_V3F */
6178+ 1436, /* GL_T2F_N3F_V3F */
6179+ 1434, /* GL_T2F_C4F_N3F_V3F */
6180+ 1438, /* GL_T4F_C4F_N3F_V4F */
6181+ 130, /* GL_CLIP_PLANE0 */
6182+ 131, /* GL_CLIP_PLANE1 */
6183+ 132, /* GL_CLIP_PLANE2 */
6184+ 133, /* GL_CLIP_PLANE3 */
6185+ 134, /* GL_CLIP_PLANE4 */
6186+ 135, /* GL_CLIP_PLANE5 */
6187+ 623, /* GL_LIGHT0 */
6188+ 624, /* GL_LIGHT1 */
6189+ 625, /* GL_LIGHT2 */
6190+ 626, /* GL_LIGHT3 */
6191+ 627, /* GL_LIGHT4 */
6192+ 628, /* GL_LIGHT5 */
6193+ 629, /* GL_LIGHT6 */
6194+ 630, /* GL_LIGHT7 */
6195+ 552, /* GL_HINT_BIT */
6196+ 247, /* GL_CONSTANT_COLOR */
6197+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6198+ 242, /* GL_CONSTANT_ALPHA */
6199+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6200+ 76, /* GL_BLEND_COLOR */
6201+ 512, /* GL_FUNC_ADD */
6202+ 881, /* GL_MIN */
6203+ 793, /* GL_MAX */
6204+ 81, /* GL_BLEND_EQUATION */
6205+ 516, /* GL_FUNC_SUBTRACT */
6206+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6207+ 250, /* GL_CONVOLUTION_1D */
6208+ 251, /* GL_CONVOLUTION_2D */
6209+ 1332, /* GL_SEPARABLE_2D */
6210+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6211+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6212+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6213+ 1231, /* GL_REDUCE */
6214+ 260, /* GL_CONVOLUTION_FORMAT */
6215+ 264, /* GL_CONVOLUTION_WIDTH */
6216+ 262, /* GL_CONVOLUTION_HEIGHT */
6217+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6218+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6219+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6220+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6221+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6222+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6223+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6224+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6225+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6226+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6227+ 553, /* GL_HISTOGRAM */
6228+ 1193, /* GL_PROXY_HISTOGRAM */
6229+ 569, /* GL_HISTOGRAM_WIDTH */
6230+ 559, /* GL_HISTOGRAM_FORMAT */
6231+ 565, /* GL_HISTOGRAM_RED_SIZE */
6232+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6233+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6234+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6235+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6236+ 567, /* GL_HISTOGRAM_SINK */
6237+ 882, /* GL_MINMAX */
6238+ 884, /* GL_MINMAX_FORMAT */
6239+ 886, /* GL_MINMAX_SINK */
6240+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6241+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6242+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6243+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6244+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6245+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6246+ 1104, /* GL_POLYGON_OFFSET_FILL */
6247+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6248+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6249+ 1251, /* GL_RESCALE_NORMAL */
6250+ 36, /* GL_ALPHA4 */
6251+ 38, /* GL_ALPHA8 */
6252+ 32, /* GL_ALPHA12 */
6253+ 34, /* GL_ALPHA16 */
6254+ 679, /* GL_LUMINANCE4 */
6255+ 685, /* GL_LUMINANCE8 */
6256+ 669, /* GL_LUMINANCE12 */
6257+ 675, /* GL_LUMINANCE16 */
6258+ 680, /* GL_LUMINANCE4_ALPHA4 */
6259+ 683, /* GL_LUMINANCE6_ALPHA2 */
6260+ 686, /* GL_LUMINANCE8_ALPHA8 */
6261+ 672, /* GL_LUMINANCE12_ALPHA4 */
6262+ 670, /* GL_LUMINANCE12_ALPHA12 */
6263+ 676, /* GL_LUMINANCE16_ALPHA16 */
6264+ 593, /* GL_INTENSITY */
6265+ 598, /* GL_INTENSITY4 */
6266+ 600, /* GL_INTENSITY8 */
6267+ 594, /* GL_INTENSITY12 */
6268+ 596, /* GL_INTENSITY16 */
6269+ 1263, /* GL_RGB2_EXT */
6270+ 1264, /* GL_RGB4 */
6271+ 1267, /* GL_RGB5 */
6272+ 1271, /* GL_RGB8 */
6273+ 1255, /* GL_RGB10 */
6274+ 1259, /* GL_RGB12 */
6275+ 1261, /* GL_RGB16 */
6276+ 1278, /* GL_RGBA2 */
6277+ 1280, /* GL_RGBA4 */
6278+ 1268, /* GL_RGB5_A1 */
6279+ 1284, /* GL_RGBA8 */
6280+ 1256, /* GL_RGB10_A2 */
6281+ 1274, /* GL_RGBA12 */
6282+ 1276, /* GL_RGBA16 */
6283+ 1613, /* GL_TEXTURE_RED_SIZE */
6284+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6285+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6286+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6287+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6288+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6289+ 1249, /* GL_REPLACE_EXT */
6290+ 1197, /* GL_PROXY_TEXTURE_1D */
6291+ 1200, /* GL_PROXY_TEXTURE_2D */
6292+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6293+ 1610, /* GL_TEXTURE_PRIORITY */
6294+ 1615, /* GL_TEXTURE_RESIDENT */
6295+ 1514, /* GL_TEXTURE_BINDING_1D */
6296+ 1516, /* GL_TEXTURE_BINDING_2D */
6297+ 1518, /* GL_TEXTURE_BINDING_3D */
6298+ 1028, /* GL_PACK_SKIP_IMAGES */
6299+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6300+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6301+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6302+ 1510, /* GL_TEXTURE_3D */
6303+ 1203, /* GL_PROXY_TEXTURE_3D */
6304+ 1572, /* GL_TEXTURE_DEPTH */
6305+ 1620, /* GL_TEXTURE_WRAP_R */
6306+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6307+ 1676, /* GL_VERTEX_ARRAY */
6308+ 959, /* GL_NORMAL_ARRAY */
6309+ 139, /* GL_COLOR_ARRAY */
6310+ 578, /* GL_INDEX_ARRAY */
6311+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6312+ 415, /* GL_EDGE_FLAG_ARRAY */
6313+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6314+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6315+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6316+ 964, /* GL_NORMAL_ARRAY_TYPE */
6317+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6318+ 143, /* GL_COLOR_ARRAY_SIZE */
6319+ 145, /* GL_COLOR_ARRAY_TYPE */
6320+ 144, /* GL_COLOR_ARRAY_STRIDE */
6321+ 583, /* GL_INDEX_ARRAY_TYPE */
6322+ 582, /* GL_INDEX_ARRAY_STRIDE */
6323+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6324+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6325+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6326+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6327+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6328+ 962, /* GL_NORMAL_ARRAY_POINTER */
6329+ 142, /* GL_COLOR_ARRAY_POINTER */
6330+ 581, /* GL_INDEX_ARRAY_POINTER */
6331+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6332+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6333+ 938, /* GL_MULTISAMPLE */
6334+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6335+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6336+ 1313, /* GL_SAMPLE_COVERAGE */
6337+ 1310, /* GL_SAMPLE_BUFFERS */
6338+ 1301, /* GL_SAMPLES */
6339+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6340+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6341+ 170, /* GL_COLOR_MATRIX */
6342+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6343+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6344+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6345+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6346+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6347+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6348+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6349+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6350+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6351+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6352+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6353+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6354+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6355+ 80, /* GL_BLEND_DST_RGB */
6356+ 88, /* GL_BLEND_SRC_RGB */
6357+ 79, /* GL_BLEND_DST_ALPHA */
6358+ 87, /* GL_BLEND_SRC_ALPHA */
6359+ 176, /* GL_COLOR_TABLE */
6360+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6361+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6362+ 1192, /* GL_PROXY_COLOR_TABLE */
6363+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6364+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6365+ 200, /* GL_COLOR_TABLE_SCALE */
6366+ 180, /* GL_COLOR_TABLE_BIAS */
6367+ 185, /* GL_COLOR_TABLE_FORMAT */
6368+ 202, /* GL_COLOR_TABLE_WIDTH */
6369+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6370+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6371+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6372+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6373+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6374+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6375+ 71, /* GL_BGR */
6376+ 72, /* GL_BGRA */
6377+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6378+ 815, /* GL_MAX_ELEMENTS_INDICES */
6379+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6380+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6381+ 1086, /* GL_POINT_SIZE_MIN */
6382+ 1082, /* GL_POINT_SIZE_MAX */
6383+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6384+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6385+ 118, /* GL_CLAMP_TO_BORDER */
6386+ 121, /* GL_CLAMP_TO_EDGE */
6387+ 1609, /* GL_TEXTURE_MIN_LOD */
6388+ 1607, /* GL_TEXTURE_MAX_LOD */
6389+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6390+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6391+ 572, /* GL_IGNORE_BORDER_HP */
6392+ 246, /* GL_CONSTANT_BORDER_HP */
6393+ 1250, /* GL_REPLICATE_BORDER_HP */
6394+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6395+ 987, /* GL_OCCLUSION_TEST_HP */
6396+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6397+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6398+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6399+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6400+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6401+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6402+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6403+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6404+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6405+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6406+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6407+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6408+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6409+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6410+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6411+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6412+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6413+ 518, /* GL_GENERATE_MIPMAP */
6414+ 519, /* GL_GENERATE_MIPMAP_HINT */
6415+ 481, /* GL_FOG_OFFSET_SGIX */
6416+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6417+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6418+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6419+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6420+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6421+ 323, /* GL_DEPTH_COMPONENT16 */
6422+ 326, /* GL_DEPTH_COMPONENT24 */
6423+ 329, /* GL_DEPTH_COMPONENT32 */
6424+ 274, /* GL_CULL_VERTEX_EXT */
6425+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6426+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6427+ 1737, /* GL_WRAP_BORDER_SUN */
6428+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6429+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6430+ 1345, /* GL_SINGLE_COLOR */
6431+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6432+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6433+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6434+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6435+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6436+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6437+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6438+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6439+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6440+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6441+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6442+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6443+ 889, /* GL_MIRRORED_REPEAT */
6444+ 1289, /* GL_RGB_S3TC */
6445+ 1266, /* GL_RGB4_S3TC */
6446+ 1288, /* GL_RGBA_S3TC */
6447+ 1283, /* GL_RGBA4_S3TC */
6448+ 1286, /* GL_RGBA_DXT5_S3TC */
6449+ 1281, /* GL_RGBA4_DXT5_S3TC */
6450+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6451+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6452+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6453+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6454+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6455+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6456+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6457+ 468, /* GL_FOG_COORDINATE_SOURCE */
6458+ 460, /* GL_FOG_COORD */
6459+ 484, /* GL_FRAGMENT_DEPTH */
6460+ 280, /* GL_CURRENT_FOG_COORD */
6461+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6462+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6463+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6464+ 462, /* GL_FOG_COORDINATE_ARRAY */
6465+ 174, /* GL_COLOR_SUM */
6466+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6467+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6468+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6469+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6470+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6471+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6472+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6473+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6474+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6475+ 1442, /* GL_TEXTURE0 */
6476+ 1444, /* GL_TEXTURE1 */
6477+ 1466, /* GL_TEXTURE2 */
6478+ 1488, /* GL_TEXTURE3 */
6479+ 1494, /* GL_TEXTURE4 */
6480+ 1496, /* GL_TEXTURE5 */
6481+ 1498, /* GL_TEXTURE6 */
6482+ 1500, /* GL_TEXTURE7 */
6483+ 1502, /* GL_TEXTURE8 */
6484+ 1504, /* GL_TEXTURE9 */
6485+ 1445, /* GL_TEXTURE10 */
6486+ 1447, /* GL_TEXTURE11 */
6487+ 1449, /* GL_TEXTURE12 */
6488+ 1451, /* GL_TEXTURE13 */
6489+ 1453, /* GL_TEXTURE14 */
6490+ 1455, /* GL_TEXTURE15 */
6491+ 1457, /* GL_TEXTURE16 */
6492+ 1459, /* GL_TEXTURE17 */
6493+ 1461, /* GL_TEXTURE18 */
6494+ 1463, /* GL_TEXTURE19 */
6495+ 1467, /* GL_TEXTURE20 */
6496+ 1469, /* GL_TEXTURE21 */
6497+ 1471, /* GL_TEXTURE22 */
6498+ 1473, /* GL_TEXTURE23 */
6499+ 1475, /* GL_TEXTURE24 */
6500+ 1477, /* GL_TEXTURE25 */
6501+ 1479, /* GL_TEXTURE26 */
6502+ 1481, /* GL_TEXTURE27 */
6503+ 1483, /* GL_TEXTURE28 */
6504+ 1485, /* GL_TEXTURE29 */
6505+ 1489, /* GL_TEXTURE30 */
6506+ 1491, /* GL_TEXTURE31 */
6507+ 18, /* GL_ACTIVE_TEXTURE */
6508+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6509+ 867, /* GL_MAX_TEXTURE_UNITS */
6510+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6511+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6512+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6513+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6514+ 1430, /* GL_SUBTRACT */
6515+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6516+ 222, /* GL_COMPRESSED_ALPHA */
6517+ 226, /* GL_COMPRESSED_LUMINANCE */
6518+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6519+ 224, /* GL_COMPRESSED_INTENSITY */
6520+ 230, /* GL_COMPRESSED_RGB */
6521+ 231, /* GL_COMPRESSED_RGBA */
6522+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6523+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6524+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6525+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6526+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6527+ 335, /* GL_DEPTH_STENCIL_NV */
6528+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6529+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6530+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6531+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6532+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6533+ 1593, /* GL_TEXTURE_LOD_BIAS */
6534+ 207, /* GL_COMBINE4 */
6535+ 857, /* GL_MAX_SHININESS_NV */
6536+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6537+ 576, /* GL_INCR_WRAP */
6538+ 310, /* GL_DECR_WRAP */
6539+ 909, /* GL_MODELVIEW1_ARB */
6540+ 965, /* GL_NORMAL_MAP */
6541+ 1236, /* GL_REFLECTION_MAP */
6542+ 1558, /* GL_TEXTURE_CUBE_MAP */
6543+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6544+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6545+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6546+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6547+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6548+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6549+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6550+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6551+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6552+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6553+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6554+ 435, /* GL_EYE_RADIAL_NV */
6555+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6556+ 206, /* GL_COMBINE */
6557+ 213, /* GL_COMBINE_RGB */
6558+ 208, /* GL_COMBINE_ALPHA */
6559+ 1290, /* GL_RGB_SCALE */
6560+ 24, /* GL_ADD_SIGNED */
6561+ 603, /* GL_INTERPOLATE */
6562+ 241, /* GL_CONSTANT */
6563+ 1155, /* GL_PRIMARY_COLOR */
6564+ 1152, /* GL_PREVIOUS */
6565+ 1356, /* GL_SOURCE0_RGB */
6566+ 1362, /* GL_SOURCE1_RGB */
6567+ 1368, /* GL_SOURCE2_RGB */
6568+ 1372, /* GL_SOURCE3_RGB_NV */
6569+ 1353, /* GL_SOURCE0_ALPHA */
6570+ 1359, /* GL_SOURCE1_ALPHA */
6571+ 1365, /* GL_SOURCE2_ALPHA */
6572+ 1371, /* GL_SOURCE3_ALPHA_NV */
6573+ 1001, /* GL_OPERAND0_RGB */
6574+ 1007, /* GL_OPERAND1_RGB */
6575+ 1013, /* GL_OPERAND2_RGB */
6576+ 1017, /* GL_OPERAND3_RGB_NV */
6577+ 998, /* GL_OPERAND0_ALPHA */
6578+ 1004, /* GL_OPERAND1_ALPHA */
6579+ 1010, /* GL_OPERAND2_ALPHA */
6580+ 1016, /* GL_OPERAND3_ALPHA_NV */
6581+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6582+ 1741, /* GL_YCBCR_422_APPLE */
6583+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6584+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6585+ 1347, /* GL_SLICE_ACCUM_SUN */
6586+ 1212, /* GL_QUAD_MESH_SUN */
6587+ 1639, /* GL_TRIANGLE_MESH_SUN */
6588+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6589+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6590+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6591+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6592+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6593+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6594+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6595+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6596+ 1182, /* GL_PROGRAM_STRING_ARB */
6597+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6598+ 571, /* GL_IDENTITY_NV */
6599+ 616, /* GL_INVERSE_NV */
6600+ 1632, /* GL_TRANSPOSE_NV */
6601+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6602+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6603+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6604+ 747, /* GL_MATRIX0_NV */
6605+ 759, /* GL_MATRIX1_NV */
6606+ 771, /* GL_MATRIX2_NV */
6607+ 775, /* GL_MATRIX3_NV */
6608+ 777, /* GL_MATRIX4_NV */
6609+ 779, /* GL_MATRIX5_NV */
6610+ 781, /* GL_MATRIX6_NV */
6611+ 783, /* GL_MATRIX7_NV */
6612+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6613+ 283, /* GL_CURRENT_MATRIX_ARB */
6614+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6615+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6616+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6617+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6618+ 1184, /* GL_PROGRAM_TARGET_NV */
6619+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6620+ 1624, /* GL_TRACK_MATRIX_NV */
6621+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6622+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6623+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6624+ 320, /* GL_DEPTH_CLAMP_NV */
6625+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6626+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6627+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6628+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6629+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6630+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6631+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6632+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6633+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6634+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6635+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6636+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6637+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6638+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6639+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6640+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6641+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6642+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6643+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6644+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6645+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6646+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6647+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6648+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6649+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6650+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6651+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6652+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6653+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6654+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6655+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6656+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6657+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6658+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6659+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6660+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6661+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6662+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6663+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6664+ 1161, /* GL_PROGRAM_BINDING_ARB */
6665+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6666+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6667+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6668+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6669+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6670+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6671+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6672+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6673+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6674+ 1544, /* GL_TEXTURE_COMPRESSED */
6675+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6676+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6677+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6678+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6679+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6680+ 1714, /* GL_VERTEX_BLEND_ARB */
6681+ 303, /* GL_CURRENT_WEIGHT_ARB */
6682+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6683+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6684+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6685+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6686+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6687+ 346, /* GL_DOT3_RGB */
6688+ 347, /* GL_DOT3_RGBA */
6689+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6690+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6691+ 939, /* GL_MULTISAMPLE_3DFX */
6692+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6693+ 1302, /* GL_SAMPLES_3DFX */
6694+ 920, /* GL_MODELVIEW2_ARB */
6695+ 923, /* GL_MODELVIEW3_ARB */
6696+ 924, /* GL_MODELVIEW4_ARB */
6697+ 925, /* GL_MODELVIEW5_ARB */
6698+ 926, /* GL_MODELVIEW6_ARB */
6699+ 927, /* GL_MODELVIEW7_ARB */
6700+ 928, /* GL_MODELVIEW8_ARB */
6701+ 929, /* GL_MODELVIEW9_ARB */
6702+ 899, /* GL_MODELVIEW10_ARB */
6703+ 900, /* GL_MODELVIEW11_ARB */
6704+ 901, /* GL_MODELVIEW12_ARB */
6705+ 902, /* GL_MODELVIEW13_ARB */
6706+ 903, /* GL_MODELVIEW14_ARB */
6707+ 904, /* GL_MODELVIEW15_ARB */
6708+ 905, /* GL_MODELVIEW16_ARB */
6709+ 906, /* GL_MODELVIEW17_ARB */
6710+ 907, /* GL_MODELVIEW18_ARB */
6711+ 908, /* GL_MODELVIEW19_ARB */
6712+ 910, /* GL_MODELVIEW20_ARB */
6713+ 911, /* GL_MODELVIEW21_ARB */
6714+ 912, /* GL_MODELVIEW22_ARB */
6715+ 913, /* GL_MODELVIEW23_ARB */
6716+ 914, /* GL_MODELVIEW24_ARB */
6717+ 915, /* GL_MODELVIEW25_ARB */
6718+ 916, /* GL_MODELVIEW26_ARB */
6719+ 917, /* GL_MODELVIEW27_ARB */
6720+ 918, /* GL_MODELVIEW28_ARB */
6721+ 919, /* GL_MODELVIEW29_ARB */
6722+ 921, /* GL_MODELVIEW30_ARB */
6723+ 922, /* GL_MODELVIEW31_ARB */
6724+ 351, /* GL_DOT3_RGB_EXT */
6725+ 349, /* GL_DOT3_RGBA_EXT */
6726+ 893, /* GL_MIRROR_CLAMP_EXT */
6727+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6728+ 934, /* GL_MODULATE_ADD_ATI */
6729+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6730+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6731+ 1742, /* GL_YCBCR_MESA */
6732+ 1025, /* GL_PACK_INVERT_MESA */
6733+ 306, /* GL_DEBUG_OBJECT_MESA */
6734+ 307, /* GL_DEBUG_PRINT_MESA */
6735+ 305, /* GL_DEBUG_ASSERT_MESA */
6736+ 107, /* GL_BUFFER_SIZE */
6737+ 109, /* GL_BUFFER_USAGE */
6738+ 1398, /* GL_STENCIL_BACK_FUNC */
6739+ 1397, /* GL_STENCIL_BACK_FAIL */
6740+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6741+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6742+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6743+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6744+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6745+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6746+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6747+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6748+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6749+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6750+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6751+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6752+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6753+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6754+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6755+ 812, /* GL_MAX_DRAW_BUFFERS */
6756+ 355, /* GL_DRAW_BUFFER0 */
6757+ 358, /* GL_DRAW_BUFFER1 */
6758+ 379, /* GL_DRAW_BUFFER2 */
6759+ 382, /* GL_DRAW_BUFFER3 */
6760+ 385, /* GL_DRAW_BUFFER4 */
6761+ 388, /* GL_DRAW_BUFFER5 */
6762+ 391, /* GL_DRAW_BUFFER6 */
6763+ 394, /* GL_DRAW_BUFFER7 */
6764+ 397, /* GL_DRAW_BUFFER8 */
6765+ 400, /* GL_DRAW_BUFFER9 */
6766+ 359, /* GL_DRAW_BUFFER10 */
6767+ 362, /* GL_DRAW_BUFFER11 */
6768+ 365, /* GL_DRAW_BUFFER12 */
6769+ 368, /* GL_DRAW_BUFFER13 */
6770+ 371, /* GL_DRAW_BUFFER14 */
6771+ 374, /* GL_DRAW_BUFFER15 */
6772+ 82, /* GL_BLEND_EQUATION_ALPHA */
6773+ 792, /* GL_MATRIX_PALETTE_ARB */
6774+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6775+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6776+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6777+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6778+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6779+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6780+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6781+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6782+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6783+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6784+ 339, /* GL_DEPTH_TEXTURE_MODE */
6785+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6786+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6787+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6788+ 1093, /* GL_POINT_SPRITE */
6789+ 266, /* GL_COORD_REPLACE */
6790+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6791+ 1214, /* GL_QUERY_COUNTER_BITS */
6792+ 291, /* GL_CURRENT_QUERY */
6793+ 1216, /* GL_QUERY_RESULT */
6794+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6795+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6796+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6797+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6798+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6799+ 859, /* GL_MAX_TEXTURE_COORDS */
6800+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6801+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6802+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6803+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6804+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6805+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6806+ 317, /* GL_DEPTH_BOUNDS_EXT */
6807+ 52, /* GL_ARRAY_BUFFER */
6808+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6809+ 54, /* GL_ARRAY_BUFFER_BINDING */
6810+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6811+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6812+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6813+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6814+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6815+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6816+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6817+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6818+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6819+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6820+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6821+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6822+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6823+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6824+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6825+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6826+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6827+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6828+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6829+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6830+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6831+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6832+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6833+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6834+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6835+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6836+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6837+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6838+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6839+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6840+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6841+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6842+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6843+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6844+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6845+ 1226, /* GL_READ_ONLY */
6846+ 1738, /* GL_WRITE_ONLY */
6847+ 1228, /* GL_READ_WRITE */
6848+ 101, /* GL_BUFFER_ACCESS */
6849+ 103, /* GL_BUFFER_MAPPED */
6850+ 105, /* GL_BUFFER_MAP_POINTER */
6851+ 1623, /* GL_TIME_ELAPSED_EXT */
6852+ 746, /* GL_MATRIX0_ARB */
6853+ 758, /* GL_MATRIX1_ARB */
6854+ 770, /* GL_MATRIX2_ARB */
6855+ 774, /* GL_MATRIX3_ARB */
6856+ 776, /* GL_MATRIX4_ARB */
6857+ 778, /* GL_MATRIX5_ARB */
6858+ 780, /* GL_MATRIX6_ARB */
6859+ 782, /* GL_MATRIX7_ARB */
6860+ 784, /* GL_MATRIX8_ARB */
6861+ 785, /* GL_MATRIX9_ARB */
6862+ 748, /* GL_MATRIX10_ARB */
6863+ 749, /* GL_MATRIX11_ARB */
6864+ 750, /* GL_MATRIX12_ARB */
6865+ 751, /* GL_MATRIX13_ARB */
6866+ 752, /* GL_MATRIX14_ARB */
6867+ 753, /* GL_MATRIX15_ARB */
6868+ 754, /* GL_MATRIX16_ARB */
6869+ 755, /* GL_MATRIX17_ARB */
6870+ 756, /* GL_MATRIX18_ARB */
6871+ 757, /* GL_MATRIX19_ARB */
6872+ 760, /* GL_MATRIX20_ARB */
6873+ 761, /* GL_MATRIX21_ARB */
6874+ 762, /* GL_MATRIX22_ARB */
6875+ 763, /* GL_MATRIX23_ARB */
6876+ 764, /* GL_MATRIX24_ARB */
6877+ 765, /* GL_MATRIX25_ARB */
6878+ 766, /* GL_MATRIX26_ARB */
6879+ 767, /* GL_MATRIX27_ARB */
6880+ 768, /* GL_MATRIX28_ARB */
6881+ 769, /* GL_MATRIX29_ARB */
6882+ 772, /* GL_MATRIX30_ARB */
6883+ 773, /* GL_MATRIX31_ARB */
6884+ 1425, /* GL_STREAM_DRAW */
6885+ 1427, /* GL_STREAM_READ */
6886+ 1423, /* GL_STREAM_COPY */
6887+ 1391, /* GL_STATIC_DRAW */
6888+ 1393, /* GL_STATIC_READ */
6889+ 1389, /* GL_STATIC_COPY */
6890+ 410, /* GL_DYNAMIC_DRAW */
6891+ 412, /* GL_DYNAMIC_READ */
6892+ 408, /* GL_DYNAMIC_COPY */
6893+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6894+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6895+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6896+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6897+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6898+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6899+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6900+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6901+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6902+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6903+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6904+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6905+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6906+ 1304, /* GL_SAMPLES_PASSED */
6907+ 486, /* GL_FRAGMENT_SHADER */
6908+ 1724, /* GL_VERTEX_SHADER */
6909+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6910+ 1336, /* GL_SHADER_OBJECT_ARB */
6911+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6912+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6913+ 871, /* GL_MAX_VARYING_FLOATS */
6914+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6915+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6916+ 985, /* GL_OBJECT_TYPE_ARB */
6917+ 1338, /* GL_SHADER_TYPE */
6918+ 451, /* GL_FLOAT_VEC2 */
6919+ 453, /* GL_FLOAT_VEC3 */
6920+ 455, /* GL_FLOAT_VEC4 */
6921+ 606, /* GL_INT_VEC2 */
6922+ 608, /* GL_INT_VEC3 */
6923+ 610, /* GL_INT_VEC4 */
6924+ 93, /* GL_BOOL */
6925+ 95, /* GL_BOOL_VEC2 */
6926+ 97, /* GL_BOOL_VEC3 */
6927+ 99, /* GL_BOOL_VEC4 */
6928+ 445, /* GL_FLOAT_MAT2 */
6929+ 447, /* GL_FLOAT_MAT3 */
6930+ 449, /* GL_FLOAT_MAT4 */
6931+ 1295, /* GL_SAMPLER_1D */
6932+ 1297, /* GL_SAMPLER_2D */
6933+ 1299, /* GL_SAMPLER_3D */
6934+ 1300, /* GL_SAMPLER_CUBE */
6935+ 1296, /* GL_SAMPLER_1D_SHADOW */
6936+ 1298, /* GL_SAMPLER_2D_SHADOW */
6937+ 529, /* GL_GL_FLOAT_MAT2x3 */
6938+ 530, /* GL_GL_FLOAT_MAT2x4 */
6939+ 531, /* GL_GL_FLOAT_MAT3x2 */
6940+ 532, /* GL_GL_FLOAT_MAT3x4 */
6941+ 533, /* GL_GL_FLOAT_MAT4x2 */
6942+ 534, /* GL_GL_FLOAT_MAT4x3 */
6943+ 312, /* GL_DELETE_STATUS */
6944+ 221, /* GL_COMPILE_STATUS */
6945+ 659, /* GL_LINK_STATUS */
6946+ 1673, /* GL_VALIDATE_STATUS */
6947+ 591, /* GL_INFO_LOG_LENGTH */
6948+ 56, /* GL_ATTACHED_SHADERS */
6949+ 20, /* GL_ACTIVE_UNIFORMS */
6950+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6951+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6952+ 15, /* GL_ACTIVE_ATTRIBUTES */
6953+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6954+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6955+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6956+ 290, /* GL_CURRENT_PROGRAM */
6957+ 1034, /* GL_PALETTE4_RGB8_OES */
6958+ 1036, /* GL_PALETTE4_RGBA8_OES */
6959+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6960+ 1035, /* GL_PALETTE4_RGBA4_OES */
6961+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6962+ 1039, /* GL_PALETTE8_RGB8_OES */
6963+ 1041, /* GL_PALETTE8_RGBA8_OES */
6964+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6965+ 1040, /* GL_PALETTE8_RGBA4_OES */
6966+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6967+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6968+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6969+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6970+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6971+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6972+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6973+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6974+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6975+ 543, /* GL_GL_SRGB */
6976+ 544, /* GL_GL_SRGB8 */
6977+ 546, /* GL_GL_SRGB_ALPHA */
6978+ 545, /* GL_GL_SRGB8_ALPHA8 */
6979+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6980+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6981+ 539, /* GL_GL_SLUMINANCE */
6982+ 540, /* GL_GL_SLUMINANCE8 */
6983+ 526, /* GL_GL_COMPRESSED_SRGB */
6984+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6985+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6986+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6987+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6988+ 667, /* GL_LOWER_LEFT */
6989+ 1670, /* GL_UPPER_LEFT */
6990+ 1401, /* GL_STENCIL_BACK_REF */
6991+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6992+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6993+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6994+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6995+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6996+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6997+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6998+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6999+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
7000+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
7001+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
7002+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
7003+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
7004+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
7005+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
7006+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
7007+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
7008+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
7009+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
7010+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
7011+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
7012+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
7013+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
7014+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
7015+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
7016+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
7017+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
7018+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
7019+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
7020+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
7021+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
7022+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
7023+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
7024+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
7025+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
7026+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
7027+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
7028+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
7029+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
7030+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
7031+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
7032+ 497, /* GL_FRAMEBUFFER_EXT */
7033+ 1241, /* GL_RENDERBUFFER_EXT */
7034+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
7035+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
7036+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
7037+ 1414, /* GL_STENCIL_INDEX_EXT */
7038+ 1411, /* GL_STENCIL_INDEX1_EXT */
7039+ 1412, /* GL_STENCIL_INDEX4_EXT */
7040+ 1413, /* GL_STENCIL_INDEX8_EXT */
7041+ 1410, /* GL_STENCIL_INDEX16_EXT */
7042+ 428, /* GL_EVAL_BIT */
7043+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
7044+ 661, /* GL_LIST_BIT */
7045+ 1523, /* GL_TEXTURE_BIT */
7046+ 1319, /* GL_SCISSOR_BIT */
7047+ 29, /* GL_ALL_ATTRIB_BITS */
7048+ 941, /* GL_MULTISAMPLE_BIT */
7049+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
7050+};
7051+
7052+#define Elements(x) sizeof(x)/sizeof(*x)
7053+
7054+typedef int (*cfunc)(const void *, const void *);
7055+
7056+/**
7057+ * Compare a key name to an element in the \c all_enums array.
7058+ *
7059+ * \c bsearch always passes the key as the first parameter and the pointer
7060+ * to the array element as the second parameter. We can elimiate some
7061+ * extra work by taking advantage of that fact.
7062+ *
7063+ * \param a Pointer to the desired enum name.
7064+ * \param b Pointer to an element of the \c all_enums array.
7065+ */
7066+static int compar_name( const char *a, const enum_elt *b )
7067+{
7068+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
7069+}
7070+
7071+/**
7072+ * Compare a key enum value to an element in the \c all_enums array.
7073+ *
7074+ * \c bsearch always passes the key as the first parameter and the pointer
7075+ * to the array element as the second parameter. We can elimiate some
7076+ * extra work by taking advantage of that fact.
7077+ *
7078+ * \param a Pointer to the desired enum name.
7079+ * \param b Pointer to an index into the \c all_enums array.
7080+ */
7081+static int compar_nr( const int *a, const unsigned *b )
7082+{
7083+ return a[0] - all_enums[*b].n;
7084+}
7085+
7086+
7087+static char token_tmp[20];
7088+
7089+const char *_mesa_lookup_enum_by_nr( int nr )
7090+{
7091+ unsigned * i;
7092+
7093+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
7094+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
7095+
7096+ if ( i != NULL ) {
7097+ return & enum_string_table[ all_enums[ *i ].offset ];
7098+ }
7099+ else {
7100+ /* this is not re-entrant safe, no big deal here */
7101+ _mesa_sprintf(token_tmp, "0x%x", nr);
7102+ return token_tmp;
7103+ }
7104+}
7105+
7106+int _mesa_lookup_enum_by_name( const char *symbol )
7107+{
7108+ enum_elt * f = NULL;
7109+
7110+ if ( symbol != NULL ) {
7111+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
7112+ sizeof( enum_elt ), (cfunc) compar_name );
7113+ }
7114+
7115+ return (f != NULL) ? f->n : -1;
7116+}
7117+
7118+
7119Index: qemu-0.12.4/target-i386/mesa_get.c
7120===================================================================
7121--- /dev/null
7122+++ qemu-0.12.4/target-i386/mesa_get.c
7123@@ -0,0 +1,5563 @@
7124+
7125+/***
7126+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7127+ ***/
7128+
7129+#include "glheader.h"
7130+#include "context.h"
7131+#include "enable.h"
7132+#include "extensions.h"
7133+#include "fbobject.h"
7134+#include "get.h"
7135+#include "macros.h"
7136+#include "mtypes.h"
7137+#include "state.h"
7138+#include "texcompress.h"
7139+
7140+
7141+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7142+
7143+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7144+
7145+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7146+#define ENUM_TO_INT(E) ( (GLint) (E) )
7147+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7148+
7149+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7150+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7151+
7152+
7153+/*
7154+ * Check if named extension is enabled, if not generate error and return.
7155+ */
7156+#define CHECK_EXT1(EXT1, FUNC) \
7157+ if (!ctx->Extensions.EXT1) { \
7158+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7159+ return; \
7160+ }
7161+
7162+/*
7163+ * Check if either of two extensions is enabled.
7164+ */
7165+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7166+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7167+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7168+ return; \
7169+ }
7170+
7171+/*
7172+ * Check if either of three extensions is enabled.
7173+ */
7174+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7175+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7176+ !ctx->Extensions.EXT3) { \
7177+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7178+ return; \
7179+ }
7180+
7181+/*
7182+ * Check if either of four extensions is enabled.
7183+ */
7184+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7185+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7186+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7187+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7188+ return; \
7189+ }
7190+
7191+
7192+void GLAPIENTRY
7193+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7194+{
7195+ GET_CURRENT_CONTEXT(ctx);
7196+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7197+
7198+ if (!params)
7199+ return;
7200+
7201+ if (ctx->NewState)
7202+ _mesa_update_state(ctx);
7203+
7204+ if (ctx->Driver.GetBooleanv &&
7205+ ctx->Driver.GetBooleanv(ctx, pname, params))
7206+ return;
7207+
7208+ switch (pname) {
7209+ case GL_ACCUM_RED_BITS:
7210+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7211+ break;
7212+ case GL_ACCUM_GREEN_BITS:
7213+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7214+ break;
7215+ case GL_ACCUM_BLUE_BITS:
7216+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7217+ break;
7218+ case GL_ACCUM_ALPHA_BITS:
7219+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7220+ break;
7221+ case GL_ACCUM_CLEAR_VALUE:
7222+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7223+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7224+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7225+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7226+ break;
7227+ case GL_ALPHA_BIAS:
7228+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7229+ break;
7230+ case GL_ALPHA_BITS:
7231+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7232+ break;
7233+ case GL_ALPHA_SCALE:
7234+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7235+ break;
7236+ case GL_ALPHA_TEST:
7237+ params[0] = ctx->Color.AlphaEnabled;
7238+ break;
7239+ case GL_ALPHA_TEST_FUNC:
7240+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7241+ break;
7242+ case GL_ALPHA_TEST_REF:
7243+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7244+ break;
7245+ case GL_ATTRIB_STACK_DEPTH:
7246+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7247+ break;
7248+ case GL_AUTO_NORMAL:
7249+ params[0] = ctx->Eval.AutoNormal;
7250+ break;
7251+ case GL_AUX_BUFFERS:
7252+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7253+ break;
7254+ case GL_BLEND:
7255+ params[0] = ctx->Color.BlendEnabled;
7256+ break;
7257+ case GL_BLEND_DST:
7258+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7259+ break;
7260+ case GL_BLEND_SRC:
7261+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7262+ break;
7263+ case GL_BLEND_SRC_RGB_EXT:
7264+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7265+ break;
7266+ case GL_BLEND_DST_RGB_EXT:
7267+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7268+ break;
7269+ case GL_BLEND_SRC_ALPHA_EXT:
7270+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7271+ break;
7272+ case GL_BLEND_DST_ALPHA_EXT:
7273+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7274+ break;
7275+ case GL_BLEND_EQUATION:
7276+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7277+ break;
7278+ case GL_BLEND_EQUATION_ALPHA_EXT:
7279+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7280+ break;
7281+ case GL_BLEND_COLOR_EXT:
7282+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7283+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7284+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7285+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7286+ break;
7287+ case GL_BLUE_BIAS:
7288+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7289+ break;
7290+ case GL_BLUE_BITS:
7291+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7292+ break;
7293+ case GL_BLUE_SCALE:
7294+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7295+ break;
7296+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7297+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7298+ break;
7299+ case GL_CLIP_PLANE0:
7300+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7301+ break;
7302+ case GL_CLIP_PLANE1:
7303+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7304+ break;
7305+ case GL_CLIP_PLANE2:
7306+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7307+ break;
7308+ case GL_CLIP_PLANE3:
7309+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7310+ break;
7311+ case GL_CLIP_PLANE4:
7312+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7313+ break;
7314+ case GL_CLIP_PLANE5:
7315+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7316+ break;
7317+ case GL_COLOR_CLEAR_VALUE:
7318+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7319+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7320+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7321+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7322+ break;
7323+ case GL_COLOR_MATERIAL:
7324+ params[0] = ctx->Light.ColorMaterialEnabled;
7325+ break;
7326+ case GL_COLOR_MATERIAL_FACE:
7327+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7328+ break;
7329+ case GL_COLOR_MATERIAL_PARAMETER:
7330+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7331+ break;
7332+ case GL_COLOR_WRITEMASK:
7333+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7334+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7335+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7336+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7337+ break;
7338+ case GL_CULL_FACE:
7339+ params[0] = ctx->Polygon.CullFlag;
7340+ break;
7341+ case GL_CULL_FACE_MODE:
7342+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7343+ break;
7344+ case GL_CURRENT_COLOR:
7345+ {
7346+ FLUSH_CURRENT(ctx, 0);
7347+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7348+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7349+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7350+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7351+ }
7352+ break;
7353+ case GL_CURRENT_INDEX:
7354+ {
7355+ FLUSH_CURRENT(ctx, 0);
7356+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7357+ }
7358+ break;
7359+ case GL_CURRENT_NORMAL:
7360+ {
7361+ FLUSH_CURRENT(ctx, 0);
7362+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7363+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7364+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7365+ }
7366+ break;
7367+ case GL_CURRENT_RASTER_COLOR:
7368+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7369+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7370+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7371+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7372+ break;
7373+ case GL_CURRENT_RASTER_DISTANCE:
7374+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7375+ break;
7376+ case GL_CURRENT_RASTER_INDEX:
7377+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7378+ break;
7379+ case GL_CURRENT_RASTER_POSITION:
7380+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7381+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7382+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7383+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7384+ break;
7385+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7386+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7387+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7388+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7389+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7390+ break;
7391+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7392+ {
7393+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7394+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7395+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7396+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7397+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7398+ }
7399+ break;
7400+ case GL_CURRENT_RASTER_POSITION_VALID:
7401+ params[0] = ctx->Current.RasterPosValid;
7402+ break;
7403+ case GL_CURRENT_TEXTURE_COORDS:
7404+ {
7405+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7406+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7407+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7408+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7409+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7410+ }
7411+ break;
7412+ case GL_DEPTH_BIAS:
7413+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7414+ break;
7415+ case GL_DEPTH_BITS:
7416+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7417+ break;
7418+ case GL_DEPTH_CLEAR_VALUE:
7419+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7420+ break;
7421+ case GL_DEPTH_FUNC:
7422+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7423+ break;
7424+ case GL_DEPTH_RANGE:
7425+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7426+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7427+ break;
7428+ case GL_DEPTH_SCALE:
7429+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7430+ break;
7431+ case GL_DEPTH_TEST:
7432+ params[0] = ctx->Depth.Test;
7433+ break;
7434+ case GL_DEPTH_WRITEMASK:
7435+ params[0] = ctx->Depth.Mask;
7436+ break;
7437+ case GL_DITHER:
7438+ params[0] = ctx->Color.DitherFlag;
7439+ break;
7440+ case GL_DOUBLEBUFFER:
7441+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7442+ break;
7443+ case GL_DRAW_BUFFER:
7444+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7445+ break;
7446+ case GL_EDGE_FLAG:
7447+ {
7448+ FLUSH_CURRENT(ctx, 0);
7449+ params[0] = ctx->Current.EdgeFlag;
7450+ }
7451+ break;
7452+ case GL_FEEDBACK_BUFFER_SIZE:
7453+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7454+ break;
7455+ case GL_FEEDBACK_BUFFER_TYPE:
7456+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7457+ break;
7458+ case GL_FOG:
7459+ params[0] = ctx->Fog.Enabled;
7460+ break;
7461+ case GL_FOG_COLOR:
7462+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7463+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7464+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7465+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7466+ break;
7467+ case GL_FOG_DENSITY:
7468+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7469+ break;
7470+ case GL_FOG_END:
7471+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7472+ break;
7473+ case GL_FOG_HINT:
7474+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7475+ break;
7476+ case GL_FOG_INDEX:
7477+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7478+ break;
7479+ case GL_FOG_MODE:
7480+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7481+ break;
7482+ case GL_FOG_START:
7483+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7484+ break;
7485+ case GL_FRONT_FACE:
7486+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7487+ break;
7488+ case GL_GREEN_BIAS:
7489+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7490+ break;
7491+ case GL_GREEN_BITS:
7492+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7493+ break;
7494+ case GL_GREEN_SCALE:
7495+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7496+ break;
7497+ case GL_INDEX_BITS:
7498+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7499+ break;
7500+ case GL_INDEX_CLEAR_VALUE:
7501+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7502+ break;
7503+ case GL_INDEX_MODE:
7504+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7505+ break;
7506+ case GL_INDEX_OFFSET:
7507+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7508+ break;
7509+ case GL_INDEX_SHIFT:
7510+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7511+ break;
7512+ case GL_INDEX_WRITEMASK:
7513+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7514+ break;
7515+ case GL_LIGHT0:
7516+ params[0] = ctx->Light.Light[0].Enabled;
7517+ break;
7518+ case GL_LIGHT1:
7519+ params[0] = ctx->Light.Light[1].Enabled;
7520+ break;
7521+ case GL_LIGHT2:
7522+ params[0] = ctx->Light.Light[2].Enabled;
7523+ break;
7524+ case GL_LIGHT3:
7525+ params[0] = ctx->Light.Light[3].Enabled;
7526+ break;
7527+ case GL_LIGHT4:
7528+ params[0] = ctx->Light.Light[4].Enabled;
7529+ break;
7530+ case GL_LIGHT5:
7531+ params[0] = ctx->Light.Light[5].Enabled;
7532+ break;
7533+ case GL_LIGHT6:
7534+ params[0] = ctx->Light.Light[6].Enabled;
7535+ break;
7536+ case GL_LIGHT7:
7537+ params[0] = ctx->Light.Light[7].Enabled;
7538+ break;
7539+ case GL_LIGHTING:
7540+ params[0] = ctx->Light.Enabled;
7541+ break;
7542+ case GL_LIGHT_MODEL_AMBIENT:
7543+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7544+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7545+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7546+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7547+ break;
7548+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7549+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7550+ break;
7551+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7552+ params[0] = ctx->Light.Model.LocalViewer;
7553+ break;
7554+ case GL_LIGHT_MODEL_TWO_SIDE:
7555+ params[0] = ctx->Light.Model.TwoSide;
7556+ break;
7557+ case GL_LINE_SMOOTH:
7558+ params[0] = ctx->Line.SmoothFlag;
7559+ break;
7560+ case GL_LINE_SMOOTH_HINT:
7561+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7562+ break;
7563+ case GL_LINE_STIPPLE:
7564+ params[0] = ctx->Line.StippleFlag;
7565+ break;
7566+ case GL_LINE_STIPPLE_PATTERN:
7567+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7568+ break;
7569+ case GL_LINE_STIPPLE_REPEAT:
7570+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7571+ break;
7572+ case GL_LINE_WIDTH:
7573+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7574+ break;
7575+ case GL_LINE_WIDTH_GRANULARITY:
7576+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7577+ break;
7578+ case GL_LINE_WIDTH_RANGE:
7579+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7580+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7581+ break;
7582+ case GL_ALIASED_LINE_WIDTH_RANGE:
7583+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7584+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7585+ break;
7586+ case GL_LIST_BASE:
7587+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7588+ break;
7589+ case GL_LIST_INDEX:
7590+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7591+ break;
7592+ case GL_LIST_MODE:
7593+ {
7594+ GLenum mode;
7595+ if (!ctx->CompileFlag)
7596+ mode = 0;
7597+ else if (ctx->ExecuteFlag)
7598+ mode = GL_COMPILE_AND_EXECUTE;
7599+ else
7600+ mode = GL_COMPILE;
7601+ params[0] = ENUM_TO_BOOLEAN(mode);
7602+ }
7603+ break;
7604+ case GL_INDEX_LOGIC_OP:
7605+ params[0] = ctx->Color.IndexLogicOpEnabled;
7606+ break;
7607+ case GL_COLOR_LOGIC_OP:
7608+ params[0] = ctx->Color.ColorLogicOpEnabled;
7609+ break;
7610+ case GL_LOGIC_OP_MODE:
7611+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7612+ break;
7613+ case GL_MAP1_COLOR_4:
7614+ params[0] = ctx->Eval.Map1Color4;
7615+ break;
7616+ case GL_MAP1_GRID_DOMAIN:
7617+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7618+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7619+ break;
7620+ case GL_MAP1_GRID_SEGMENTS:
7621+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7622+ break;
7623+ case GL_MAP1_INDEX:
7624+ params[0] = ctx->Eval.Map1Index;
7625+ break;
7626+ case GL_MAP1_NORMAL:
7627+ params[0] = ctx->Eval.Map1Normal;
7628+ break;
7629+ case GL_MAP1_TEXTURE_COORD_1:
7630+ params[0] = ctx->Eval.Map1TextureCoord1;
7631+ break;
7632+ case GL_MAP1_TEXTURE_COORD_2:
7633+ params[0] = ctx->Eval.Map1TextureCoord2;
7634+ break;
7635+ case GL_MAP1_TEXTURE_COORD_3:
7636+ params[0] = ctx->Eval.Map1TextureCoord3;
7637+ break;
7638+ case GL_MAP1_TEXTURE_COORD_4:
7639+ params[0] = ctx->Eval.Map1TextureCoord4;
7640+ break;
7641+ case GL_MAP1_VERTEX_3:
7642+ params[0] = ctx->Eval.Map1Vertex3;
7643+ break;
7644+ case GL_MAP1_VERTEX_4:
7645+ params[0] = ctx->Eval.Map1Vertex4;
7646+ break;
7647+ case GL_MAP2_COLOR_4:
7648+ params[0] = ctx->Eval.Map2Color4;
7649+ break;
7650+ case GL_MAP2_GRID_DOMAIN:
7651+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7652+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7653+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7654+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7655+ break;
7656+ case GL_MAP2_GRID_SEGMENTS:
7657+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7658+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7659+ break;
7660+ case GL_MAP2_INDEX:
7661+ params[0] = ctx->Eval.Map2Index;
7662+ break;
7663+ case GL_MAP2_NORMAL:
7664+ params[0] = ctx->Eval.Map2Normal;
7665+ break;
7666+ case GL_MAP2_TEXTURE_COORD_1:
7667+ params[0] = ctx->Eval.Map2TextureCoord1;
7668+ break;
7669+ case GL_MAP2_TEXTURE_COORD_2:
7670+ params[0] = ctx->Eval.Map2TextureCoord2;
7671+ break;
7672+ case GL_MAP2_TEXTURE_COORD_3:
7673+ params[0] = ctx->Eval.Map2TextureCoord3;
7674+ break;
7675+ case GL_MAP2_TEXTURE_COORD_4:
7676+ params[0] = ctx->Eval.Map2TextureCoord4;
7677+ break;
7678+ case GL_MAP2_VERTEX_3:
7679+ params[0] = ctx->Eval.Map2Vertex3;
7680+ break;
7681+ case GL_MAP2_VERTEX_4:
7682+ params[0] = ctx->Eval.Map2Vertex4;
7683+ break;
7684+ case GL_MAP_COLOR:
7685+ params[0] = ctx->Pixel.MapColorFlag;
7686+ break;
7687+ case GL_MAP_STENCIL:
7688+ params[0] = ctx->Pixel.MapStencilFlag;
7689+ break;
7690+ case GL_MATRIX_MODE:
7691+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7692+ break;
7693+ case GL_MAX_ATTRIB_STACK_DEPTH:
7694+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7695+ break;
7696+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7697+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7698+ break;
7699+ case GL_MAX_CLIP_PLANES:
7700+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7701+ break;
7702+ case GL_MAX_ELEMENTS_VERTICES:
7703+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7704+ break;
7705+ case GL_MAX_ELEMENTS_INDICES:
7706+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7707+ break;
7708+ case GL_MAX_EVAL_ORDER:
7709+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7710+ break;
7711+ case GL_MAX_LIGHTS:
7712+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7713+ break;
7714+ case GL_MAX_LIST_NESTING:
7715+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7716+ break;
7717+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7718+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7719+ break;
7720+ case GL_MAX_NAME_STACK_DEPTH:
7721+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7722+ break;
7723+ case GL_MAX_PIXEL_MAP_TABLE:
7724+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7725+ break;
7726+ case GL_MAX_PROJECTION_STACK_DEPTH:
7727+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7728+ break;
7729+ case GL_MAX_TEXTURE_SIZE:
7730+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7731+ break;
7732+ case GL_MAX_3D_TEXTURE_SIZE:
7733+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7734+ break;
7735+ case GL_MAX_TEXTURE_STACK_DEPTH:
7736+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7737+ break;
7738+ case GL_MAX_VIEWPORT_DIMS:
7739+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7740+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7741+ break;
7742+ case GL_MODELVIEW_MATRIX:
7743+ {
7744+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7745+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7746+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7747+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7748+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7749+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7750+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7751+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7752+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7753+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7754+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7755+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7756+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7757+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7758+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7759+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7760+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7761+ }
7762+ break;
7763+ case GL_MODELVIEW_STACK_DEPTH:
7764+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7765+ break;
7766+ case GL_NAME_STACK_DEPTH:
7767+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7768+ break;
7769+ case GL_NORMALIZE:
7770+ params[0] = ctx->Transform.Normalize;
7771+ break;
7772+ case GL_PACK_ALIGNMENT:
7773+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7774+ break;
7775+ case GL_PACK_LSB_FIRST:
7776+ params[0] = ctx->Pack.LsbFirst;
7777+ break;
7778+ case GL_PACK_ROW_LENGTH:
7779+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7780+ break;
7781+ case GL_PACK_SKIP_PIXELS:
7782+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7783+ break;
7784+ case GL_PACK_SKIP_ROWS:
7785+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7786+ break;
7787+ case GL_PACK_SWAP_BYTES:
7788+ params[0] = ctx->Pack.SwapBytes;
7789+ break;
7790+ case GL_PACK_SKIP_IMAGES_EXT:
7791+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7792+ break;
7793+ case GL_PACK_IMAGE_HEIGHT_EXT:
7794+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7795+ break;
7796+ case GL_PACK_INVERT_MESA:
7797+ params[0] = ctx->Pack.Invert;
7798+ break;
7799+ case GL_PERSPECTIVE_CORRECTION_HINT:
7800+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7801+ break;
7802+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7803+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7804+ break;
7805+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7806+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7807+ break;
7808+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7809+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7810+ break;
7811+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7812+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7813+ break;
7814+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7815+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7816+ break;
7817+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7818+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7819+ break;
7820+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7821+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7822+ break;
7823+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7824+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7825+ break;
7826+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7827+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7828+ break;
7829+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7830+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7831+ break;
7832+ case GL_POINT_SIZE:
7833+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7834+ break;
7835+ case GL_POINT_SIZE_GRANULARITY:
7836+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7837+ break;
7838+ case GL_POINT_SIZE_RANGE:
7839+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7840+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7841+ break;
7842+ case GL_ALIASED_POINT_SIZE_RANGE:
7843+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7844+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7845+ break;
7846+ case GL_POINT_SMOOTH:
7847+ params[0] = ctx->Point.SmoothFlag;
7848+ break;
7849+ case GL_POINT_SMOOTH_HINT:
7850+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7851+ break;
7852+ case GL_POINT_SIZE_MIN_EXT:
7853+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7854+ break;
7855+ case GL_POINT_SIZE_MAX_EXT:
7856+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7857+ break;
7858+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7859+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7860+ break;
7861+ case GL_DISTANCE_ATTENUATION_EXT:
7862+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7863+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7864+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7865+ break;
7866+ case GL_POLYGON_MODE:
7867+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7868+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7869+ break;
7870+ case GL_POLYGON_OFFSET_BIAS_EXT:
7871+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7872+ break;
7873+ case GL_POLYGON_OFFSET_FACTOR:
7874+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7875+ break;
7876+ case GL_POLYGON_OFFSET_UNITS:
7877+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7878+ break;
7879+ case GL_POLYGON_SMOOTH:
7880+ params[0] = ctx->Polygon.SmoothFlag;
7881+ break;
7882+ case GL_POLYGON_SMOOTH_HINT:
7883+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7884+ break;
7885+ case GL_POLYGON_STIPPLE:
7886+ params[0] = ctx->Polygon.StippleFlag;
7887+ break;
7888+ case GL_PROJECTION_MATRIX:
7889+ {
7890+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7891+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7892+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7893+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7894+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7895+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7896+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7897+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7898+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7899+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7900+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7901+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7902+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7903+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7904+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7905+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7906+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7907+ }
7908+ break;
7909+ case GL_PROJECTION_STACK_DEPTH:
7910+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7911+ break;
7912+ case GL_READ_BUFFER:
7913+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7914+ break;
7915+ case GL_RED_BIAS:
7916+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7917+ break;
7918+ case GL_RED_BITS:
7919+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7920+ break;
7921+ case GL_RED_SCALE:
7922+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7923+ break;
7924+ case GL_RENDER_MODE:
7925+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7926+ break;
7927+ case GL_RESCALE_NORMAL:
7928+ params[0] = ctx->Transform.RescaleNormals;
7929+ break;
7930+ case GL_RGBA_MODE:
7931+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7932+ break;
7933+ case GL_SCISSOR_BOX:
7934+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7935+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7936+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7937+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7938+ break;
7939+ case GL_SCISSOR_TEST:
7940+ params[0] = ctx->Scissor.Enabled;
7941+ break;
7942+ case GL_SELECTION_BUFFER_SIZE:
7943+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7944+ break;
7945+ case GL_SHADE_MODEL:
7946+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7947+ break;
7948+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7949+ params[0] = ctx->Texture.SharedPalette;
7950+ break;
7951+ case GL_STENCIL_BITS:
7952+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7953+ break;
7954+ case GL_STENCIL_CLEAR_VALUE:
7955+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7956+ break;
7957+ case GL_STENCIL_FAIL:
7958+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7959+ break;
7960+ case GL_STENCIL_FUNC:
7961+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7962+ break;
7963+ case GL_STENCIL_PASS_DEPTH_FAIL:
7964+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7965+ break;
7966+ case GL_STENCIL_PASS_DEPTH_PASS:
7967+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7968+ break;
7969+ case GL_STENCIL_REF:
7970+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7971+ break;
7972+ case GL_STENCIL_TEST:
7973+ params[0] = ctx->Stencil.Enabled;
7974+ break;
7975+ case GL_STENCIL_VALUE_MASK:
7976+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7977+ break;
7978+ case GL_STENCIL_WRITEMASK:
7979+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7980+ break;
7981+ case GL_STEREO:
7982+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7983+ break;
7984+ case GL_SUBPIXEL_BITS:
7985+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7986+ break;
7987+ case GL_TEXTURE_1D:
7988+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7989+ break;
7990+ case GL_TEXTURE_2D:
7991+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7992+ break;
7993+ case GL_TEXTURE_3D:
7994+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7995+ break;
7996+ case GL_TEXTURE_BINDING_1D:
7997+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7998+ break;
7999+ case GL_TEXTURE_BINDING_2D:
8000+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
8001+ break;
8002+ case GL_TEXTURE_BINDING_3D:
8003+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
8004+ break;
8005+ case GL_TEXTURE_ENV_COLOR:
8006+ {
8007+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
8008+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
8009+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
8010+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
8011+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
8012+ }
8013+ break;
8014+ case GL_TEXTURE_ENV_MODE:
8015+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
8016+ break;
8017+ case GL_TEXTURE_GEN_S:
8018+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
8019+ break;
8020+ case GL_TEXTURE_GEN_T:
8021+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
8022+ break;
8023+ case GL_TEXTURE_GEN_R:
8024+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
8025+ break;
8026+ case GL_TEXTURE_GEN_Q:
8027+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
8028+ break;
8029+ case GL_TEXTURE_MATRIX:
8030+ {
8031+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8032+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8033+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8034+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8035+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8036+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8037+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8038+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8039+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8040+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8041+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8042+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8043+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8044+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8045+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8046+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8047+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8048+ }
8049+ break;
8050+ case GL_TEXTURE_STACK_DEPTH:
8051+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
8052+ break;
8053+ case GL_UNPACK_ALIGNMENT:
8054+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
8055+ break;
8056+ case GL_UNPACK_LSB_FIRST:
8057+ params[0] = ctx->Unpack.LsbFirst;
8058+ break;
8059+ case GL_UNPACK_ROW_LENGTH:
8060+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
8061+ break;
8062+ case GL_UNPACK_SKIP_PIXELS:
8063+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
8064+ break;
8065+ case GL_UNPACK_SKIP_ROWS:
8066+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
8067+ break;
8068+ case GL_UNPACK_SWAP_BYTES:
8069+ params[0] = ctx->Unpack.SwapBytes;
8070+ break;
8071+ case GL_UNPACK_SKIP_IMAGES_EXT:
8072+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
8073+ break;
8074+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
8075+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
8076+ break;
8077+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
8078+ params[0] = ctx->Unpack.ClientStorage;
8079+ break;
8080+ case GL_VIEWPORT:
8081+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
8082+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
8083+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
8084+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
8085+ break;
8086+ case GL_ZOOM_X:
8087+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
8088+ break;
8089+ case GL_ZOOM_Y:
8090+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
8091+ break;
8092+ case GL_VERTEX_ARRAY:
8093+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
8094+ break;
8095+ case GL_VERTEX_ARRAY_SIZE:
8096+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
8097+ break;
8098+ case GL_VERTEX_ARRAY_TYPE:
8099+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
8100+ break;
8101+ case GL_VERTEX_ARRAY_STRIDE:
8102+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
8103+ break;
8104+ case GL_VERTEX_ARRAY_COUNT_EXT:
8105+ params[0] = INT_TO_BOOLEAN(0);
8106+ break;
8107+ case GL_NORMAL_ARRAY:
8108+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
8109+ break;
8110+ case GL_NORMAL_ARRAY_TYPE:
8111+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
8112+ break;
8113+ case GL_NORMAL_ARRAY_STRIDE:
8114+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
8115+ break;
8116+ case GL_NORMAL_ARRAY_COUNT_EXT:
8117+ params[0] = INT_TO_BOOLEAN(0);
8118+ break;
8119+ case GL_COLOR_ARRAY:
8120+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8121+ break;
8122+ case GL_COLOR_ARRAY_SIZE:
8123+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8124+ break;
8125+ case GL_COLOR_ARRAY_TYPE:
8126+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8127+ break;
8128+ case GL_COLOR_ARRAY_STRIDE:
8129+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8130+ break;
8131+ case GL_COLOR_ARRAY_COUNT_EXT:
8132+ params[0] = INT_TO_BOOLEAN(0);
8133+ break;
8134+ case GL_INDEX_ARRAY:
8135+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8136+ break;
8137+ case GL_INDEX_ARRAY_TYPE:
8138+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8139+ break;
8140+ case GL_INDEX_ARRAY_STRIDE:
8141+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8142+ break;
8143+ case GL_INDEX_ARRAY_COUNT_EXT:
8144+ params[0] = INT_TO_BOOLEAN(0);
8145+ break;
8146+ case GL_TEXTURE_COORD_ARRAY:
8147+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8148+ break;
8149+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8150+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8151+ break;
8152+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8153+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8154+ break;
8155+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8156+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8157+ break;
8158+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8159+ params[0] = INT_TO_BOOLEAN(0);
8160+ break;
8161+ case GL_EDGE_FLAG_ARRAY:
8162+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8163+ break;
8164+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8165+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8166+ break;
8167+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8168+ params[0] = INT_TO_BOOLEAN(0);
8169+ break;
8170+ case GL_MAX_TEXTURE_UNITS_ARB:
8171+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8172+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8173+ break;
8174+ case GL_ACTIVE_TEXTURE_ARB:
8175+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8176+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8177+ break;
8178+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8179+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8180+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8181+ break;
8182+ case GL_TEXTURE_CUBE_MAP_ARB:
8183+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8184+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8185+ break;
8186+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8187+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8188+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8189+ break;
8190+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8191+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8192+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8193+ break;
8194+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8195+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8196+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8197+ break;
8198+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8199+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8200+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8201+ break;
8202+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8203+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8204+ {
8205+ GLint formats[100];
8206+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8207+ ASSERT(n <= 100);
8208+ for (i = 0; i < n; i++)
8209+ params[i] = ENUM_TO_INT(formats[i]);
8210+ }
8211+ break;
8212+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8213+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8214+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8215+ break;
8216+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8217+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8218+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8219+ break;
8220+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8221+ {
8222+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8223+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8224+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8225+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8226+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8227+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8228+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8229+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8230+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8231+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8232+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8233+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8234+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8235+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8236+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8237+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8238+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8239+ }
8240+ break;
8241+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8242+ {
8243+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8244+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8245+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8246+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8247+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8248+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8249+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8250+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8251+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8252+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8253+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8254+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8255+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8256+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8257+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8258+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8259+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8260+ }
8261+ break;
8262+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8263+ {
8264+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8265+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8266+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8267+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8268+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8269+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8270+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8271+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8272+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8273+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8274+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8275+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8276+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8277+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8278+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8279+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8280+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8281+ }
8282+ break;
8283+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8284+ {
8285+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8286+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8287+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8288+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8289+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8290+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8291+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8292+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8293+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8294+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8295+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8296+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8297+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8298+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8299+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8300+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8301+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8302+ }
8303+ break;
8304+ case GL_COLOR_MATRIX_SGI:
8305+ {
8306+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8307+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8308+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8309+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8310+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8311+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8312+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8313+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8314+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8315+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8316+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8317+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8318+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8319+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8320+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8321+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8322+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8323+ }
8324+ break;
8325+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8326+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8327+ break;
8328+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8329+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8330+ break;
8331+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8332+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8333+ break;
8334+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8335+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8336+ break;
8337+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8338+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8339+ break;
8340+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8341+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8342+ break;
8343+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8344+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8345+ break;
8346+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8347+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8348+ break;
8349+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8350+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8351+ break;
8352+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8353+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8354+ break;
8355+ case GL_CONVOLUTION_1D_EXT:
8356+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8357+ params[0] = ctx->Pixel.Convolution1DEnabled;
8358+ break;
8359+ case GL_CONVOLUTION_2D_EXT:
8360+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8361+ params[0] = ctx->Pixel.Convolution2DEnabled;
8362+ break;
8363+ case GL_SEPARABLE_2D_EXT:
8364+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8365+ params[0] = ctx->Pixel.Separable2DEnabled;
8366+ break;
8367+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8368+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8369+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8370+ break;
8371+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8372+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8373+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8374+ break;
8375+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8376+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8377+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8378+ break;
8379+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8380+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8381+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8382+ break;
8383+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8384+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8385+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8386+ break;
8387+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8388+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8389+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8390+ break;
8391+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8392+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8393+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8394+ break;
8395+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8396+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8397+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8398+ break;
8399+ case GL_HISTOGRAM:
8400+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8401+ params[0] = ctx->Pixel.HistogramEnabled;
8402+ break;
8403+ case GL_MINMAX:
8404+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8405+ params[0] = ctx->Pixel.MinMaxEnabled;
8406+ break;
8407+ case GL_COLOR_TABLE_SGI:
8408+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8409+ params[0] = ctx->Pixel.ColorTableEnabled;
8410+ break;
8411+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8412+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8413+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8414+ break;
8415+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8416+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8417+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8418+ break;
8419+ case GL_TEXTURE_COLOR_TABLE_SGI:
8420+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8421+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8422+ break;
8423+ case GL_COLOR_SUM_EXT:
8424+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8425+ params[0] = ctx->Fog.ColorSumEnabled;
8426+ break;
8427+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8428+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8429+ {
8430+ FLUSH_CURRENT(ctx, 0);
8431+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8432+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8433+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8434+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8435+ }
8436+ break;
8437+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8438+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8439+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8440+ break;
8441+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8442+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8443+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8444+ break;
8445+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8446+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8447+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8448+ break;
8449+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8450+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8451+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8452+ break;
8453+ case GL_CURRENT_FOG_COORDINATE_EXT:
8454+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8455+ {
8456+ FLUSH_CURRENT(ctx, 0);
8457+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8458+ }
8459+ break;
8460+ case GL_FOG_COORDINATE_ARRAY_EXT:
8461+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8462+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8463+ break;
8464+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8465+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8466+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8467+ break;
8468+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8469+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8470+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8471+ break;
8472+ case GL_FOG_COORDINATE_SOURCE_EXT:
8473+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8474+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8475+ break;
8476+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8477+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8478+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8479+ break;
8480+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8481+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8482+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8483+ break;
8484+ case GL_MULTISAMPLE_ARB:
8485+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8486+ params[0] = ctx->Multisample.Enabled;
8487+ break;
8488+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8489+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8490+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8491+ break;
8492+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8493+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8494+ params[0] = ctx->Multisample.SampleAlphaToOne;
8495+ break;
8496+ case GL_SAMPLE_COVERAGE_ARB:
8497+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8498+ params[0] = ctx->Multisample.SampleCoverage;
8499+ break;
8500+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8501+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8502+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8503+ break;
8504+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8505+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8506+ params[0] = ctx->Multisample.SampleCoverageInvert;
8507+ break;
8508+ case GL_SAMPLE_BUFFERS_ARB:
8509+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8510+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8511+ break;
8512+ case GL_SAMPLES_ARB:
8513+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8514+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8515+ break;
8516+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8517+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8518+ params[0] = ctx->Transform.RasterPositionUnclipped;
8519+ break;
8520+ case GL_POINT_SPRITE_NV:
8521+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8522+ params[0] = ctx->Point.PointSprite;
8523+ break;
8524+ case GL_POINT_SPRITE_R_MODE_NV:
8525+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8526+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8527+ break;
8528+ case GL_POINT_SPRITE_COORD_ORIGIN:
8529+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8530+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8531+ break;
8532+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8533+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8534+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8535+ break;
8536+ case GL_VERTEX_PROGRAM_BINDING_NV:
8537+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8538+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8539+ break;
8540+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8541+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8542+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8543+ break;
8544+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8545+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8546+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8547+ break;
8548+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8549+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8550+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8551+ break;
8552+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8553+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8554+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8555+ break;
8556+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8557+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8558+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8559+ break;
8560+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8561+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8562+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8563+ break;
8564+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8565+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8566+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8567+ break;
8568+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8569+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8570+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8571+ break;
8572+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8573+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8574+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8575+ break;
8576+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8577+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8578+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8579+ break;
8580+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8581+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8582+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8583+ break;
8584+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8585+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8586+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8587+ break;
8588+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8589+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8590+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8591+ break;
8592+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8593+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8594+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8595+ break;
8596+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8597+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8598+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8599+ break;
8600+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8601+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8602+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8603+ break;
8604+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8605+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8606+ params[0] = ctx->Eval.Map1Attrib[0];
8607+ break;
8608+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8609+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8610+ params[0] = ctx->Eval.Map1Attrib[1];
8611+ break;
8612+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8613+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8614+ params[0] = ctx->Eval.Map1Attrib[2];
8615+ break;
8616+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8617+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8618+ params[0] = ctx->Eval.Map1Attrib[3];
8619+ break;
8620+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8621+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8622+ params[0] = ctx->Eval.Map1Attrib[4];
8623+ break;
8624+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8625+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8626+ params[0] = ctx->Eval.Map1Attrib[5];
8627+ break;
8628+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8629+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8630+ params[0] = ctx->Eval.Map1Attrib[6];
8631+ break;
8632+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8633+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8634+ params[0] = ctx->Eval.Map1Attrib[7];
8635+ break;
8636+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8637+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8638+ params[0] = ctx->Eval.Map1Attrib[8];
8639+ break;
8640+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8641+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8642+ params[0] = ctx->Eval.Map1Attrib[9];
8643+ break;
8644+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8645+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8646+ params[0] = ctx->Eval.Map1Attrib[10];
8647+ break;
8648+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8649+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8650+ params[0] = ctx->Eval.Map1Attrib[11];
8651+ break;
8652+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8653+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8654+ params[0] = ctx->Eval.Map1Attrib[12];
8655+ break;
8656+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8657+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8658+ params[0] = ctx->Eval.Map1Attrib[13];
8659+ break;
8660+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8661+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8662+ params[0] = ctx->Eval.Map1Attrib[14];
8663+ break;
8664+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8665+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8666+ params[0] = ctx->Eval.Map1Attrib[15];
8667+ break;
8668+ case GL_FRAGMENT_PROGRAM_NV:
8669+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8670+ params[0] = ctx->FragmentProgram.Enabled;
8671+ break;
8672+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8673+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8674+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8675+ break;
8676+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8677+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8678+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8679+ break;
8680+ case GL_TEXTURE_RECTANGLE_NV:
8681+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8682+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8683+ break;
8684+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8685+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8686+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8687+ break;
8688+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8689+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8690+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8691+ break;
8692+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8693+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8694+ params[0] = ctx->Stencil.TestTwoSide;
8695+ break;
8696+ case GL_ACTIVE_STENCIL_FACE_EXT:
8697+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8698+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8699+ break;
8700+ case GL_MAX_SHININESS_NV:
8701+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8702+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8703+ break;
8704+ case GL_MAX_SPOT_EXPONENT_NV:
8705+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8706+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8707+ break;
8708+ case GL_ARRAY_BUFFER_BINDING_ARB:
8709+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8710+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8711+ break;
8712+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8713+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8714+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8715+ break;
8716+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8717+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8718+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8719+ break;
8720+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8721+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8722+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8723+ break;
8724+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8725+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8726+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8727+ break;
8728+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8729+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8730+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8731+ break;
8732+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8733+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8734+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8735+ break;
8736+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8737+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8738+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8739+ break;
8740+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8741+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8742+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8743+ break;
8744+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8745+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8746+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8747+ break;
8748+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8749+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8750+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8751+ break;
8752+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8753+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8754+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8755+ break;
8756+ case GL_VERTEX_PROGRAM_ARB:
8757+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8758+ params[0] = ctx->VertexProgram.Enabled;
8759+ break;
8760+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8761+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8762+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8763+ break;
8764+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8765+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8766+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8767+ break;
8768+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8769+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8770+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8771+ break;
8772+ case GL_MAX_PROGRAM_MATRICES_ARB:
8773+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8774+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8775+ break;
8776+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8777+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8778+ params[0] = ctx->CurrentStack->Depth + 1;
8779+ break;
8780+ case GL_CURRENT_MATRIX_ARB:
8781+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8782+ {
8783+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8784+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8785+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8786+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8787+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8788+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8789+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8790+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8791+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8792+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8793+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8794+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8795+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8796+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8797+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8798+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8799+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8800+ }
8801+ break;
8802+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8803+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8804+ {
8805+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8806+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8807+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8808+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8809+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8810+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8811+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8812+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8813+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8814+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8815+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8816+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8817+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8818+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8819+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8820+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8821+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8822+ }
8823+ break;
8824+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8825+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8826+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8827+ break;
8828+ case GL_PROGRAM_ERROR_POSITION_ARB:
8829+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8830+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8831+ break;
8832+ case GL_FRAGMENT_PROGRAM_ARB:
8833+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8834+ params[0] = ctx->FragmentProgram.Enabled;
8835+ break;
8836+ case GL_MAX_TEXTURE_COORDS_ARB:
8837+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8838+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8839+ break;
8840+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8841+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8842+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8843+ break;
8844+ case GL_DEPTH_BOUNDS_TEST_EXT:
8845+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8846+ params[0] = ctx->Depth.BoundsTest;
8847+ break;
8848+ case GL_DEPTH_BOUNDS_EXT:
8849+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8850+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8851+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8852+ break;
8853+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8854+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8855+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8856+ break;
8857+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8858+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8859+ params[0] = ctx->VertexProgram.CallbackEnabled;
8860+ break;
8861+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8862+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8863+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8864+ break;
8865+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8866+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8867+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8868+ break;
8869+ case GL_MAX_DRAW_BUFFERS_ARB:
8870+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8871+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8872+ break;
8873+ case GL_DRAW_BUFFER0_ARB:
8874+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8875+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8876+ break;
8877+ case GL_DRAW_BUFFER1_ARB:
8878+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8879+ {
8880+ GLenum buffer;
8881+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8882+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8883+ return;
8884+ }
8885+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8886+ params[0] = ENUM_TO_BOOLEAN(buffer);
8887+ }
8888+ break;
8889+ case GL_DRAW_BUFFER2_ARB:
8890+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8891+ {
8892+ GLenum buffer;
8893+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8894+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8895+ return;
8896+ }
8897+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8898+ params[0] = ENUM_TO_BOOLEAN(buffer);
8899+ }
8900+ break;
8901+ case GL_DRAW_BUFFER3_ARB:
8902+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8903+ {
8904+ GLenum buffer;
8905+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8906+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8907+ return;
8908+ }
8909+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8910+ params[0] = ENUM_TO_BOOLEAN(buffer);
8911+ }
8912+ break;
8913+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8914+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8915+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8916+ break;
8917+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8918+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8919+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8920+ break;
8921+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8922+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8923+ params[0] = INT_TO_BOOLEAN(6);
8924+ break;
8925+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8926+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8927+ params[0] = INT_TO_BOOLEAN(8);
8928+ break;
8929+ case GL_NUM_PASSES_ATI:
8930+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8931+ params[0] = INT_TO_BOOLEAN(2);
8932+ break;
8933+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8934+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8935+ params[0] = INT_TO_BOOLEAN(8);
8936+ break;
8937+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8938+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8939+ params[0] = INT_TO_BOOLEAN(16);
8940+ break;
8941+ case GL_COLOR_ALPHA_PAIRING_ATI:
8942+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8943+ params[0] = GL_TRUE;
8944+ break;
8945+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8946+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8947+ params[0] = INT_TO_BOOLEAN(3);
8948+ break;
8949+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8950+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8951+ params[0] = INT_TO_BOOLEAN(3);
8952+ break;
8953+ case GL_STENCIL_BACK_FUNC:
8954+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8955+ break;
8956+ case GL_STENCIL_BACK_VALUE_MASK:
8957+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8958+ break;
8959+ case GL_STENCIL_BACK_REF:
8960+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8961+ break;
8962+ case GL_STENCIL_BACK_FAIL:
8963+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8964+ break;
8965+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8966+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8967+ break;
8968+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8969+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8970+ break;
8971+ case GL_FRAMEBUFFER_BINDING_EXT:
8972+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8973+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8974+ break;
8975+ case GL_RENDERBUFFER_BINDING_EXT:
8976+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8977+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8978+ break;
8979+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8980+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8981+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8982+ break;
8983+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8984+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8985+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8986+ break;
8987+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8988+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8989+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8990+ break;
8991+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8992+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8993+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8994+ break;
8995+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8996+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8997+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8998+ break;
8999+ case GL_MAX_VARYING_FLOATS_ARB:
9000+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9001+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
9002+ break;
9003+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
9004+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9005+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
9006+ break;
9007+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
9008+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9009+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
9010+ break;
9011+ default:
9012+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
9013+ }
9014+}
9015+
9016+void GLAPIENTRY
9017+_mesa_GetFloatv( GLenum pname, GLfloat *params )
9018+{
9019+ GET_CURRENT_CONTEXT(ctx);
9020+ ASSERT_OUTSIDE_BEGIN_END(ctx);
9021+
9022+ if (!params)
9023+ return;
9024+
9025+ if (ctx->NewState)
9026+ _mesa_update_state(ctx);
9027+
9028+ if (ctx->Driver.GetFloatv &&
9029+ ctx->Driver.GetFloatv(ctx, pname, params))
9030+ return;
9031+
9032+ switch (pname) {
9033+ case GL_ACCUM_RED_BITS:
9034+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
9035+ break;
9036+ case GL_ACCUM_GREEN_BITS:
9037+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
9038+ break;
9039+ case GL_ACCUM_BLUE_BITS:
9040+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
9041+ break;
9042+ case GL_ACCUM_ALPHA_BITS:
9043+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
9044+ break;
9045+ case GL_ACCUM_CLEAR_VALUE:
9046+ params[0] = ctx->Accum.ClearColor[0];
9047+ params[1] = ctx->Accum.ClearColor[1];
9048+ params[2] = ctx->Accum.ClearColor[2];
9049+ params[3] = ctx->Accum.ClearColor[3];
9050+ break;
9051+ case GL_ALPHA_BIAS:
9052+ params[0] = ctx->Pixel.AlphaBias;
9053+ break;
9054+ case GL_ALPHA_BITS:
9055+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
9056+ break;
9057+ case GL_ALPHA_SCALE:
9058+ params[0] = ctx->Pixel.AlphaScale;
9059+ break;
9060+ case GL_ALPHA_TEST:
9061+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
9062+ break;
9063+ case GL_ALPHA_TEST_FUNC:
9064+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
9065+ break;
9066+ case GL_ALPHA_TEST_REF:
9067+ params[0] = ctx->Color.AlphaRef;
9068+ break;
9069+ case GL_ATTRIB_STACK_DEPTH:
9070+ params[0] = (GLfloat)(ctx->AttribStackDepth);
9071+ break;
9072+ case GL_AUTO_NORMAL:
9073+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
9074+ break;
9075+ case GL_AUX_BUFFERS:
9076+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
9077+ break;
9078+ case GL_BLEND:
9079+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
9080+ break;
9081+ case GL_BLEND_DST:
9082+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9083+ break;
9084+ case GL_BLEND_SRC:
9085+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9086+ break;
9087+ case GL_BLEND_SRC_RGB_EXT:
9088+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9089+ break;
9090+ case GL_BLEND_DST_RGB_EXT:
9091+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9092+ break;
9093+ case GL_BLEND_SRC_ALPHA_EXT:
9094+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
9095+ break;
9096+ case GL_BLEND_DST_ALPHA_EXT:
9097+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
9098+ break;
9099+ case GL_BLEND_EQUATION:
9100+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
9101+ break;
9102+ case GL_BLEND_EQUATION_ALPHA_EXT:
9103+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
9104+ break;
9105+ case GL_BLEND_COLOR_EXT:
9106+ params[0] = ctx->Color.BlendColor[0];
9107+ params[1] = ctx->Color.BlendColor[1];
9108+ params[2] = ctx->Color.BlendColor[2];
9109+ params[3] = ctx->Color.BlendColor[3];
9110+ break;
9111+ case GL_BLUE_BIAS:
9112+ params[0] = ctx->Pixel.BlueBias;
9113+ break;
9114+ case GL_BLUE_BITS:
9115+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
9116+ break;
9117+ case GL_BLUE_SCALE:
9118+ params[0] = ctx->Pixel.BlueScale;
9119+ break;
9120+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9121+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9122+ break;
9123+ case GL_CLIP_PLANE0:
9124+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9125+ break;
9126+ case GL_CLIP_PLANE1:
9127+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9128+ break;
9129+ case GL_CLIP_PLANE2:
9130+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9131+ break;
9132+ case GL_CLIP_PLANE3:
9133+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9134+ break;
9135+ case GL_CLIP_PLANE4:
9136+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9137+ break;
9138+ case GL_CLIP_PLANE5:
9139+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9140+ break;
9141+ case GL_COLOR_CLEAR_VALUE:
9142+ params[0] = ctx->Color.ClearColor[0];
9143+ params[1] = ctx->Color.ClearColor[1];
9144+ params[2] = ctx->Color.ClearColor[2];
9145+ params[3] = ctx->Color.ClearColor[3];
9146+ break;
9147+ case GL_COLOR_MATERIAL:
9148+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9149+ break;
9150+ case GL_COLOR_MATERIAL_FACE:
9151+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9152+ break;
9153+ case GL_COLOR_MATERIAL_PARAMETER:
9154+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9155+ break;
9156+ case GL_COLOR_WRITEMASK:
9157+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9158+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9159+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9160+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9161+ break;
9162+ case GL_CULL_FACE:
9163+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9164+ break;
9165+ case GL_CULL_FACE_MODE:
9166+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9167+ break;
9168+ case GL_CURRENT_COLOR:
9169+ {
9170+ FLUSH_CURRENT(ctx, 0);
9171+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9172+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9173+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9174+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9175+ }
9176+ break;
9177+ case GL_CURRENT_INDEX:
9178+ {
9179+ FLUSH_CURRENT(ctx, 0);
9180+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9181+ }
9182+ break;
9183+ case GL_CURRENT_NORMAL:
9184+ {
9185+ FLUSH_CURRENT(ctx, 0);
9186+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9187+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9188+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9189+ }
9190+ break;
9191+ case GL_CURRENT_RASTER_COLOR:
9192+ params[0] = ctx->Current.RasterColor[0];
9193+ params[1] = ctx->Current.RasterColor[1];
9194+ params[2] = ctx->Current.RasterColor[2];
9195+ params[3] = ctx->Current.RasterColor[3];
9196+ break;
9197+ case GL_CURRENT_RASTER_DISTANCE:
9198+ params[0] = ctx->Current.RasterDistance;
9199+ break;
9200+ case GL_CURRENT_RASTER_INDEX:
9201+ params[0] = ctx->Current.RasterIndex;
9202+ break;
9203+ case GL_CURRENT_RASTER_POSITION:
9204+ params[0] = ctx->Current.RasterPos[0];
9205+ params[1] = ctx->Current.RasterPos[1];
9206+ params[2] = ctx->Current.RasterPos[2];
9207+ params[3] = ctx->Current.RasterPos[3];
9208+ break;
9209+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9210+ params[0] = ctx->Current.RasterSecondaryColor[0];
9211+ params[1] = ctx->Current.RasterSecondaryColor[1];
9212+ params[2] = ctx->Current.RasterSecondaryColor[2];
9213+ params[3] = ctx->Current.RasterSecondaryColor[3];
9214+ break;
9215+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9216+ {
9217+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9218+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9219+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9220+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9221+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9222+ }
9223+ break;
9224+ case GL_CURRENT_RASTER_POSITION_VALID:
9225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9226+ break;
9227+ case GL_CURRENT_TEXTURE_COORDS:
9228+ {
9229+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9230+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9231+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9232+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9233+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9234+ }
9235+ break;
9236+ case GL_DEPTH_BIAS:
9237+ params[0] = ctx->Pixel.DepthBias;
9238+ break;
9239+ case GL_DEPTH_BITS:
9240+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9241+ break;
9242+ case GL_DEPTH_CLEAR_VALUE:
9243+ params[0] = ctx->Depth.Clear;
9244+ break;
9245+ case GL_DEPTH_FUNC:
9246+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9247+ break;
9248+ case GL_DEPTH_RANGE:
9249+ params[0] = ctx->Viewport.Near;
9250+ params[1] = ctx->Viewport.Far;
9251+ break;
9252+ case GL_DEPTH_SCALE:
9253+ params[0] = ctx->Pixel.DepthScale;
9254+ break;
9255+ case GL_DEPTH_TEST:
9256+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9257+ break;
9258+ case GL_DEPTH_WRITEMASK:
9259+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9260+ break;
9261+ case GL_DITHER:
9262+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9263+ break;
9264+ case GL_DOUBLEBUFFER:
9265+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9266+ break;
9267+ case GL_DRAW_BUFFER:
9268+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9269+ break;
9270+ case GL_EDGE_FLAG:
9271+ {
9272+ FLUSH_CURRENT(ctx, 0);
9273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9274+ }
9275+ break;
9276+ case GL_FEEDBACK_BUFFER_SIZE:
9277+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9278+ break;
9279+ case GL_FEEDBACK_BUFFER_TYPE:
9280+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9281+ break;
9282+ case GL_FOG:
9283+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9284+ break;
9285+ case GL_FOG_COLOR:
9286+ params[0] = ctx->Fog.Color[0];
9287+ params[1] = ctx->Fog.Color[1];
9288+ params[2] = ctx->Fog.Color[2];
9289+ params[3] = ctx->Fog.Color[3];
9290+ break;
9291+ case GL_FOG_DENSITY:
9292+ params[0] = ctx->Fog.Density;
9293+ break;
9294+ case GL_FOG_END:
9295+ params[0] = ctx->Fog.End;
9296+ break;
9297+ case GL_FOG_HINT:
9298+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9299+ break;
9300+ case GL_FOG_INDEX:
9301+ params[0] = ctx->Fog.Index;
9302+ break;
9303+ case GL_FOG_MODE:
9304+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9305+ break;
9306+ case GL_FOG_START:
9307+ params[0] = ctx->Fog.Start;
9308+ break;
9309+ case GL_FRONT_FACE:
9310+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9311+ break;
9312+ case GL_GREEN_BIAS:
9313+ params[0] = ctx->Pixel.GreenBias;
9314+ break;
9315+ case GL_GREEN_BITS:
9316+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9317+ break;
9318+ case GL_GREEN_SCALE:
9319+ params[0] = ctx->Pixel.GreenScale;
9320+ break;
9321+ case GL_INDEX_BITS:
9322+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9323+ break;
9324+ case GL_INDEX_CLEAR_VALUE:
9325+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9326+ break;
9327+ case GL_INDEX_MODE:
9328+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9329+ break;
9330+ case GL_INDEX_OFFSET:
9331+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9332+ break;
9333+ case GL_INDEX_SHIFT:
9334+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9335+ break;
9336+ case GL_INDEX_WRITEMASK:
9337+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9338+ break;
9339+ case GL_LIGHT0:
9340+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9341+ break;
9342+ case GL_LIGHT1:
9343+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9344+ break;
9345+ case GL_LIGHT2:
9346+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9347+ break;
9348+ case GL_LIGHT3:
9349+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9350+ break;
9351+ case GL_LIGHT4:
9352+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9353+ break;
9354+ case GL_LIGHT5:
9355+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9356+ break;
9357+ case GL_LIGHT6:
9358+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9359+ break;
9360+ case GL_LIGHT7:
9361+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9362+ break;
9363+ case GL_LIGHTING:
9364+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9365+ break;
9366+ case GL_LIGHT_MODEL_AMBIENT:
9367+ params[0] = ctx->Light.Model.Ambient[0];
9368+ params[1] = ctx->Light.Model.Ambient[1];
9369+ params[2] = ctx->Light.Model.Ambient[2];
9370+ params[3] = ctx->Light.Model.Ambient[3];
9371+ break;
9372+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9373+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9374+ break;
9375+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9376+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9377+ break;
9378+ case GL_LIGHT_MODEL_TWO_SIDE:
9379+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9380+ break;
9381+ case GL_LINE_SMOOTH:
9382+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9383+ break;
9384+ case GL_LINE_SMOOTH_HINT:
9385+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9386+ break;
9387+ case GL_LINE_STIPPLE:
9388+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9389+ break;
9390+ case GL_LINE_STIPPLE_PATTERN:
9391+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9392+ break;
9393+ case GL_LINE_STIPPLE_REPEAT:
9394+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9395+ break;
9396+ case GL_LINE_WIDTH:
9397+ params[0] = ctx->Line.Width;
9398+ break;
9399+ case GL_LINE_WIDTH_GRANULARITY:
9400+ params[0] = ctx->Const.LineWidthGranularity;
9401+ break;
9402+ case GL_LINE_WIDTH_RANGE:
9403+ params[0] = ctx->Const.MinLineWidthAA;
9404+ params[1] = ctx->Const.MaxLineWidthAA;
9405+ break;
9406+ case GL_ALIASED_LINE_WIDTH_RANGE:
9407+ params[0] = ctx->Const.MinLineWidth;
9408+ params[1] = ctx->Const.MaxLineWidth;
9409+ break;
9410+ case GL_LIST_BASE:
9411+ params[0] = (GLfloat)(ctx->List.ListBase);
9412+ break;
9413+ case GL_LIST_INDEX:
9414+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9415+ break;
9416+ case GL_LIST_MODE:
9417+ {
9418+ GLenum mode;
9419+ if (!ctx->CompileFlag)
9420+ mode = 0;
9421+ else if (ctx->ExecuteFlag)
9422+ mode = GL_COMPILE_AND_EXECUTE;
9423+ else
9424+ mode = GL_COMPILE;
9425+ params[0] = ENUM_TO_FLOAT(mode);
9426+ }
9427+ break;
9428+ case GL_INDEX_LOGIC_OP:
9429+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9430+ break;
9431+ case GL_COLOR_LOGIC_OP:
9432+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9433+ break;
9434+ case GL_LOGIC_OP_MODE:
9435+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9436+ break;
9437+ case GL_MAP1_COLOR_4:
9438+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9439+ break;
9440+ case GL_MAP1_GRID_DOMAIN:
9441+ params[0] = ctx->Eval.MapGrid1u1;
9442+ params[1] = ctx->Eval.MapGrid1u2;
9443+ break;
9444+ case GL_MAP1_GRID_SEGMENTS:
9445+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9446+ break;
9447+ case GL_MAP1_INDEX:
9448+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9449+ break;
9450+ case GL_MAP1_NORMAL:
9451+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9452+ break;
9453+ case GL_MAP1_TEXTURE_COORD_1:
9454+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9455+ break;
9456+ case GL_MAP1_TEXTURE_COORD_2:
9457+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9458+ break;
9459+ case GL_MAP1_TEXTURE_COORD_3:
9460+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9461+ break;
9462+ case GL_MAP1_TEXTURE_COORD_4:
9463+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9464+ break;
9465+ case GL_MAP1_VERTEX_3:
9466+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9467+ break;
9468+ case GL_MAP1_VERTEX_4:
9469+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9470+ break;
9471+ case GL_MAP2_COLOR_4:
9472+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9473+ break;
9474+ case GL_MAP2_GRID_DOMAIN:
9475+ params[0] = ctx->Eval.MapGrid2u1;
9476+ params[1] = ctx->Eval.MapGrid2u2;
9477+ params[2] = ctx->Eval.MapGrid2v1;
9478+ params[3] = ctx->Eval.MapGrid2v2;
9479+ break;
9480+ case GL_MAP2_GRID_SEGMENTS:
9481+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9482+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9483+ break;
9484+ case GL_MAP2_INDEX:
9485+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9486+ break;
9487+ case GL_MAP2_NORMAL:
9488+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9489+ break;
9490+ case GL_MAP2_TEXTURE_COORD_1:
9491+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9492+ break;
9493+ case GL_MAP2_TEXTURE_COORD_2:
9494+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9495+ break;
9496+ case GL_MAP2_TEXTURE_COORD_3:
9497+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9498+ break;
9499+ case GL_MAP2_TEXTURE_COORD_4:
9500+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9501+ break;
9502+ case GL_MAP2_VERTEX_3:
9503+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9504+ break;
9505+ case GL_MAP2_VERTEX_4:
9506+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9507+ break;
9508+ case GL_MAP_COLOR:
9509+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9510+ break;
9511+ case GL_MAP_STENCIL:
9512+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9513+ break;
9514+ case GL_MATRIX_MODE:
9515+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9516+ break;
9517+ case GL_MAX_ATTRIB_STACK_DEPTH:
9518+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9519+ break;
9520+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9521+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9522+ break;
9523+ case GL_MAX_CLIP_PLANES:
9524+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9525+ break;
9526+ case GL_MAX_ELEMENTS_VERTICES:
9527+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9528+ break;
9529+ case GL_MAX_ELEMENTS_INDICES:
9530+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9531+ break;
9532+ case GL_MAX_EVAL_ORDER:
9533+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9534+ break;
9535+ case GL_MAX_LIGHTS:
9536+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9537+ break;
9538+ case GL_MAX_LIST_NESTING:
9539+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9540+ break;
9541+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9542+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9543+ break;
9544+ case GL_MAX_NAME_STACK_DEPTH:
9545+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9546+ break;
9547+ case GL_MAX_PIXEL_MAP_TABLE:
9548+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9549+ break;
9550+ case GL_MAX_PROJECTION_STACK_DEPTH:
9551+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9552+ break;
9553+ case GL_MAX_TEXTURE_SIZE:
9554+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9555+ break;
9556+ case GL_MAX_3D_TEXTURE_SIZE:
9557+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9558+ break;
9559+ case GL_MAX_TEXTURE_STACK_DEPTH:
9560+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9561+ break;
9562+ case GL_MAX_VIEWPORT_DIMS:
9563+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9564+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9565+ break;
9566+ case GL_MODELVIEW_MATRIX:
9567+ {
9568+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9569+ params[0] = matrix[0];
9570+ params[1] = matrix[1];
9571+ params[2] = matrix[2];
9572+ params[3] = matrix[3];
9573+ params[4] = matrix[4];
9574+ params[5] = matrix[5];
9575+ params[6] = matrix[6];
9576+ params[7] = matrix[7];
9577+ params[8] = matrix[8];
9578+ params[9] = matrix[9];
9579+ params[10] = matrix[10];
9580+ params[11] = matrix[11];
9581+ params[12] = matrix[12];
9582+ params[13] = matrix[13];
9583+ params[14] = matrix[14];
9584+ params[15] = matrix[15];
9585+ }
9586+ break;
9587+ case GL_MODELVIEW_STACK_DEPTH:
9588+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9589+ break;
9590+ case GL_NAME_STACK_DEPTH:
9591+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9592+ break;
9593+ case GL_NORMALIZE:
9594+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9595+ break;
9596+ case GL_PACK_ALIGNMENT:
9597+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9598+ break;
9599+ case GL_PACK_LSB_FIRST:
9600+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9601+ break;
9602+ case GL_PACK_ROW_LENGTH:
9603+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9604+ break;
9605+ case GL_PACK_SKIP_PIXELS:
9606+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9607+ break;
9608+ case GL_PACK_SKIP_ROWS:
9609+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9610+ break;
9611+ case GL_PACK_SWAP_BYTES:
9612+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9613+ break;
9614+ case GL_PACK_SKIP_IMAGES_EXT:
9615+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9616+ break;
9617+ case GL_PACK_IMAGE_HEIGHT_EXT:
9618+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9619+ break;
9620+ case GL_PACK_INVERT_MESA:
9621+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9622+ break;
9623+ case GL_PERSPECTIVE_CORRECTION_HINT:
9624+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9625+ break;
9626+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9627+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9628+ break;
9629+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9630+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9631+ break;
9632+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9633+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9634+ break;
9635+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9636+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9637+ break;
9638+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9639+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9640+ break;
9641+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9642+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9643+ break;
9644+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9645+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9646+ break;
9647+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9648+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9649+ break;
9650+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9651+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9652+ break;
9653+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9654+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9655+ break;
9656+ case GL_POINT_SIZE:
9657+ params[0] = ctx->Point.Size;
9658+ break;
9659+ case GL_POINT_SIZE_GRANULARITY:
9660+ params[0] = ctx->Const.PointSizeGranularity;
9661+ break;
9662+ case GL_POINT_SIZE_RANGE:
9663+ params[0] = ctx->Const.MinPointSizeAA;
9664+ params[1] = ctx->Const.MaxPointSizeAA;
9665+ break;
9666+ case GL_ALIASED_POINT_SIZE_RANGE:
9667+ params[0] = ctx->Const.MinPointSize;
9668+ params[1] = ctx->Const.MaxPointSize;
9669+ break;
9670+ case GL_POINT_SMOOTH:
9671+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9672+ break;
9673+ case GL_POINT_SMOOTH_HINT:
9674+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9675+ break;
9676+ case GL_POINT_SIZE_MIN_EXT:
9677+ params[0] = ctx->Point.MinSize;
9678+ break;
9679+ case GL_POINT_SIZE_MAX_EXT:
9680+ params[0] = ctx->Point.MaxSize;
9681+ break;
9682+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9683+ params[0] = ctx->Point.Threshold;
9684+ break;
9685+ case GL_DISTANCE_ATTENUATION_EXT:
9686+ params[0] = ctx->Point.Params[0];
9687+ params[1] = ctx->Point.Params[1];
9688+ params[2] = ctx->Point.Params[2];
9689+ break;
9690+ case GL_POLYGON_MODE:
9691+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9692+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9693+ break;
9694+ case GL_POLYGON_OFFSET_BIAS_EXT:
9695+ params[0] = ctx->Polygon.OffsetUnits;
9696+ break;
9697+ case GL_POLYGON_OFFSET_FACTOR:
9698+ params[0] = ctx->Polygon.OffsetFactor ;
9699+ break;
9700+ case GL_POLYGON_OFFSET_UNITS:
9701+ params[0] = ctx->Polygon.OffsetUnits ;
9702+ break;
9703+ case GL_POLYGON_SMOOTH:
9704+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9705+ break;
9706+ case GL_POLYGON_SMOOTH_HINT:
9707+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9708+ break;
9709+ case GL_POLYGON_STIPPLE:
9710+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9711+ break;
9712+ case GL_PROJECTION_MATRIX:
9713+ {
9714+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9715+ params[0] = matrix[0];
9716+ params[1] = matrix[1];
9717+ params[2] = matrix[2];
9718+ params[3] = matrix[3];
9719+ params[4] = matrix[4];
9720+ params[5] = matrix[5];
9721+ params[6] = matrix[6];
9722+ params[7] = matrix[7];
9723+ params[8] = matrix[8];
9724+ params[9] = matrix[9];
9725+ params[10] = matrix[10];
9726+ params[11] = matrix[11];
9727+ params[12] = matrix[12];
9728+ params[13] = matrix[13];
9729+ params[14] = matrix[14];
9730+ params[15] = matrix[15];
9731+ }
9732+ break;
9733+ case GL_PROJECTION_STACK_DEPTH:
9734+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9735+ break;
9736+ case GL_READ_BUFFER:
9737+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9738+ break;
9739+ case GL_RED_BIAS:
9740+ params[0] = ctx->Pixel.RedBias;
9741+ break;
9742+ case GL_RED_BITS:
9743+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9744+ break;
9745+ case GL_RED_SCALE:
9746+ params[0] = ctx->Pixel.RedScale;
9747+ break;
9748+ case GL_RENDER_MODE:
9749+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9750+ break;
9751+ case GL_RESCALE_NORMAL:
9752+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9753+ break;
9754+ case GL_RGBA_MODE:
9755+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9756+ break;
9757+ case GL_SCISSOR_BOX:
9758+ params[0] = (GLfloat)(ctx->Scissor.X);
9759+ params[1] = (GLfloat)(ctx->Scissor.Y);
9760+ params[2] = (GLfloat)(ctx->Scissor.Width);
9761+ params[3] = (GLfloat)(ctx->Scissor.Height);
9762+ break;
9763+ case GL_SCISSOR_TEST:
9764+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9765+ break;
9766+ case GL_SELECTION_BUFFER_SIZE:
9767+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9768+ break;
9769+ case GL_SHADE_MODEL:
9770+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9771+ break;
9772+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9773+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9774+ break;
9775+ case GL_STENCIL_BITS:
9776+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9777+ break;
9778+ case GL_STENCIL_CLEAR_VALUE:
9779+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9780+ break;
9781+ case GL_STENCIL_FAIL:
9782+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9783+ break;
9784+ case GL_STENCIL_FUNC:
9785+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9786+ break;
9787+ case GL_STENCIL_PASS_DEPTH_FAIL:
9788+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9789+ break;
9790+ case GL_STENCIL_PASS_DEPTH_PASS:
9791+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9792+ break;
9793+ case GL_STENCIL_REF:
9794+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9795+ break;
9796+ case GL_STENCIL_TEST:
9797+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9798+ break;
9799+ case GL_STENCIL_VALUE_MASK:
9800+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9801+ break;
9802+ case GL_STENCIL_WRITEMASK:
9803+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9804+ break;
9805+ case GL_STEREO:
9806+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9807+ break;
9808+ case GL_SUBPIXEL_BITS:
9809+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9810+ break;
9811+ case GL_TEXTURE_1D:
9812+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9813+ break;
9814+ case GL_TEXTURE_2D:
9815+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9816+ break;
9817+ case GL_TEXTURE_3D:
9818+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9819+ break;
9820+ case GL_TEXTURE_BINDING_1D:
9821+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9822+ break;
9823+ case GL_TEXTURE_BINDING_2D:
9824+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9825+ break;
9826+ case GL_TEXTURE_BINDING_3D:
9827+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9828+ break;
9829+ case GL_TEXTURE_ENV_COLOR:
9830+ {
9831+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9832+ params[0] = color[0];
9833+ params[1] = color[1];
9834+ params[2] = color[2];
9835+ params[3] = color[3];
9836+ }
9837+ break;
9838+ case GL_TEXTURE_ENV_MODE:
9839+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9840+ break;
9841+ case GL_TEXTURE_GEN_S:
9842+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9843+ break;
9844+ case GL_TEXTURE_GEN_T:
9845+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9846+ break;
9847+ case GL_TEXTURE_GEN_R:
9848+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9849+ break;
9850+ case GL_TEXTURE_GEN_Q:
9851+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9852+ break;
9853+ case GL_TEXTURE_MATRIX:
9854+ {
9855+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9856+ params[0] = matrix[0];
9857+ params[1] = matrix[1];
9858+ params[2] = matrix[2];
9859+ params[3] = matrix[3];
9860+ params[4] = matrix[4];
9861+ params[5] = matrix[5];
9862+ params[6] = matrix[6];
9863+ params[7] = matrix[7];
9864+ params[8] = matrix[8];
9865+ params[9] = matrix[9];
9866+ params[10] = matrix[10];
9867+ params[11] = matrix[11];
9868+ params[12] = matrix[12];
9869+ params[13] = matrix[13];
9870+ params[14] = matrix[14];
9871+ params[15] = matrix[15];
9872+ }
9873+ break;
9874+ case GL_TEXTURE_STACK_DEPTH:
9875+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9876+ break;
9877+ case GL_UNPACK_ALIGNMENT:
9878+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9879+ break;
9880+ case GL_UNPACK_LSB_FIRST:
9881+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9882+ break;
9883+ case GL_UNPACK_ROW_LENGTH:
9884+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9885+ break;
9886+ case GL_UNPACK_SKIP_PIXELS:
9887+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9888+ break;
9889+ case GL_UNPACK_SKIP_ROWS:
9890+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9891+ break;
9892+ case GL_UNPACK_SWAP_BYTES:
9893+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9894+ break;
9895+ case GL_UNPACK_SKIP_IMAGES_EXT:
9896+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9897+ break;
9898+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9899+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9900+ break;
9901+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9902+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9903+ break;
9904+ case GL_VIEWPORT:
9905+ params[0] = (GLfloat)(ctx->Viewport.X);
9906+ params[1] = (GLfloat)(ctx->Viewport.Y);
9907+ params[2] = (GLfloat)(ctx->Viewport.Width);
9908+ params[3] = (GLfloat)(ctx->Viewport.Height);
9909+ break;
9910+ case GL_ZOOM_X:
9911+ params[0] = ctx->Pixel.ZoomX;
9912+ break;
9913+ case GL_ZOOM_Y:
9914+ params[0] = ctx->Pixel.ZoomY;
9915+ break;
9916+ case GL_VERTEX_ARRAY:
9917+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9918+ break;
9919+ case GL_VERTEX_ARRAY_SIZE:
9920+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9921+ break;
9922+ case GL_VERTEX_ARRAY_TYPE:
9923+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9924+ break;
9925+ case GL_VERTEX_ARRAY_STRIDE:
9926+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9927+ break;
9928+ case GL_VERTEX_ARRAY_COUNT_EXT:
9929+ params[0] = (GLfloat)(0);
9930+ break;
9931+ case GL_NORMAL_ARRAY:
9932+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9933+ break;
9934+ case GL_NORMAL_ARRAY_TYPE:
9935+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9936+ break;
9937+ case GL_NORMAL_ARRAY_STRIDE:
9938+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9939+ break;
9940+ case GL_NORMAL_ARRAY_COUNT_EXT:
9941+ params[0] = (GLfloat)(0);
9942+ break;
9943+ case GL_COLOR_ARRAY:
9944+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9945+ break;
9946+ case GL_COLOR_ARRAY_SIZE:
9947+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9948+ break;
9949+ case GL_COLOR_ARRAY_TYPE:
9950+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9951+ break;
9952+ case GL_COLOR_ARRAY_STRIDE:
9953+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9954+ break;
9955+ case GL_COLOR_ARRAY_COUNT_EXT:
9956+ params[0] = (GLfloat)(0);
9957+ break;
9958+ case GL_INDEX_ARRAY:
9959+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9960+ break;
9961+ case GL_INDEX_ARRAY_TYPE:
9962+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9963+ break;
9964+ case GL_INDEX_ARRAY_STRIDE:
9965+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9966+ break;
9967+ case GL_INDEX_ARRAY_COUNT_EXT:
9968+ params[0] = (GLfloat)(0);
9969+ break;
9970+ case GL_TEXTURE_COORD_ARRAY:
9971+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9972+ break;
9973+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9974+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9975+ break;
9976+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9977+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9978+ break;
9979+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9980+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9981+ break;
9982+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9983+ params[0] = (GLfloat)(0);
9984+ break;
9985+ case GL_EDGE_FLAG_ARRAY:
9986+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9987+ break;
9988+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9989+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9990+ break;
9991+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9992+ params[0] = (GLfloat)(0);
9993+ break;
9994+ case GL_MAX_TEXTURE_UNITS_ARB:
9995+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9996+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9997+ break;
9998+ case GL_ACTIVE_TEXTURE_ARB:
9999+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10000+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
10001+ break;
10002+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
10003+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10004+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
10005+ break;
10006+ case GL_TEXTURE_CUBE_MAP_ARB:
10007+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10008+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
10009+ break;
10010+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
10011+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10012+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
10013+ break;
10014+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
10015+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10016+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
10017+ break;
10018+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
10019+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10020+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
10021+ break;
10022+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
10023+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10024+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
10025+ break;
10026+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
10027+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10028+ {
10029+ GLint formats[100];
10030+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
10031+ ASSERT(n <= 100);
10032+ for (i = 0; i < n; i++)
10033+ params[i] = ENUM_TO_INT(formats[i]);
10034+ }
10035+ break;
10036+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
10037+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10038+ params[0] = (GLfloat)(ctx->Array.LockFirst);
10039+ break;
10040+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
10041+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10042+ params[0] = (GLfloat)(ctx->Array.LockCount);
10043+ break;
10044+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
10045+ {
10046+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10047+ params[0] = matrix[0];
10048+ params[1] = matrix[4];
10049+ params[2] = matrix[8];
10050+ params[3] = matrix[12];
10051+ params[4] = matrix[1];
10052+ params[5] = matrix[5];
10053+ params[6] = matrix[9];
10054+ params[7] = matrix[13];
10055+ params[8] = matrix[2];
10056+ params[9] = matrix[6];
10057+ params[10] = matrix[10];
10058+ params[11] = matrix[14];
10059+ params[12] = matrix[3];
10060+ params[13] = matrix[7];
10061+ params[14] = matrix[11];
10062+ params[15] = matrix[15];
10063+ }
10064+ break;
10065+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
10066+ {
10067+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
10068+ params[0] = matrix[0];
10069+ params[1] = matrix[4];
10070+ params[2] = matrix[8];
10071+ params[3] = matrix[12];
10072+ params[4] = matrix[1];
10073+ params[5] = matrix[5];
10074+ params[6] = matrix[9];
10075+ params[7] = matrix[13];
10076+ params[8] = matrix[2];
10077+ params[9] = matrix[6];
10078+ params[10] = matrix[10];
10079+ params[11] = matrix[14];
10080+ params[12] = matrix[3];
10081+ params[13] = matrix[7];
10082+ params[14] = matrix[11];
10083+ params[15] = matrix[15];
10084+ }
10085+ break;
10086+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
10087+ {
10088+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
10089+ params[0] = matrix[0];
10090+ params[1] = matrix[4];
10091+ params[2] = matrix[8];
10092+ params[3] = matrix[12];
10093+ params[4] = matrix[1];
10094+ params[5] = matrix[5];
10095+ params[6] = matrix[9];
10096+ params[7] = matrix[13];
10097+ params[8] = matrix[2];
10098+ params[9] = matrix[6];
10099+ params[10] = matrix[10];
10100+ params[11] = matrix[14];
10101+ params[12] = matrix[3];
10102+ params[13] = matrix[7];
10103+ params[14] = matrix[11];
10104+ params[15] = matrix[15];
10105+ }
10106+ break;
10107+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
10108+ {
10109+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
10110+ params[0] = matrix[0];
10111+ params[1] = matrix[4];
10112+ params[2] = matrix[8];
10113+ params[3] = matrix[12];
10114+ params[4] = matrix[1];
10115+ params[5] = matrix[5];
10116+ params[6] = matrix[9];
10117+ params[7] = matrix[13];
10118+ params[8] = matrix[2];
10119+ params[9] = matrix[6];
10120+ params[10] = matrix[10];
10121+ params[11] = matrix[14];
10122+ params[12] = matrix[3];
10123+ params[13] = matrix[7];
10124+ params[14] = matrix[11];
10125+ params[15] = matrix[15];
10126+ }
10127+ break;
10128+ case GL_COLOR_MATRIX_SGI:
10129+ {
10130+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10131+ params[0] = matrix[0];
10132+ params[1] = matrix[1];
10133+ params[2] = matrix[2];
10134+ params[3] = matrix[3];
10135+ params[4] = matrix[4];
10136+ params[5] = matrix[5];
10137+ params[6] = matrix[6];
10138+ params[7] = matrix[7];
10139+ params[8] = matrix[8];
10140+ params[9] = matrix[9];
10141+ params[10] = matrix[10];
10142+ params[11] = matrix[11];
10143+ params[12] = matrix[12];
10144+ params[13] = matrix[13];
10145+ params[14] = matrix[14];
10146+ params[15] = matrix[15];
10147+ }
10148+ break;
10149+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10150+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10151+ break;
10152+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10153+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10154+ break;
10155+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10156+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10157+ break;
10158+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10159+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10160+ break;
10161+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10162+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10163+ break;
10164+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10165+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10166+ break;
10167+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10168+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10169+ break;
10170+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10171+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10172+ break;
10173+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10174+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10175+ break;
10176+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10177+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10178+ break;
10179+ case GL_CONVOLUTION_1D_EXT:
10180+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10181+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10182+ break;
10183+ case GL_CONVOLUTION_2D_EXT:
10184+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10185+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10186+ break;
10187+ case GL_SEPARABLE_2D_EXT:
10188+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10189+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10190+ break;
10191+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10192+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10193+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10194+ break;
10195+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10196+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10197+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10198+ break;
10199+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10200+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10201+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10202+ break;
10203+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10204+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10205+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10206+ break;
10207+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10208+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10209+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10210+ break;
10211+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10212+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10213+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10214+ break;
10215+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10216+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10217+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10218+ break;
10219+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10220+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10221+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10222+ break;
10223+ case GL_HISTOGRAM:
10224+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10226+ break;
10227+ case GL_MINMAX:
10228+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10229+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10230+ break;
10231+ case GL_COLOR_TABLE_SGI:
10232+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10233+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10234+ break;
10235+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10236+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10237+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10238+ break;
10239+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10240+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10241+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10242+ break;
10243+ case GL_TEXTURE_COLOR_TABLE_SGI:
10244+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10245+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10246+ break;
10247+ case GL_COLOR_SUM_EXT:
10248+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10249+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10250+ break;
10251+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10252+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10253+ {
10254+ FLUSH_CURRENT(ctx, 0);
10255+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10256+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10257+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10258+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10259+ }
10260+ break;
10261+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10262+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10263+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10264+ break;
10265+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10266+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10267+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10268+ break;
10269+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10270+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10271+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10272+ break;
10273+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10274+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10275+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10276+ break;
10277+ case GL_CURRENT_FOG_COORDINATE_EXT:
10278+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10279+ {
10280+ FLUSH_CURRENT(ctx, 0);
10281+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10282+ }
10283+ break;
10284+ case GL_FOG_COORDINATE_ARRAY_EXT:
10285+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10286+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10287+ break;
10288+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10289+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10290+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10291+ break;
10292+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10293+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10294+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10295+ break;
10296+ case GL_FOG_COORDINATE_SOURCE_EXT:
10297+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10298+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10299+ break;
10300+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10301+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10302+ params[0] = ctx->Const.MaxTextureLodBias;
10303+ break;
10304+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10305+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10306+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10307+ break;
10308+ case GL_MULTISAMPLE_ARB:
10309+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10310+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10311+ break;
10312+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10313+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10314+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10315+ break;
10316+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10317+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10318+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10319+ break;
10320+ case GL_SAMPLE_COVERAGE_ARB:
10321+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10322+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10323+ break;
10324+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10325+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10326+ params[0] = ctx->Multisample.SampleCoverageValue;
10327+ break;
10328+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10329+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10330+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10331+ break;
10332+ case GL_SAMPLE_BUFFERS_ARB:
10333+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10334+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10335+ break;
10336+ case GL_SAMPLES_ARB:
10337+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10338+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10339+ break;
10340+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10341+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10342+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10343+ break;
10344+ case GL_POINT_SPRITE_NV:
10345+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10346+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10347+ break;
10348+ case GL_POINT_SPRITE_R_MODE_NV:
10349+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10350+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10351+ break;
10352+ case GL_POINT_SPRITE_COORD_ORIGIN:
10353+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10354+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10355+ break;
10356+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10357+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10358+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10359+ break;
10360+ case GL_VERTEX_PROGRAM_BINDING_NV:
10361+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10362+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10363+ break;
10364+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10365+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10366+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10367+ break;
10368+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10369+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10370+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10371+ break;
10372+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10373+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10374+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10375+ break;
10376+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10377+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10378+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10379+ break;
10380+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10381+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10382+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10383+ break;
10384+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10385+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10386+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10387+ break;
10388+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10389+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10390+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10391+ break;
10392+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10393+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10394+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10395+ break;
10396+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10397+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10398+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10399+ break;
10400+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10401+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10402+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10403+ break;
10404+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10405+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10406+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10407+ break;
10408+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10409+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10410+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10411+ break;
10412+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10413+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10414+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10415+ break;
10416+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10417+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10418+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10419+ break;
10420+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10421+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10422+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10423+ break;
10424+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10425+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10426+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10427+ break;
10428+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10429+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10430+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10431+ break;
10432+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10433+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10434+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10435+ break;
10436+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10437+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10438+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10439+ break;
10440+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10441+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10442+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10443+ break;
10444+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10445+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10446+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10447+ break;
10448+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10449+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10450+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10451+ break;
10452+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10453+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10454+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10455+ break;
10456+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10457+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10458+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10459+ break;
10460+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10461+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10462+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10463+ break;
10464+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10465+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10466+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10467+ break;
10468+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10469+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10470+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10471+ break;
10472+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10473+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10474+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10475+ break;
10476+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10477+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10478+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10479+ break;
10480+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10481+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10482+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10483+ break;
10484+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10485+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10486+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10487+ break;
10488+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10489+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10490+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10491+ break;
10492+ case GL_FRAGMENT_PROGRAM_NV:
10493+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10494+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10495+ break;
10496+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10497+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10498+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10499+ break;
10500+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10501+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10502+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10503+ break;
10504+ case GL_TEXTURE_RECTANGLE_NV:
10505+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10506+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10507+ break;
10508+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10509+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10510+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10511+ break;
10512+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10513+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10514+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10515+ break;
10516+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10517+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10518+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10519+ break;
10520+ case GL_ACTIVE_STENCIL_FACE_EXT:
10521+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10522+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10523+ break;
10524+ case GL_MAX_SHININESS_NV:
10525+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10526+ params[0] = ctx->Const.MaxShininess;
10527+ break;
10528+ case GL_MAX_SPOT_EXPONENT_NV:
10529+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10530+ params[0] = ctx->Const.MaxSpotExponent;
10531+ break;
10532+ case GL_ARRAY_BUFFER_BINDING_ARB:
10533+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10534+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10535+ break;
10536+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10537+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10538+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10539+ break;
10540+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10541+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10542+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10543+ break;
10544+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10545+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10546+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10547+ break;
10548+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10549+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10550+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10551+ break;
10552+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10553+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10554+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10555+ break;
10556+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10557+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10558+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10559+ break;
10560+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10561+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10562+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10563+ break;
10564+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10565+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10566+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10567+ break;
10568+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10569+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10570+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10571+ break;
10572+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10573+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10574+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10575+ break;
10576+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10577+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10578+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10579+ break;
10580+ case GL_VERTEX_PROGRAM_ARB:
10581+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10582+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10583+ break;
10584+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10585+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10586+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10587+ break;
10588+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10589+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10590+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10591+ break;
10592+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10593+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10594+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10595+ break;
10596+ case GL_MAX_PROGRAM_MATRICES_ARB:
10597+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10598+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10599+ break;
10600+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10601+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10602+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10603+ break;
10604+ case GL_CURRENT_MATRIX_ARB:
10605+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10606+ {
10607+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10608+ params[0] = matrix[0];
10609+ params[1] = matrix[1];
10610+ params[2] = matrix[2];
10611+ params[3] = matrix[3];
10612+ params[4] = matrix[4];
10613+ params[5] = matrix[5];
10614+ params[6] = matrix[6];
10615+ params[7] = matrix[7];
10616+ params[8] = matrix[8];
10617+ params[9] = matrix[9];
10618+ params[10] = matrix[10];
10619+ params[11] = matrix[11];
10620+ params[12] = matrix[12];
10621+ params[13] = matrix[13];
10622+ params[14] = matrix[14];
10623+ params[15] = matrix[15];
10624+ }
10625+ break;
10626+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10627+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10628+ {
10629+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10630+ params[0] = matrix[0];
10631+ params[1] = matrix[4];
10632+ params[2] = matrix[8];
10633+ params[3] = matrix[12];
10634+ params[4] = matrix[1];
10635+ params[5] = matrix[5];
10636+ params[6] = matrix[9];
10637+ params[7] = matrix[13];
10638+ params[8] = matrix[2];
10639+ params[9] = matrix[6];
10640+ params[10] = matrix[10];
10641+ params[11] = matrix[14];
10642+ params[12] = matrix[3];
10643+ params[13] = matrix[7];
10644+ params[14] = matrix[11];
10645+ params[15] = matrix[15];
10646+ }
10647+ break;
10648+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10649+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10650+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10651+ break;
10652+ case GL_PROGRAM_ERROR_POSITION_ARB:
10653+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10654+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10655+ break;
10656+ case GL_FRAGMENT_PROGRAM_ARB:
10657+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10658+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10659+ break;
10660+ case GL_MAX_TEXTURE_COORDS_ARB:
10661+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10662+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10663+ break;
10664+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10665+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10666+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10667+ break;
10668+ case GL_DEPTH_BOUNDS_TEST_EXT:
10669+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10670+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10671+ break;
10672+ case GL_DEPTH_BOUNDS_EXT:
10673+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10674+ params[0] = ctx->Depth.BoundsMin;
10675+ params[1] = ctx->Depth.BoundsMax;
10676+ break;
10677+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10678+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10679+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10680+ break;
10681+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10682+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10683+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10684+ break;
10685+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10686+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10687+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10688+ break;
10689+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10690+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10691+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10692+ break;
10693+ case GL_MAX_DRAW_BUFFERS_ARB:
10694+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10695+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10696+ break;
10697+ case GL_DRAW_BUFFER0_ARB:
10698+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10699+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10700+ break;
10701+ case GL_DRAW_BUFFER1_ARB:
10702+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10703+ {
10704+ GLenum buffer;
10705+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10706+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10707+ return;
10708+ }
10709+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10710+ params[0] = ENUM_TO_FLOAT(buffer);
10711+ }
10712+ break;
10713+ case GL_DRAW_BUFFER2_ARB:
10714+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10715+ {
10716+ GLenum buffer;
10717+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10718+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10719+ return;
10720+ }
10721+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10722+ params[0] = ENUM_TO_FLOAT(buffer);
10723+ }
10724+ break;
10725+ case GL_DRAW_BUFFER3_ARB:
10726+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10727+ {
10728+ GLenum buffer;
10729+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10730+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10731+ return;
10732+ }
10733+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10734+ params[0] = ENUM_TO_FLOAT(buffer);
10735+ }
10736+ break;
10737+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10738+ CHECK_EXT1(OES_read_format, "GetFloatv");
10739+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10740+ break;
10741+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10742+ CHECK_EXT1(OES_read_format, "GetFloatv");
10743+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10744+ break;
10745+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10746+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10747+ params[0] = (GLfloat)(6);
10748+ break;
10749+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10750+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10751+ params[0] = (GLfloat)(8);
10752+ break;
10753+ case GL_NUM_PASSES_ATI:
10754+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10755+ params[0] = (GLfloat)(2);
10756+ break;
10757+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10758+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10759+ params[0] = (GLfloat)(8);
10760+ break;
10761+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10762+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10763+ params[0] = (GLfloat)(16);
10764+ break;
10765+ case GL_COLOR_ALPHA_PAIRING_ATI:
10766+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10767+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10768+ break;
10769+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10770+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10771+ params[0] = (GLfloat)(3);
10772+ break;
10773+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10774+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10775+ params[0] = (GLfloat)(3);
10776+ break;
10777+ case GL_STENCIL_BACK_FUNC:
10778+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10779+ break;
10780+ case GL_STENCIL_BACK_VALUE_MASK:
10781+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10782+ break;
10783+ case GL_STENCIL_BACK_REF:
10784+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10785+ break;
10786+ case GL_STENCIL_BACK_FAIL:
10787+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10788+ break;
10789+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10790+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10791+ break;
10792+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10793+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10794+ break;
10795+ case GL_FRAMEBUFFER_BINDING_EXT:
10796+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10797+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10798+ break;
10799+ case GL_RENDERBUFFER_BINDING_EXT:
10800+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10801+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10802+ break;
10803+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10804+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10805+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10806+ break;
10807+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10808+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10809+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10810+ break;
10811+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10812+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10813+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10814+ break;
10815+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10816+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10817+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10818+ break;
10819+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10820+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10821+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10822+ break;
10823+ case GL_MAX_VARYING_FLOATS_ARB:
10824+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10825+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10826+ break;
10827+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10828+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10829+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10830+ break;
10831+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10832+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10833+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10834+ break;
10835+ default:
10836+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10837+ }
10838+}
10839+
10840+void GLAPIENTRY
10841+_mesa_GetIntegerv( GLenum pname, GLint *params )
10842+{
10843+ GET_CURRENT_CONTEXT(ctx);
10844+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10845+
10846+ if (!params)
10847+ return;
10848+
10849+ if (ctx->NewState)
10850+ _mesa_update_state(ctx);
10851+
10852+ if (ctx->Driver.GetIntegerv &&
10853+ ctx->Driver.GetIntegerv(ctx, pname, params))
10854+ return;
10855+
10856+ switch (pname) {
10857+ case GL_ACCUM_RED_BITS:
10858+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10859+ break;
10860+ case GL_ACCUM_GREEN_BITS:
10861+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10862+ break;
10863+ case GL_ACCUM_BLUE_BITS:
10864+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10865+ break;
10866+ case GL_ACCUM_ALPHA_BITS:
10867+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10868+ break;
10869+ case GL_ACCUM_CLEAR_VALUE:
10870+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10871+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10872+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10873+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10874+ break;
10875+ case GL_ALPHA_BIAS:
10876+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10877+ break;
10878+ case GL_ALPHA_BITS:
10879+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10880+ break;
10881+ case GL_ALPHA_SCALE:
10882+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10883+ break;
10884+ case GL_ALPHA_TEST:
10885+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10886+ break;
10887+ case GL_ALPHA_TEST_FUNC:
10888+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10889+ break;
10890+ case GL_ALPHA_TEST_REF:
10891+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10892+ break;
10893+ case GL_ATTRIB_STACK_DEPTH:
10894+ params[0] = ctx->AttribStackDepth;
10895+ break;
10896+ case GL_AUTO_NORMAL:
10897+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10898+ break;
10899+ case GL_AUX_BUFFERS:
10900+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10901+ break;
10902+ case GL_BLEND:
10903+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10904+ break;
10905+ case GL_BLEND_DST:
10906+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10907+ break;
10908+ case GL_BLEND_SRC:
10909+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10910+ break;
10911+ case GL_BLEND_SRC_RGB_EXT:
10912+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10913+ break;
10914+ case GL_BLEND_DST_RGB_EXT:
10915+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10916+ break;
10917+ case GL_BLEND_SRC_ALPHA_EXT:
10918+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10919+ break;
10920+ case GL_BLEND_DST_ALPHA_EXT:
10921+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10922+ break;
10923+ case GL_BLEND_EQUATION:
10924+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10925+ break;
10926+ case GL_BLEND_EQUATION_ALPHA_EXT:
10927+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10928+ break;
10929+ case GL_BLEND_COLOR_EXT:
10930+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10931+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10932+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10933+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10934+ break;
10935+ case GL_BLUE_BIAS:
10936+ params[0] = IROUND(ctx->Pixel.BlueBias);
10937+ break;
10938+ case GL_BLUE_BITS:
10939+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10940+ break;
10941+ case GL_BLUE_SCALE:
10942+ params[0] = IROUND(ctx->Pixel.BlueScale);
10943+ break;
10944+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10945+ params[0] = ctx->ClientAttribStackDepth;
10946+ break;
10947+ case GL_CLIP_PLANE0:
10948+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10949+ break;
10950+ case GL_CLIP_PLANE1:
10951+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10952+ break;
10953+ case GL_CLIP_PLANE2:
10954+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10955+ break;
10956+ case GL_CLIP_PLANE3:
10957+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10958+ break;
10959+ case GL_CLIP_PLANE4:
10960+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10961+ break;
10962+ case GL_CLIP_PLANE5:
10963+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10964+ break;
10965+ case GL_COLOR_CLEAR_VALUE:
10966+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10967+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10968+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10969+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10970+ break;
10971+ case GL_COLOR_MATERIAL:
10972+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10973+ break;
10974+ case GL_COLOR_MATERIAL_FACE:
10975+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10976+ break;
10977+ case GL_COLOR_MATERIAL_PARAMETER:
10978+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10979+ break;
10980+ case GL_COLOR_WRITEMASK:
10981+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10982+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10983+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10984+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10985+ break;
10986+ case GL_CULL_FACE:
10987+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10988+ break;
10989+ case GL_CULL_FACE_MODE:
10990+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10991+ break;
10992+ case GL_CURRENT_COLOR:
10993+ {
10994+ FLUSH_CURRENT(ctx, 0);
10995+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10996+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10997+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10998+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10999+ }
11000+ break;
11001+ case GL_CURRENT_INDEX:
11002+ {
11003+ FLUSH_CURRENT(ctx, 0);
11004+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
11005+ }
11006+ break;
11007+ case GL_CURRENT_NORMAL:
11008+ {
11009+ FLUSH_CURRENT(ctx, 0);
11010+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
11011+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
11012+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
11013+ }
11014+ break;
11015+ case GL_CURRENT_RASTER_COLOR:
11016+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
11017+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
11018+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
11019+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
11020+ break;
11021+ case GL_CURRENT_RASTER_DISTANCE:
11022+ params[0] = IROUND(ctx->Current.RasterDistance);
11023+ break;
11024+ case GL_CURRENT_RASTER_INDEX:
11025+ params[0] = IROUND(ctx->Current.RasterIndex);
11026+ break;
11027+ case GL_CURRENT_RASTER_POSITION:
11028+ params[0] = IROUND(ctx->Current.RasterPos[0]);
11029+ params[1] = IROUND(ctx->Current.RasterPos[1]);
11030+ params[2] = IROUND(ctx->Current.RasterPos[2]);
11031+ params[3] = IROUND(ctx->Current.RasterPos[3]);
11032+ break;
11033+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
11034+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
11035+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
11036+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
11037+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
11038+ break;
11039+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
11040+ {
11041+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11042+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
11043+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
11044+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
11045+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
11046+ }
11047+ break;
11048+ case GL_CURRENT_RASTER_POSITION_VALID:
11049+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
11050+ break;
11051+ case GL_CURRENT_TEXTURE_COORDS:
11052+ {
11053+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11054+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
11055+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
11056+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
11057+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
11058+ }
11059+ break;
11060+ case GL_DEPTH_BIAS:
11061+ params[0] = IROUND(ctx->Pixel.DepthBias);
11062+ break;
11063+ case GL_DEPTH_BITS:
11064+ params[0] = ctx->DrawBuffer->Visual.depthBits;
11065+ break;
11066+ case GL_DEPTH_CLEAR_VALUE:
11067+ params[0] = IROUND(ctx->Depth.Clear);
11068+ break;
11069+ case GL_DEPTH_FUNC:
11070+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
11071+ break;
11072+ case GL_DEPTH_RANGE:
11073+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
11074+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
11075+ break;
11076+ case GL_DEPTH_SCALE:
11077+ params[0] = IROUND(ctx->Pixel.DepthScale);
11078+ break;
11079+ case GL_DEPTH_TEST:
11080+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
11081+ break;
11082+ case GL_DEPTH_WRITEMASK:
11083+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
11084+ break;
11085+ case GL_DITHER:
11086+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
11087+ break;
11088+ case GL_DOUBLEBUFFER:
11089+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
11090+ break;
11091+ case GL_DRAW_BUFFER:
11092+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
11093+ break;
11094+ case GL_EDGE_FLAG:
11095+ {
11096+ FLUSH_CURRENT(ctx, 0);
11097+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
11098+ }
11099+ break;
11100+ case GL_FEEDBACK_BUFFER_SIZE:
11101+ params[0] = ctx->Feedback.BufferSize;
11102+ break;
11103+ case GL_FEEDBACK_BUFFER_TYPE:
11104+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
11105+ break;
11106+ case GL_FOG:
11107+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
11108+ break;
11109+ case GL_FOG_COLOR:
11110+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
11111+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
11112+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
11113+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
11114+ break;
11115+ case GL_FOG_DENSITY:
11116+ params[0] = IROUND(ctx->Fog.Density);
11117+ break;
11118+ case GL_FOG_END:
11119+ params[0] = IROUND(ctx->Fog.End);
11120+ break;
11121+ case GL_FOG_HINT:
11122+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11123+ break;
11124+ case GL_FOG_INDEX:
11125+ params[0] = IROUND(ctx->Fog.Index);
11126+ break;
11127+ case GL_FOG_MODE:
11128+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11129+ break;
11130+ case GL_FOG_START:
11131+ params[0] = IROUND(ctx->Fog.Start);
11132+ break;
11133+ case GL_FRONT_FACE:
11134+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11135+ break;
11136+ case GL_GREEN_BIAS:
11137+ params[0] = IROUND(ctx->Pixel.GreenBias);
11138+ break;
11139+ case GL_GREEN_BITS:
11140+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11141+ break;
11142+ case GL_GREEN_SCALE:
11143+ params[0] = IROUND(ctx->Pixel.GreenScale);
11144+ break;
11145+ case GL_INDEX_BITS:
11146+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11147+ break;
11148+ case GL_INDEX_CLEAR_VALUE:
11149+ params[0] = ctx->Color.ClearIndex;
11150+ break;
11151+ case GL_INDEX_MODE:
11152+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11153+ break;
11154+ case GL_INDEX_OFFSET:
11155+ params[0] = ctx->Pixel.IndexOffset;
11156+ break;
11157+ case GL_INDEX_SHIFT:
11158+ params[0] = ctx->Pixel.IndexShift;
11159+ break;
11160+ case GL_INDEX_WRITEMASK:
11161+ params[0] = ctx->Color.IndexMask;
11162+ break;
11163+ case GL_LIGHT0:
11164+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11165+ break;
11166+ case GL_LIGHT1:
11167+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11168+ break;
11169+ case GL_LIGHT2:
11170+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11171+ break;
11172+ case GL_LIGHT3:
11173+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11174+ break;
11175+ case GL_LIGHT4:
11176+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11177+ break;
11178+ case GL_LIGHT5:
11179+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11180+ break;
11181+ case GL_LIGHT6:
11182+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11183+ break;
11184+ case GL_LIGHT7:
11185+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11186+ break;
11187+ case GL_LIGHTING:
11188+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11189+ break;
11190+ case GL_LIGHT_MODEL_AMBIENT:
11191+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11192+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11193+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11194+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11195+ break;
11196+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11197+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11198+ break;
11199+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11200+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11201+ break;
11202+ case GL_LIGHT_MODEL_TWO_SIDE:
11203+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11204+ break;
11205+ case GL_LINE_SMOOTH:
11206+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11207+ break;
11208+ case GL_LINE_SMOOTH_HINT:
11209+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11210+ break;
11211+ case GL_LINE_STIPPLE:
11212+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11213+ break;
11214+ case GL_LINE_STIPPLE_PATTERN:
11215+ params[0] = ctx->Line.StipplePattern;
11216+ break;
11217+ case GL_LINE_STIPPLE_REPEAT:
11218+ params[0] = ctx->Line.StippleFactor;
11219+ break;
11220+ case GL_LINE_WIDTH:
11221+ params[0] = IROUND(ctx->Line.Width);
11222+ break;
11223+ case GL_LINE_WIDTH_GRANULARITY:
11224+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11225+ break;
11226+ case GL_LINE_WIDTH_RANGE:
11227+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11228+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11229+ break;
11230+ case GL_ALIASED_LINE_WIDTH_RANGE:
11231+ params[0] = IROUND(ctx->Const.MinLineWidth);
11232+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11233+ break;
11234+ case GL_LIST_BASE:
11235+ params[0] = ctx->List.ListBase;
11236+ break;
11237+ case GL_LIST_INDEX:
11238+ params[0] = ctx->ListState.CurrentListNum;
11239+ break;
11240+ case GL_LIST_MODE:
11241+ {
11242+ GLenum mode;
11243+ if (!ctx->CompileFlag)
11244+ mode = 0;
11245+ else if (ctx->ExecuteFlag)
11246+ mode = GL_COMPILE_AND_EXECUTE;
11247+ else
11248+ mode = GL_COMPILE;
11249+ params[0] = ENUM_TO_INT(mode);
11250+ }
11251+ break;
11252+ case GL_INDEX_LOGIC_OP:
11253+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11254+ break;
11255+ case GL_COLOR_LOGIC_OP:
11256+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11257+ break;
11258+ case GL_LOGIC_OP_MODE:
11259+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11260+ break;
11261+ case GL_MAP1_COLOR_4:
11262+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11263+ break;
11264+ case GL_MAP1_GRID_DOMAIN:
11265+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11266+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11267+ break;
11268+ case GL_MAP1_GRID_SEGMENTS:
11269+ params[0] = ctx->Eval.MapGrid1un;
11270+ break;
11271+ case GL_MAP1_INDEX:
11272+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11273+ break;
11274+ case GL_MAP1_NORMAL:
11275+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11276+ break;
11277+ case GL_MAP1_TEXTURE_COORD_1:
11278+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11279+ break;
11280+ case GL_MAP1_TEXTURE_COORD_2:
11281+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11282+ break;
11283+ case GL_MAP1_TEXTURE_COORD_3:
11284+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11285+ break;
11286+ case GL_MAP1_TEXTURE_COORD_4:
11287+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11288+ break;
11289+ case GL_MAP1_VERTEX_3:
11290+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11291+ break;
11292+ case GL_MAP1_VERTEX_4:
11293+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11294+ break;
11295+ case GL_MAP2_COLOR_4:
11296+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11297+ break;
11298+ case GL_MAP2_GRID_DOMAIN:
11299+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11300+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11301+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11302+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11303+ break;
11304+ case GL_MAP2_GRID_SEGMENTS:
11305+ params[0] = ctx->Eval.MapGrid2un;
11306+ params[1] = ctx->Eval.MapGrid2vn;
11307+ break;
11308+ case GL_MAP2_INDEX:
11309+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11310+ break;
11311+ case GL_MAP2_NORMAL:
11312+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11313+ break;
11314+ case GL_MAP2_TEXTURE_COORD_1:
11315+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11316+ break;
11317+ case GL_MAP2_TEXTURE_COORD_2:
11318+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11319+ break;
11320+ case GL_MAP2_TEXTURE_COORD_3:
11321+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11322+ break;
11323+ case GL_MAP2_TEXTURE_COORD_4:
11324+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11325+ break;
11326+ case GL_MAP2_VERTEX_3:
11327+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11328+ break;
11329+ case GL_MAP2_VERTEX_4:
11330+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11331+ break;
11332+ case GL_MAP_COLOR:
11333+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11334+ break;
11335+ case GL_MAP_STENCIL:
11336+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11337+ break;
11338+ case GL_MATRIX_MODE:
11339+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11340+ break;
11341+ case GL_MAX_ATTRIB_STACK_DEPTH:
11342+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11343+ break;
11344+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11345+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11346+ break;
11347+ case GL_MAX_CLIP_PLANES:
11348+ params[0] = ctx->Const.MaxClipPlanes;
11349+ break;
11350+ case GL_MAX_ELEMENTS_VERTICES:
11351+ params[0] = ctx->Const.MaxArrayLockSize;
11352+ break;
11353+ case GL_MAX_ELEMENTS_INDICES:
11354+ params[0] = ctx->Const.MaxArrayLockSize;
11355+ break;
11356+ case GL_MAX_EVAL_ORDER:
11357+ params[0] = MAX_EVAL_ORDER;
11358+ break;
11359+ case GL_MAX_LIGHTS:
11360+ params[0] = ctx->Const.MaxLights;
11361+ break;
11362+ case GL_MAX_LIST_NESTING:
11363+ params[0] = MAX_LIST_NESTING;
11364+ break;
11365+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11366+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11367+ break;
11368+ case GL_MAX_NAME_STACK_DEPTH:
11369+ params[0] = MAX_NAME_STACK_DEPTH;
11370+ break;
11371+ case GL_MAX_PIXEL_MAP_TABLE:
11372+ params[0] = MAX_PIXEL_MAP_TABLE;
11373+ break;
11374+ case GL_MAX_PROJECTION_STACK_DEPTH:
11375+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11376+ break;
11377+ case GL_MAX_TEXTURE_SIZE:
11378+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11379+ break;
11380+ case GL_MAX_3D_TEXTURE_SIZE:
11381+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11382+ break;
11383+ case GL_MAX_TEXTURE_STACK_DEPTH:
11384+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11385+ break;
11386+ case GL_MAX_VIEWPORT_DIMS:
11387+ params[0] = ctx->Const.MaxViewportWidth;
11388+ params[1] = ctx->Const.MaxViewportHeight;
11389+ break;
11390+ case GL_MODELVIEW_MATRIX:
11391+ {
11392+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11393+ params[0] = IROUND(matrix[0]);
11394+ params[1] = IROUND(matrix[1]);
11395+ params[2] = IROUND(matrix[2]);
11396+ params[3] = IROUND(matrix[3]);
11397+ params[4] = IROUND(matrix[4]);
11398+ params[5] = IROUND(matrix[5]);
11399+ params[6] = IROUND(matrix[6]);
11400+ params[7] = IROUND(matrix[7]);
11401+ params[8] = IROUND(matrix[8]);
11402+ params[9] = IROUND(matrix[9]);
11403+ params[10] = IROUND(matrix[10]);
11404+ params[11] = IROUND(matrix[11]);
11405+ params[12] = IROUND(matrix[12]);
11406+ params[13] = IROUND(matrix[13]);
11407+ params[14] = IROUND(matrix[14]);
11408+ params[15] = IROUND(matrix[15]);
11409+ }
11410+ break;
11411+ case GL_MODELVIEW_STACK_DEPTH:
11412+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11413+ break;
11414+ case GL_NAME_STACK_DEPTH:
11415+ params[0] = ctx->Select.NameStackDepth;
11416+ break;
11417+ case GL_NORMALIZE:
11418+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11419+ break;
11420+ case GL_PACK_ALIGNMENT:
11421+ params[0] = ctx->Pack.Alignment;
11422+ break;
11423+ case GL_PACK_LSB_FIRST:
11424+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11425+ break;
11426+ case GL_PACK_ROW_LENGTH:
11427+ params[0] = ctx->Pack.RowLength;
11428+ break;
11429+ case GL_PACK_SKIP_PIXELS:
11430+ params[0] = ctx->Pack.SkipPixels;
11431+ break;
11432+ case GL_PACK_SKIP_ROWS:
11433+ params[0] = ctx->Pack.SkipRows;
11434+ break;
11435+ case GL_PACK_SWAP_BYTES:
11436+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11437+ break;
11438+ case GL_PACK_SKIP_IMAGES_EXT:
11439+ params[0] = ctx->Pack.SkipImages;
11440+ break;
11441+ case GL_PACK_IMAGE_HEIGHT_EXT:
11442+ params[0] = ctx->Pack.ImageHeight;
11443+ break;
11444+ case GL_PACK_INVERT_MESA:
11445+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11446+ break;
11447+ case GL_PERSPECTIVE_CORRECTION_HINT:
11448+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11449+ break;
11450+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11451+ params[0] = ctx->Pixel.MapAtoAsize;
11452+ break;
11453+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11454+ params[0] = ctx->Pixel.MapBtoBsize;
11455+ break;
11456+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11457+ params[0] = ctx->Pixel.MapGtoGsize;
11458+ break;
11459+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11460+ params[0] = ctx->Pixel.MapItoAsize;
11461+ break;
11462+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11463+ params[0] = ctx->Pixel.MapItoBsize;
11464+ break;
11465+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11466+ params[0] = ctx->Pixel.MapItoGsize;
11467+ break;
11468+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11469+ params[0] = ctx->Pixel.MapItoIsize;
11470+ break;
11471+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11472+ params[0] = ctx->Pixel.MapItoRsize;
11473+ break;
11474+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11475+ params[0] = ctx->Pixel.MapRtoRsize;
11476+ break;
11477+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11478+ params[0] = ctx->Pixel.MapStoSsize;
11479+ break;
11480+ case GL_POINT_SIZE:
11481+ params[0] = IROUND(ctx->Point.Size);
11482+ break;
11483+ case GL_POINT_SIZE_GRANULARITY:
11484+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11485+ break;
11486+ case GL_POINT_SIZE_RANGE:
11487+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11488+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11489+ break;
11490+ case GL_ALIASED_POINT_SIZE_RANGE:
11491+ params[0] = IROUND(ctx->Const.MinPointSize);
11492+ params[1] = IROUND(ctx->Const.MaxPointSize);
11493+ break;
11494+ case GL_POINT_SMOOTH:
11495+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11496+ break;
11497+ case GL_POINT_SMOOTH_HINT:
11498+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11499+ break;
11500+ case GL_POINT_SIZE_MIN_EXT:
11501+ params[0] = IROUND(ctx->Point.MinSize);
11502+ break;
11503+ case GL_POINT_SIZE_MAX_EXT:
11504+ params[0] = IROUND(ctx->Point.MaxSize);
11505+ break;
11506+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11507+ params[0] = IROUND(ctx->Point.Threshold);
11508+ break;
11509+ case GL_DISTANCE_ATTENUATION_EXT:
11510+ params[0] = IROUND(ctx->Point.Params[0]);
11511+ params[1] = IROUND(ctx->Point.Params[1]);
11512+ params[2] = IROUND(ctx->Point.Params[2]);
11513+ break;
11514+ case GL_POLYGON_MODE:
11515+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11516+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11517+ break;
11518+ case GL_POLYGON_OFFSET_BIAS_EXT:
11519+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11520+ break;
11521+ case GL_POLYGON_OFFSET_FACTOR:
11522+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11523+ break;
11524+ case GL_POLYGON_OFFSET_UNITS:
11525+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11526+ break;
11527+ case GL_POLYGON_SMOOTH:
11528+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11529+ break;
11530+ case GL_POLYGON_SMOOTH_HINT:
11531+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11532+ break;
11533+ case GL_POLYGON_STIPPLE:
11534+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11535+ break;
11536+ case GL_PROJECTION_MATRIX:
11537+ {
11538+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11539+ params[0] = IROUND(matrix[0]);
11540+ params[1] = IROUND(matrix[1]);
11541+ params[2] = IROUND(matrix[2]);
11542+ params[3] = IROUND(matrix[3]);
11543+ params[4] = IROUND(matrix[4]);
11544+ params[5] = IROUND(matrix[5]);
11545+ params[6] = IROUND(matrix[6]);
11546+ params[7] = IROUND(matrix[7]);
11547+ params[8] = IROUND(matrix[8]);
11548+ params[9] = IROUND(matrix[9]);
11549+ params[10] = IROUND(matrix[10]);
11550+ params[11] = IROUND(matrix[11]);
11551+ params[12] = IROUND(matrix[12]);
11552+ params[13] = IROUND(matrix[13]);
11553+ params[14] = IROUND(matrix[14]);
11554+ params[15] = IROUND(matrix[15]);
11555+ }
11556+ break;
11557+ case GL_PROJECTION_STACK_DEPTH:
11558+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11559+ break;
11560+ case GL_READ_BUFFER:
11561+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11562+ break;
11563+ case GL_RED_BIAS:
11564+ params[0] = IROUND(ctx->Pixel.RedBias);
11565+ break;
11566+ case GL_RED_BITS:
11567+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11568+ break;
11569+ case GL_RED_SCALE:
11570+ params[0] = IROUND(ctx->Pixel.RedScale);
11571+ break;
11572+ case GL_RENDER_MODE:
11573+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11574+ break;
11575+ case GL_RESCALE_NORMAL:
11576+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11577+ break;
11578+ case GL_RGBA_MODE:
11579+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11580+ break;
11581+ case GL_SCISSOR_BOX:
11582+ params[0] = ctx->Scissor.X;
11583+ params[1] = ctx->Scissor.Y;
11584+ params[2] = ctx->Scissor.Width;
11585+ params[3] = ctx->Scissor.Height;
11586+ break;
11587+ case GL_SCISSOR_TEST:
11588+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11589+ break;
11590+ case GL_SELECTION_BUFFER_SIZE:
11591+ params[0] = ctx->Select.BufferSize;
11592+ break;
11593+ case GL_SHADE_MODEL:
11594+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11595+ break;
11596+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11597+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11598+ break;
11599+ case GL_STENCIL_BITS:
11600+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11601+ break;
11602+ case GL_STENCIL_CLEAR_VALUE:
11603+ params[0] = ctx->Stencil.Clear;
11604+ break;
11605+ case GL_STENCIL_FAIL:
11606+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11607+ break;
11608+ case GL_STENCIL_FUNC:
11609+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11610+ break;
11611+ case GL_STENCIL_PASS_DEPTH_FAIL:
11612+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11613+ break;
11614+ case GL_STENCIL_PASS_DEPTH_PASS:
11615+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11616+ break;
11617+ case GL_STENCIL_REF:
11618+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11619+ break;
11620+ case GL_STENCIL_TEST:
11621+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11622+ break;
11623+ case GL_STENCIL_VALUE_MASK:
11624+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11625+ break;
11626+ case GL_STENCIL_WRITEMASK:
11627+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11628+ break;
11629+ case GL_STEREO:
11630+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11631+ break;
11632+ case GL_SUBPIXEL_BITS:
11633+ params[0] = ctx->Const.SubPixelBits;
11634+ break;
11635+ case GL_TEXTURE_1D:
11636+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11637+ break;
11638+ case GL_TEXTURE_2D:
11639+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11640+ break;
11641+ case GL_TEXTURE_3D:
11642+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11643+ break;
11644+ case GL_TEXTURE_BINDING_1D:
11645+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11646+ break;
11647+ case GL_TEXTURE_BINDING_2D:
11648+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11649+ break;
11650+ case GL_TEXTURE_BINDING_3D:
11651+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11652+ break;
11653+ case GL_TEXTURE_ENV_COLOR:
11654+ {
11655+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11656+ params[0] = FLOAT_TO_INT(color[0]);
11657+ params[1] = FLOAT_TO_INT(color[1]);
11658+ params[2] = FLOAT_TO_INT(color[2]);
11659+ params[3] = FLOAT_TO_INT(color[3]);
11660+ }
11661+ break;
11662+ case GL_TEXTURE_ENV_MODE:
11663+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11664+ break;
11665+ case GL_TEXTURE_GEN_S:
11666+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11667+ break;
11668+ case GL_TEXTURE_GEN_T:
11669+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11670+ break;
11671+ case GL_TEXTURE_GEN_R:
11672+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11673+ break;
11674+ case GL_TEXTURE_GEN_Q:
11675+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11676+ break;
11677+ case GL_TEXTURE_MATRIX:
11678+ {
11679+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11680+ params[0] = IROUND(matrix[0]);
11681+ params[1] = IROUND(matrix[1]);
11682+ params[2] = IROUND(matrix[2]);
11683+ params[3] = IROUND(matrix[3]);
11684+ params[4] = IROUND(matrix[4]);
11685+ params[5] = IROUND(matrix[5]);
11686+ params[6] = IROUND(matrix[6]);
11687+ params[7] = IROUND(matrix[7]);
11688+ params[8] = IROUND(matrix[8]);
11689+ params[9] = IROUND(matrix[9]);
11690+ params[10] = IROUND(matrix[10]);
11691+ params[11] = IROUND(matrix[11]);
11692+ params[12] = IROUND(matrix[12]);
11693+ params[13] = IROUND(matrix[13]);
11694+ params[14] = IROUND(matrix[14]);
11695+ params[15] = IROUND(matrix[15]);
11696+ }
11697+ break;
11698+ case GL_TEXTURE_STACK_DEPTH:
11699+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11700+ break;
11701+ case GL_UNPACK_ALIGNMENT:
11702+ params[0] = ctx->Unpack.Alignment;
11703+ break;
11704+ case GL_UNPACK_LSB_FIRST:
11705+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11706+ break;
11707+ case GL_UNPACK_ROW_LENGTH:
11708+ params[0] = ctx->Unpack.RowLength;
11709+ break;
11710+ case GL_UNPACK_SKIP_PIXELS:
11711+ params[0] = ctx->Unpack.SkipPixels;
11712+ break;
11713+ case GL_UNPACK_SKIP_ROWS:
11714+ params[0] = ctx->Unpack.SkipRows;
11715+ break;
11716+ case GL_UNPACK_SWAP_BYTES:
11717+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11718+ break;
11719+ case GL_UNPACK_SKIP_IMAGES_EXT:
11720+ params[0] = ctx->Unpack.SkipImages;
11721+ break;
11722+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11723+ params[0] = ctx->Unpack.ImageHeight;
11724+ break;
11725+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11726+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11727+ break;
11728+ case GL_VIEWPORT:
11729+ params[0] = ctx->Viewport.X;
11730+ params[1] = ctx->Viewport.Y;
11731+ params[2] = ctx->Viewport.Width;
11732+ params[3] = ctx->Viewport.Height;
11733+ break;
11734+ case GL_ZOOM_X:
11735+ params[0] = IROUND(ctx->Pixel.ZoomX);
11736+ break;
11737+ case GL_ZOOM_Y:
11738+ params[0] = IROUND(ctx->Pixel.ZoomY);
11739+ break;
11740+ case GL_VERTEX_ARRAY:
11741+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11742+ break;
11743+ case GL_VERTEX_ARRAY_SIZE:
11744+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11745+ break;
11746+ case GL_VERTEX_ARRAY_TYPE:
11747+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11748+ break;
11749+ case GL_VERTEX_ARRAY_STRIDE:
11750+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11751+ break;
11752+ case GL_VERTEX_ARRAY_COUNT_EXT:
11753+ params[0] = 0;
11754+ break;
11755+ case GL_NORMAL_ARRAY:
11756+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11757+ break;
11758+ case GL_NORMAL_ARRAY_TYPE:
11759+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11760+ break;
11761+ case GL_NORMAL_ARRAY_STRIDE:
11762+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11763+ break;
11764+ case GL_NORMAL_ARRAY_COUNT_EXT:
11765+ params[0] = 0;
11766+ break;
11767+ case GL_COLOR_ARRAY:
11768+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11769+ break;
11770+ case GL_COLOR_ARRAY_SIZE:
11771+ params[0] = ctx->Array.ArrayObj->Color.Size;
11772+ break;
11773+ case GL_COLOR_ARRAY_TYPE:
11774+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11775+ break;
11776+ case GL_COLOR_ARRAY_STRIDE:
11777+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11778+ break;
11779+ case GL_COLOR_ARRAY_COUNT_EXT:
11780+ params[0] = 0;
11781+ break;
11782+ case GL_INDEX_ARRAY:
11783+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11784+ break;
11785+ case GL_INDEX_ARRAY_TYPE:
11786+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11787+ break;
11788+ case GL_INDEX_ARRAY_STRIDE:
11789+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11790+ break;
11791+ case GL_INDEX_ARRAY_COUNT_EXT:
11792+ params[0] = 0;
11793+ break;
11794+ case GL_TEXTURE_COORD_ARRAY:
11795+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11796+ break;
11797+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11798+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11799+ break;
11800+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11801+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11802+ break;
11803+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11804+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11805+ break;
11806+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11807+ params[0] = 0;
11808+ break;
11809+ case GL_EDGE_FLAG_ARRAY:
11810+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11811+ break;
11812+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11813+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11814+ break;
11815+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11816+ params[0] = 0;
11817+ break;
11818+ case GL_MAX_TEXTURE_UNITS_ARB:
11819+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11820+ params[0] = ctx->Const.MaxTextureUnits;
11821+ break;
11822+ case GL_ACTIVE_TEXTURE_ARB:
11823+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11824+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11825+ break;
11826+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11827+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11828+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11829+ break;
11830+ case GL_TEXTURE_CUBE_MAP_ARB:
11831+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11832+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11833+ break;
11834+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11835+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11836+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11837+ break;
11838+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11839+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11840+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11841+ break;
11842+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11843+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11844+ params[0] = ctx->Hint.TextureCompression;
11845+ break;
11846+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11847+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11848+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11849+ break;
11850+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11851+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11852+ {
11853+ GLint formats[100];
11854+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11855+ ASSERT(n <= 100);
11856+ for (i = 0; i < n; i++)
11857+ params[i] = ENUM_TO_INT(formats[i]);
11858+ }
11859+ break;
11860+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11861+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11862+ params[0] = ctx->Array.LockFirst;
11863+ break;
11864+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11865+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11866+ params[0] = ctx->Array.LockCount;
11867+ break;
11868+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11869+ {
11870+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11871+ params[0] = IROUND(matrix[0]);
11872+ params[1] = IROUND(matrix[4]);
11873+ params[2] = IROUND(matrix[8]);
11874+ params[3] = IROUND(matrix[12]);
11875+ params[4] = IROUND(matrix[1]);
11876+ params[5] = IROUND(matrix[5]);
11877+ params[6] = IROUND(matrix[9]);
11878+ params[7] = IROUND(matrix[13]);
11879+ params[8] = IROUND(matrix[2]);
11880+ params[9] = IROUND(matrix[6]);
11881+ params[10] = IROUND(matrix[10]);
11882+ params[11] = IROUND(matrix[14]);
11883+ params[12] = IROUND(matrix[3]);
11884+ params[13] = IROUND(matrix[7]);
11885+ params[14] = IROUND(matrix[11]);
11886+ params[15] = IROUND(matrix[15]);
11887+ }
11888+ break;
11889+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11890+ {
11891+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11892+ params[0] = IROUND(matrix[0]);
11893+ params[1] = IROUND(matrix[4]);
11894+ params[2] = IROUND(matrix[8]);
11895+ params[3] = IROUND(matrix[12]);
11896+ params[4] = IROUND(matrix[1]);
11897+ params[5] = IROUND(matrix[5]);
11898+ params[6] = IROUND(matrix[9]);
11899+ params[7] = IROUND(matrix[13]);
11900+ params[8] = IROUND(matrix[2]);
11901+ params[9] = IROUND(matrix[6]);
11902+ params[10] = IROUND(matrix[10]);
11903+ params[11] = IROUND(matrix[14]);
11904+ params[12] = IROUND(matrix[3]);
11905+ params[13] = IROUND(matrix[7]);
11906+ params[14] = IROUND(matrix[11]);
11907+ params[15] = IROUND(matrix[15]);
11908+ }
11909+ break;
11910+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11911+ {
11912+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11913+ params[0] = IROUND(matrix[0]);
11914+ params[1] = IROUND(matrix[4]);
11915+ params[2] = IROUND(matrix[8]);
11916+ params[3] = IROUND(matrix[12]);
11917+ params[4] = IROUND(matrix[1]);
11918+ params[5] = IROUND(matrix[5]);
11919+ params[6] = IROUND(matrix[9]);
11920+ params[7] = IROUND(matrix[13]);
11921+ params[8] = IROUND(matrix[2]);
11922+ params[9] = IROUND(matrix[6]);
11923+ params[10] = IROUND(matrix[10]);
11924+ params[11] = IROUND(matrix[14]);
11925+ params[12] = IROUND(matrix[3]);
11926+ params[13] = IROUND(matrix[7]);
11927+ params[14] = IROUND(matrix[11]);
11928+ params[15] = IROUND(matrix[15]);
11929+ }
11930+ break;
11931+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11932+ {
11933+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11934+ params[0] = IROUND(matrix[0]);
11935+ params[1] = IROUND(matrix[4]);
11936+ params[2] = IROUND(matrix[8]);
11937+ params[3] = IROUND(matrix[12]);
11938+ params[4] = IROUND(matrix[1]);
11939+ params[5] = IROUND(matrix[5]);
11940+ params[6] = IROUND(matrix[9]);
11941+ params[7] = IROUND(matrix[13]);
11942+ params[8] = IROUND(matrix[2]);
11943+ params[9] = IROUND(matrix[6]);
11944+ params[10] = IROUND(matrix[10]);
11945+ params[11] = IROUND(matrix[14]);
11946+ params[12] = IROUND(matrix[3]);
11947+ params[13] = IROUND(matrix[7]);
11948+ params[14] = IROUND(matrix[11]);
11949+ params[15] = IROUND(matrix[15]);
11950+ }
11951+ break;
11952+ case GL_COLOR_MATRIX_SGI:
11953+ {
11954+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11955+ params[0] = IROUND(matrix[0]);
11956+ params[1] = IROUND(matrix[1]);
11957+ params[2] = IROUND(matrix[2]);
11958+ params[3] = IROUND(matrix[3]);
11959+ params[4] = IROUND(matrix[4]);
11960+ params[5] = IROUND(matrix[5]);
11961+ params[6] = IROUND(matrix[6]);
11962+ params[7] = IROUND(matrix[7]);
11963+ params[8] = IROUND(matrix[8]);
11964+ params[9] = IROUND(matrix[9]);
11965+ params[10] = IROUND(matrix[10]);
11966+ params[11] = IROUND(matrix[11]);
11967+ params[12] = IROUND(matrix[12]);
11968+ params[13] = IROUND(matrix[13]);
11969+ params[14] = IROUND(matrix[14]);
11970+ params[15] = IROUND(matrix[15]);
11971+ }
11972+ break;
11973+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11974+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11975+ break;
11976+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11977+ params[0] = MAX_COLOR_STACK_DEPTH;
11978+ break;
11979+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11980+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11981+ break;
11982+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11983+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11984+ break;
11985+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11986+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11987+ break;
11988+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11989+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11990+ break;
11991+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11992+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11993+ break;
11994+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11995+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11996+ break;
11997+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11998+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11999+ break;
12000+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
12001+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
12002+ break;
12003+ case GL_CONVOLUTION_1D_EXT:
12004+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12005+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
12006+ break;
12007+ case GL_CONVOLUTION_2D_EXT:
12008+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12009+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
12010+ break;
12011+ case GL_SEPARABLE_2D_EXT:
12012+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12013+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
12014+ break;
12015+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
12016+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12017+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
12018+ break;
12019+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
12020+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12021+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
12022+ break;
12023+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
12024+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12025+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
12026+ break;
12027+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
12028+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12029+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
12030+ break;
12031+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
12032+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12033+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
12034+ break;
12035+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
12036+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12037+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
12038+ break;
12039+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
12040+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12041+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
12042+ break;
12043+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
12044+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12045+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
12046+ break;
12047+ case GL_HISTOGRAM:
12048+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12049+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
12050+ break;
12051+ case GL_MINMAX:
12052+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12053+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
12054+ break;
12055+ case GL_COLOR_TABLE_SGI:
12056+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12057+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
12058+ break;
12059+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
12060+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12061+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
12062+ break;
12063+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
12064+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12065+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
12066+ break;
12067+ case GL_TEXTURE_COLOR_TABLE_SGI:
12068+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
12069+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
12070+ break;
12071+ case GL_COLOR_SUM_EXT:
12072+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
12073+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
12074+ break;
12075+ case GL_CURRENT_SECONDARY_COLOR_EXT:
12076+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12077+ {
12078+ FLUSH_CURRENT(ctx, 0);
12079+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
12080+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
12081+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
12082+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
12083+ }
12084+ break;
12085+ case GL_SECONDARY_COLOR_ARRAY_EXT:
12086+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12087+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
12088+ break;
12089+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
12090+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12091+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
12092+ break;
12093+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
12094+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12095+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
12096+ break;
12097+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
12098+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12099+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
12100+ break;
12101+ case GL_CURRENT_FOG_COORDINATE_EXT:
12102+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12103+ {
12104+ FLUSH_CURRENT(ctx, 0);
12105+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
12106+ }
12107+ break;
12108+ case GL_FOG_COORDINATE_ARRAY_EXT:
12109+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12110+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
12111+ break;
12112+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
12113+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12114+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
12115+ break;
12116+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12117+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12118+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12119+ break;
12120+ case GL_FOG_COORDINATE_SOURCE_EXT:
12121+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12122+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12123+ break;
12124+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12125+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12126+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12127+ break;
12128+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12129+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12130+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12131+ break;
12132+ case GL_MULTISAMPLE_ARB:
12133+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12134+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12135+ break;
12136+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12137+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12138+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12139+ break;
12140+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12141+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12142+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12143+ break;
12144+ case GL_SAMPLE_COVERAGE_ARB:
12145+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12146+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12147+ break;
12148+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12149+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12150+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12151+ break;
12152+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12153+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12154+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12155+ break;
12156+ case GL_SAMPLE_BUFFERS_ARB:
12157+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12158+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12159+ break;
12160+ case GL_SAMPLES_ARB:
12161+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12162+ params[0] = ctx->DrawBuffer->Visual.samples;
12163+ break;
12164+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12165+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12166+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12167+ break;
12168+ case GL_POINT_SPRITE_NV:
12169+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12170+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12171+ break;
12172+ case GL_POINT_SPRITE_R_MODE_NV:
12173+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12174+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12175+ break;
12176+ case GL_POINT_SPRITE_COORD_ORIGIN:
12177+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12178+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12179+ break;
12180+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12181+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12182+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12183+ break;
12184+ case GL_VERTEX_PROGRAM_BINDING_NV:
12185+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12186+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12187+ break;
12188+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12189+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12190+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12191+ break;
12192+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12193+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12194+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12195+ break;
12196+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12197+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12198+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12199+ break;
12200+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12201+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12202+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12203+ break;
12204+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12205+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12206+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12207+ break;
12208+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12209+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12210+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12211+ break;
12212+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12213+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12214+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12215+ break;
12216+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12217+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12218+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12219+ break;
12220+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12221+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12222+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12223+ break;
12224+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12225+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12226+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12227+ break;
12228+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12229+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12230+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12231+ break;
12232+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12233+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12234+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12235+ break;
12236+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12237+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12238+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12239+ break;
12240+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12241+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12242+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12243+ break;
12244+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12245+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12246+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12247+ break;
12248+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12249+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12250+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12251+ break;
12252+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12253+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12254+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12255+ break;
12256+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12257+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12258+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12259+ break;
12260+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12261+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12262+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12263+ break;
12264+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12265+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12266+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12267+ break;
12268+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12269+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12270+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12271+ break;
12272+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12273+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12274+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12275+ break;
12276+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12277+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12278+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12279+ break;
12280+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12281+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12282+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12283+ break;
12284+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12285+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12286+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12287+ break;
12288+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12289+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12290+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12291+ break;
12292+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12293+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12294+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12295+ break;
12296+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12297+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12298+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12299+ break;
12300+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12301+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12302+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12303+ break;
12304+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12305+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12306+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12307+ break;
12308+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12309+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12310+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12311+ break;
12312+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12313+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12314+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12315+ break;
12316+ case GL_FRAGMENT_PROGRAM_NV:
12317+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12318+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12319+ break;
12320+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12321+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12322+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12323+ break;
12324+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12325+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12326+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12327+ break;
12328+ case GL_TEXTURE_RECTANGLE_NV:
12329+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12330+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12331+ break;
12332+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12333+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12334+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12335+ break;
12336+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12337+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12338+ params[0] = ctx->Const.MaxTextureRectSize;
12339+ break;
12340+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12341+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12342+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12343+ break;
12344+ case GL_ACTIVE_STENCIL_FACE_EXT:
12345+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12346+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12347+ break;
12348+ case GL_MAX_SHININESS_NV:
12349+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12350+ params[0] = IROUND(ctx->Const.MaxShininess);
12351+ break;
12352+ case GL_MAX_SPOT_EXPONENT_NV:
12353+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12354+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12355+ break;
12356+ case GL_ARRAY_BUFFER_BINDING_ARB:
12357+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12358+ params[0] = ctx->Array.ArrayBufferObj->Name;
12359+ break;
12360+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12361+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12362+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12363+ break;
12364+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12365+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12366+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12367+ break;
12368+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12369+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12370+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12371+ break;
12372+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12373+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12374+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12375+ break;
12376+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12377+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12378+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12379+ break;
12380+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12381+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12382+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12383+ break;
12384+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12385+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12386+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12387+ break;
12388+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12389+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12390+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12391+ break;
12392+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12393+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12394+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12395+ break;
12396+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12397+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12398+ params[0] = ctx->Pack.BufferObj->Name;
12399+ break;
12400+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12401+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12402+ params[0] = ctx->Unpack.BufferObj->Name;
12403+ break;
12404+ case GL_VERTEX_PROGRAM_ARB:
12405+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12406+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12407+ break;
12408+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12409+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12410+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12411+ break;
12412+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12413+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12414+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12415+ break;
12416+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12417+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12418+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12419+ break;
12420+ case GL_MAX_PROGRAM_MATRICES_ARB:
12421+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12422+ params[0] = ctx->Const.MaxProgramMatrices;
12423+ break;
12424+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12425+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12426+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12427+ break;
12428+ case GL_CURRENT_MATRIX_ARB:
12429+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12430+ {
12431+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12432+ params[0] = IROUND(matrix[0]);
12433+ params[1] = IROUND(matrix[1]);
12434+ params[2] = IROUND(matrix[2]);
12435+ params[3] = IROUND(matrix[3]);
12436+ params[4] = IROUND(matrix[4]);
12437+ params[5] = IROUND(matrix[5]);
12438+ params[6] = IROUND(matrix[6]);
12439+ params[7] = IROUND(matrix[7]);
12440+ params[8] = IROUND(matrix[8]);
12441+ params[9] = IROUND(matrix[9]);
12442+ params[10] = IROUND(matrix[10]);
12443+ params[11] = IROUND(matrix[11]);
12444+ params[12] = IROUND(matrix[12]);
12445+ params[13] = IROUND(matrix[13]);
12446+ params[14] = IROUND(matrix[14]);
12447+ params[15] = IROUND(matrix[15]);
12448+ }
12449+ break;
12450+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12451+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12452+ {
12453+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12454+ params[0] = IROUND(matrix[0]);
12455+ params[1] = IROUND(matrix[4]);
12456+ params[2] = IROUND(matrix[8]);
12457+ params[3] = IROUND(matrix[12]);
12458+ params[4] = IROUND(matrix[1]);
12459+ params[5] = IROUND(matrix[5]);
12460+ params[6] = IROUND(matrix[9]);
12461+ params[7] = IROUND(matrix[13]);
12462+ params[8] = IROUND(matrix[2]);
12463+ params[9] = IROUND(matrix[6]);
12464+ params[10] = IROUND(matrix[10]);
12465+ params[11] = IROUND(matrix[14]);
12466+ params[12] = IROUND(matrix[3]);
12467+ params[13] = IROUND(matrix[7]);
12468+ params[14] = IROUND(matrix[11]);
12469+ params[15] = IROUND(matrix[15]);
12470+ }
12471+ break;
12472+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12473+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12474+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12475+ break;
12476+ case GL_PROGRAM_ERROR_POSITION_ARB:
12477+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12478+ params[0] = ctx->Program.ErrorPos;
12479+ break;
12480+ case GL_FRAGMENT_PROGRAM_ARB:
12481+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12482+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12483+ break;
12484+ case GL_MAX_TEXTURE_COORDS_ARB:
12485+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12486+ params[0] = ctx->Const.MaxTextureCoordUnits;
12487+ break;
12488+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12489+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12490+ params[0] = ctx->Const.MaxTextureImageUnits;
12491+ break;
12492+ case GL_DEPTH_BOUNDS_TEST_EXT:
12493+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12494+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12495+ break;
12496+ case GL_DEPTH_BOUNDS_EXT:
12497+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12498+ params[0] = IROUND(ctx->Depth.BoundsMin);
12499+ params[1] = IROUND(ctx->Depth.BoundsMax);
12500+ break;
12501+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12502+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12503+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12504+ break;
12505+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12506+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12507+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12508+ break;
12509+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12510+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12511+ params[0] = ctx->FragmentProgram.CurrentPosition;
12512+ break;
12513+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12514+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12515+ params[0] = ctx->VertexProgram.CurrentPosition;
12516+ break;
12517+ case GL_MAX_DRAW_BUFFERS_ARB:
12518+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12519+ params[0] = ctx->Const.MaxDrawBuffers;
12520+ break;
12521+ case GL_DRAW_BUFFER0_ARB:
12522+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12523+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12524+ break;
12525+ case GL_DRAW_BUFFER1_ARB:
12526+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12527+ {
12528+ GLenum buffer;
12529+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12530+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12531+ return;
12532+ }
12533+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12534+ params[0] = ENUM_TO_INT(buffer);
12535+ }
12536+ break;
12537+ case GL_DRAW_BUFFER2_ARB:
12538+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12539+ {
12540+ GLenum buffer;
12541+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12542+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12543+ return;
12544+ }
12545+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12546+ params[0] = ENUM_TO_INT(buffer);
12547+ }
12548+ break;
12549+ case GL_DRAW_BUFFER3_ARB:
12550+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12551+ {
12552+ GLenum buffer;
12553+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12554+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12555+ return;
12556+ }
12557+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12558+ params[0] = ENUM_TO_INT(buffer);
12559+ }
12560+ break;
12561+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12562+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12563+ params[0] = ctx->Const.ColorReadType;
12564+ break;
12565+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12566+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12567+ params[0] = ctx->Const.ColorReadFormat;
12568+ break;
12569+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12570+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12571+ params[0] = 6;
12572+ break;
12573+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12574+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12575+ params[0] = 8;
12576+ break;
12577+ case GL_NUM_PASSES_ATI:
12578+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12579+ params[0] = 2;
12580+ break;
12581+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12582+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12583+ params[0] = 8;
12584+ break;
12585+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12586+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12587+ params[0] = 16;
12588+ break;
12589+ case GL_COLOR_ALPHA_PAIRING_ATI:
12590+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12591+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12592+ break;
12593+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12594+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12595+ params[0] = 3;
12596+ break;
12597+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12598+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12599+ params[0] = 3;
12600+ break;
12601+ case GL_STENCIL_BACK_FUNC:
12602+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12603+ break;
12604+ case GL_STENCIL_BACK_VALUE_MASK:
12605+ params[0] = ctx->Stencil.ValueMask[1];
12606+ break;
12607+ case GL_STENCIL_BACK_REF:
12608+ params[0] = ctx->Stencil.Ref[1];
12609+ break;
12610+ case GL_STENCIL_BACK_FAIL:
12611+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12612+ break;
12613+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12614+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12615+ break;
12616+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12617+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12618+ break;
12619+ case GL_FRAMEBUFFER_BINDING_EXT:
12620+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12621+ params[0] = ctx->DrawBuffer->Name;
12622+ break;
12623+ case GL_RENDERBUFFER_BINDING_EXT:
12624+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12625+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12626+ break;
12627+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12628+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12629+ params[0] = ctx->Const.MaxColorAttachments;
12630+ break;
12631+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12632+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12633+ params[0] = ctx->Const.MaxRenderbufferSize;
12634+ break;
12635+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12636+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12637+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12638+ break;
12639+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12640+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12641+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12642+ break;
12643+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12644+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12645+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12646+ break;
12647+ case GL_MAX_VARYING_FLOATS_ARB:
12648+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12649+ params[0] = MAX_VARYING_FLOATS;
12650+ break;
12651+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12652+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12653+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12654+ break;
12655+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12656+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12657+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12658+ break;
12659+ default:
12660+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12661+ }
12662+}
12663+
12664+
12665+void GLAPIENTRY
12666+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12667+{
12668+ const GLfloat magic = -1234.5F;
12669+ GLfloat values[16];
12670+ GLuint i;
12671+
12672+ if (!params)
12673+ return;
12674+
12675+ /* Init temp array to magic numbers so we can figure out how many values
12676+ * are returned by the GetFloatv() call.
12677+ */
12678+ for (i = 0; i < 16; i++)
12679+ values[i] = magic;
12680+
12681+ _mesa_GetFloatv(pname, values);
12682+
12683+ for (i = 0; i < 16 && values[i] != magic; i++)
12684+ params[i] = (GLdouble) values[i];
12685+}
12686+
12687Index: qemu-0.12.4/target-i386/mesa_gl.h
12688===================================================================
12689--- /dev/null
12690+++ qemu-0.12.4/target-i386/mesa_gl.h
12691@@ -0,0 +1,2251 @@
12692+/*
12693+ * Mesa 3-D graphics library
12694+ * Version: 6.5.1
12695+ *
12696+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12697+ *
12698+ * Permission is hereby granted, free of charge, to any person obtaining a
12699+ * copy of this software and associated documentation files (the "Software"),
12700+ * to deal in the Software without restriction, including without limitation
12701+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12702+ * and/or sell copies of the Software, and to permit persons to whom the
12703+ * Software is furnished to do so, subject to the following conditions:
12704+ *
12705+ * The above copyright notice and this permission notice shall be included
12706+ * in all copies or substantial portions of the Software.
12707+ *
12708+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12709+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12710+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12711+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12712+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12713+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12714+ */
12715+
12716+
12717+#ifndef __gl_h_
12718+#define __gl_h_
12719+
12720+#if defined(USE_MGL_NAMESPACE)
12721+#include "gl_mangle.h"
12722+#endif
12723+
12724+
12725+/**********************************************************************
12726+ * Begin system-specific stuff. Do not do any of this when building
12727+ * for SciTech SNAP, as this is all done before this header file is
12728+ * included.
12729+ */
12730+#if !defined(__SCITECH_SNAP__)
12731+
12732+#if defined(__BEOS__)
12733+#include <stdlib.h> /* to get some BeOS-isms */
12734+#endif
12735+
12736+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12737+#define OPENSTEP
12738+#endif
12739+
12740+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12741+#define __WIN32__
12742+#endif
12743+
12744+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12745+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12746+# define GLAPI __declspec(dllexport)
12747+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12748+# define GLAPI __declspec(dllimport)
12749+# else /* for use with static link lib build of Win32 edition only */
12750+# define GLAPI extern
12751+# endif /* _STATIC_MESA support */
12752+# define GLAPIENTRY __stdcall
12753+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12754+# define GLAPI extern
12755+# define GLAPIENTRY __stdcall
12756+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12757+# define GLAPI __attribute__((visibility("default")))
12758+# define GLAPIENTRY
12759+#endif /* WIN32 && !CYGWIN */
12760+
12761+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12762+# define PRAGMA_EXPORT_SUPPORTED 1
12763+#endif
12764+
12765+/*
12766+ * WINDOWS: Include windows.h here to define APIENTRY.
12767+ * It is also useful when applications include this file by
12768+ * including only glut.h, since glut.h depends on windows.h.
12769+ * Applications needing to include windows.h with parms other
12770+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12771+ * glut.h or gl.h.
12772+ */
12773+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12774+#define WIN32_LEAN_AND_MEAN 1
12775+#include <windows.h>
12776+#endif
12777+
12778+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12779+#include <GL/mesa_wgl.h>
12780+#endif
12781+
12782+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12783+#pragma import on
12784+#endif
12785+
12786+#ifndef GLAPI
12787+#define GLAPI extern
12788+#endif
12789+
12790+#ifndef GLAPIENTRY
12791+#define GLAPIENTRY
12792+#endif
12793+
12794+#ifndef APIENTRY
12795+#define APIENTRY GLAPIENTRY
12796+#endif
12797+
12798+/* "P" suffix to be used for a pointer to a function */
12799+#ifndef APIENTRYP
12800+#define APIENTRYP APIENTRY *
12801+#endif
12802+
12803+#ifndef GLAPIENTRYP
12804+#define GLAPIENTRYP GLAPIENTRY *
12805+#endif
12806+
12807+#ifdef CENTERLINE_CLPP
12808+#define signed
12809+#endif
12810+
12811+#if defined(PRAGMA_EXPORT_SUPPORTED)
12812+#pragma export on
12813+#endif
12814+
12815+#endif /* !__SCITECH_SNAP__ */
12816+/*
12817+ * End system-specific stuff.
12818+ **********************************************************************/
12819+
12820+
12821+
12822+#ifdef __cplusplus
12823+extern "C" {
12824+#endif
12825+
12826+
12827+
12828+#define GL_VERSION_1_1 1
12829+#define GL_VERSION_1_2 1
12830+#define GL_VERSION_1_3 1
12831+#define GL_ARB_imaging 1
12832+
12833+
12834+/*
12835+ * Datatypes
12836+ */
12837+typedef unsigned int GLenum;
12838+typedef unsigned char GLboolean;
12839+typedef unsigned int GLbitfield;
12840+typedef void GLvoid;
12841+typedef signed char GLbyte; /* 1-byte signed */
12842+typedef short GLshort; /* 2-byte signed */
12843+typedef int GLint; /* 4-byte signed */
12844+typedef unsigned char GLubyte; /* 1-byte unsigned */
12845+typedef unsigned short GLushort; /* 2-byte unsigned */
12846+typedef unsigned int GLuint; /* 4-byte unsigned */
12847+typedef int GLsizei; /* 4-byte signed */
12848+typedef float GLfloat; /* single precision float */
12849+typedef float GLclampf; /* single precision float in [0,1] */
12850+typedef double GLdouble; /* double precision float */
12851+typedef double GLclampd; /* double precision float in [0,1] */
12852+
12853+
12854+
12855+/*
12856+ * Constants
12857+ */
12858+
12859+/* Boolean values */
12860+#define GL_FALSE 0x0
12861+#define GL_TRUE 0x1
12862+
12863+/* Data types */
12864+#define GL_BYTE 0x1400
12865+#define GL_UNSIGNED_BYTE 0x1401
12866+#define GL_SHORT 0x1402
12867+#define GL_UNSIGNED_SHORT 0x1403
12868+#define GL_INT 0x1404
12869+#define GL_UNSIGNED_INT 0x1405
12870+#define GL_FLOAT 0x1406
12871+#define GL_2_BYTES 0x1407
12872+#define GL_3_BYTES 0x1408
12873+#define GL_4_BYTES 0x1409
12874+#define GL_DOUBLE 0x140A
12875+
12876+/* Primitives */
12877+#define GL_POINTS 0x0000
12878+#define GL_LINES 0x0001
12879+#define GL_LINE_LOOP 0x0002
12880+#define GL_LINE_STRIP 0x0003
12881+#define GL_TRIANGLES 0x0004
12882+#define GL_TRIANGLE_STRIP 0x0005
12883+#define GL_TRIANGLE_FAN 0x0006
12884+#define GL_QUADS 0x0007
12885+#define GL_QUAD_STRIP 0x0008
12886+#define GL_POLYGON 0x0009
12887+
12888+/* Vertex Arrays */
12889+#define GL_VERTEX_ARRAY 0x8074
12890+#define GL_NORMAL_ARRAY 0x8075
12891+#define GL_COLOR_ARRAY 0x8076
12892+#define GL_INDEX_ARRAY 0x8077
12893+#define GL_TEXTURE_COORD_ARRAY 0x8078
12894+#define GL_EDGE_FLAG_ARRAY 0x8079
12895+#define GL_VERTEX_ARRAY_SIZE 0x807A
12896+#define GL_VERTEX_ARRAY_TYPE 0x807B
12897+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12898+#define GL_NORMAL_ARRAY_TYPE 0x807E
12899+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12900+#define GL_COLOR_ARRAY_SIZE 0x8081
12901+#define GL_COLOR_ARRAY_TYPE 0x8082
12902+#define GL_COLOR_ARRAY_STRIDE 0x8083
12903+#define GL_INDEX_ARRAY_TYPE 0x8085
12904+#define GL_INDEX_ARRAY_STRIDE 0x8086
12905+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12906+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12907+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12908+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12909+#define GL_VERTEX_ARRAY_POINTER 0x808E
12910+#define GL_NORMAL_ARRAY_POINTER 0x808F
12911+#define GL_COLOR_ARRAY_POINTER 0x8090
12912+#define GL_INDEX_ARRAY_POINTER 0x8091
12913+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12914+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12915+#define GL_V2F 0x2A20
12916+#define GL_V3F 0x2A21
12917+#define GL_C4UB_V2F 0x2A22
12918+#define GL_C4UB_V3F 0x2A23
12919+#define GL_C3F_V3F 0x2A24
12920+#define GL_N3F_V3F 0x2A25
12921+#define GL_C4F_N3F_V3F 0x2A26
12922+#define GL_T2F_V3F 0x2A27
12923+#define GL_T4F_V4F 0x2A28
12924+#define GL_T2F_C4UB_V3F 0x2A29
12925+#define GL_T2F_C3F_V3F 0x2A2A
12926+#define GL_T2F_N3F_V3F 0x2A2B
12927+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12928+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12929+
12930+/* Matrix Mode */
12931+#define GL_MATRIX_MODE 0x0BA0
12932+#define GL_MODELVIEW 0x1700
12933+#define GL_PROJECTION 0x1701
12934+#define GL_TEXTURE 0x1702
12935+
12936+/* Points */
12937+#define GL_POINT_SMOOTH 0x0B10
12938+#define GL_POINT_SIZE 0x0B11
12939+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12940+#define GL_POINT_SIZE_RANGE 0x0B12
12941+
12942+/* Lines */
12943+#define GL_LINE_SMOOTH 0x0B20
12944+#define GL_LINE_STIPPLE 0x0B24
12945+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12946+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12947+#define GL_LINE_WIDTH 0x0B21
12948+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12949+#define GL_LINE_WIDTH_RANGE 0x0B22
12950+
12951+/* Polygons */
12952+#define GL_POINT 0x1B00
12953+#define GL_LINE 0x1B01
12954+#define GL_FILL 0x1B02
12955+#define GL_CW 0x0900
12956+#define GL_CCW 0x0901
12957+#define GL_FRONT 0x0404
12958+#define GL_BACK 0x0405
12959+#define GL_POLYGON_MODE 0x0B40
12960+#define GL_POLYGON_SMOOTH 0x0B41
12961+#define GL_POLYGON_STIPPLE 0x0B42
12962+#define GL_EDGE_FLAG 0x0B43
12963+#define GL_CULL_FACE 0x0B44
12964+#define GL_CULL_FACE_MODE 0x0B45
12965+#define GL_FRONT_FACE 0x0B46
12966+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12967+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12968+#define GL_POLYGON_OFFSET_POINT 0x2A01
12969+#define GL_POLYGON_OFFSET_LINE 0x2A02
12970+#define GL_POLYGON_OFFSET_FILL 0x8037
12971+
12972+/* Display Lists */
12973+#define GL_COMPILE 0x1300
12974+#define GL_COMPILE_AND_EXECUTE 0x1301
12975+#define GL_LIST_BASE 0x0B32
12976+#define GL_LIST_INDEX 0x0B33
12977+#define GL_LIST_MODE 0x0B30
12978+
12979+/* Depth buffer */
12980+#define GL_NEVER 0x0200
12981+#define GL_LESS 0x0201
12982+#define GL_EQUAL 0x0202
12983+#define GL_LEQUAL 0x0203
12984+#define GL_GREATER 0x0204
12985+#define GL_NOTEQUAL 0x0205
12986+#define GL_GEQUAL 0x0206
12987+#define GL_ALWAYS 0x0207
12988+#define GL_DEPTH_TEST 0x0B71
12989+#define GL_DEPTH_BITS 0x0D56
12990+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12991+#define GL_DEPTH_FUNC 0x0B74
12992+#define GL_DEPTH_RANGE 0x0B70
12993+#define GL_DEPTH_WRITEMASK 0x0B72
12994+#define GL_DEPTH_COMPONENT 0x1902
12995+
12996+/* Lighting */
12997+#define GL_LIGHTING 0x0B50
12998+#define GL_LIGHT0 0x4000
12999+#define GL_LIGHT1 0x4001
13000+#define GL_LIGHT2 0x4002
13001+#define GL_LIGHT3 0x4003
13002+#define GL_LIGHT4 0x4004
13003+#define GL_LIGHT5 0x4005
13004+#define GL_LIGHT6 0x4006
13005+#define GL_LIGHT7 0x4007
13006+#define GL_SPOT_EXPONENT 0x1205
13007+#define GL_SPOT_CUTOFF 0x1206
13008+#define GL_CONSTANT_ATTENUATION 0x1207
13009+#define GL_LINEAR_ATTENUATION 0x1208
13010+#define GL_QUADRATIC_ATTENUATION 0x1209
13011+#define GL_AMBIENT 0x1200
13012+#define GL_DIFFUSE 0x1201
13013+#define GL_SPECULAR 0x1202
13014+#define GL_SHININESS 0x1601
13015+#define GL_EMISSION 0x1600
13016+#define GL_POSITION 0x1203
13017+#define GL_SPOT_DIRECTION 0x1204
13018+#define GL_AMBIENT_AND_DIFFUSE 0x1602
13019+#define GL_COLOR_INDEXES 0x1603
13020+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
13021+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
13022+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
13023+#define GL_FRONT_AND_BACK 0x0408
13024+#define GL_SHADE_MODEL 0x0B54
13025+#define GL_FLAT 0x1D00
13026+#define GL_SMOOTH 0x1D01
13027+#define GL_COLOR_MATERIAL 0x0B57
13028+#define GL_COLOR_MATERIAL_FACE 0x0B55
13029+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
13030+#define GL_NORMALIZE 0x0BA1
13031+
13032+/* User clipping planes */
13033+#define GL_CLIP_PLANE0 0x3000
13034+#define GL_CLIP_PLANE1 0x3001
13035+#define GL_CLIP_PLANE2 0x3002
13036+#define GL_CLIP_PLANE3 0x3003
13037+#define GL_CLIP_PLANE4 0x3004
13038+#define GL_CLIP_PLANE5 0x3005
13039+
13040+/* Accumulation buffer */
13041+#define GL_ACCUM_RED_BITS 0x0D58
13042+#define GL_ACCUM_GREEN_BITS 0x0D59
13043+#define GL_ACCUM_BLUE_BITS 0x0D5A
13044+#define GL_ACCUM_ALPHA_BITS 0x0D5B
13045+#define GL_ACCUM_CLEAR_VALUE 0x0B80
13046+#define GL_ACCUM 0x0100
13047+#define GL_ADD 0x0104
13048+#define GL_LOAD 0x0101
13049+#define GL_MULT 0x0103
13050+#define GL_RETURN 0x0102
13051+
13052+/* Alpha testing */
13053+#define GL_ALPHA_TEST 0x0BC0
13054+#define GL_ALPHA_TEST_REF 0x0BC2
13055+#define GL_ALPHA_TEST_FUNC 0x0BC1
13056+
13057+/* Blending */
13058+#define GL_BLEND 0x0BE2
13059+#define GL_BLEND_SRC 0x0BE1
13060+#define GL_BLEND_DST 0x0BE0
13061+#define GL_ZERO 0x0
13062+#define GL_ONE 0x1
13063+#define GL_SRC_COLOR 0x0300
13064+#define GL_ONE_MINUS_SRC_COLOR 0x0301
13065+#define GL_SRC_ALPHA 0x0302
13066+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
13067+#define GL_DST_ALPHA 0x0304
13068+#define GL_ONE_MINUS_DST_ALPHA 0x0305
13069+#define GL_DST_COLOR 0x0306
13070+#define GL_ONE_MINUS_DST_COLOR 0x0307
13071+#define GL_SRC_ALPHA_SATURATE 0x0308
13072+
13073+/* Render Mode */
13074+#define GL_FEEDBACK 0x1C01
13075+#define GL_RENDER 0x1C00
13076+#define GL_SELECT 0x1C02
13077+
13078+/* Feedback */
13079+#define GL_2D 0x0600
13080+#define GL_3D 0x0601
13081+#define GL_3D_COLOR 0x0602
13082+#define GL_3D_COLOR_TEXTURE 0x0603
13083+#define GL_4D_COLOR_TEXTURE 0x0604
13084+#define GL_POINT_TOKEN 0x0701
13085+#define GL_LINE_TOKEN 0x0702
13086+#define GL_LINE_RESET_TOKEN 0x0707
13087+#define GL_POLYGON_TOKEN 0x0703
13088+#define GL_BITMAP_TOKEN 0x0704
13089+#define GL_DRAW_PIXEL_TOKEN 0x0705
13090+#define GL_COPY_PIXEL_TOKEN 0x0706
13091+#define GL_PASS_THROUGH_TOKEN 0x0700
13092+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
13093+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
13094+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
13095+
13096+/* Selection */
13097+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
13098+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
13099+
13100+/* Fog */
13101+#define GL_FOG 0x0B60
13102+#define GL_FOG_MODE 0x0B65
13103+#define GL_FOG_DENSITY 0x0B62
13104+#define GL_FOG_COLOR 0x0B66
13105+#define GL_FOG_INDEX 0x0B61
13106+#define GL_FOG_START 0x0B63
13107+#define GL_FOG_END 0x0B64
13108+#define GL_LINEAR 0x2601
13109+#define GL_EXP 0x0800
13110+#define GL_EXP2 0x0801
13111+
13112+/* Logic Ops */
13113+#define GL_LOGIC_OP 0x0BF1
13114+#define GL_INDEX_LOGIC_OP 0x0BF1
13115+#define GL_COLOR_LOGIC_OP 0x0BF2
13116+#define GL_LOGIC_OP_MODE 0x0BF0
13117+#define GL_CLEAR 0x1500
13118+#define GL_SET 0x150F
13119+#define GL_COPY 0x1503
13120+#define GL_COPY_INVERTED 0x150C
13121+#define GL_NOOP 0x1505
13122+#define GL_INVERT 0x150A
13123+#define GL_AND 0x1501
13124+#define GL_NAND 0x150E
13125+#define GL_OR 0x1507
13126+#define GL_NOR 0x1508
13127+#define GL_XOR 0x1506
13128+#define GL_EQUIV 0x1509
13129+#define GL_AND_REVERSE 0x1502
13130+#define GL_AND_INVERTED 0x1504
13131+#define GL_OR_REVERSE 0x150B
13132+#define GL_OR_INVERTED 0x150D
13133+
13134+/* Stencil */
13135+#define GL_STENCIL_BITS 0x0D57
13136+#define GL_STENCIL_TEST 0x0B90
13137+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13138+#define GL_STENCIL_FUNC 0x0B92
13139+#define GL_STENCIL_VALUE_MASK 0x0B93
13140+#define GL_STENCIL_FAIL 0x0B94
13141+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13142+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13143+#define GL_STENCIL_REF 0x0B97
13144+#define GL_STENCIL_WRITEMASK 0x0B98
13145+#define GL_STENCIL_INDEX 0x1901
13146+#define GL_KEEP 0x1E00
13147+#define GL_REPLACE 0x1E01
13148+#define GL_INCR 0x1E02
13149+#define GL_DECR 0x1E03
13150+
13151+/* Buffers, Pixel Drawing/Reading */
13152+#define GL_NONE 0x0
13153+#define GL_LEFT 0x0406
13154+#define GL_RIGHT 0x0407
13155+/*GL_FRONT 0x0404 */
13156+/*GL_BACK 0x0405 */
13157+/*GL_FRONT_AND_BACK 0x0408 */
13158+#define GL_FRONT_LEFT 0x0400
13159+#define GL_FRONT_RIGHT 0x0401
13160+#define GL_BACK_LEFT 0x0402
13161+#define GL_BACK_RIGHT 0x0403
13162+#define GL_AUX0 0x0409
13163+#define GL_AUX1 0x040A
13164+#define GL_AUX2 0x040B
13165+#define GL_AUX3 0x040C
13166+#define GL_COLOR_INDEX 0x1900
13167+#define GL_RED 0x1903
13168+#define GL_GREEN 0x1904
13169+#define GL_BLUE 0x1905
13170+#define GL_ALPHA 0x1906
13171+#define GL_LUMINANCE 0x1909
13172+#define GL_LUMINANCE_ALPHA 0x190A
13173+#define GL_ALPHA_BITS 0x0D55
13174+#define GL_RED_BITS 0x0D52
13175+#define GL_GREEN_BITS 0x0D53
13176+#define GL_BLUE_BITS 0x0D54
13177+#define GL_INDEX_BITS 0x0D51
13178+#define GL_SUBPIXEL_BITS 0x0D50
13179+#define GL_AUX_BUFFERS 0x0C00
13180+#define GL_READ_BUFFER 0x0C02
13181+#define GL_DRAW_BUFFER 0x0C01
13182+#define GL_DOUBLEBUFFER 0x0C32
13183+#define GL_STEREO 0x0C33
13184+#define GL_BITMAP 0x1A00
13185+#define GL_COLOR 0x1800
13186+#define GL_DEPTH 0x1801
13187+#define GL_STENCIL 0x1802
13188+#define GL_DITHER 0x0BD0
13189+#define GL_RGB 0x1907
13190+#define GL_RGBA 0x1908
13191+
13192+/* Implementation limits */
13193+#define GL_MAX_LIST_NESTING 0x0B31
13194+#define GL_MAX_EVAL_ORDER 0x0D30
13195+#define GL_MAX_LIGHTS 0x0D31
13196+#define GL_MAX_CLIP_PLANES 0x0D32
13197+#define GL_MAX_TEXTURE_SIZE 0x0D33
13198+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13199+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13200+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13201+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13202+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13203+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13204+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13205+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13206+
13207+/* Gets */
13208+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13209+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13210+#define GL_COLOR_CLEAR_VALUE 0x0C22
13211+#define GL_COLOR_WRITEMASK 0x0C23
13212+#define GL_CURRENT_INDEX 0x0B01
13213+#define GL_CURRENT_COLOR 0x0B00
13214+#define GL_CURRENT_NORMAL 0x0B02
13215+#define GL_CURRENT_RASTER_COLOR 0x0B04
13216+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13217+#define GL_CURRENT_RASTER_INDEX 0x0B05
13218+#define GL_CURRENT_RASTER_POSITION 0x0B07
13219+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13220+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13221+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13222+#define GL_INDEX_CLEAR_VALUE 0x0C20
13223+#define GL_INDEX_MODE 0x0C30
13224+#define GL_INDEX_WRITEMASK 0x0C21
13225+#define GL_MODELVIEW_MATRIX 0x0BA6
13226+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13227+#define GL_NAME_STACK_DEPTH 0x0D70
13228+#define GL_PROJECTION_MATRIX 0x0BA7
13229+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13230+#define GL_RENDER_MODE 0x0C40
13231+#define GL_RGBA_MODE 0x0C31
13232+#define GL_TEXTURE_MATRIX 0x0BA8
13233+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13234+#define GL_VIEWPORT 0x0BA2
13235+
13236+/* Evaluators */
13237+#define GL_AUTO_NORMAL 0x0D80
13238+#define GL_MAP1_COLOR_4 0x0D90
13239+#define GL_MAP1_INDEX 0x0D91
13240+#define GL_MAP1_NORMAL 0x0D92
13241+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13242+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13243+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13244+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13245+#define GL_MAP1_VERTEX_3 0x0D97
13246+#define GL_MAP1_VERTEX_4 0x0D98
13247+#define GL_MAP2_COLOR_4 0x0DB0
13248+#define GL_MAP2_INDEX 0x0DB1
13249+#define GL_MAP2_NORMAL 0x0DB2
13250+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13251+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13252+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13253+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13254+#define GL_MAP2_VERTEX_3 0x0DB7
13255+#define GL_MAP2_VERTEX_4 0x0DB8
13256+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13257+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13258+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13259+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13260+#define GL_COEFF 0x0A00
13261+#define GL_ORDER 0x0A01
13262+#define GL_DOMAIN 0x0A02
13263+
13264+/* Hints */
13265+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13266+#define GL_POINT_SMOOTH_HINT 0x0C51
13267+#define GL_LINE_SMOOTH_HINT 0x0C52
13268+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13269+#define GL_FOG_HINT 0x0C54
13270+#define GL_DONT_CARE 0x1100
13271+#define GL_FASTEST 0x1101
13272+#define GL_NICEST 0x1102
13273+
13274+/* Scissor box */
13275+#define GL_SCISSOR_BOX 0x0C10
13276+#define GL_SCISSOR_TEST 0x0C11
13277+
13278+/* Pixel Mode / Transfer */
13279+#define GL_MAP_COLOR 0x0D10
13280+#define GL_MAP_STENCIL 0x0D11
13281+#define GL_INDEX_SHIFT 0x0D12
13282+#define GL_INDEX_OFFSET 0x0D13
13283+#define GL_RED_SCALE 0x0D14
13284+#define GL_RED_BIAS 0x0D15
13285+#define GL_GREEN_SCALE 0x0D18
13286+#define GL_GREEN_BIAS 0x0D19
13287+#define GL_BLUE_SCALE 0x0D1A
13288+#define GL_BLUE_BIAS 0x0D1B
13289+#define GL_ALPHA_SCALE 0x0D1C
13290+#define GL_ALPHA_BIAS 0x0D1D
13291+#define GL_DEPTH_SCALE 0x0D1E
13292+#define GL_DEPTH_BIAS 0x0D1F
13293+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13294+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13295+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13296+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13297+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13298+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13299+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13300+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13301+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13302+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13303+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13304+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13305+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13306+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13307+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13308+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13309+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13310+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13311+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13312+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13313+#define GL_PACK_ALIGNMENT 0x0D05
13314+#define GL_PACK_LSB_FIRST 0x0D01
13315+#define GL_PACK_ROW_LENGTH 0x0D02
13316+#define GL_PACK_SKIP_PIXELS 0x0D04
13317+#define GL_PACK_SKIP_ROWS 0x0D03
13318+#define GL_PACK_SWAP_BYTES 0x0D00
13319+#define GL_UNPACK_ALIGNMENT 0x0CF5
13320+#define GL_UNPACK_LSB_FIRST 0x0CF1
13321+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13322+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13323+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13324+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13325+#define GL_ZOOM_X 0x0D16
13326+#define GL_ZOOM_Y 0x0D17
13327+
13328+/* Texture mapping */
13329+#define GL_TEXTURE_ENV 0x2300
13330+#define GL_TEXTURE_ENV_MODE 0x2200
13331+#define GL_TEXTURE_1D 0x0DE0
13332+#define GL_TEXTURE_2D 0x0DE1
13333+#define GL_TEXTURE_WRAP_S 0x2802
13334+#define GL_TEXTURE_WRAP_T 0x2803
13335+#define GL_TEXTURE_MAG_FILTER 0x2800
13336+#define GL_TEXTURE_MIN_FILTER 0x2801
13337+#define GL_TEXTURE_ENV_COLOR 0x2201
13338+#define GL_TEXTURE_GEN_S 0x0C60
13339+#define GL_TEXTURE_GEN_T 0x0C61
13340+#define GL_TEXTURE_GEN_MODE 0x2500
13341+#define GL_TEXTURE_BORDER_COLOR 0x1004
13342+#define GL_TEXTURE_WIDTH 0x1000
13343+#define GL_TEXTURE_HEIGHT 0x1001
13344+#define GL_TEXTURE_BORDER 0x1005
13345+#define GL_TEXTURE_COMPONENTS 0x1003
13346+#define GL_TEXTURE_RED_SIZE 0x805C
13347+#define GL_TEXTURE_GREEN_SIZE 0x805D
13348+#define GL_TEXTURE_BLUE_SIZE 0x805E
13349+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13350+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13351+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13352+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13353+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13354+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13355+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13356+#define GL_OBJECT_LINEAR 0x2401
13357+#define GL_OBJECT_PLANE 0x2501
13358+#define GL_EYE_LINEAR 0x2400
13359+#define GL_EYE_PLANE 0x2502
13360+#define GL_SPHERE_MAP 0x2402
13361+#define GL_DECAL 0x2101
13362+#define GL_MODULATE 0x2100
13363+#define GL_NEAREST 0x2600
13364+#define GL_REPEAT 0x2901
13365+#define GL_CLAMP 0x2900
13366+#define GL_S 0x2000
13367+#define GL_T 0x2001
13368+#define GL_R 0x2002
13369+#define GL_Q 0x2003
13370+#define GL_TEXTURE_GEN_R 0x0C62
13371+#define GL_TEXTURE_GEN_Q 0x0C63
13372+
13373+/* Utility */
13374+#define GL_VENDOR 0x1F00
13375+#define GL_RENDERER 0x1F01
13376+#define GL_VERSION 0x1F02
13377+#define GL_EXTENSIONS 0x1F03
13378+
13379+/* Errors */
13380+#define GL_NO_ERROR 0x0
13381+#define GL_INVALID_ENUM 0x0500
13382+#define GL_INVALID_VALUE 0x0501
13383+#define GL_INVALID_OPERATION 0x0502
13384+#define GL_STACK_OVERFLOW 0x0503
13385+#define GL_STACK_UNDERFLOW 0x0504
13386+#define GL_OUT_OF_MEMORY 0x0505
13387+
13388+/* glPush/PopAttrib bits */
13389+#define GL_CURRENT_BIT 0x00000001
13390+#define GL_POINT_BIT 0x00000002
13391+#define GL_LINE_BIT 0x00000004
13392+#define GL_POLYGON_BIT 0x00000008
13393+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13394+#define GL_PIXEL_MODE_BIT 0x00000020
13395+#define GL_LIGHTING_BIT 0x00000040
13396+#define GL_FOG_BIT 0x00000080
13397+#define GL_DEPTH_BUFFER_BIT 0x00000100
13398+#define GL_ACCUM_BUFFER_BIT 0x00000200
13399+#define GL_STENCIL_BUFFER_BIT 0x00000400
13400+#define GL_VIEWPORT_BIT 0x00000800
13401+#define GL_TRANSFORM_BIT 0x00001000
13402+#define GL_ENABLE_BIT 0x00002000
13403+#define GL_COLOR_BUFFER_BIT 0x00004000
13404+#define GL_HINT_BIT 0x00008000
13405+#define GL_EVAL_BIT 0x00010000
13406+#define GL_LIST_BIT 0x00020000
13407+#define GL_TEXTURE_BIT 0x00040000
13408+#define GL_SCISSOR_BIT 0x00080000
13409+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13410+
13411+
13412+/* OpenGL 1.1 */
13413+#define GL_PROXY_TEXTURE_1D 0x8063
13414+#define GL_PROXY_TEXTURE_2D 0x8064
13415+#define GL_TEXTURE_PRIORITY 0x8066
13416+#define GL_TEXTURE_RESIDENT 0x8067
13417+#define GL_TEXTURE_BINDING_1D 0x8068
13418+#define GL_TEXTURE_BINDING_2D 0x8069
13419+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13420+#define GL_ALPHA4 0x803B
13421+#define GL_ALPHA8 0x803C
13422+#define GL_ALPHA12 0x803D
13423+#define GL_ALPHA16 0x803E
13424+#define GL_LUMINANCE4 0x803F
13425+#define GL_LUMINANCE8 0x8040
13426+#define GL_LUMINANCE12 0x8041
13427+#define GL_LUMINANCE16 0x8042
13428+#define GL_LUMINANCE4_ALPHA4 0x8043
13429+#define GL_LUMINANCE6_ALPHA2 0x8044
13430+#define GL_LUMINANCE8_ALPHA8 0x8045
13431+#define GL_LUMINANCE12_ALPHA4 0x8046
13432+#define GL_LUMINANCE12_ALPHA12 0x8047
13433+#define GL_LUMINANCE16_ALPHA16 0x8048
13434+#define GL_INTENSITY 0x8049
13435+#define GL_INTENSITY4 0x804A
13436+#define GL_INTENSITY8 0x804B
13437+#define GL_INTENSITY12 0x804C
13438+#define GL_INTENSITY16 0x804D
13439+#define GL_R3_G3_B2 0x2A10
13440+#define GL_RGB4 0x804F
13441+#define GL_RGB5 0x8050
13442+#define GL_RGB8 0x8051
13443+#define GL_RGB10 0x8052
13444+#define GL_RGB12 0x8053
13445+#define GL_RGB16 0x8054
13446+#define GL_RGBA2 0x8055
13447+#define GL_RGBA4 0x8056
13448+#define GL_RGB5_A1 0x8057
13449+#define GL_RGBA8 0x8058
13450+#define GL_RGB10_A2 0x8059
13451+#define GL_RGBA12 0x805A
13452+#define GL_RGBA16 0x805B
13453+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13454+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13455+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13456+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13457+
13458+
13459+
13460+/*
13461+ * Miscellaneous
13462+ */
13463+
13464+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13465+
13466+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13467+
13468+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13469+
13470+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13471+
13472+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13473+
13474+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13475+
13476+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13477+
13478+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13479+
13480+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13481+
13482+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13483+
13484+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13485+
13486+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13487+
13488+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13489+
13490+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13491+
13492+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13493+
13494+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13495+
13496+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13497+
13498+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13499+
13500+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13501+
13502+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13503+
13504+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13505+
13506+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13507+
13508+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13509+
13510+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13511+
13512+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13513+
13514+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13515+
13516+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13517+
13518+
13519+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13520+
13521+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13522+
13523+
13524+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13525+
13526+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13527+
13528+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13529+
13530+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13531+
13532+
13533+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13534+
13535+GLAPI void GLAPIENTRY glPopAttrib( void );
13536+
13537+
13538+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13539+
13540+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13541+
13542+
13543+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13544+
13545+GLAPI GLenum GLAPIENTRY glGetError( void );
13546+
13547+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13548+
13549+GLAPI void GLAPIENTRY glFinish( void );
13550+
13551+GLAPI void GLAPIENTRY glFlush( void );
13552+
13553+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13554+
13555+
13556+/*
13557+ * Depth Buffer
13558+ */
13559+
13560+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13561+
13562+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13563+
13564+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13565+
13566+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13567+
13568+
13569+/*
13570+ * Accumulation Buffer
13571+ */
13572+
13573+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13574+
13575+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13576+
13577+
13578+/*
13579+ * Transformation
13580+ */
13581+
13582+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13583+
13584+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13585+ GLdouble bottom, GLdouble top,
13586+ GLdouble near_val, GLdouble far_val );
13587+
13588+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13589+ GLdouble bottom, GLdouble top,
13590+ GLdouble near_val, GLdouble far_val );
13591+
13592+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13593+ GLsizei width, GLsizei height );
13594+
13595+GLAPI void GLAPIENTRY glPushMatrix( void );
13596+
13597+GLAPI void GLAPIENTRY glPopMatrix( void );
13598+
13599+GLAPI void GLAPIENTRY glLoadIdentity( void );
13600+
13601+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13602+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13603+
13604+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13605+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13606+
13607+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13608+ GLdouble x, GLdouble y, GLdouble z );
13609+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13610+ GLfloat x, GLfloat y, GLfloat z );
13611+
13612+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13613+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13614+
13615+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13616+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13617+
13618+
13619+/*
13620+ * Display Lists
13621+ */
13622+
13623+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13624+
13625+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13626+
13627+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13628+
13629+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13630+
13631+GLAPI void GLAPIENTRY glEndList( void );
13632+
13633+GLAPI void GLAPIENTRY glCallList( GLuint list );
13634+
13635+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13636+ const GLvoid *lists );
13637+
13638+GLAPI void GLAPIENTRY glListBase( GLuint base );
13639+
13640+
13641+/*
13642+ * Drawing Functions
13643+ */
13644+
13645+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13646+
13647+GLAPI void GLAPIENTRY glEnd( void );
13648+
13649+
13650+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13651+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13652+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13653+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13654+
13655+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13656+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13657+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13658+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13659+
13660+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13661+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13662+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13663+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13664+
13665+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13666+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13667+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13668+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13669+
13670+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13671+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13672+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13673+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13674+
13675+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13676+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13677+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13678+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13679+
13680+
13681+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13682+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13683+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13684+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13685+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13686+
13687+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13688+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13689+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13690+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13691+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13692+
13693+
13694+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13695+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13696+GLAPI void GLAPIENTRY glIndexi( GLint c );
13697+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13698+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13699+
13700+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13701+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13702+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13703+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13704+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13705+
13706+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13707+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13708+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13709+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13710+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13711+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13712+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13713+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13714+
13715+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13716+ GLbyte blue, GLbyte alpha );
13717+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13718+ GLdouble blue, GLdouble alpha );
13719+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13720+ GLfloat blue, GLfloat alpha );
13721+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13722+ GLint blue, GLint alpha );
13723+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13724+ GLshort blue, GLshort alpha );
13725+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13726+ GLubyte blue, GLubyte alpha );
13727+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13728+ GLuint blue, GLuint alpha );
13729+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13730+ GLushort blue, GLushort alpha );
13731+
13732+
13733+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13734+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13735+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13736+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13737+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13738+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13739+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13740+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13741+
13742+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13743+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13744+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13745+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13746+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13747+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13748+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13749+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13750+
13751+
13752+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13753+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13754+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13755+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13756+
13757+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13758+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13759+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13760+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13761+
13762+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13763+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13764+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13765+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13766+
13767+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13768+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13769+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13770+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13771+
13772+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13773+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13774+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13775+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13776+
13777+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13778+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13779+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13780+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13781+
13782+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13783+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13784+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13785+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13786+
13787+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13788+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13789+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13790+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13791+
13792+
13793+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13794+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13795+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13796+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13797+
13798+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13799+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13800+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13801+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13802+
13803+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13804+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13805+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13806+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13807+
13808+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13809+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13810+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13811+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13812+
13813+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13814+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13815+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13816+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13817+
13818+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13819+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13820+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13821+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13822+
13823+
13824+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13825+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13826+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13827+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13828+
13829+
13830+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13831+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13832+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13833+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13834+
13835+
13836+/*
13837+ * Vertex Arrays (1.1)
13838+ */
13839+
13840+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13841+ GLsizei stride, const GLvoid *ptr );
13842+
13843+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13844+ const GLvoid *ptr );
13845+
13846+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13847+ GLsizei stride, const GLvoid *ptr );
13848+
13849+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13850+ const GLvoid *ptr );
13851+
13852+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13853+ GLsizei stride, const GLvoid *ptr );
13854+
13855+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13856+
13857+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13858+
13859+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13860+
13861+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13862+
13863+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13864+ GLenum type, const GLvoid *indices );
13865+
13866+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13867+ const GLvoid *pointer );
13868+
13869+/*
13870+ * Lighting
13871+ */
13872+
13873+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13874+
13875+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13876+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13877+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13878+ const GLfloat *params );
13879+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13880+ const GLint *params );
13881+
13882+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13883+ GLfloat *params );
13884+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13885+ GLint *params );
13886+
13887+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13888+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13889+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13890+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13891+
13892+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13893+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13894+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13895+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13896+
13897+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13898+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13899+
13900+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13901+
13902+
13903+/*
13904+ * Raster functions
13905+ */
13906+
13907+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13908+
13909+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13910+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13911+
13912+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13913+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13914+
13915+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13916+ const GLfloat *values );
13917+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13918+ const GLuint *values );
13919+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13920+ const GLushort *values );
13921+
13922+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13923+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13924+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13925+
13926+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13927+ GLfloat xorig, GLfloat yorig,
13928+ GLfloat xmove, GLfloat ymove,
13929+ const GLubyte *bitmap );
13930+
13931+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13932+ GLsizei width, GLsizei height,
13933+ GLenum format, GLenum type,
13934+ GLvoid *pixels );
13935+
13936+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13937+ GLenum format, GLenum type,
13938+ const GLvoid *pixels );
13939+
13940+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13941+ GLsizei width, GLsizei height,
13942+ GLenum type );
13943+
13944+/*
13945+ * Stenciling
13946+ */
13947+
13948+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13949+
13950+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13951+
13952+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13953+
13954+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13955+
13956+
13957+
13958+/*
13959+ * Texture mapping
13960+ */
13961+
13962+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13963+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13964+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13965+
13966+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13967+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13968+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13969+
13970+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13971+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13972+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13973+
13974+
13975+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13976+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13977+
13978+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13979+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13980+
13981+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13982+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13983+
13984+
13985+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13986+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13987+
13988+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13989+ const GLfloat *params );
13990+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13991+ const GLint *params );
13992+
13993+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13994+ GLenum pname, GLfloat *params);
13995+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13996+ GLenum pname, GLint *params );
13997+
13998+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13999+ GLenum pname, GLfloat *params );
14000+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
14001+ GLenum pname, GLint *params );
14002+
14003+
14004+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
14005+ GLint internalFormat,
14006+ GLsizei width, GLint border,
14007+ GLenum format, GLenum type,
14008+ const GLvoid *pixels );
14009+
14010+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
14011+ GLint internalFormat,
14012+ GLsizei width, GLsizei height,
14013+ GLint border, GLenum format, GLenum type,
14014+ const GLvoid *pixels );
14015+
14016+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
14017+ GLenum format, GLenum type,
14018+ GLvoid *pixels );
14019+
14020+
14021+/* 1.1 functions */
14022+
14023+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
14024+
14025+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
14026+
14027+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
14028+
14029+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
14030+ const GLuint *textures,
14031+ const GLclampf *priorities );
14032+
14033+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
14034+ const GLuint *textures,
14035+ GLboolean *residences );
14036+
14037+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
14038+
14039+
14040+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
14041+ GLint xoffset,
14042+ GLsizei width, GLenum format,
14043+ GLenum type, const GLvoid *pixels );
14044+
14045+
14046+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
14047+ GLint xoffset, GLint yoffset,
14048+ GLsizei width, GLsizei height,
14049+ GLenum format, GLenum type,
14050+ const GLvoid *pixels );
14051+
14052+
14053+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
14054+ GLenum internalformat,
14055+ GLint x, GLint y,
14056+ GLsizei width, GLint border );
14057+
14058+
14059+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
14060+ GLenum internalformat,
14061+ GLint x, GLint y,
14062+ GLsizei width, GLsizei height,
14063+ GLint border );
14064+
14065+
14066+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
14067+ GLint xoffset, GLint x, GLint y,
14068+ GLsizei width );
14069+
14070+
14071+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
14072+ GLint xoffset, GLint yoffset,
14073+ GLint x, GLint y,
14074+ GLsizei width, GLsizei height );
14075+
14076+
14077+/*
14078+ * Evaluators
14079+ */
14080+
14081+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
14082+ GLint stride,
14083+ GLint order, const GLdouble *points );
14084+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
14085+ GLint stride,
14086+ GLint order, const GLfloat *points );
14087+
14088+GLAPI void GLAPIENTRY glMap2d( GLenum target,
14089+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
14090+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
14091+ const GLdouble *points );
14092+GLAPI void GLAPIENTRY glMap2f( GLenum target,
14093+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
14094+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
14095+ const GLfloat *points );
14096+
14097+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
14098+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
14099+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
14100+
14101+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
14102+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
14103+
14104+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
14105+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
14106+
14107+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
14108+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
14109+
14110+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
14111+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
14112+
14113+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
14114+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
14115+
14116+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14117+ GLint vn, GLdouble v1, GLdouble v2 );
14118+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14119+ GLint vn, GLfloat v1, GLfloat v2 );
14120+
14121+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14122+
14123+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14124+
14125+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14126+
14127+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14128+
14129+
14130+/*
14131+ * Fog
14132+ */
14133+
14134+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14135+
14136+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14137+
14138+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14139+
14140+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14141+
14142+
14143+/*
14144+ * Selection and Feedback
14145+ */
14146+
14147+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14148+
14149+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14150+
14151+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14152+
14153+GLAPI void GLAPIENTRY glInitNames( void );
14154+
14155+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14156+
14157+GLAPI void GLAPIENTRY glPushName( GLuint name );
14158+
14159+GLAPI void GLAPIENTRY glPopName( void );
14160+
14161+
14162+
14163+/*
14164+ * OpenGL 1.2
14165+ */
14166+
14167+#define GL_RESCALE_NORMAL 0x803A
14168+#define GL_CLAMP_TO_EDGE 0x812F
14169+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14170+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14171+#define GL_BGR 0x80E0
14172+#define GL_BGRA 0x80E1
14173+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14174+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14175+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14176+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14177+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14178+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14179+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14180+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14181+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14182+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14183+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14184+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14185+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14186+#define GL_SINGLE_COLOR 0x81F9
14187+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14188+#define GL_TEXTURE_MIN_LOD 0x813A
14189+#define GL_TEXTURE_MAX_LOD 0x813B
14190+#define GL_TEXTURE_BASE_LEVEL 0x813C
14191+#define GL_TEXTURE_MAX_LEVEL 0x813D
14192+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14193+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14194+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14195+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14196+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14197+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14198+#define GL_PACK_SKIP_IMAGES 0x806B
14199+#define GL_PACK_IMAGE_HEIGHT 0x806C
14200+#define GL_UNPACK_SKIP_IMAGES 0x806D
14201+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14202+#define GL_TEXTURE_3D 0x806F
14203+#define GL_PROXY_TEXTURE_3D 0x8070
14204+#define GL_TEXTURE_DEPTH 0x8071
14205+#define GL_TEXTURE_WRAP_R 0x8072
14206+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14207+#define GL_TEXTURE_BINDING_3D 0x806A
14208+
14209+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14210+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14211+
14212+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14213+ GLint internalFormat,
14214+ GLsizei width, GLsizei height,
14215+ GLsizei depth, GLint border,
14216+ GLenum format, GLenum type,
14217+ const GLvoid *pixels );
14218+
14219+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14220+ GLint xoffset, GLint yoffset,
14221+ GLint zoffset, GLsizei width,
14222+ GLsizei height, GLsizei depth,
14223+ GLenum format,
14224+ GLenum type, const GLvoid *pixels);
14225+
14226+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14227+ GLint xoffset, GLint yoffset,
14228+ GLint zoffset, GLint x,
14229+ GLint y, GLsizei width,
14230+ GLsizei height );
14231+
14232+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14233+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
14234+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
14235+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14236+
14237+
14238+/*
14239+ * GL_ARB_imaging
14240+ */
14241+
14242+#define GL_CONSTANT_COLOR 0x8001
14243+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14244+#define GL_CONSTANT_ALPHA 0x8003
14245+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14246+#define GL_COLOR_TABLE 0x80D0
14247+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14248+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14249+#define GL_PROXY_COLOR_TABLE 0x80D3
14250+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14251+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14252+#define GL_COLOR_TABLE_SCALE 0x80D6
14253+#define GL_COLOR_TABLE_BIAS 0x80D7
14254+#define GL_COLOR_TABLE_FORMAT 0x80D8
14255+#define GL_COLOR_TABLE_WIDTH 0x80D9
14256+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14257+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14258+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14259+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14260+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14261+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14262+#define GL_CONVOLUTION_1D 0x8010
14263+#define GL_CONVOLUTION_2D 0x8011
14264+#define GL_SEPARABLE_2D 0x8012
14265+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14266+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14267+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14268+#define GL_REDUCE 0x8016
14269+#define GL_CONVOLUTION_FORMAT 0x8017
14270+#define GL_CONVOLUTION_WIDTH 0x8018
14271+#define GL_CONVOLUTION_HEIGHT 0x8019
14272+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14273+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14274+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14275+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14276+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14277+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14278+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14279+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14280+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14281+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14282+#define GL_CONSTANT_BORDER 0x8151
14283+#define GL_REPLICATE_BORDER 0x8153
14284+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14285+#define GL_COLOR_MATRIX 0x80B1
14286+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14287+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14288+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14289+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14290+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14291+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14292+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14293+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14294+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14295+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14296+#define GL_HISTOGRAM 0x8024
14297+#define GL_PROXY_HISTOGRAM 0x8025
14298+#define GL_HISTOGRAM_WIDTH 0x8026
14299+#define GL_HISTOGRAM_FORMAT 0x8027
14300+#define GL_HISTOGRAM_RED_SIZE 0x8028
14301+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14302+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14303+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14304+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14305+#define GL_HISTOGRAM_SINK 0x802D
14306+#define GL_MINMAX 0x802E
14307+#define GL_MINMAX_FORMAT 0x802F
14308+#define GL_MINMAX_SINK 0x8030
14309+#define GL_TABLE_TOO_LARGE 0x8031
14310+#define GL_BLEND_EQUATION 0x8009
14311+#define GL_MIN 0x8007
14312+#define GL_MAX 0x8008
14313+#define GL_FUNC_ADD 0x8006
14314+#define GL_FUNC_SUBTRACT 0x800A
14315+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14316+#define GL_BLEND_COLOR 0x8005
14317+
14318+
14319+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14320+ GLsizei width, GLenum format,
14321+ GLenum type, const GLvoid *table );
14322+
14323+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14324+ GLsizei start, GLsizei count,
14325+ GLenum format, GLenum type,
14326+ const GLvoid *data );
14327+
14328+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14329+ const GLint *params);
14330+
14331+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14332+ const GLfloat *params);
14333+
14334+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14335+ GLint x, GLint y, GLsizei width );
14336+
14337+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14338+ GLint x, GLint y, GLsizei width );
14339+
14340+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14341+ GLenum type, GLvoid *table );
14342+
14343+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14344+ GLfloat *params );
14345+
14346+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14347+ GLint *params );
14348+
14349+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14350+
14351+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14352+ GLclampf blue, GLclampf alpha );
14353+
14354+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14355+ GLenum internalformat, GLboolean sink );
14356+
14357+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14358+
14359+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14360+ GLenum format, GLenum type,
14361+ GLvoid *values );
14362+
14363+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14364+ GLfloat *params );
14365+
14366+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14367+ GLint *params );
14368+
14369+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14370+ GLboolean sink );
14371+
14372+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14373+
14374+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14375+ GLenum format, GLenum types,
14376+ GLvoid *values );
14377+
14378+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14379+ GLfloat *params );
14380+
14381+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14382+ GLint *params );
14383+
14384+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14385+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14386+ const GLvoid *image );
14387+
14388+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14389+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14390+ GLenum type, const GLvoid *image );
14391+
14392+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14393+ GLfloat params );
14394+
14395+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14396+ const GLfloat *params );
14397+
14398+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14399+ GLint params );
14400+
14401+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14402+ const GLint *params );
14403+
14404+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14405+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14406+
14407+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14408+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14409+ GLsizei height);
14410+
14411+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14412+ GLenum type, GLvoid *image );
14413+
14414+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14415+ GLfloat *params );
14416+
14417+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14418+ GLint *params );
14419+
14420+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14421+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14422+ GLenum type, const GLvoid *row, const GLvoid *column );
14423+
14424+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14425+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14426+
14427+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14428+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14429+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14430+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14431+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14432+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14433+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14434+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14435+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14436+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14437+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14438+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14439+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14440+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14441+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14442+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14443+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14444+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14445+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14446+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14447+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14448+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14449+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14450+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14451+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14452+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14453+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14454+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14455+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14456+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14457+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14458+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14459+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14460+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14461+
14462+
14463+
14464+/*
14465+ * OpenGL 1.3
14466+ */
14467+
14468+/* multitexture */
14469+#define GL_TEXTURE0 0x84C0
14470+#define GL_TEXTURE1 0x84C1
14471+#define GL_TEXTURE2 0x84C2
14472+#define GL_TEXTURE3 0x84C3
14473+#define GL_TEXTURE4 0x84C4
14474+#define GL_TEXTURE5 0x84C5
14475+#define GL_TEXTURE6 0x84C6
14476+#define GL_TEXTURE7 0x84C7
14477+#define GL_TEXTURE8 0x84C8
14478+#define GL_TEXTURE9 0x84C9
14479+#define GL_TEXTURE10 0x84CA
14480+#define GL_TEXTURE11 0x84CB
14481+#define GL_TEXTURE12 0x84CC
14482+#define GL_TEXTURE13 0x84CD
14483+#define GL_TEXTURE14 0x84CE
14484+#define GL_TEXTURE15 0x84CF
14485+#define GL_TEXTURE16 0x84D0
14486+#define GL_TEXTURE17 0x84D1
14487+#define GL_TEXTURE18 0x84D2
14488+#define GL_TEXTURE19 0x84D3
14489+#define GL_TEXTURE20 0x84D4
14490+#define GL_TEXTURE21 0x84D5
14491+#define GL_TEXTURE22 0x84D6
14492+#define GL_TEXTURE23 0x84D7
14493+#define GL_TEXTURE24 0x84D8
14494+#define GL_TEXTURE25 0x84D9
14495+#define GL_TEXTURE26 0x84DA
14496+#define GL_TEXTURE27 0x84DB
14497+#define GL_TEXTURE28 0x84DC
14498+#define GL_TEXTURE29 0x84DD
14499+#define GL_TEXTURE30 0x84DE
14500+#define GL_TEXTURE31 0x84DF
14501+#define GL_ACTIVE_TEXTURE 0x84E0
14502+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14503+#define GL_MAX_TEXTURE_UNITS 0x84E2
14504+/* texture_cube_map */
14505+#define GL_NORMAL_MAP 0x8511
14506+#define GL_REFLECTION_MAP 0x8512
14507+#define GL_TEXTURE_CUBE_MAP 0x8513
14508+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14509+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14510+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14511+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14512+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14513+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14514+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14515+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14516+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14517+/* texture_compression */
14518+#define GL_COMPRESSED_ALPHA 0x84E9
14519+#define GL_COMPRESSED_LUMINANCE 0x84EA
14520+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14521+#define GL_COMPRESSED_INTENSITY 0x84EC
14522+#define GL_COMPRESSED_RGB 0x84ED
14523+#define GL_COMPRESSED_RGBA 0x84EE
14524+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14525+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14526+#define GL_TEXTURE_COMPRESSED 0x86A1
14527+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14528+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14529+/* multisample */
14530+#define GL_MULTISAMPLE 0x809D
14531+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14532+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14533+#define GL_SAMPLE_COVERAGE 0x80A0
14534+#define GL_SAMPLE_BUFFERS 0x80A8
14535+#define GL_SAMPLES 0x80A9
14536+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14537+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14538+#define GL_MULTISAMPLE_BIT 0x20000000
14539+/* transpose_matrix */
14540+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14541+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14542+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14543+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14544+/* texture_env_combine */
14545+#define GL_COMBINE 0x8570
14546+#define GL_COMBINE_RGB 0x8571
14547+#define GL_COMBINE_ALPHA 0x8572
14548+#define GL_SOURCE0_RGB 0x8580
14549+#define GL_SOURCE1_RGB 0x8581
14550+#define GL_SOURCE2_RGB 0x8582
14551+#define GL_SOURCE0_ALPHA 0x8588
14552+#define GL_SOURCE1_ALPHA 0x8589
14553+#define GL_SOURCE2_ALPHA 0x858A
14554+#define GL_OPERAND0_RGB 0x8590
14555+#define GL_OPERAND1_RGB 0x8591
14556+#define GL_OPERAND2_RGB 0x8592
14557+#define GL_OPERAND0_ALPHA 0x8598
14558+#define GL_OPERAND1_ALPHA 0x8599
14559+#define GL_OPERAND2_ALPHA 0x859A
14560+#define GL_RGB_SCALE 0x8573
14561+#define GL_ADD_SIGNED 0x8574
14562+#define GL_INTERPOLATE 0x8575
14563+#define GL_SUBTRACT 0x84E7
14564+#define GL_CONSTANT 0x8576
14565+#define GL_PRIMARY_COLOR 0x8577
14566+#define GL_PREVIOUS 0x8578
14567+/* texture_env_dot3 */
14568+#define GL_DOT3_RGB 0x86AE
14569+#define GL_DOT3_RGBA 0x86AF
14570+/* texture_border_clamp */
14571+#define GL_CLAMP_TO_BORDER 0x812D
14572+
14573+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14574+
14575+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14576+
14577+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14578+
14579+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14580+
14581+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14582+
14583+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14584+
14585+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14586+
14587+GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
14588+
14589+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14590+
14591+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14592+
14593+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14594+
14595+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14596+
14597+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14598+
14599+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14600+
14601+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14602+
14603+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14604+
14605+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14606+
14607+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14608+
14609+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14610+
14611+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14612+
14613+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14614+
14615+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14616+
14617+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14618+
14619+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14620+
14621+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14622+
14623+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14624+
14625+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14626+
14627+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14628+
14629+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14630+
14631+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14632+
14633+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14634+
14635+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14636+
14637+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14638+
14639+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14640+
14641+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14642+
14643+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14644+
14645+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14646+
14647+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14648+
14649+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14650+
14651+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14652+
14653+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14654+
14655+
14656+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14657+
14658+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14659+
14660+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14661+
14662+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14663+
14664+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14665+
14666+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14667+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14668+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14669+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14670+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14671+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14672+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14673+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14674+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14675+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14676+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14677+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14678+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14679+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14680+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14681+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14682+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14683+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14684+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14685+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14686+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14687+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14688+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14689+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14690+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14691+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14692+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14693+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14694+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14695+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14696+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14697+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14698+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14699+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14700+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14701+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14702+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14703+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14704+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14705+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14706+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14707+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14708+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
14709+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14710+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14711+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14712+
14713+
14714+/*
14715+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14716+ */
14717+#ifndef GL_ARB_multitexture
14718+#define GL_ARB_multitexture 1
14719+
14720+#define GL_TEXTURE0_ARB 0x84C0
14721+#define GL_TEXTURE1_ARB 0x84C1
14722+#define GL_TEXTURE2_ARB 0x84C2
14723+#define GL_TEXTURE3_ARB 0x84C3
14724+#define GL_TEXTURE4_ARB 0x84C4
14725+#define GL_TEXTURE5_ARB 0x84C5
14726+#define GL_TEXTURE6_ARB 0x84C6
14727+#define GL_TEXTURE7_ARB 0x84C7
14728+#define GL_TEXTURE8_ARB 0x84C8
14729+#define GL_TEXTURE9_ARB 0x84C9
14730+#define GL_TEXTURE10_ARB 0x84CA
14731+#define GL_TEXTURE11_ARB 0x84CB
14732+#define GL_TEXTURE12_ARB 0x84CC
14733+#define GL_TEXTURE13_ARB 0x84CD
14734+#define GL_TEXTURE14_ARB 0x84CE
14735+#define GL_TEXTURE15_ARB 0x84CF
14736+#define GL_TEXTURE16_ARB 0x84D0
14737+#define GL_TEXTURE17_ARB 0x84D1
14738+#define GL_TEXTURE18_ARB 0x84D2
14739+#define GL_TEXTURE19_ARB 0x84D3
14740+#define GL_TEXTURE20_ARB 0x84D4
14741+#define GL_TEXTURE21_ARB 0x84D5
14742+#define GL_TEXTURE22_ARB 0x84D6
14743+#define GL_TEXTURE23_ARB 0x84D7
14744+#define GL_TEXTURE24_ARB 0x84D8
14745+#define GL_TEXTURE25_ARB 0x84D9
14746+#define GL_TEXTURE26_ARB 0x84DA
14747+#define GL_TEXTURE27_ARB 0x84DB
14748+#define GL_TEXTURE28_ARB 0x84DC
14749+#define GL_TEXTURE29_ARB 0x84DD
14750+#define GL_TEXTURE30_ARB 0x84DE
14751+#define GL_TEXTURE31_ARB 0x84DF
14752+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14753+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14754+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14755+
14756+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14757+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14758+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14759+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14760+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14761+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14762+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14763+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14764+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14765+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14766+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14767+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14768+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14769+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14770+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14771+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14772+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14773+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14774+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14775+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14776+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14777+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14778+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14779+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14780+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14781+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14782+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14783+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14784+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14785+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14786+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14787+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14788+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14789+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14790+
14791+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14792+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14793+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14794+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14795+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14796+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14797+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14798+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14799+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14800+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14801+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14802+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14803+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14804+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14805+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14806+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14807+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14808+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14809+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14810+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14811+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14812+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14813+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14814+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14815+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14816+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14817+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14818+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14819+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14820+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14821+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14822+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14823+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14824+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14825+
14826+#endif /* GL_ARB_multitexture */
14827+
14828+
14829+
14830+/*
14831+ * Define this token if you want "old-style" header file behaviour (extensions
14832+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14833+ */
14834+#if defined(GL_GLEXT_LEGACY)
14835+
14836+/* All extensions that used to be here are now found in glext.h */
14837+
14838+#else /* GL_GLEXT_LEGACY */
14839+
14840+#include <mesa_glext.h>
14841+
14842+#endif /* GL_GLEXT_LEGACY */
14843+
14844+
14845+
14846+#if GL_ARB_shader_objects
14847+
14848+#ifndef GL_MESA_shader_debug
14849+#define GL_MESA_shader_debug 1
14850+
14851+#define GL_DEBUG_OBJECT_MESA 0x8759
14852+#define GL_DEBUG_PRINT_MESA 0x875A
14853+#define GL_DEBUG_ASSERT_MESA 0x875B
14854+
14855+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14856+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14857+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14858+ GLsizei *length, GLcharARB *debugLog);
14859+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14860+
14861+#endif /* GL_MESA_shader_debug */
14862+
14863+#endif /* GL_ARB_shader_objects */
14864+
14865+
14866+/*
14867+ * ???. GL_MESA_packed_depth_stencil
14868+ * XXX obsolete
14869+ */
14870+#ifndef GL_MESA_packed_depth_stencil
14871+#define GL_MESA_packed_depth_stencil 1
14872+
14873+#define GL_DEPTH_STENCIL_MESA 0x8750
14874+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14875+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14876+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14877+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14878+
14879+#endif /* GL_MESA_packed_depth_stencil */
14880+
14881+
14882+#ifndef GL_MESA_program_debug
14883+#define GL_MESA_program_debug 1
14884+
14885+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14886+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14887+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14888+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14889+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14890+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14891+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14892+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14893+
14894+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14895+
14896+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14897+
14898+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14899+
14900+#endif /* GL_MESA_program_debug */
14901+
14902+
14903+#ifndef GL_ATI_blend_equation_separate
14904+#define GL_ATI_blend_equation_separate 1
14905+
14906+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14907+
14908+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14909+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14910+
14911+#endif /* GL_ATI_blend_equation_separate */
14912+
14913+
14914+
14915+/**
14916+ ** NOTE!!!!! If you add new functions to this file, or update
14917+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14918+ ** in that file for details.
14919+ **/
14920+
14921+
14922+
14923+/**********************************************************************
14924+ * Begin system-specific stuff
14925+ */
14926+#if defined(PRAGMA_EXPORT_SUPPORTED)
14927+#pragma export off
14928+#endif
14929+
14930+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14931+#pragma import off
14932+#endif
14933+/*
14934+ * End system-specific stuff
14935+ **********************************************************************/
14936+
14937+
14938+#ifdef __cplusplus
14939+}
14940+#endif
14941+
14942+#endif /* __gl_h_ */
14943Index: qemu-0.12.4/target-i386/mesa_glext.h
14944===================================================================
14945--- /dev/null
14946+++ qemu-0.12.4/target-i386/mesa_glext.h
14947@@ -0,0 +1,7279 @@
14948+#ifndef __glext_h_
14949+#define __glext_h_
14950+
14951+#ifdef __cplusplus
14952+extern "C" {
14953+#endif
14954+
14955+/*
14956+** Copyright (c) 2007 The Khronos Group Inc.
14957+**
14958+** Permission is hereby granted, free of charge, to any person obtaining a
14959+** copy of this software and/or associated documentation files (the
14960+** "Materials"), to deal in the Materials without restriction, including
14961+** without limitation the rights to use, copy, modify, merge, publish,
14962+** distribute, sublicense, and/or sell copies of the Materials, and to
14963+** permit persons to whom the Materials are furnished to do so, subject to
14964+** the following conditions:
14965+**
14966+** The above copyright notice and this permission notice shall be included
14967+** in all copies or substantial portions of the Materials.
14968+**
14969+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14970+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14971+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14972+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14973+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14974+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14975+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14976+*/
14977+
14978+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14979+#define WIN32_LEAN_AND_MEAN 1
14980+#include <windows.h>
14981+#endif
14982+
14983+#ifndef APIENTRY
14984+#define APIENTRY
14985+#endif
14986+#ifndef APIENTRYP
14987+#define APIENTRYP APIENTRY *
14988+#endif
14989+#ifndef GLAPI
14990+#define GLAPI extern
14991+#endif
14992+
14993+/*************************************************************/
14994+
14995+/* Header file version number, required by OpenGL ABI for Linux */
14996+/* glext.h last updated 2007/02/12 */
14997+/* Current version at http://www.opengl.org/registry/ */
14998+#define GL_GLEXT_VERSION 39
14999+
15000+#ifndef GL_VERSION_1_2
15001+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
15002+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
15003+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
15004+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
15005+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
15006+#define GL_RESCALE_NORMAL 0x803A
15007+#define GL_TEXTURE_BINDING_3D 0x806A
15008+#define GL_PACK_SKIP_IMAGES 0x806B
15009+#define GL_PACK_IMAGE_HEIGHT 0x806C
15010+#define GL_UNPACK_SKIP_IMAGES 0x806D
15011+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
15012+#define GL_TEXTURE_3D 0x806F
15013+#define GL_PROXY_TEXTURE_3D 0x8070
15014+#define GL_TEXTURE_DEPTH 0x8071
15015+#define GL_TEXTURE_WRAP_R 0x8072
15016+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
15017+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
15018+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
15019+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
15020+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
15021+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
15022+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
15023+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
15024+#define GL_BGR 0x80E0
15025+#define GL_BGRA 0x80E1
15026+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
15027+#define GL_MAX_ELEMENTS_INDICES 0x80E9
15028+#define GL_CLAMP_TO_EDGE 0x812F
15029+#define GL_TEXTURE_MIN_LOD 0x813A
15030+#define GL_TEXTURE_MAX_LOD 0x813B
15031+#define GL_TEXTURE_BASE_LEVEL 0x813C
15032+#define GL_TEXTURE_MAX_LEVEL 0x813D
15033+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
15034+#define GL_SINGLE_COLOR 0x81F9
15035+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
15036+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
15037+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
15038+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
15039+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
15040+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
15041+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
15042+#endif
15043+
15044+#ifndef GL_ARB_imaging
15045+#define GL_CONSTANT_COLOR 0x8001
15046+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
15047+#define GL_CONSTANT_ALPHA 0x8003
15048+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
15049+#define GL_BLEND_COLOR 0x8005
15050+#define GL_FUNC_ADD 0x8006
15051+#define GL_MIN 0x8007
15052+#define GL_MAX 0x8008
15053+#define GL_BLEND_EQUATION 0x8009
15054+#define GL_FUNC_SUBTRACT 0x800A
15055+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
15056+#define GL_CONVOLUTION_1D 0x8010
15057+#define GL_CONVOLUTION_2D 0x8011
15058+#define GL_SEPARABLE_2D 0x8012
15059+#define GL_CONVOLUTION_BORDER_MODE 0x8013
15060+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
15061+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
15062+#define GL_REDUCE 0x8016
15063+#define GL_CONVOLUTION_FORMAT 0x8017
15064+#define GL_CONVOLUTION_WIDTH 0x8018
15065+#define GL_CONVOLUTION_HEIGHT 0x8019
15066+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
15067+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
15068+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
15069+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
15070+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
15071+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
15072+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
15073+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
15074+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
15075+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
15076+#define GL_HISTOGRAM 0x8024
15077+#define GL_PROXY_HISTOGRAM 0x8025
15078+#define GL_HISTOGRAM_WIDTH 0x8026
15079+#define GL_HISTOGRAM_FORMAT 0x8027
15080+#define GL_HISTOGRAM_RED_SIZE 0x8028
15081+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
15082+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
15083+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
15084+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
15085+#define GL_HISTOGRAM_SINK 0x802D
15086+#define GL_MINMAX 0x802E
15087+#define GL_MINMAX_FORMAT 0x802F
15088+#define GL_MINMAX_SINK 0x8030
15089+#define GL_TABLE_TOO_LARGE 0x8031
15090+#define GL_COLOR_MATRIX 0x80B1
15091+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
15092+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
15093+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
15094+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
15095+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
15096+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
15097+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
15098+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
15099+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
15100+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
15101+#define GL_COLOR_TABLE 0x80D0
15102+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
15103+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
15104+#define GL_PROXY_COLOR_TABLE 0x80D3
15105+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
15106+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
15107+#define GL_COLOR_TABLE_SCALE 0x80D6
15108+#define GL_COLOR_TABLE_BIAS 0x80D7
15109+#define GL_COLOR_TABLE_FORMAT 0x80D8
15110+#define GL_COLOR_TABLE_WIDTH 0x80D9
15111+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
15112+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
15113+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
15114+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
15115+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
15116+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15117+#define GL_CONSTANT_BORDER 0x8151
15118+#define GL_REPLICATE_BORDER 0x8153
15119+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15120+#endif
15121+
15122+#ifndef GL_VERSION_1_3
15123+#define GL_TEXTURE0 0x84C0
15124+#define GL_TEXTURE1 0x84C1
15125+#define GL_TEXTURE2 0x84C2
15126+#define GL_TEXTURE3 0x84C3
15127+#define GL_TEXTURE4 0x84C4
15128+#define GL_TEXTURE5 0x84C5
15129+#define GL_TEXTURE6 0x84C6
15130+#define GL_TEXTURE7 0x84C7
15131+#define GL_TEXTURE8 0x84C8
15132+#define GL_TEXTURE9 0x84C9
15133+#define GL_TEXTURE10 0x84CA
15134+#define GL_TEXTURE11 0x84CB
15135+#define GL_TEXTURE12 0x84CC
15136+#define GL_TEXTURE13 0x84CD
15137+#define GL_TEXTURE14 0x84CE
15138+#define GL_TEXTURE15 0x84CF
15139+#define GL_TEXTURE16 0x84D0
15140+#define GL_TEXTURE17 0x84D1
15141+#define GL_TEXTURE18 0x84D2
15142+#define GL_TEXTURE19 0x84D3
15143+#define GL_TEXTURE20 0x84D4
15144+#define GL_TEXTURE21 0x84D5
15145+#define GL_TEXTURE22 0x84D6
15146+#define GL_TEXTURE23 0x84D7
15147+#define GL_TEXTURE24 0x84D8
15148+#define GL_TEXTURE25 0x84D9
15149+#define GL_TEXTURE26 0x84DA
15150+#define GL_TEXTURE27 0x84DB
15151+#define GL_TEXTURE28 0x84DC
15152+#define GL_TEXTURE29 0x84DD
15153+#define GL_TEXTURE30 0x84DE
15154+#define GL_TEXTURE31 0x84DF
15155+#define GL_ACTIVE_TEXTURE 0x84E0
15156+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15157+#define GL_MAX_TEXTURE_UNITS 0x84E2
15158+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15159+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15160+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15161+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15162+#define GL_MULTISAMPLE 0x809D
15163+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15164+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15165+#define GL_SAMPLE_COVERAGE 0x80A0
15166+#define GL_SAMPLE_BUFFERS 0x80A8
15167+#define GL_SAMPLES 0x80A9
15168+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15169+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15170+#define GL_MULTISAMPLE_BIT 0x20000000
15171+#define GL_NORMAL_MAP 0x8511
15172+#define GL_REFLECTION_MAP 0x8512
15173+#define GL_TEXTURE_CUBE_MAP 0x8513
15174+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15175+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15176+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15177+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15178+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15179+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15180+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15181+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15182+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15183+#define GL_COMPRESSED_ALPHA 0x84E9
15184+#define GL_COMPRESSED_LUMINANCE 0x84EA
15185+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15186+#define GL_COMPRESSED_INTENSITY 0x84EC
15187+#define GL_COMPRESSED_RGB 0x84ED
15188+#define GL_COMPRESSED_RGBA 0x84EE
15189+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15190+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15191+#define GL_TEXTURE_COMPRESSED 0x86A1
15192+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15193+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15194+#define GL_CLAMP_TO_BORDER 0x812D
15195+#define GL_COMBINE 0x8570
15196+#define GL_COMBINE_RGB 0x8571
15197+#define GL_COMBINE_ALPHA 0x8572
15198+#define GL_SOURCE0_RGB 0x8580
15199+#define GL_SOURCE1_RGB 0x8581
15200+#define GL_SOURCE2_RGB 0x8582
15201+#define GL_SOURCE0_ALPHA 0x8588
15202+#define GL_SOURCE1_ALPHA 0x8589
15203+#define GL_SOURCE2_ALPHA 0x858A
15204+#define GL_OPERAND0_RGB 0x8590
15205+#define GL_OPERAND1_RGB 0x8591
15206+#define GL_OPERAND2_RGB 0x8592
15207+#define GL_OPERAND0_ALPHA 0x8598
15208+#define GL_OPERAND1_ALPHA 0x8599
15209+#define GL_OPERAND2_ALPHA 0x859A
15210+#define GL_RGB_SCALE 0x8573
15211+#define GL_ADD_SIGNED 0x8574
15212+#define GL_INTERPOLATE 0x8575
15213+#define GL_SUBTRACT 0x84E7
15214+#define GL_CONSTANT 0x8576
15215+#define GL_PRIMARY_COLOR 0x8577
15216+#define GL_PREVIOUS 0x8578
15217+#define GL_DOT3_RGB 0x86AE
15218+#define GL_DOT3_RGBA 0x86AF
15219+#endif
15220+
15221+#ifndef GL_VERSION_1_4
15222+#define GL_BLEND_DST_RGB 0x80C8
15223+#define GL_BLEND_SRC_RGB 0x80C9
15224+#define GL_BLEND_DST_ALPHA 0x80CA
15225+#define GL_BLEND_SRC_ALPHA 0x80CB
15226+#define GL_POINT_SIZE_MIN 0x8126
15227+#define GL_POINT_SIZE_MAX 0x8127
15228+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15229+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15230+#define GL_GENERATE_MIPMAP 0x8191
15231+#define GL_GENERATE_MIPMAP_HINT 0x8192
15232+#define GL_DEPTH_COMPONENT16 0x81A5
15233+#define GL_DEPTH_COMPONENT24 0x81A6
15234+#define GL_DEPTH_COMPONENT32 0x81A7
15235+#define GL_MIRRORED_REPEAT 0x8370
15236+#define GL_FOG_COORDINATE_SOURCE 0x8450
15237+#define GL_FOG_COORDINATE 0x8451
15238+#define GL_FRAGMENT_DEPTH 0x8452
15239+#define GL_CURRENT_FOG_COORDINATE 0x8453
15240+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15241+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15242+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15243+#define GL_FOG_COORDINATE_ARRAY 0x8457
15244+#define GL_COLOR_SUM 0x8458
15245+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15246+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15247+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15248+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15249+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15250+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15251+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15252+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15253+#define GL_TEXTURE_LOD_BIAS 0x8501
15254+#define GL_INCR_WRAP 0x8507
15255+#define GL_DECR_WRAP 0x8508
15256+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15257+#define GL_DEPTH_TEXTURE_MODE 0x884B
15258+#define GL_TEXTURE_COMPARE_MODE 0x884C
15259+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15260+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15261+#endif
15262+
15263+#ifndef GL_VERSION_1_5
15264+#define GL_BUFFER_SIZE 0x8764
15265+#define GL_BUFFER_USAGE 0x8765
15266+#define GL_QUERY_COUNTER_BITS 0x8864
15267+#define GL_CURRENT_QUERY 0x8865
15268+#define GL_QUERY_RESULT 0x8866
15269+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15270+#define GL_ARRAY_BUFFER 0x8892
15271+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15272+#define GL_ARRAY_BUFFER_BINDING 0x8894
15273+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15274+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15275+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15276+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15277+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15278+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15279+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15280+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15281+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15282+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15283+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15284+#define GL_READ_ONLY 0x88B8
15285+#define GL_WRITE_ONLY 0x88B9
15286+#define GL_READ_WRITE 0x88BA
15287+#define GL_BUFFER_ACCESS 0x88BB
15288+#define GL_BUFFER_MAPPED 0x88BC
15289+#define GL_BUFFER_MAP_POINTER 0x88BD
15290+#define GL_STREAM_DRAW 0x88E0
15291+#define GL_STREAM_READ 0x88E1
15292+#define GL_STREAM_COPY 0x88E2
15293+#define GL_STATIC_DRAW 0x88E4
15294+#define GL_STATIC_READ 0x88E5
15295+#define GL_STATIC_COPY 0x88E6
15296+#define GL_DYNAMIC_DRAW 0x88E8
15297+#define GL_DYNAMIC_READ 0x88E9
15298+#define GL_DYNAMIC_COPY 0x88EA
15299+#define GL_SAMPLES_PASSED 0x8914
15300+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15301+#define GL_FOG_COORD GL_FOG_COORDINATE
15302+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15303+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15304+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15305+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15306+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15307+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15308+#define GL_SRC0_RGB GL_SOURCE0_RGB
15309+#define GL_SRC1_RGB GL_SOURCE1_RGB
15310+#define GL_SRC2_RGB GL_SOURCE2_RGB
15311+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15312+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15313+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15314+#endif
15315+
15316+#ifndef GL_VERSION_2_0
15317+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15318+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15319+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15320+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15321+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15322+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15323+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15324+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15325+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15326+#define GL_STENCIL_BACK_FUNC 0x8800
15327+#define GL_STENCIL_BACK_FAIL 0x8801
15328+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15329+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15330+#define GL_MAX_DRAW_BUFFERS 0x8824
15331+#define GL_DRAW_BUFFER0 0x8825
15332+#define GL_DRAW_BUFFER1 0x8826
15333+#define GL_DRAW_BUFFER2 0x8827
15334+#define GL_DRAW_BUFFER3 0x8828
15335+#define GL_DRAW_BUFFER4 0x8829
15336+#define GL_DRAW_BUFFER5 0x882A
15337+#define GL_DRAW_BUFFER6 0x882B
15338+#define GL_DRAW_BUFFER7 0x882C
15339+#define GL_DRAW_BUFFER8 0x882D
15340+#define GL_DRAW_BUFFER9 0x882E
15341+#define GL_DRAW_BUFFER10 0x882F
15342+#define GL_DRAW_BUFFER11 0x8830
15343+#define GL_DRAW_BUFFER12 0x8831
15344+#define GL_DRAW_BUFFER13 0x8832
15345+#define GL_DRAW_BUFFER14 0x8833
15346+#define GL_DRAW_BUFFER15 0x8834
15347+#define GL_BLEND_EQUATION_ALPHA 0x883D
15348+#define GL_POINT_SPRITE 0x8861
15349+#define GL_COORD_REPLACE 0x8862
15350+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15351+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15352+#define GL_MAX_TEXTURE_COORDS 0x8871
15353+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15354+#define GL_FRAGMENT_SHADER 0x8B30
15355+#define GL_VERTEX_SHADER 0x8B31
15356+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15357+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15358+#define GL_MAX_VARYING_FLOATS 0x8B4B
15359+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15360+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15361+#define GL_SHADER_TYPE 0x8B4F
15362+#define GL_FLOAT_VEC2 0x8B50
15363+#define GL_FLOAT_VEC3 0x8B51
15364+#define GL_FLOAT_VEC4 0x8B52
15365+#define GL_INT_VEC2 0x8B53
15366+#define GL_INT_VEC3 0x8B54
15367+#define GL_INT_VEC4 0x8B55
15368+#define GL_BOOL 0x8B56
15369+#define GL_BOOL_VEC2 0x8B57
15370+#define GL_BOOL_VEC3 0x8B58
15371+#define GL_BOOL_VEC4 0x8B59
15372+#define GL_FLOAT_MAT2 0x8B5A
15373+#define GL_FLOAT_MAT3 0x8B5B
15374+#define GL_FLOAT_MAT4 0x8B5C
15375+#define GL_SAMPLER_1D 0x8B5D
15376+#define GL_SAMPLER_2D 0x8B5E
15377+#define GL_SAMPLER_3D 0x8B5F
15378+#define GL_SAMPLER_CUBE 0x8B60
15379+#define GL_SAMPLER_1D_SHADOW 0x8B61
15380+#define GL_SAMPLER_2D_SHADOW 0x8B62
15381+#define GL_DELETE_STATUS 0x8B80
15382+#define GL_COMPILE_STATUS 0x8B81
15383+#define GL_LINK_STATUS 0x8B82
15384+#define GL_VALIDATE_STATUS 0x8B83
15385+#define GL_INFO_LOG_LENGTH 0x8B84
15386+#define GL_ATTACHED_SHADERS 0x8B85
15387+#define GL_ACTIVE_UNIFORMS 0x8B86
15388+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15389+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15390+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15391+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15392+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15393+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15394+#define GL_CURRENT_PROGRAM 0x8B8D
15395+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15396+#define GL_LOWER_LEFT 0x8CA1
15397+#define GL_UPPER_LEFT 0x8CA2
15398+#define GL_STENCIL_BACK_REF 0x8CA3
15399+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15400+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15401+#endif
15402+
15403+#ifndef GL_VERSION_2_1
15404+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15405+#define GL_PIXEL_PACK_BUFFER 0x88EB
15406+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15407+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15408+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15409+#define GL_FLOAT_MAT2x3 0x8B65
15410+#define GL_FLOAT_MAT2x4 0x8B66
15411+#define GL_FLOAT_MAT3x2 0x8B67
15412+#define GL_FLOAT_MAT3x4 0x8B68
15413+#define GL_FLOAT_MAT4x2 0x8B69
15414+#define GL_FLOAT_MAT4x3 0x8B6A
15415+#define GL_SRGB 0x8C40
15416+#define GL_SRGB8 0x8C41
15417+#define GL_SRGB_ALPHA 0x8C42
15418+#define GL_SRGB8_ALPHA8 0x8C43
15419+#define GL_SLUMINANCE_ALPHA 0x8C44
15420+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15421+#define GL_SLUMINANCE 0x8C46
15422+#define GL_SLUMINANCE8 0x8C47
15423+#define GL_COMPRESSED_SRGB 0x8C48
15424+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15425+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15426+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15427+#endif
15428+
15429+#ifndef GL_ARB_multitexture
15430+#define GL_TEXTURE0_ARB 0x84C0
15431+#define GL_TEXTURE1_ARB 0x84C1
15432+#define GL_TEXTURE2_ARB 0x84C2
15433+#define GL_TEXTURE3_ARB 0x84C3
15434+#define GL_TEXTURE4_ARB 0x84C4
15435+#define GL_TEXTURE5_ARB 0x84C5
15436+#define GL_TEXTURE6_ARB 0x84C6
15437+#define GL_TEXTURE7_ARB 0x84C7
15438+#define GL_TEXTURE8_ARB 0x84C8
15439+#define GL_TEXTURE9_ARB 0x84C9
15440+#define GL_TEXTURE10_ARB 0x84CA
15441+#define GL_TEXTURE11_ARB 0x84CB
15442+#define GL_TEXTURE12_ARB 0x84CC
15443+#define GL_TEXTURE13_ARB 0x84CD
15444+#define GL_TEXTURE14_ARB 0x84CE
15445+#define GL_TEXTURE15_ARB 0x84CF
15446+#define GL_TEXTURE16_ARB 0x84D0
15447+#define GL_TEXTURE17_ARB 0x84D1
15448+#define GL_TEXTURE18_ARB 0x84D2
15449+#define GL_TEXTURE19_ARB 0x84D3
15450+#define GL_TEXTURE20_ARB 0x84D4
15451+#define GL_TEXTURE21_ARB 0x84D5
15452+#define GL_TEXTURE22_ARB 0x84D6
15453+#define GL_TEXTURE23_ARB 0x84D7
15454+#define GL_TEXTURE24_ARB 0x84D8
15455+#define GL_TEXTURE25_ARB 0x84D9
15456+#define GL_TEXTURE26_ARB 0x84DA
15457+#define GL_TEXTURE27_ARB 0x84DB
15458+#define GL_TEXTURE28_ARB 0x84DC
15459+#define GL_TEXTURE29_ARB 0x84DD
15460+#define GL_TEXTURE30_ARB 0x84DE
15461+#define GL_TEXTURE31_ARB 0x84DF
15462+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15463+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15464+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15465+#endif
15466+
15467+#ifndef GL_ARB_transpose_matrix
15468+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15469+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15470+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15471+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15472+#endif
15473+
15474+#ifndef GL_ARB_multisample
15475+#define GL_MULTISAMPLE_ARB 0x809D
15476+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15477+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15478+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15479+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15480+#define GL_SAMPLES_ARB 0x80A9
15481+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15482+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15483+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15484+#endif
15485+
15486+#ifndef GL_ARB_texture_env_add
15487+#endif
15488+
15489+#ifndef GL_ARB_texture_cube_map
15490+#define GL_NORMAL_MAP_ARB 0x8511
15491+#define GL_REFLECTION_MAP_ARB 0x8512
15492+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15493+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15494+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15495+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15496+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15497+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15498+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15499+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15500+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15501+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15502+#endif
15503+
15504+#ifndef GL_ARB_texture_compression
15505+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15506+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15507+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15508+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15509+#define GL_COMPRESSED_RGB_ARB 0x84ED
15510+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15511+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15512+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15513+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15514+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15515+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15516+#endif
15517+
15518+#ifndef GL_ARB_texture_border_clamp
15519+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15520+#endif
15521+
15522+#ifndef GL_ARB_point_parameters
15523+#define GL_POINT_SIZE_MIN_ARB 0x8126
15524+#define GL_POINT_SIZE_MAX_ARB 0x8127
15525+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15526+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15527+#endif
15528+
15529+#ifndef GL_ARB_vertex_blend
15530+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15531+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15532+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15533+#define GL_VERTEX_BLEND_ARB 0x86A7
15534+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15535+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15536+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15537+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15538+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15539+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15540+#define GL_MODELVIEW0_ARB 0x1700
15541+#define GL_MODELVIEW1_ARB 0x850A
15542+#define GL_MODELVIEW2_ARB 0x8722
15543+#define GL_MODELVIEW3_ARB 0x8723
15544+#define GL_MODELVIEW4_ARB 0x8724
15545+#define GL_MODELVIEW5_ARB 0x8725
15546+#define GL_MODELVIEW6_ARB 0x8726
15547+#define GL_MODELVIEW7_ARB 0x8727
15548+#define GL_MODELVIEW8_ARB 0x8728
15549+#define GL_MODELVIEW9_ARB 0x8729
15550+#define GL_MODELVIEW10_ARB 0x872A
15551+#define GL_MODELVIEW11_ARB 0x872B
15552+#define GL_MODELVIEW12_ARB 0x872C
15553+#define GL_MODELVIEW13_ARB 0x872D
15554+#define GL_MODELVIEW14_ARB 0x872E
15555+#define GL_MODELVIEW15_ARB 0x872F
15556+#define GL_MODELVIEW16_ARB 0x8730
15557+#define GL_MODELVIEW17_ARB 0x8731
15558+#define GL_MODELVIEW18_ARB 0x8732
15559+#define GL_MODELVIEW19_ARB 0x8733
15560+#define GL_MODELVIEW20_ARB 0x8734
15561+#define GL_MODELVIEW21_ARB 0x8735
15562+#define GL_MODELVIEW22_ARB 0x8736
15563+#define GL_MODELVIEW23_ARB 0x8737
15564+#define GL_MODELVIEW24_ARB 0x8738
15565+#define GL_MODELVIEW25_ARB 0x8739
15566+#define GL_MODELVIEW26_ARB 0x873A
15567+#define GL_MODELVIEW27_ARB 0x873B
15568+#define GL_MODELVIEW28_ARB 0x873C
15569+#define GL_MODELVIEW29_ARB 0x873D
15570+#define GL_MODELVIEW30_ARB 0x873E
15571+#define GL_MODELVIEW31_ARB 0x873F
15572+#endif
15573+
15574+#ifndef GL_ARB_matrix_palette
15575+#define GL_MATRIX_PALETTE_ARB 0x8840
15576+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15577+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15578+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15579+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15580+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15581+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15582+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15583+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15584+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15585+#endif
15586+
15587+#ifndef GL_ARB_texture_env_combine
15588+#define GL_COMBINE_ARB 0x8570
15589+#define GL_COMBINE_RGB_ARB 0x8571
15590+#define GL_COMBINE_ALPHA_ARB 0x8572
15591+#define GL_SOURCE0_RGB_ARB 0x8580
15592+#define GL_SOURCE1_RGB_ARB 0x8581
15593+#define GL_SOURCE2_RGB_ARB 0x8582
15594+#define GL_SOURCE0_ALPHA_ARB 0x8588
15595+#define GL_SOURCE1_ALPHA_ARB 0x8589
15596+#define GL_SOURCE2_ALPHA_ARB 0x858A
15597+#define GL_OPERAND0_RGB_ARB 0x8590
15598+#define GL_OPERAND1_RGB_ARB 0x8591
15599+#define GL_OPERAND2_RGB_ARB 0x8592
15600+#define GL_OPERAND0_ALPHA_ARB 0x8598
15601+#define GL_OPERAND1_ALPHA_ARB 0x8599
15602+#define GL_OPERAND2_ALPHA_ARB 0x859A
15603+#define GL_RGB_SCALE_ARB 0x8573
15604+#define GL_ADD_SIGNED_ARB 0x8574
15605+#define GL_INTERPOLATE_ARB 0x8575
15606+#define GL_SUBTRACT_ARB 0x84E7
15607+#define GL_CONSTANT_ARB 0x8576
15608+#define GL_PRIMARY_COLOR_ARB 0x8577
15609+#define GL_PREVIOUS_ARB 0x8578
15610+#endif
15611+
15612+#ifndef GL_ARB_texture_env_crossbar
15613+#endif
15614+
15615+#ifndef GL_ARB_texture_env_dot3
15616+#define GL_DOT3_RGB_ARB 0x86AE
15617+#define GL_DOT3_RGBA_ARB 0x86AF
15618+#endif
15619+
15620+#ifndef GL_ARB_texture_mirrored_repeat
15621+#define GL_MIRRORED_REPEAT_ARB 0x8370
15622+#endif
15623+
15624+#ifndef GL_ARB_depth_texture
15625+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15626+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15627+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15628+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15629+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15630+#endif
15631+
15632+#ifndef GL_ARB_shadow
15633+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15634+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15635+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15636+#endif
15637+
15638+#ifndef GL_ARB_shadow_ambient
15639+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15640+#endif
15641+
15642+#ifndef GL_ARB_window_pos
15643+#endif
15644+
15645+#ifndef GL_ARB_vertex_program
15646+#define GL_COLOR_SUM_ARB 0x8458
15647+#define GL_VERTEX_PROGRAM_ARB 0x8620
15648+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15649+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15650+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15651+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15652+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15653+#define GL_PROGRAM_LENGTH_ARB 0x8627
15654+#define GL_PROGRAM_STRING_ARB 0x8628
15655+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15656+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15657+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15658+#define GL_CURRENT_MATRIX_ARB 0x8641
15659+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15660+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15661+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15662+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15663+#define GL_PROGRAM_BINDING_ARB 0x8677
15664+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15665+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15666+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15667+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15668+#define GL_PROGRAM_FORMAT_ARB 0x8876
15669+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15670+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15671+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15672+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15673+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15674+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15675+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15676+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15677+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15678+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15679+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15680+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15681+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15682+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15683+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15684+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15685+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15686+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15687+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15688+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15689+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15690+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15691+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15692+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15693+#define GL_MATRIX0_ARB 0x88C0
15694+#define GL_MATRIX1_ARB 0x88C1
15695+#define GL_MATRIX2_ARB 0x88C2
15696+#define GL_MATRIX3_ARB 0x88C3
15697+#define GL_MATRIX4_ARB 0x88C4
15698+#define GL_MATRIX5_ARB 0x88C5
15699+#define GL_MATRIX6_ARB 0x88C6
15700+#define GL_MATRIX7_ARB 0x88C7
15701+#define GL_MATRIX8_ARB 0x88C8
15702+#define GL_MATRIX9_ARB 0x88C9
15703+#define GL_MATRIX10_ARB 0x88CA
15704+#define GL_MATRIX11_ARB 0x88CB
15705+#define GL_MATRIX12_ARB 0x88CC
15706+#define GL_MATRIX13_ARB 0x88CD
15707+#define GL_MATRIX14_ARB 0x88CE
15708+#define GL_MATRIX15_ARB 0x88CF
15709+#define GL_MATRIX16_ARB 0x88D0
15710+#define GL_MATRIX17_ARB 0x88D1
15711+#define GL_MATRIX18_ARB 0x88D2
15712+#define GL_MATRIX19_ARB 0x88D3
15713+#define GL_MATRIX20_ARB 0x88D4
15714+#define GL_MATRIX21_ARB 0x88D5
15715+#define GL_MATRIX22_ARB 0x88D6
15716+#define GL_MATRIX23_ARB 0x88D7
15717+#define GL_MATRIX24_ARB 0x88D8
15718+#define GL_MATRIX25_ARB 0x88D9
15719+#define GL_MATRIX26_ARB 0x88DA
15720+#define GL_MATRIX27_ARB 0x88DB
15721+#define GL_MATRIX28_ARB 0x88DC
15722+#define GL_MATRIX29_ARB 0x88DD
15723+#define GL_MATRIX30_ARB 0x88DE
15724+#define GL_MATRIX31_ARB 0x88DF
15725+#endif
15726+
15727+#ifndef GL_ARB_fragment_program
15728+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15729+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15730+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15731+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15732+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15733+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15734+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15735+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15736+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15737+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15738+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15739+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15740+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15741+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15742+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15743+#endif
15744+
15745+#ifndef GL_ARB_vertex_buffer_object
15746+#define GL_BUFFER_SIZE_ARB 0x8764
15747+#define GL_BUFFER_USAGE_ARB 0x8765
15748+#define GL_ARRAY_BUFFER_ARB 0x8892
15749+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15750+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15751+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15752+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15753+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15754+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15755+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15756+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15757+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15758+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15759+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15760+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15761+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15762+#define GL_READ_ONLY_ARB 0x88B8
15763+#define GL_WRITE_ONLY_ARB 0x88B9
15764+#define GL_READ_WRITE_ARB 0x88BA
15765+#define GL_BUFFER_ACCESS_ARB 0x88BB
15766+#define GL_BUFFER_MAPPED_ARB 0x88BC
15767+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15768+#define GL_STREAM_DRAW_ARB 0x88E0
15769+#define GL_STREAM_READ_ARB 0x88E1
15770+#define GL_STREAM_COPY_ARB 0x88E2
15771+#define GL_STATIC_DRAW_ARB 0x88E4
15772+#define GL_STATIC_READ_ARB 0x88E5
15773+#define GL_STATIC_COPY_ARB 0x88E6
15774+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15775+#define GL_DYNAMIC_READ_ARB 0x88E9
15776+#define GL_DYNAMIC_COPY_ARB 0x88EA
15777+#endif
15778+
15779+#ifndef GL_ARB_occlusion_query
15780+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15781+#define GL_CURRENT_QUERY_ARB 0x8865
15782+#define GL_QUERY_RESULT_ARB 0x8866
15783+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15784+#define GL_SAMPLES_PASSED_ARB 0x8914
15785+#endif
15786+
15787+#ifndef GL_ARB_shader_objects
15788+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15789+#define GL_SHADER_OBJECT_ARB 0x8B48
15790+#define GL_OBJECT_TYPE_ARB 0x8B4E
15791+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15792+#define GL_FLOAT_VEC2_ARB 0x8B50
15793+#define GL_FLOAT_VEC3_ARB 0x8B51
15794+#define GL_FLOAT_VEC4_ARB 0x8B52
15795+#define GL_INT_VEC2_ARB 0x8B53
15796+#define GL_INT_VEC3_ARB 0x8B54
15797+#define GL_INT_VEC4_ARB 0x8B55
15798+#define GL_BOOL_ARB 0x8B56
15799+#define GL_BOOL_VEC2_ARB 0x8B57
15800+#define GL_BOOL_VEC3_ARB 0x8B58
15801+#define GL_BOOL_VEC4_ARB 0x8B59
15802+#define GL_FLOAT_MAT2_ARB 0x8B5A
15803+#define GL_FLOAT_MAT3_ARB 0x8B5B
15804+#define GL_FLOAT_MAT4_ARB 0x8B5C
15805+#define GL_SAMPLER_1D_ARB 0x8B5D
15806+#define GL_SAMPLER_2D_ARB 0x8B5E
15807+#define GL_SAMPLER_3D_ARB 0x8B5F
15808+#define GL_SAMPLER_CUBE_ARB 0x8B60
15809+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15810+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15811+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15812+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15813+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15814+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15815+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15816+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15817+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15818+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15819+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15820+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15821+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15822+#endif
15823+
15824+#ifndef GL_ARB_vertex_shader
15825+#define GL_VERTEX_SHADER_ARB 0x8B31
15826+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15827+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15828+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15829+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15830+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15831+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15832+#endif
15833+
15834+#ifndef GL_ARB_fragment_shader
15835+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15836+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15837+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15838+#endif
15839+
15840+#ifndef GL_ARB_shading_language_100
15841+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15842+#endif
15843+
15844+#ifndef GL_ARB_texture_non_power_of_two
15845+#endif
15846+
15847+#ifndef GL_ARB_point_sprite
15848+#define GL_POINT_SPRITE_ARB 0x8861
15849+#define GL_COORD_REPLACE_ARB 0x8862
15850+#endif
15851+
15852+#ifndef GL_ARB_fragment_program_shadow
15853+#endif
15854+
15855+#ifndef GL_ARB_draw_buffers
15856+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15857+#define GL_DRAW_BUFFER0_ARB 0x8825
15858+#define GL_DRAW_BUFFER1_ARB 0x8826
15859+#define GL_DRAW_BUFFER2_ARB 0x8827
15860+#define GL_DRAW_BUFFER3_ARB 0x8828
15861+#define GL_DRAW_BUFFER4_ARB 0x8829
15862+#define GL_DRAW_BUFFER5_ARB 0x882A
15863+#define GL_DRAW_BUFFER6_ARB 0x882B
15864+#define GL_DRAW_BUFFER7_ARB 0x882C
15865+#define GL_DRAW_BUFFER8_ARB 0x882D
15866+#define GL_DRAW_BUFFER9_ARB 0x882E
15867+#define GL_DRAW_BUFFER10_ARB 0x882F
15868+#define GL_DRAW_BUFFER11_ARB 0x8830
15869+#define GL_DRAW_BUFFER12_ARB 0x8831
15870+#define GL_DRAW_BUFFER13_ARB 0x8832
15871+#define GL_DRAW_BUFFER14_ARB 0x8833
15872+#define GL_DRAW_BUFFER15_ARB 0x8834
15873+#endif
15874+
15875+#ifndef GL_ARB_texture_rectangle
15876+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15877+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15878+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15879+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15880+#endif
15881+
15882+#ifndef GL_ARB_color_buffer_float
15883+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15884+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15885+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15886+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15887+#define GL_FIXED_ONLY_ARB 0x891D
15888+#endif
15889+
15890+#ifndef GL_ARB_half_float_pixel
15891+#define GL_HALF_FLOAT_ARB 0x140B
15892+#endif
15893+
15894+#ifndef GL_ARB_texture_float
15895+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15896+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15897+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15898+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15899+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15900+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15901+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15902+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15903+#define GL_RGBA32F_ARB 0x8814
15904+#define GL_RGB32F_ARB 0x8815
15905+#define GL_ALPHA32F_ARB 0x8816
15906+#define GL_INTENSITY32F_ARB 0x8817
15907+#define GL_LUMINANCE32F_ARB 0x8818
15908+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15909+#define GL_RGBA16F_ARB 0x881A
15910+#define GL_RGB16F_ARB 0x881B
15911+#define GL_ALPHA16F_ARB 0x881C
15912+#define GL_INTENSITY16F_ARB 0x881D
15913+#define GL_LUMINANCE16F_ARB 0x881E
15914+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15915+#endif
15916+
15917+#ifndef GL_ARB_pixel_buffer_object
15918+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15919+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15920+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15921+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15922+#endif
15923+
15924+#ifndef GL_EXT_abgr
15925+#define GL_ABGR_EXT 0x8000
15926+#endif
15927+
15928+#ifndef GL_EXT_blend_color
15929+#define GL_CONSTANT_COLOR_EXT 0x8001
15930+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15931+#define GL_CONSTANT_ALPHA_EXT 0x8003
15932+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15933+#define GL_BLEND_COLOR_EXT 0x8005
15934+#endif
15935+
15936+#ifndef GL_EXT_polygon_offset
15937+#define GL_POLYGON_OFFSET_EXT 0x8037
15938+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15939+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15940+#endif
15941+
15942+#ifndef GL_EXT_texture
15943+#define GL_ALPHA4_EXT 0x803B
15944+#define GL_ALPHA8_EXT 0x803C
15945+#define GL_ALPHA12_EXT 0x803D
15946+#define GL_ALPHA16_EXT 0x803E
15947+#define GL_LUMINANCE4_EXT 0x803F
15948+#define GL_LUMINANCE8_EXT 0x8040
15949+#define GL_LUMINANCE12_EXT 0x8041
15950+#define GL_LUMINANCE16_EXT 0x8042
15951+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15952+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15953+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15954+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15955+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15956+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15957+#define GL_INTENSITY_EXT 0x8049
15958+#define GL_INTENSITY4_EXT 0x804A
15959+#define GL_INTENSITY8_EXT 0x804B
15960+#define GL_INTENSITY12_EXT 0x804C
15961+#define GL_INTENSITY16_EXT 0x804D
15962+#define GL_RGB2_EXT 0x804E
15963+#define GL_RGB4_EXT 0x804F
15964+#define GL_RGB5_EXT 0x8050
15965+#define GL_RGB8_EXT 0x8051
15966+#define GL_RGB10_EXT 0x8052
15967+#define GL_RGB12_EXT 0x8053
15968+#define GL_RGB16_EXT 0x8054
15969+#define GL_RGBA2_EXT 0x8055
15970+#define GL_RGBA4_EXT 0x8056
15971+#define GL_RGB5_A1_EXT 0x8057
15972+#define GL_RGBA8_EXT 0x8058
15973+#define GL_RGB10_A2_EXT 0x8059
15974+#define GL_RGBA12_EXT 0x805A
15975+#define GL_RGBA16_EXT 0x805B
15976+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15977+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15978+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15979+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15980+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15981+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15982+#define GL_REPLACE_EXT 0x8062
15983+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15984+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15985+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15986+#endif
15987+
15988+#ifndef GL_EXT_texture3D
15989+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15990+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15991+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15992+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15993+#define GL_TEXTURE_3D_EXT 0x806F
15994+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15995+#define GL_TEXTURE_DEPTH_EXT 0x8071
15996+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15997+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15998+#endif
15999+
16000+#ifndef GL_SGIS_texture_filter4
16001+#define GL_FILTER4_SGIS 0x8146
16002+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
16003+#endif
16004+
16005+#ifndef GL_EXT_subtexture
16006+#endif
16007+
16008+#ifndef GL_EXT_copy_texture
16009+#endif
16010+
16011+#ifndef GL_EXT_histogram
16012+#define GL_HISTOGRAM_EXT 0x8024
16013+#define GL_PROXY_HISTOGRAM_EXT 0x8025
16014+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
16015+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
16016+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
16017+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
16018+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
16019+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
16020+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
16021+#define GL_HISTOGRAM_SINK_EXT 0x802D
16022+#define GL_MINMAX_EXT 0x802E
16023+#define GL_MINMAX_FORMAT_EXT 0x802F
16024+#define GL_MINMAX_SINK_EXT 0x8030
16025+#define GL_TABLE_TOO_LARGE_EXT 0x8031
16026+#endif
16027+
16028+#ifndef GL_EXT_convolution
16029+#define GL_CONVOLUTION_1D_EXT 0x8010
16030+#define GL_CONVOLUTION_2D_EXT 0x8011
16031+#define GL_SEPARABLE_2D_EXT 0x8012
16032+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
16033+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
16034+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
16035+#define GL_REDUCE_EXT 0x8016
16036+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
16037+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
16038+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
16039+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
16040+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
16041+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
16042+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
16043+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
16044+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
16045+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
16046+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
16047+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
16048+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
16049+#endif
16050+
16051+#ifndef GL_SGI_color_matrix
16052+#define GL_COLOR_MATRIX_SGI 0x80B1
16053+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
16054+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
16055+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
16056+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
16057+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
16058+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
16059+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
16060+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
16061+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
16062+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
16063+#endif
16064+
16065+#ifndef GL_SGI_color_table
16066+#define GL_COLOR_TABLE_SGI 0x80D0
16067+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
16068+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
16069+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
16070+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
16071+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
16072+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
16073+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
16074+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
16075+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
16076+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
16077+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
16078+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
16079+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
16080+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
16081+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
16082+#endif
16083+
16084+#ifndef GL_SGIS_pixel_texture
16085+#define GL_PIXEL_TEXTURE_SGIS 0x8353
16086+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
16087+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
16088+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
16089+#endif
16090+
16091+#ifndef GL_SGIX_pixel_texture
16092+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
16093+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
16094+#endif
16095+
16096+#ifndef GL_SGIS_texture4D
16097+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
16098+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
16099+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
16100+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
16101+#define GL_TEXTURE_4D_SGIS 0x8134
16102+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
16103+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
16104+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
16105+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
16106+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
16107+#endif
16108+
16109+#ifndef GL_SGI_texture_color_table
16110+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
16111+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
16112+#endif
16113+
16114+#ifndef GL_EXT_cmyka
16115+#define GL_CMYK_EXT 0x800C
16116+#define GL_CMYKA_EXT 0x800D
16117+#define GL_PACK_CMYK_HINT_EXT 0x800E
16118+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16119+#endif
16120+
16121+#ifndef GL_EXT_texture_object
16122+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16123+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16124+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16125+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16126+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16127+#endif
16128+
16129+#ifndef GL_SGIS_detail_texture
16130+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16131+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16132+#define GL_LINEAR_DETAIL_SGIS 0x8097
16133+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16134+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16135+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16136+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16137+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16138+#endif
16139+
16140+#ifndef GL_SGIS_sharpen_texture
16141+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16142+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16143+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16144+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16145+#endif
16146+
16147+#ifndef GL_EXT_packed_pixels
16148+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16149+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16150+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16151+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16152+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16153+#endif
16154+
16155+#ifndef GL_SGIS_texture_lod
16156+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16157+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16158+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16159+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16160+#endif
16161+
16162+#ifndef GL_SGIS_multisample
16163+#define GL_MULTISAMPLE_SGIS 0x809D
16164+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16165+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16166+#define GL_SAMPLE_MASK_SGIS 0x80A0
16167+#define GL_1PASS_SGIS 0x80A1
16168+#define GL_2PASS_0_SGIS 0x80A2
16169+#define GL_2PASS_1_SGIS 0x80A3
16170+#define GL_4PASS_0_SGIS 0x80A4
16171+#define GL_4PASS_1_SGIS 0x80A5
16172+#define GL_4PASS_2_SGIS 0x80A6
16173+#define GL_4PASS_3_SGIS 0x80A7
16174+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16175+#define GL_SAMPLES_SGIS 0x80A9
16176+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16177+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16178+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16179+#endif
16180+
16181+#ifndef GL_EXT_rescale_normal
16182+#define GL_RESCALE_NORMAL_EXT 0x803A
16183+#endif
16184+
16185+#ifndef GL_EXT_vertex_array
16186+#define GL_VERTEX_ARRAY_EXT 0x8074
16187+#define GL_NORMAL_ARRAY_EXT 0x8075
16188+#define GL_COLOR_ARRAY_EXT 0x8076
16189+#define GL_INDEX_ARRAY_EXT 0x8077
16190+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16191+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16192+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16193+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16194+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16195+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16196+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16197+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16198+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16199+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16200+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16201+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16202+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16203+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16204+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16205+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16206+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16207+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16208+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16209+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16210+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16211+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16212+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16213+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16214+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16215+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16216+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16217+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16218+#endif
16219+
16220+#ifndef GL_EXT_misc_attribute
16221+#endif
16222+
16223+#ifndef GL_SGIS_generate_mipmap
16224+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16225+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16226+#endif
16227+
16228+#ifndef GL_SGIX_clipmap
16229+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16230+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16231+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16232+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16233+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16234+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16235+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16236+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16237+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16238+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16239+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16240+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16241+#endif
16242+
16243+#ifndef GL_SGIX_shadow
16244+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16245+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16246+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16247+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16248+#endif
16249+
16250+#ifndef GL_SGIS_texture_edge_clamp
16251+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16252+#endif
16253+
16254+#ifndef GL_SGIS_texture_border_clamp
16255+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16256+#endif
16257+
16258+#ifndef GL_EXT_blend_minmax
16259+#define GL_FUNC_ADD_EXT 0x8006
16260+#define GL_MIN_EXT 0x8007
16261+#define GL_MAX_EXT 0x8008
16262+#define GL_BLEND_EQUATION_EXT 0x8009
16263+#endif
16264+
16265+#ifndef GL_EXT_blend_subtract
16266+#define GL_FUNC_SUBTRACT_EXT 0x800A
16267+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16268+#endif
16269+
16270+#ifndef GL_EXT_blend_logic_op
16271+#endif
16272+
16273+#ifndef GL_SGIX_interlace
16274+#define GL_INTERLACE_SGIX 0x8094
16275+#endif
16276+
16277+#ifndef GL_SGIX_pixel_tiles
16278+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16279+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16280+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16281+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16282+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16283+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16284+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16285+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16286+#endif
16287+
16288+#ifndef GL_SGIS_texture_select
16289+#define GL_DUAL_ALPHA4_SGIS 0x8110
16290+#define GL_DUAL_ALPHA8_SGIS 0x8111
16291+#define GL_DUAL_ALPHA12_SGIS 0x8112
16292+#define GL_DUAL_ALPHA16_SGIS 0x8113
16293+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16294+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16295+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16296+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16297+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16298+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16299+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16300+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16301+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16302+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16303+#define GL_QUAD_ALPHA4_SGIS 0x811E
16304+#define GL_QUAD_ALPHA8_SGIS 0x811F
16305+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16306+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16307+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16308+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16309+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16310+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16311+#endif
16312+
16313+#ifndef GL_SGIX_sprite
16314+#define GL_SPRITE_SGIX 0x8148
16315+#define GL_SPRITE_MODE_SGIX 0x8149
16316+#define GL_SPRITE_AXIS_SGIX 0x814A
16317+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16318+#define GL_SPRITE_AXIAL_SGIX 0x814C
16319+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16320+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16321+#endif
16322+
16323+#ifndef GL_SGIX_texture_multi_buffer
16324+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16325+#endif
16326+
16327+#ifndef GL_EXT_point_parameters
16328+#define GL_POINT_SIZE_MIN_EXT 0x8126
16329+#define GL_POINT_SIZE_MAX_EXT 0x8127
16330+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16331+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16332+#endif
16333+
16334+#ifndef GL_SGIS_point_parameters
16335+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16336+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16337+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16338+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16339+#endif
16340+
16341+#ifndef GL_SGIX_instruments
16342+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16343+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16344+#endif
16345+
16346+#ifndef GL_SGIX_texture_scale_bias
16347+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16348+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16349+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16350+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16351+#endif
16352+
16353+#ifndef GL_SGIX_framezoom
16354+#define GL_FRAMEZOOM_SGIX 0x818B
16355+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16356+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16357+#endif
16358+
16359+#ifndef GL_SGIX_tag_sample_buffer
16360+#endif
16361+
16362+#ifndef GL_FfdMaskSGIX
16363+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16364+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16365+#endif
16366+
16367+#ifndef GL_SGIX_polynomial_ffd
16368+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16369+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16370+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16371+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16372+#endif
16373+
16374+#ifndef GL_SGIX_reference_plane
16375+#define GL_REFERENCE_PLANE_SGIX 0x817D
16376+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16377+#endif
16378+
16379+#ifndef GL_SGIX_flush_raster
16380+#endif
16381+
16382+#ifndef GL_SGIX_depth_texture
16383+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16384+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16385+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16386+#endif
16387+
16388+#ifndef GL_SGIS_fog_function
16389+#define GL_FOG_FUNC_SGIS 0x812A
16390+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16391+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16392+#endif
16393+
16394+#ifndef GL_SGIX_fog_offset
16395+#define GL_FOG_OFFSET_SGIX 0x8198
16396+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16397+#endif
16398+
16399+#ifndef GL_HP_image_transform
16400+#define GL_IMAGE_SCALE_X_HP 0x8155
16401+#define GL_IMAGE_SCALE_Y_HP 0x8156
16402+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16403+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16404+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16405+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16406+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16407+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16408+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16409+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16410+#define GL_CUBIC_HP 0x815F
16411+#define GL_AVERAGE_HP 0x8160
16412+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16413+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16414+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16415+#endif
16416+
16417+#ifndef GL_HP_convolution_border_modes
16418+#define GL_IGNORE_BORDER_HP 0x8150
16419+#define GL_CONSTANT_BORDER_HP 0x8151
16420+#define GL_REPLICATE_BORDER_HP 0x8153
16421+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16422+#endif
16423+
16424+#ifndef GL_INGR_palette_buffer
16425+#endif
16426+
16427+#ifndef GL_SGIX_texture_add_env
16428+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16429+#endif
16430+
16431+#ifndef GL_EXT_color_subtable
16432+#endif
16433+
16434+#ifndef GL_PGI_vertex_hints
16435+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16436+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16437+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16438+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16439+#define GL_COLOR3_BIT_PGI 0x00010000
16440+#define GL_COLOR4_BIT_PGI 0x00020000
16441+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16442+#define GL_INDEX_BIT_PGI 0x00080000
16443+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16444+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16445+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16446+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16447+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16448+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16449+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16450+#define GL_NORMAL_BIT_PGI 0x08000000
16451+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16452+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16453+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16454+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16455+#define GL_VERTEX23_BIT_PGI 0x00000004
16456+#define GL_VERTEX4_BIT_PGI 0x00000008
16457+#endif
16458+
16459+#ifndef GL_PGI_misc_hints
16460+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16461+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16462+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16463+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16464+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16465+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16466+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16467+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16468+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16469+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16470+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16471+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16472+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16473+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16474+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16475+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16476+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16477+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16478+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16479+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16480+#endif
16481+
16482+#ifndef GL_EXT_paletted_texture
16483+#define GL_COLOR_INDEX1_EXT 0x80E2
16484+#define GL_COLOR_INDEX2_EXT 0x80E3
16485+#define GL_COLOR_INDEX4_EXT 0x80E4
16486+#define GL_COLOR_INDEX8_EXT 0x80E5
16487+#define GL_COLOR_INDEX12_EXT 0x80E6
16488+#define GL_COLOR_INDEX16_EXT 0x80E7
16489+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16490+#endif
16491+
16492+#ifndef GL_EXT_clip_volume_hint
16493+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16494+#endif
16495+
16496+#ifndef GL_SGIX_list_priority
16497+#define GL_LIST_PRIORITY_SGIX 0x8182
16498+#endif
16499+
16500+#ifndef GL_SGIX_ir_instrument1
16501+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16502+#endif
16503+
16504+#ifndef GL_SGIX_calligraphic_fragment
16505+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16506+#endif
16507+
16508+#ifndef GL_SGIX_texture_lod_bias
16509+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16510+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16511+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16512+#endif
16513+
16514+#ifndef GL_SGIX_shadow_ambient
16515+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16516+#endif
16517+
16518+#ifndef GL_EXT_index_texture
16519+#endif
16520+
16521+#ifndef GL_EXT_index_material
16522+#define GL_INDEX_MATERIAL_EXT 0x81B8
16523+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16524+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16525+#endif
16526+
16527+#ifndef GL_EXT_index_func
16528+#define GL_INDEX_TEST_EXT 0x81B5
16529+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16530+#define GL_INDEX_TEST_REF_EXT 0x81B7
16531+#endif
16532+
16533+#ifndef GL_EXT_index_array_formats
16534+#define GL_IUI_V2F_EXT 0x81AD
16535+#define GL_IUI_V3F_EXT 0x81AE
16536+#define GL_IUI_N3F_V2F_EXT 0x81AF
16537+#define GL_IUI_N3F_V3F_EXT 0x81B0
16538+#define GL_T2F_IUI_V2F_EXT 0x81B1
16539+#define GL_T2F_IUI_V3F_EXT 0x81B2
16540+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16541+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16542+#endif
16543+
16544+#ifndef GL_EXT_compiled_vertex_array
16545+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16546+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16547+#endif
16548+
16549+#ifndef GL_EXT_cull_vertex
16550+#define GL_CULL_VERTEX_EXT 0x81AA
16551+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16552+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16553+#endif
16554+
16555+#ifndef GL_SGIX_ycrcb
16556+#define GL_YCRCB_422_SGIX 0x81BB
16557+#define GL_YCRCB_444_SGIX 0x81BC
16558+#endif
16559+
16560+#ifndef GL_SGIX_fragment_lighting
16561+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16562+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16563+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16564+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16565+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16566+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16567+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16568+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16569+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16570+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16571+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16572+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16573+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16574+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16575+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16576+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16577+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16578+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16579+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16580+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16581+#endif
16582+
16583+#ifndef GL_IBM_rasterpos_clip
16584+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16585+#endif
16586+
16587+#ifndef GL_HP_texture_lighting
16588+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16589+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16590+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16591+#endif
16592+
16593+#ifndef GL_EXT_draw_range_elements
16594+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16595+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16596+#endif
16597+
16598+#ifndef GL_WIN_phong_shading
16599+#define GL_PHONG_WIN 0x80EA
16600+#define GL_PHONG_HINT_WIN 0x80EB
16601+#endif
16602+
16603+#ifndef GL_WIN_specular_fog
16604+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16605+#endif
16606+
16607+#ifndef GL_EXT_light_texture
16608+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16609+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16610+#define GL_FRAGMENT_COLOR_EXT 0x834C
16611+#define GL_ATTENUATION_EXT 0x834D
16612+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16613+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16614+#define GL_TEXTURE_LIGHT_EXT 0x8350
16615+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16616+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16617+/* reuse GL_FRAGMENT_DEPTH_EXT */
16618+#endif
16619+
16620+#ifndef GL_SGIX_blend_alpha_minmax
16621+#define GL_ALPHA_MIN_SGIX 0x8320
16622+#define GL_ALPHA_MAX_SGIX 0x8321
16623+#endif
16624+
16625+#ifndef GL_SGIX_impact_pixel_texture
16626+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16627+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16628+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16629+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16630+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16631+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16632+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16633+#endif
16634+
16635+#ifndef GL_EXT_bgra
16636+#define GL_BGR_EXT 0x80E0
16637+#define GL_BGRA_EXT 0x80E1
16638+#endif
16639+
16640+#ifndef GL_SGIX_async
16641+#define GL_ASYNC_MARKER_SGIX 0x8329
16642+#endif
16643+
16644+#ifndef GL_SGIX_async_pixel
16645+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16646+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16647+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16648+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16649+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16650+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16651+#endif
16652+
16653+#ifndef GL_SGIX_async_histogram
16654+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16655+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16656+#endif
16657+
16658+#ifndef GL_INTEL_texture_scissor
16659+#endif
16660+
16661+#ifndef GL_INTEL_parallel_arrays
16662+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16663+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16664+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16665+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16666+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16667+#endif
16668+
16669+#ifndef GL_HP_occlusion_test
16670+#define GL_OCCLUSION_TEST_HP 0x8165
16671+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16672+#endif
16673+
16674+#ifndef GL_EXT_pixel_transform
16675+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16676+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16677+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16678+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16679+#define GL_CUBIC_EXT 0x8334
16680+#define GL_AVERAGE_EXT 0x8335
16681+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16682+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16683+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16684+#endif
16685+
16686+#ifndef GL_EXT_pixel_transform_color_table
16687+#endif
16688+
16689+#ifndef GL_EXT_shared_texture_palette
16690+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16691+#endif
16692+
16693+#ifndef GL_EXT_separate_specular_color
16694+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16695+#define GL_SINGLE_COLOR_EXT 0x81F9
16696+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16697+#endif
16698+
16699+#ifndef GL_EXT_secondary_color
16700+#define GL_COLOR_SUM_EXT 0x8458
16701+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16702+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16703+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16704+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16705+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16706+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16707+#endif
16708+
16709+#ifndef GL_EXT_texture_perturb_normal
16710+#define GL_PERTURB_EXT 0x85AE
16711+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16712+#endif
16713+
16714+#ifndef GL_EXT_multi_draw_arrays
16715+#endif
16716+
16717+#ifndef GL_EXT_fog_coord
16718+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16719+#define GL_FOG_COORDINATE_EXT 0x8451
16720+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16721+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16722+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16723+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16724+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16725+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16726+#endif
16727+
16728+#ifndef GL_REND_screen_coordinates
16729+#define GL_SCREEN_COORDINATES_REND 0x8490
16730+#define GL_INVERTED_SCREEN_W_REND 0x8491
16731+#endif
16732+
16733+#ifndef GL_EXT_coordinate_frame
16734+#define GL_TANGENT_ARRAY_EXT 0x8439
16735+#define GL_BINORMAL_ARRAY_EXT 0x843A
16736+#define GL_CURRENT_TANGENT_EXT 0x843B
16737+#define GL_CURRENT_BINORMAL_EXT 0x843C
16738+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16739+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16740+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16741+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16742+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16743+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16744+#define GL_MAP1_TANGENT_EXT 0x8444
16745+#define GL_MAP2_TANGENT_EXT 0x8445
16746+#define GL_MAP1_BINORMAL_EXT 0x8446
16747+#define GL_MAP2_BINORMAL_EXT 0x8447
16748+#endif
16749+
16750+#ifndef GL_EXT_texture_env_combine
16751+#define GL_COMBINE_EXT 0x8570
16752+#define GL_COMBINE_RGB_EXT 0x8571
16753+#define GL_COMBINE_ALPHA_EXT 0x8572
16754+#define GL_RGB_SCALE_EXT 0x8573
16755+#define GL_ADD_SIGNED_EXT 0x8574
16756+#define GL_INTERPOLATE_EXT 0x8575
16757+#define GL_CONSTANT_EXT 0x8576
16758+#define GL_PRIMARY_COLOR_EXT 0x8577
16759+#define GL_PREVIOUS_EXT 0x8578
16760+#define GL_SOURCE0_RGB_EXT 0x8580
16761+#define GL_SOURCE1_RGB_EXT 0x8581
16762+#define GL_SOURCE2_RGB_EXT 0x8582
16763+#define GL_SOURCE0_ALPHA_EXT 0x8588
16764+#define GL_SOURCE1_ALPHA_EXT 0x8589
16765+#define GL_SOURCE2_ALPHA_EXT 0x858A
16766+#define GL_OPERAND0_RGB_EXT 0x8590
16767+#define GL_OPERAND1_RGB_EXT 0x8591
16768+#define GL_OPERAND2_RGB_EXT 0x8592
16769+#define GL_OPERAND0_ALPHA_EXT 0x8598
16770+#define GL_OPERAND1_ALPHA_EXT 0x8599
16771+#define GL_OPERAND2_ALPHA_EXT 0x859A
16772+#endif
16773+
16774+#ifndef GL_APPLE_specular_vector
16775+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16776+#endif
16777+
16778+#ifndef GL_APPLE_transform_hint
16779+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16780+#endif
16781+
16782+#ifndef GL_SGIX_fog_scale
16783+#define GL_FOG_SCALE_SGIX 0x81FC
16784+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16785+#endif
16786+
16787+#ifndef GL_SUNX_constant_data
16788+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16789+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16790+#endif
16791+
16792+#ifndef GL_SUN_global_alpha
16793+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16794+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16795+#endif
16796+
16797+#ifndef GL_SUN_triangle_list
16798+#define GL_RESTART_SUN 0x0001
16799+#define GL_REPLACE_MIDDLE_SUN 0x0002
16800+#define GL_REPLACE_OLDEST_SUN 0x0003
16801+#define GL_TRIANGLE_LIST_SUN 0x81D7
16802+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16803+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16804+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16805+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16806+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16807+#define GL_R1UI_V3F_SUN 0x85C4
16808+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16809+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16810+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16811+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16812+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16813+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16814+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16815+#endif
16816+
16817+#ifndef GL_SUN_vertex
16818+#endif
16819+
16820+#ifndef GL_EXT_blend_func_separate
16821+#define GL_BLEND_DST_RGB_EXT 0x80C8
16822+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16823+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16824+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16825+#endif
16826+
16827+#ifndef GL_INGR_color_clamp
16828+#define GL_RED_MIN_CLAMP_INGR 0x8560
16829+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16830+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16831+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16832+#define GL_RED_MAX_CLAMP_INGR 0x8564
16833+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16834+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16835+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16836+#endif
16837+
16838+#ifndef GL_INGR_interlace_read
16839+#define GL_INTERLACE_READ_INGR 0x8568
16840+#endif
16841+
16842+#ifndef GL_EXT_stencil_wrap
16843+#define GL_INCR_WRAP_EXT 0x8507
16844+#define GL_DECR_WRAP_EXT 0x8508
16845+#endif
16846+
16847+#ifndef GL_EXT_422_pixels
16848+#define GL_422_EXT 0x80CC
16849+#define GL_422_REV_EXT 0x80CD
16850+#define GL_422_AVERAGE_EXT 0x80CE
16851+#define GL_422_REV_AVERAGE_EXT 0x80CF
16852+#endif
16853+
16854+#ifndef GL_NV_texgen_reflection
16855+#define GL_NORMAL_MAP_NV 0x8511
16856+#define GL_REFLECTION_MAP_NV 0x8512
16857+#endif
16858+
16859+#ifndef GL_EXT_texture_cube_map
16860+#define GL_NORMAL_MAP_EXT 0x8511
16861+#define GL_REFLECTION_MAP_EXT 0x8512
16862+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16863+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16864+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16865+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16866+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16867+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16868+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16869+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16870+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16871+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16872+#endif
16873+
16874+#ifndef GL_SUN_convolution_border_modes
16875+#define GL_WRAP_BORDER_SUN 0x81D4
16876+#endif
16877+
16878+#ifndef GL_EXT_texture_env_add
16879+#endif
16880+
16881+#ifndef GL_EXT_texture_lod_bias
16882+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16883+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16884+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16885+#endif
16886+
16887+#ifndef GL_EXT_texture_filter_anisotropic
16888+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16889+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16890+#endif
16891+
16892+#ifndef GL_EXT_vertex_weighting
16893+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16894+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16895+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16896+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16897+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16898+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16899+#define GL_MODELVIEW1_EXT 0x850A
16900+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16901+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16902+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16903+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16904+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16905+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16906+#endif
16907+
16908+#ifndef GL_NV_light_max_exponent
16909+#define GL_MAX_SHININESS_NV 0x8504
16910+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16911+#endif
16912+
16913+#ifndef GL_NV_vertex_array_range
16914+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16915+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16916+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16917+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16918+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16919+#endif
16920+
16921+#ifndef GL_NV_register_combiners
16922+#define GL_REGISTER_COMBINERS_NV 0x8522
16923+#define GL_VARIABLE_A_NV 0x8523
16924+#define GL_VARIABLE_B_NV 0x8524
16925+#define GL_VARIABLE_C_NV 0x8525
16926+#define GL_VARIABLE_D_NV 0x8526
16927+#define GL_VARIABLE_E_NV 0x8527
16928+#define GL_VARIABLE_F_NV 0x8528
16929+#define GL_VARIABLE_G_NV 0x8529
16930+#define GL_CONSTANT_COLOR0_NV 0x852A
16931+#define GL_CONSTANT_COLOR1_NV 0x852B
16932+#define GL_PRIMARY_COLOR_NV 0x852C
16933+#define GL_SECONDARY_COLOR_NV 0x852D
16934+#define GL_SPARE0_NV 0x852E
16935+#define GL_SPARE1_NV 0x852F
16936+#define GL_DISCARD_NV 0x8530
16937+#define GL_E_TIMES_F_NV 0x8531
16938+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16939+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16940+#define GL_UNSIGNED_INVERT_NV 0x8537
16941+#define GL_EXPAND_NORMAL_NV 0x8538
16942+#define GL_EXPAND_NEGATE_NV 0x8539
16943+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16944+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16945+#define GL_SIGNED_IDENTITY_NV 0x853C
16946+#define GL_SIGNED_NEGATE_NV 0x853D
16947+#define GL_SCALE_BY_TWO_NV 0x853E
16948+#define GL_SCALE_BY_FOUR_NV 0x853F
16949+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16950+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16951+#define GL_COMBINER_INPUT_NV 0x8542
16952+#define GL_COMBINER_MAPPING_NV 0x8543
16953+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16954+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16955+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16956+#define GL_COMBINER_MUX_SUM_NV 0x8547
16957+#define GL_COMBINER_SCALE_NV 0x8548
16958+#define GL_COMBINER_BIAS_NV 0x8549
16959+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16960+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16961+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16962+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16963+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16964+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16965+#define GL_COMBINER0_NV 0x8550
16966+#define GL_COMBINER1_NV 0x8551
16967+#define GL_COMBINER2_NV 0x8552
16968+#define GL_COMBINER3_NV 0x8553
16969+#define GL_COMBINER4_NV 0x8554
16970+#define GL_COMBINER5_NV 0x8555
16971+#define GL_COMBINER6_NV 0x8556
16972+#define GL_COMBINER7_NV 0x8557
16973+/* reuse GL_TEXTURE0_ARB */
16974+/* reuse GL_TEXTURE1_ARB */
16975+/* reuse GL_ZERO */
16976+/* reuse GL_NONE */
16977+/* reuse GL_FOG */
16978+#endif
16979+
16980+#ifndef GL_NV_fog_distance
16981+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16982+#define GL_EYE_RADIAL_NV 0x855B
16983+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16984+/* reuse GL_EYE_PLANE */
16985+#endif
16986+
16987+#ifndef GL_NV_texgen_emboss
16988+#define GL_EMBOSS_LIGHT_NV 0x855D
16989+#define GL_EMBOSS_CONSTANT_NV 0x855E
16990+#define GL_EMBOSS_MAP_NV 0x855F
16991+#endif
16992+
16993+#ifndef GL_NV_blend_square
16994+#endif
16995+
16996+#ifndef GL_NV_texture_env_combine4
16997+#define GL_COMBINE4_NV 0x8503
16998+#define GL_SOURCE3_RGB_NV 0x8583
16999+#define GL_SOURCE3_ALPHA_NV 0x858B
17000+#define GL_OPERAND3_RGB_NV 0x8593
17001+#define GL_OPERAND3_ALPHA_NV 0x859B
17002+#endif
17003+
17004+#ifndef GL_MESA_resize_buffers
17005+#endif
17006+
17007+#ifndef GL_MESA_window_pos
17008+#endif
17009+
17010+#ifndef GL_EXT_texture_compression_s3tc
17011+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
17012+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
17013+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
17014+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
17015+#endif
17016+
17017+#ifndef GL_IBM_cull_vertex
17018+#define GL_CULL_VERTEX_IBM 103050
17019+#endif
17020+
17021+#ifndef GL_IBM_multimode_draw_arrays
17022+#endif
17023+
17024+#ifndef GL_IBM_vertex_array_lists
17025+#define GL_VERTEX_ARRAY_LIST_IBM 103070
17026+#define GL_NORMAL_ARRAY_LIST_IBM 103071
17027+#define GL_COLOR_ARRAY_LIST_IBM 103072
17028+#define GL_INDEX_ARRAY_LIST_IBM 103073
17029+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
17030+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
17031+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
17032+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
17033+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
17034+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
17035+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
17036+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
17037+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
17038+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
17039+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
17040+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
17041+#endif
17042+
17043+#ifndef GL_SGIX_subsample
17044+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
17045+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
17046+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
17047+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
17048+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
17049+#endif
17050+
17051+#ifndef GL_SGIX_ycrcb_subsample
17052+#endif
17053+
17054+#ifndef GL_SGIX_ycrcba
17055+#define GL_YCRCB_SGIX 0x8318
17056+#define GL_YCRCBA_SGIX 0x8319
17057+#endif
17058+
17059+#ifndef GL_SGI_depth_pass_instrument
17060+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
17061+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
17062+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
17063+#endif
17064+
17065+#ifndef GL_3DFX_texture_compression_FXT1
17066+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
17067+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
17068+#endif
17069+
17070+#ifndef GL_3DFX_multisample
17071+#define GL_MULTISAMPLE_3DFX 0x86B2
17072+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
17073+#define GL_SAMPLES_3DFX 0x86B4
17074+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
17075+#endif
17076+
17077+#ifndef GL_3DFX_tbuffer
17078+#endif
17079+
17080+#ifndef GL_EXT_multisample
17081+#define GL_MULTISAMPLE_EXT 0x809D
17082+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
17083+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
17084+#define GL_SAMPLE_MASK_EXT 0x80A0
17085+#define GL_1PASS_EXT 0x80A1
17086+#define GL_2PASS_0_EXT 0x80A2
17087+#define GL_2PASS_1_EXT 0x80A3
17088+#define GL_4PASS_0_EXT 0x80A4
17089+#define GL_4PASS_1_EXT 0x80A5
17090+#define GL_4PASS_2_EXT 0x80A6
17091+#define GL_4PASS_3_EXT 0x80A7
17092+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
17093+#define GL_SAMPLES_EXT 0x80A9
17094+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
17095+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
17096+#define GL_SAMPLE_PATTERN_EXT 0x80AC
17097+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
17098+#endif
17099+
17100+#ifndef GL_SGIX_vertex_preclip
17101+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
17102+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
17103+#endif
17104+
17105+#ifndef GL_SGIX_convolution_accuracy
17106+#define GL_CONVOLUTION_HINT_SGIX 0x8316
17107+#endif
17108+
17109+#ifndef GL_SGIX_resample
17110+#define GL_PACK_RESAMPLE_SGIX 0x842C
17111+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
17112+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
17113+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
17114+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
17115+#endif
17116+
17117+#ifndef GL_SGIS_point_line_texgen
17118+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17119+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17120+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17121+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17122+#define GL_EYE_POINT_SGIS 0x81F4
17123+#define GL_OBJECT_POINT_SGIS 0x81F5
17124+#define GL_EYE_LINE_SGIS 0x81F6
17125+#define GL_OBJECT_LINE_SGIS 0x81F7
17126+#endif
17127+
17128+#ifndef GL_SGIS_texture_color_mask
17129+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17130+#endif
17131+
17132+#ifndef GL_EXT_texture_env_dot3
17133+#define GL_DOT3_RGB_EXT 0x8740
17134+#define GL_DOT3_RGBA_EXT 0x8741
17135+#endif
17136+
17137+#ifndef GL_ATI_texture_mirror_once
17138+#define GL_MIRROR_CLAMP_ATI 0x8742
17139+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17140+#endif
17141+
17142+#ifndef GL_NV_fence
17143+#define GL_ALL_COMPLETED_NV 0x84F2
17144+#define GL_FENCE_STATUS_NV 0x84F3
17145+#define GL_FENCE_CONDITION_NV 0x84F4
17146+#endif
17147+
17148+#ifndef GL_IBM_texture_mirrored_repeat
17149+#define GL_MIRRORED_REPEAT_IBM 0x8370
17150+#endif
17151+
17152+#ifndef GL_NV_evaluators
17153+#define GL_EVAL_2D_NV 0x86C0
17154+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17155+#define GL_MAP_TESSELLATION_NV 0x86C2
17156+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17157+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17158+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17159+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17160+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17161+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17162+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17163+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17164+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17165+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17166+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17167+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17168+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17169+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17170+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17171+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17172+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17173+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17174+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17175+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17176+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17177+#endif
17178+
17179+#ifndef GL_NV_packed_depth_stencil
17180+#define GL_DEPTH_STENCIL_NV 0x84F9
17181+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17182+#endif
17183+
17184+#ifndef GL_NV_register_combiners2
17185+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17186+#endif
17187+
17188+#ifndef GL_NV_texture_compression_vtc
17189+#endif
17190+
17191+#ifndef GL_NV_texture_rectangle
17192+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17193+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17194+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17195+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17196+#endif
17197+
17198+#ifndef GL_NV_texture_shader
17199+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17200+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17201+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17202+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17203+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17204+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17205+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17206+#define GL_SHADER_CONSISTENT_NV 0x86DD
17207+#define GL_TEXTURE_SHADER_NV 0x86DE
17208+#define GL_SHADER_OPERATION_NV 0x86DF
17209+#define GL_CULL_MODES_NV 0x86E0
17210+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17211+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17212+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17213+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17214+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17215+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17216+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17217+#define GL_CONST_EYE_NV 0x86E5
17218+#define GL_PASS_THROUGH_NV 0x86E6
17219+#define GL_CULL_FRAGMENT_NV 0x86E7
17220+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17221+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17222+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17223+#define GL_DOT_PRODUCT_NV 0x86EC
17224+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17225+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17226+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17227+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17228+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17229+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17230+#define GL_HILO_NV 0x86F4
17231+#define GL_DSDT_NV 0x86F5
17232+#define GL_DSDT_MAG_NV 0x86F6
17233+#define GL_DSDT_MAG_VIB_NV 0x86F7
17234+#define GL_HILO16_NV 0x86F8
17235+#define GL_SIGNED_HILO_NV 0x86F9
17236+#define GL_SIGNED_HILO16_NV 0x86FA
17237+#define GL_SIGNED_RGBA_NV 0x86FB
17238+#define GL_SIGNED_RGBA8_NV 0x86FC
17239+#define GL_SIGNED_RGB_NV 0x86FE
17240+#define GL_SIGNED_RGB8_NV 0x86FF
17241+#define GL_SIGNED_LUMINANCE_NV 0x8701
17242+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17243+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17244+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17245+#define GL_SIGNED_ALPHA_NV 0x8705
17246+#define GL_SIGNED_ALPHA8_NV 0x8706
17247+#define GL_SIGNED_INTENSITY_NV 0x8707
17248+#define GL_SIGNED_INTENSITY8_NV 0x8708
17249+#define GL_DSDT8_NV 0x8709
17250+#define GL_DSDT8_MAG8_NV 0x870A
17251+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17252+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17253+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17254+#define GL_HI_SCALE_NV 0x870E
17255+#define GL_LO_SCALE_NV 0x870F
17256+#define GL_DS_SCALE_NV 0x8710
17257+#define GL_DT_SCALE_NV 0x8711
17258+#define GL_MAGNITUDE_SCALE_NV 0x8712
17259+#define GL_VIBRANCE_SCALE_NV 0x8713
17260+#define GL_HI_BIAS_NV 0x8714
17261+#define GL_LO_BIAS_NV 0x8715
17262+#define GL_DS_BIAS_NV 0x8716
17263+#define GL_DT_BIAS_NV 0x8717
17264+#define GL_MAGNITUDE_BIAS_NV 0x8718
17265+#define GL_VIBRANCE_BIAS_NV 0x8719
17266+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17267+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17268+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17269+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17270+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17271+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17272+#endif
17273+
17274+#ifndef GL_NV_texture_shader2
17275+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17276+#endif
17277+
17278+#ifndef GL_NV_vertex_array_range2
17279+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17280+#endif
17281+
17282+#ifndef GL_NV_vertex_program
17283+#define GL_VERTEX_PROGRAM_NV 0x8620
17284+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17285+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17286+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17287+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17288+#define GL_CURRENT_ATTRIB_NV 0x8626
17289+#define GL_PROGRAM_LENGTH_NV 0x8627
17290+#define GL_PROGRAM_STRING_NV 0x8628
17291+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17292+#define GL_IDENTITY_NV 0x862A
17293+#define GL_INVERSE_NV 0x862B
17294+#define GL_TRANSPOSE_NV 0x862C
17295+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17296+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17297+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17298+#define GL_MATRIX0_NV 0x8630
17299+#define GL_MATRIX1_NV 0x8631
17300+#define GL_MATRIX2_NV 0x8632
17301+#define GL_MATRIX3_NV 0x8633
17302+#define GL_MATRIX4_NV 0x8634
17303+#define GL_MATRIX5_NV 0x8635
17304+#define GL_MATRIX6_NV 0x8636
17305+#define GL_MATRIX7_NV 0x8637
17306+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17307+#define GL_CURRENT_MATRIX_NV 0x8641
17308+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17309+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17310+#define GL_PROGRAM_PARAMETER_NV 0x8644
17311+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17312+#define GL_PROGRAM_TARGET_NV 0x8646
17313+#define GL_PROGRAM_RESIDENT_NV 0x8647
17314+#define GL_TRACK_MATRIX_NV 0x8648
17315+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17316+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17317+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17318+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17319+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17320+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17321+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17322+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17323+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17324+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17325+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17326+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17327+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17328+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17329+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17330+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17331+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17332+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17333+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17334+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17335+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17336+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17337+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17338+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17339+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17340+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17341+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17342+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17343+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17344+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17345+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17346+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17347+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17348+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17349+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17350+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17351+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17352+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17353+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17354+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17355+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17356+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17357+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17358+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17359+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17360+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17361+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17362+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17363+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17364+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17365+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17366+#endif
17367+
17368+#ifndef GL_SGIX_texture_coordinate_clamp
17369+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17370+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17371+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17372+#endif
17373+
17374+#ifndef GL_SGIX_scalebias_hint
17375+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17376+#endif
17377+
17378+#ifndef GL_OML_interlace
17379+#define GL_INTERLACE_OML 0x8980
17380+#define GL_INTERLACE_READ_OML 0x8981
17381+#endif
17382+
17383+#ifndef GL_OML_subsample
17384+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17385+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17386+#endif
17387+
17388+#ifndef GL_OML_resample
17389+#define GL_PACK_RESAMPLE_OML 0x8984
17390+#define GL_UNPACK_RESAMPLE_OML 0x8985
17391+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17392+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17393+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17394+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17395+#endif
17396+
17397+#ifndef GL_NV_copy_depth_to_color
17398+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17399+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17400+#endif
17401+
17402+#ifndef GL_ATI_envmap_bumpmap
17403+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17404+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17405+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17406+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17407+#define GL_DUDV_ATI 0x8779
17408+#define GL_DU8DV8_ATI 0x877A
17409+#define GL_BUMP_ENVMAP_ATI 0x877B
17410+#define GL_BUMP_TARGET_ATI 0x877C
17411+#endif
17412+
17413+#ifndef GL_ATI_fragment_shader
17414+#define GL_FRAGMENT_SHADER_ATI 0x8920
17415+#define GL_REG_0_ATI 0x8921
17416+#define GL_REG_1_ATI 0x8922
17417+#define GL_REG_2_ATI 0x8923
17418+#define GL_REG_3_ATI 0x8924
17419+#define GL_REG_4_ATI 0x8925
17420+#define GL_REG_5_ATI 0x8926
17421+#define GL_REG_6_ATI 0x8927
17422+#define GL_REG_7_ATI 0x8928
17423+#define GL_REG_8_ATI 0x8929
17424+#define GL_REG_9_ATI 0x892A
17425+#define GL_REG_10_ATI 0x892B
17426+#define GL_REG_11_ATI 0x892C
17427+#define GL_REG_12_ATI 0x892D
17428+#define GL_REG_13_ATI 0x892E
17429+#define GL_REG_14_ATI 0x892F
17430+#define GL_REG_15_ATI 0x8930
17431+#define GL_REG_16_ATI 0x8931
17432+#define GL_REG_17_ATI 0x8932
17433+#define GL_REG_18_ATI 0x8933
17434+#define GL_REG_19_ATI 0x8934
17435+#define GL_REG_20_ATI 0x8935
17436+#define GL_REG_21_ATI 0x8936
17437+#define GL_REG_22_ATI 0x8937
17438+#define GL_REG_23_ATI 0x8938
17439+#define GL_REG_24_ATI 0x8939
17440+#define GL_REG_25_ATI 0x893A
17441+#define GL_REG_26_ATI 0x893B
17442+#define GL_REG_27_ATI 0x893C
17443+#define GL_REG_28_ATI 0x893D
17444+#define GL_REG_29_ATI 0x893E
17445+#define GL_REG_30_ATI 0x893F
17446+#define GL_REG_31_ATI 0x8940
17447+#define GL_CON_0_ATI 0x8941
17448+#define GL_CON_1_ATI 0x8942
17449+#define GL_CON_2_ATI 0x8943
17450+#define GL_CON_3_ATI 0x8944
17451+#define GL_CON_4_ATI 0x8945
17452+#define GL_CON_5_ATI 0x8946
17453+#define GL_CON_6_ATI 0x8947
17454+#define GL_CON_7_ATI 0x8948
17455+#define GL_CON_8_ATI 0x8949
17456+#define GL_CON_9_ATI 0x894A
17457+#define GL_CON_10_ATI 0x894B
17458+#define GL_CON_11_ATI 0x894C
17459+#define GL_CON_12_ATI 0x894D
17460+#define GL_CON_13_ATI 0x894E
17461+#define GL_CON_14_ATI 0x894F
17462+#define GL_CON_15_ATI 0x8950
17463+#define GL_CON_16_ATI 0x8951
17464+#define GL_CON_17_ATI 0x8952
17465+#define GL_CON_18_ATI 0x8953
17466+#define GL_CON_19_ATI 0x8954
17467+#define GL_CON_20_ATI 0x8955
17468+#define GL_CON_21_ATI 0x8956
17469+#define GL_CON_22_ATI 0x8957
17470+#define GL_CON_23_ATI 0x8958
17471+#define GL_CON_24_ATI 0x8959
17472+#define GL_CON_25_ATI 0x895A
17473+#define GL_CON_26_ATI 0x895B
17474+#define GL_CON_27_ATI 0x895C
17475+#define GL_CON_28_ATI 0x895D
17476+#define GL_CON_29_ATI 0x895E
17477+#define GL_CON_30_ATI 0x895F
17478+#define GL_CON_31_ATI 0x8960
17479+#define GL_MOV_ATI 0x8961
17480+#define GL_ADD_ATI 0x8963
17481+#define GL_MUL_ATI 0x8964
17482+#define GL_SUB_ATI 0x8965
17483+#define GL_DOT3_ATI 0x8966
17484+#define GL_DOT4_ATI 0x8967
17485+#define GL_MAD_ATI 0x8968
17486+#define GL_LERP_ATI 0x8969
17487+#define GL_CND_ATI 0x896A
17488+#define GL_CND0_ATI 0x896B
17489+#define GL_DOT2_ADD_ATI 0x896C
17490+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17491+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17492+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17493+#define GL_NUM_PASSES_ATI 0x8970
17494+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17495+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17496+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17497+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17498+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17499+#define GL_SWIZZLE_STR_ATI 0x8976
17500+#define GL_SWIZZLE_STQ_ATI 0x8977
17501+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17502+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17503+#define GL_SWIZZLE_STRQ_ATI 0x897A
17504+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17505+#define GL_RED_BIT_ATI 0x00000001
17506+#define GL_GREEN_BIT_ATI 0x00000002
17507+#define GL_BLUE_BIT_ATI 0x00000004
17508+#define GL_2X_BIT_ATI 0x00000001
17509+#define GL_4X_BIT_ATI 0x00000002
17510+#define GL_8X_BIT_ATI 0x00000004
17511+#define GL_HALF_BIT_ATI 0x00000008
17512+#define GL_QUARTER_BIT_ATI 0x00000010
17513+#define GL_EIGHTH_BIT_ATI 0x00000020
17514+#define GL_SATURATE_BIT_ATI 0x00000040
17515+#define GL_COMP_BIT_ATI 0x00000002
17516+#define GL_NEGATE_BIT_ATI 0x00000004
17517+#define GL_BIAS_BIT_ATI 0x00000008
17518+#endif
17519+
17520+#ifndef GL_ATI_pn_triangles
17521+#define GL_PN_TRIANGLES_ATI 0x87F0
17522+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17523+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17524+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17525+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17526+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17527+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17528+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17529+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17530+#endif
17531+
17532+#ifndef GL_ATI_vertex_array_object
17533+#define GL_STATIC_ATI 0x8760
17534+#define GL_DYNAMIC_ATI 0x8761
17535+#define GL_PRESERVE_ATI 0x8762
17536+#define GL_DISCARD_ATI 0x8763
17537+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17538+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17539+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17540+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17541+#endif
17542+
17543+#ifndef GL_EXT_vertex_shader
17544+#define GL_VERTEX_SHADER_EXT 0x8780
17545+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17546+#define GL_OP_INDEX_EXT 0x8782
17547+#define GL_OP_NEGATE_EXT 0x8783
17548+#define GL_OP_DOT3_EXT 0x8784
17549+#define GL_OP_DOT4_EXT 0x8785
17550+#define GL_OP_MUL_EXT 0x8786
17551+#define GL_OP_ADD_EXT 0x8787
17552+#define GL_OP_MADD_EXT 0x8788
17553+#define GL_OP_FRAC_EXT 0x8789
17554+#define GL_OP_MAX_EXT 0x878A
17555+#define GL_OP_MIN_EXT 0x878B
17556+#define GL_OP_SET_GE_EXT 0x878C
17557+#define GL_OP_SET_LT_EXT 0x878D
17558+#define GL_OP_CLAMP_EXT 0x878E
17559+#define GL_OP_FLOOR_EXT 0x878F
17560+#define GL_OP_ROUND_EXT 0x8790
17561+#define GL_OP_EXP_BASE_2_EXT 0x8791
17562+#define GL_OP_LOG_BASE_2_EXT 0x8792
17563+#define GL_OP_POWER_EXT 0x8793
17564+#define GL_OP_RECIP_EXT 0x8794
17565+#define GL_OP_RECIP_SQRT_EXT 0x8795
17566+#define GL_OP_SUB_EXT 0x8796
17567+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17568+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17569+#define GL_OP_MOV_EXT 0x8799
17570+#define GL_OUTPUT_VERTEX_EXT 0x879A
17571+#define GL_OUTPUT_COLOR0_EXT 0x879B
17572+#define GL_OUTPUT_COLOR1_EXT 0x879C
17573+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17574+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17575+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17576+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17577+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17578+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17579+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17580+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17581+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17582+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17583+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17584+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17585+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17586+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17587+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17588+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17589+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17590+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17591+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17592+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17593+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17594+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17595+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17596+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17597+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17598+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17599+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17600+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17601+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17602+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17603+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17604+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17605+#define GL_OUTPUT_FOG_EXT 0x87BD
17606+#define GL_SCALAR_EXT 0x87BE
17607+#define GL_VECTOR_EXT 0x87BF
17608+#define GL_MATRIX_EXT 0x87C0
17609+#define GL_VARIANT_EXT 0x87C1
17610+#define GL_INVARIANT_EXT 0x87C2
17611+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17612+#define GL_LOCAL_EXT 0x87C4
17613+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17614+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17615+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17616+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17617+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17618+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17619+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17620+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17621+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17622+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17623+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17624+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17625+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17626+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17627+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17628+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17629+#define GL_X_EXT 0x87D5
17630+#define GL_Y_EXT 0x87D6
17631+#define GL_Z_EXT 0x87D7
17632+#define GL_W_EXT 0x87D8
17633+#define GL_NEGATIVE_X_EXT 0x87D9
17634+#define GL_NEGATIVE_Y_EXT 0x87DA
17635+#define GL_NEGATIVE_Z_EXT 0x87DB
17636+#define GL_NEGATIVE_W_EXT 0x87DC
17637+#define GL_ZERO_EXT 0x87DD
17638+#define GL_ONE_EXT 0x87DE
17639+#define GL_NEGATIVE_ONE_EXT 0x87DF
17640+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17641+#define GL_FULL_RANGE_EXT 0x87E1
17642+#define GL_CURRENT_VERTEX_EXT 0x87E2
17643+#define GL_MVP_MATRIX_EXT 0x87E3
17644+#define GL_VARIANT_VALUE_EXT 0x87E4
17645+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17646+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17647+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17648+#define GL_VARIANT_ARRAY_EXT 0x87E8
17649+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17650+#define GL_INVARIANT_VALUE_EXT 0x87EA
17651+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17652+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17653+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17654+#endif
17655+
17656+#ifndef GL_ATI_vertex_streams
17657+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17658+#define GL_VERTEX_STREAM0_ATI 0x876C
17659+#define GL_VERTEX_STREAM1_ATI 0x876D
17660+#define GL_VERTEX_STREAM2_ATI 0x876E
17661+#define GL_VERTEX_STREAM3_ATI 0x876F
17662+#define GL_VERTEX_STREAM4_ATI 0x8770
17663+#define GL_VERTEX_STREAM5_ATI 0x8771
17664+#define GL_VERTEX_STREAM6_ATI 0x8772
17665+#define GL_VERTEX_STREAM7_ATI 0x8773
17666+#define GL_VERTEX_SOURCE_ATI 0x8774
17667+#endif
17668+
17669+#ifndef GL_ATI_element_array
17670+#define GL_ELEMENT_ARRAY_ATI 0x8768
17671+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17672+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17673+#endif
17674+
17675+#ifndef GL_SUN_mesh_array
17676+#define GL_QUAD_MESH_SUN 0x8614
17677+#define GL_TRIANGLE_MESH_SUN 0x8615
17678+#endif
17679+
17680+#ifndef GL_SUN_slice_accum
17681+#define GL_SLICE_ACCUM_SUN 0x85CC
17682+#endif
17683+
17684+#ifndef GL_NV_multisample_filter_hint
17685+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17686+#endif
17687+
17688+#ifndef GL_NV_depth_clamp
17689+#define GL_DEPTH_CLAMP_NV 0x864F
17690+#endif
17691+
17692+#ifndef GL_NV_occlusion_query
17693+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17694+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17695+#define GL_PIXEL_COUNT_NV 0x8866
17696+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17697+#endif
17698+
17699+#ifndef GL_NV_point_sprite
17700+#define GL_POINT_SPRITE_NV 0x8861
17701+#define GL_COORD_REPLACE_NV 0x8862
17702+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17703+#endif
17704+
17705+#ifndef GL_NV_texture_shader3
17706+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17707+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17708+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17709+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17710+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17711+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17712+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17713+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17714+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17715+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17716+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17717+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17718+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17719+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17720+#define GL_HILO8_NV 0x885E
17721+#define GL_SIGNED_HILO8_NV 0x885F
17722+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17723+#endif
17724+
17725+#ifndef GL_NV_vertex_program1_1
17726+#endif
17727+
17728+#ifndef GL_EXT_shadow_funcs
17729+#endif
17730+
17731+#ifndef GL_EXT_stencil_two_side
17732+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17733+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17734+#endif
17735+
17736+#ifndef GL_ATI_text_fragment_shader
17737+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17738+#endif
17739+
17740+#ifndef GL_APPLE_client_storage
17741+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17742+#endif
17743+
17744+#ifndef GL_APPLE_element_array
17745+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17746+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17747+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17748+#endif
17749+
17750+#ifndef GL_APPLE_fence
17751+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17752+#define GL_FENCE_APPLE 0x8A0B
17753+#endif
17754+
17755+#ifndef GL_APPLE_vertex_array_object
17756+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17757+#endif
17758+
17759+#ifndef GL_APPLE_vertex_array_range
17760+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17761+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17762+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17763+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17764+#define GL_STORAGE_CACHED_APPLE 0x85BE
17765+#define GL_STORAGE_SHARED_APPLE 0x85BF
17766+#endif
17767+
17768+#ifndef GL_APPLE_ycbcr_422
17769+#define GL_YCBCR_422_APPLE 0x85B9
17770+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17771+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17772+#endif
17773+
17774+#ifndef GL_S3_s3tc
17775+#define GL_RGB_S3TC 0x83A0
17776+#define GL_RGB4_S3TC 0x83A1
17777+#define GL_RGBA_S3TC 0x83A2
17778+#define GL_RGBA4_S3TC 0x83A3
17779+#endif
17780+
17781+#ifndef GL_ATI_draw_buffers
17782+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17783+#define GL_DRAW_BUFFER0_ATI 0x8825
17784+#define GL_DRAW_BUFFER1_ATI 0x8826
17785+#define GL_DRAW_BUFFER2_ATI 0x8827
17786+#define GL_DRAW_BUFFER3_ATI 0x8828
17787+#define GL_DRAW_BUFFER4_ATI 0x8829
17788+#define GL_DRAW_BUFFER5_ATI 0x882A
17789+#define GL_DRAW_BUFFER6_ATI 0x882B
17790+#define GL_DRAW_BUFFER7_ATI 0x882C
17791+#define GL_DRAW_BUFFER8_ATI 0x882D
17792+#define GL_DRAW_BUFFER9_ATI 0x882E
17793+#define GL_DRAW_BUFFER10_ATI 0x882F
17794+#define GL_DRAW_BUFFER11_ATI 0x8830
17795+#define GL_DRAW_BUFFER12_ATI 0x8831
17796+#define GL_DRAW_BUFFER13_ATI 0x8832
17797+#define GL_DRAW_BUFFER14_ATI 0x8833
17798+#define GL_DRAW_BUFFER15_ATI 0x8834
17799+#endif
17800+
17801+#ifndef GL_ATI_pixel_format_float
17802+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17803+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17804+#endif
17805+
17806+#ifndef GL_ATI_texture_env_combine3
17807+#define GL_MODULATE_ADD_ATI 0x8744
17808+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17809+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17810+#endif
17811+
17812+#ifndef GL_ATI_texture_float
17813+#define GL_RGBA_FLOAT32_ATI 0x8814
17814+#define GL_RGB_FLOAT32_ATI 0x8815
17815+#define GL_ALPHA_FLOAT32_ATI 0x8816
17816+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17817+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17818+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17819+#define GL_RGBA_FLOAT16_ATI 0x881A
17820+#define GL_RGB_FLOAT16_ATI 0x881B
17821+#define GL_ALPHA_FLOAT16_ATI 0x881C
17822+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17823+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17824+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17825+#endif
17826+
17827+#ifndef GL_NV_float_buffer
17828+#define GL_FLOAT_R_NV 0x8880
17829+#define GL_FLOAT_RG_NV 0x8881
17830+#define GL_FLOAT_RGB_NV 0x8882
17831+#define GL_FLOAT_RGBA_NV 0x8883
17832+#define GL_FLOAT_R16_NV 0x8884
17833+#define GL_FLOAT_R32_NV 0x8885
17834+#define GL_FLOAT_RG16_NV 0x8886
17835+#define GL_FLOAT_RG32_NV 0x8887
17836+#define GL_FLOAT_RGB16_NV 0x8888
17837+#define GL_FLOAT_RGB32_NV 0x8889
17838+#define GL_FLOAT_RGBA16_NV 0x888A
17839+#define GL_FLOAT_RGBA32_NV 0x888B
17840+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17841+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17842+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17843+#endif
17844+
17845+#ifndef GL_NV_fragment_program
17846+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17847+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17848+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17849+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17850+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17851+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17852+#endif
17853+
17854+#ifndef GL_NV_half_float
17855+#define GL_HALF_FLOAT_NV 0x140B
17856+#endif
17857+
17858+#ifndef GL_NV_pixel_data_range
17859+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17860+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17861+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17862+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17863+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17864+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17865+#endif
17866+
17867+#ifndef GL_NV_primitive_restart
17868+#define GL_PRIMITIVE_RESTART_NV 0x8558
17869+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17870+#endif
17871+
17872+#ifndef GL_NV_texture_expand_normal
17873+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17874+#endif
17875+
17876+#ifndef GL_NV_vertex_program2
17877+#endif
17878+
17879+#ifndef GL_ATI_map_object_buffer
17880+#endif
17881+
17882+#ifndef GL_ATI_separate_stencil
17883+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17884+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17885+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17886+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17887+#endif
17888+
17889+#ifndef GL_ATI_vertex_attrib_array_object
17890+#endif
17891+
17892+#ifndef GL_OES_read_format
17893+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17894+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17895+#endif
17896+
17897+#ifndef GL_EXT_depth_bounds_test
17898+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17899+#define GL_DEPTH_BOUNDS_EXT 0x8891
17900+#endif
17901+
17902+#ifndef GL_EXT_texture_mirror_clamp
17903+#define GL_MIRROR_CLAMP_EXT 0x8742
17904+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17905+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17906+#endif
17907+
17908+#ifndef GL_EXT_blend_equation_separate
17909+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17910+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17911+#endif
17912+
17913+#ifndef GL_MESA_pack_invert
17914+#define GL_PACK_INVERT_MESA 0x8758
17915+#endif
17916+
17917+#ifndef GL_MESA_ycbcr_texture
17918+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17919+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17920+#define GL_YCBCR_MESA 0x8757
17921+#endif
17922+
17923+#ifndef GL_EXT_pixel_buffer_object
17924+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17925+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17926+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17927+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17928+#endif
17929+
17930+#ifndef GL_NV_fragment_program_option
17931+#endif
17932+
17933+#ifndef GL_NV_fragment_program2
17934+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17935+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17936+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17937+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17938+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17939+#endif
17940+
17941+#ifndef GL_NV_vertex_program2_option
17942+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17943+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17944+#endif
17945+
17946+#ifndef GL_NV_vertex_program3
17947+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17948+#endif
17949+
17950+#ifndef GL_EXT_framebuffer_object
17951+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17952+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17953+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17954+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17955+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17956+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17957+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17958+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17959+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17960+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17961+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17962+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17963+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17964+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17965+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17966+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17967+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17968+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17969+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17970+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17971+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17972+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17973+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17974+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17975+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17976+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17977+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17978+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17979+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17980+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17981+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17982+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17983+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17984+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17985+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17986+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17987+#define GL_FRAMEBUFFER_EXT 0x8D40
17988+#define GL_RENDERBUFFER_EXT 0x8D41
17989+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17990+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17991+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17992+#define GL_STENCIL_INDEX1_EXT 0x8D46
17993+#define GL_STENCIL_INDEX4_EXT 0x8D47
17994+#define GL_STENCIL_INDEX8_EXT 0x8D48
17995+#define GL_STENCIL_INDEX16_EXT 0x8D49
17996+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17997+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17998+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17999+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
18000+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
18001+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
18002+#endif
18003+
18004+#ifndef GL_GREMEDY_string_marker
18005+#endif
18006+
18007+#ifndef GL_EXT_packed_depth_stencil
18008+#define GL_DEPTH_STENCIL_EXT 0x84F9
18009+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
18010+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
18011+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
18012+#endif
18013+
18014+#ifndef GL_EXT_stencil_clear_tag
18015+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
18016+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
18017+#endif
18018+
18019+#ifndef GL_EXT_texture_sRGB
18020+#define GL_SRGB_EXT 0x8C40
18021+#define GL_SRGB8_EXT 0x8C41
18022+#define GL_SRGB_ALPHA_EXT 0x8C42
18023+#define GL_SRGB8_ALPHA8_EXT 0x8C43
18024+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
18025+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
18026+#define GL_SLUMINANCE_EXT 0x8C46
18027+#define GL_SLUMINANCE8_EXT 0x8C47
18028+#define GL_COMPRESSED_SRGB_EXT 0x8C48
18029+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
18030+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
18031+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
18032+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
18033+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
18034+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
18035+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
18036+#endif
18037+
18038+#ifndef GL_EXT_framebuffer_blit
18039+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
18040+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
18041+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
18042+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
18043+#endif
18044+
18045+#ifndef GL_EXT_framebuffer_multisample
18046+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
18047+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
18048+#define GL_MAX_SAMPLES_EXT 0x8D57
18049+#endif
18050+
18051+#ifndef GL_MESAX_texture_stack
18052+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
18053+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
18054+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
18055+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
18056+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
18057+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
18058+#endif
18059+
18060+#ifndef GL_EXT_timer_query
18061+#define GL_TIME_ELAPSED_EXT 0x88BF
18062+#endif
18063+
18064+#ifndef GL_EXT_gpu_program_parameters
18065+#endif
18066+
18067+#ifndef GL_APPLE_flush_buffer_range
18068+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
18069+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
18070+#endif
18071+
18072+#ifndef GL_NV_gpu_program4
18073+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
18074+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
18075+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
18076+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
18077+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
18078+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
18079+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
18080+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
18081+#endif
18082+
18083+#ifndef GL_NV_geometry_program4
18084+#define GL_LINES_ADJACENCY_EXT 0x000A
18085+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
18086+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
18087+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
18088+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
18089+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
18090+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
18091+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
18092+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
18093+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
18094+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
18095+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
18096+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
18097+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
18098+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
18099+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
18100+#endif
18101+
18102+#ifndef GL_EXT_geometry_shader4
18103+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
18104+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
18105+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
18106+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
18107+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
18108+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
18109+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
18110+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
18111+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
18112+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
18113+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
18114+/* reuse GL_LINES_ADJACENCY_EXT */
18115+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
18116+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18117+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18118+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18119+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18120+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18121+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18122+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18123+#endif
18124+
18125+#ifndef GL_NV_vertex_program4
18126+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18127+#endif
18128+
18129+#ifndef GL_EXT_gpu_shader4
18130+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18131+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18132+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18133+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18134+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18135+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18136+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18137+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18138+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18139+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18140+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18141+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18142+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18143+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18144+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18145+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18146+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18147+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18148+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18149+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18150+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18151+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18152+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18153+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18154+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18155+#endif
18156+
18157+#ifndef GL_EXT_draw_instanced
18158+#endif
18159+
18160+#ifndef GL_EXT_packed_float
18161+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18162+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18163+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18164+#endif
18165+
18166+#ifndef GL_EXT_texture_array
18167+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18168+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18169+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18170+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18171+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18172+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18173+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18174+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18175+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18176+#endif
18177+
18178+#ifndef GL_EXT_texture_buffer_object
18179+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18180+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18181+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18182+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18183+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18184+#endif
18185+
18186+#ifndef GL_EXT_texture_compression_latc
18187+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18188+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18189+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18190+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18191+#endif
18192+
18193+#ifndef GL_EXT_texture_compression_rgtc
18194+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18195+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18196+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18197+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18198+#endif
18199+
18200+#ifndef GL_EXT_texture_shared_exponent
18201+#define GL_RGB9_E5_EXT 0x8C3D
18202+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18203+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18204+#endif
18205+
18206+#ifndef GL_NV_depth_buffer_float
18207+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18208+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18209+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18210+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18211+#endif
18212+
18213+#ifndef GL_NV_fragment_program4
18214+#endif
18215+
18216+#ifndef GL_NV_framebuffer_multisample_coverage
18217+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18218+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18219+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18220+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18221+#endif
18222+
18223+#ifndef GL_EXT_framebuffer_sRGB
18224+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18225+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18226+#endif
18227+
18228+#ifndef GL_NV_geometry_shader4
18229+#endif
18230+
18231+#ifndef GL_NV_parameter_buffer_object
18232+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18233+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18234+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18235+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18236+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18237+#endif
18238+
18239+#ifndef GL_EXT_draw_buffers2
18240+#endif
18241+
18242+#ifndef GL_NV_transform_feedback
18243+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18244+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18245+#define GL_TEXTURE_COORD_NV 0x8C79
18246+#define GL_CLIP_DISTANCE_NV 0x8C7A
18247+#define GL_VERTEX_ID_NV 0x8C7B
18248+#define GL_PRIMITIVE_ID_NV 0x8C7C
18249+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18250+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18251+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18252+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18253+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18254+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18255+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18256+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18257+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18258+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18259+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18260+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18261+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18262+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18263+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18264+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18265+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18266+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18267+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18268+#endif
18269+
18270+#ifndef GL_EXT_bindable_uniform
18271+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18272+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18273+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18274+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18275+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18276+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18277+#endif
18278+
18279+#ifndef GL_EXT_texture_integer
18280+#define GL_RGBA32UI_EXT 0x8D70
18281+#define GL_RGB32UI_EXT 0x8D71
18282+#define GL_ALPHA32UI_EXT 0x8D72
18283+#define GL_INTENSITY32UI_EXT 0x8D73
18284+#define GL_LUMINANCE32UI_EXT 0x8D74
18285+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18286+#define GL_RGBA16UI_EXT 0x8D76
18287+#define GL_RGB16UI_EXT 0x8D77
18288+#define GL_ALPHA16UI_EXT 0x8D78
18289+#define GL_INTENSITY16UI_EXT 0x8D79
18290+#define GL_LUMINANCE16UI_EXT 0x8D7A
18291+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18292+#define GL_RGBA8UI_EXT 0x8D7C
18293+#define GL_RGB8UI_EXT 0x8D7D
18294+#define GL_ALPHA8UI_EXT 0x8D7E
18295+#define GL_INTENSITY8UI_EXT 0x8D7F
18296+#define GL_LUMINANCE8UI_EXT 0x8D80
18297+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18298+#define GL_RGBA32I_EXT 0x8D82
18299+#define GL_RGB32I_EXT 0x8D83
18300+#define GL_ALPHA32I_EXT 0x8D84
18301+#define GL_INTENSITY32I_EXT 0x8D85
18302+#define GL_LUMINANCE32I_EXT 0x8D86
18303+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18304+#define GL_RGBA16I_EXT 0x8D88
18305+#define GL_RGB16I_EXT 0x8D89
18306+#define GL_ALPHA16I_EXT 0x8D8A
18307+#define GL_INTENSITY16I_EXT 0x8D8B
18308+#define GL_LUMINANCE16I_EXT 0x8D8C
18309+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18310+#define GL_RGBA8I_EXT 0x8D8E
18311+#define GL_RGB8I_EXT 0x8D8F
18312+#define GL_ALPHA8I_EXT 0x8D90
18313+#define GL_INTENSITY8I_EXT 0x8D91
18314+#define GL_LUMINANCE8I_EXT 0x8D92
18315+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18316+#define GL_RED_INTEGER_EXT 0x8D94
18317+#define GL_GREEN_INTEGER_EXT 0x8D95
18318+#define GL_BLUE_INTEGER_EXT 0x8D96
18319+#define GL_ALPHA_INTEGER_EXT 0x8D97
18320+#define GL_RGB_INTEGER_EXT 0x8D98
18321+#define GL_RGBA_INTEGER_EXT 0x8D99
18322+#define GL_BGR_INTEGER_EXT 0x8D9A
18323+#define GL_BGRA_INTEGER_EXT 0x8D9B
18324+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18325+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18326+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18327+#endif
18328+
18329+
18330+/*************************************************************/
18331+
18332+#include <stddef.h>
18333+#ifndef GL_VERSION_2_0
18334+/* GL type for program/shader text */
18335+typedef char GLchar; /* native character */
18336+#endif
18337+
18338+#ifndef GL_VERSION_1_5
18339+/* GL types for handling large vertex buffer objects */
18340+typedef ptrdiff_t GLintptr;
18341+typedef ptrdiff_t GLsizeiptr;
18342+#endif
18343+
18344+#ifndef GL_ARB_vertex_buffer_object
18345+/* GL types for handling large vertex buffer objects */
18346+typedef ptrdiff_t GLintptrARB;
18347+typedef ptrdiff_t GLsizeiptrARB;
18348+#endif
18349+
18350+#ifndef GL_ARB_shader_objects
18351+/* GL types for handling shader object handles and program/shader text */
18352+typedef char GLcharARB; /* native character */
18353+typedef unsigned int GLhandleARB; /* shader object handle */
18354+#endif
18355+
18356+/* GL types for "half" precision (s10e5) float data in host memory */
18357+#ifndef GL_ARB_half_float_pixel
18358+typedef unsigned short GLhalfARB;
18359+#endif
18360+
18361+#ifndef GL_NV_half_float
18362+typedef unsigned short GLhalfNV;
18363+#endif
18364+
18365+#ifndef GLEXT_64_TYPES_DEFINED
18366+/* This code block is duplicated in glext.h, so must be protected */
18367+#define GLEXT_64_TYPES_DEFINED
18368+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18369+/* (as used in the GL_EXT_timer_query extension). */
18370+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18371+#include <inttypes.h>
18372+#elif defined(__sun__)
18373+#include <inttypes.h>
18374+#if defined(__STDC__)
18375+#if defined(__arch64__)
18376+typedef long int int64_t;
18377+typedef unsigned long int uint64_t;
18378+#else
18379+typedef long long int int64_t;
18380+typedef unsigned long long int uint64_t;
18381+#endif /* __arch64__ */
18382+#endif /* __STDC__ */
18383+#elif defined( __VMS )
18384+#include <inttypes.h>
18385+#elif defined(__SCO__) || defined(__USLC__)
18386+#include <stdint.h>
18387+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18388+typedef long int int32_t;
18389+typedef long long int int64_t;
18390+typedef unsigned long long int uint64_t;
18391+#elif defined(_WIN32) && defined(__GNUC__)
18392+#include <stdint.h>
18393+#elif defined(_WIN32)
18394+typedef __int32 int32_t;
18395+typedef __int64 int64_t;
18396+typedef unsigned __int64 uint64_t;
18397+#else
18398+#include <inttypes.h> /* Fallback option */
18399+#endif
18400+#endif
18401+
18402+#ifndef GL_EXT_timer_query
18403+typedef int64_t GLint64EXT;
18404+typedef uint64_t GLuint64EXT;
18405+#endif
18406+
18407+#ifndef GL_VERSION_1_2
18408+#define GL_VERSION_1_2 1
18409+#ifdef GL_GLEXT_PROTOTYPES
18410+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18411+GLAPI void APIENTRY glBlendEquation (GLenum);
18412+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18413+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18414+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18415+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18416+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18417+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18418+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18419+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18420+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18421+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18422+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18423+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18424+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18425+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18426+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18427+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18428+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18429+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18430+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18431+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18432+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18433+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18434+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18435+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18436+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18437+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18438+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18439+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18440+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18441+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18442+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18443+GLAPI void APIENTRY glResetHistogram (GLenum);
18444+GLAPI void APIENTRY glResetMinmax (GLenum);
18445+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18446+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18447+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18448+#endif /* GL_GLEXT_PROTOTYPES */
18449+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18450+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18451+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18452+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18453+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18454+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18455+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18456+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18457+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18458+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18459+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18460+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18461+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18462+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18463+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18464+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18465+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18466+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18467+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18468+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18469+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18470+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18471+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18472+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18473+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18474+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18475+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18476+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18477+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18478+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18479+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18480+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18481+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18482+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18483+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18484+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
18485+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
18486+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18487+#endif
18488+
18489+#ifndef GL_VERSION_1_3
18490+#define GL_VERSION_1_3 1
18491+#ifdef GL_GLEXT_PROTOTYPES
18492+GLAPI void APIENTRY glActiveTexture (GLenum);
18493+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18494+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18495+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18496+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18497+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18498+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18499+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18500+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18501+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18502+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18503+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18504+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18505+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18506+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18507+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18508+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18509+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18510+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18511+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18512+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18513+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18514+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18515+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18516+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18517+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18518+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18519+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18520+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18521+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18522+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18523+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18524+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18525+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18526+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18527+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18528+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18529+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18530+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18531+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18532+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18533+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18534+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18535+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18536+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18537+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18538+#endif /* GL_GLEXT_PROTOTYPES */
18539+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18540+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18541+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18542+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18543+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18544+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18545+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18546+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18547+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18548+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18549+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18550+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18551+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18552+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18553+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18554+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18555+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18556+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18557+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18558+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18559+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18560+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18561+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18562+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18563+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18564+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18565+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18566+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18567+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18568+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18569+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18570+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18571+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18572+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18573+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18574+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18575+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18576+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18577+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18578+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18579+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18580+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18581+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
18582+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18583+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18584+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18585+#endif
18586+
18587+#ifndef GL_VERSION_1_4
18588+#define GL_VERSION_1_4 1
18589+#ifdef GL_GLEXT_PROTOTYPES
18590+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18591+GLAPI void APIENTRY glFogCoordf (GLfloat);
18592+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18593+GLAPI void APIENTRY glFogCoordd (GLdouble);
18594+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18595+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18596+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18597+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18598+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18599+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18600+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18601+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18602+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18603+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18604+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18605+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18606+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18607+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18608+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18609+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18610+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18611+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18612+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18613+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18614+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18615+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18616+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18617+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18618+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18619+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18620+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18621+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18622+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18623+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18624+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18625+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18626+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18627+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18628+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18629+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18630+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18631+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18632+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18633+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18634+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18635+#endif /* GL_GLEXT_PROTOTYPES */
18636+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18637+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18638+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18639+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18640+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18641+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18642+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18643+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18644+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18645+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18646+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18647+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18648+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18649+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18650+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18651+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18652+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18653+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18654+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18655+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18656+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18657+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18658+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18659+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18660+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18661+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18662+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18663+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18664+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18665+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18666+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18667+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18668+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18669+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18670+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18671+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18672+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18673+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18674+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18675+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18676+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18677+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18678+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18679+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18680+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18681+#endif
18682+
18683+#ifndef GL_VERSION_1_5
18684+#define GL_VERSION_1_5 1
18685+#ifdef GL_GLEXT_PROTOTYPES
18686+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18687+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18688+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18689+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18690+GLAPI void APIENTRY glEndQuery (GLenum);
18691+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18692+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18693+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18694+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18695+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18696+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18697+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18698+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18699+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18700+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18701+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18702+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18703+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18704+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18705+#endif /* GL_GLEXT_PROTOTYPES */
18706+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18707+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18708+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18709+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18710+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18711+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18712+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18713+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18714+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18715+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18716+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18717+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18718+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18719+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18720+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18721+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18722+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18723+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18724+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18725+#endif
18726+
18727+#ifndef GL_VERSION_2_0
18728+#define GL_VERSION_2_0 1
18729+#ifdef GL_GLEXT_PROTOTYPES
18730+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18731+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18732+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18733+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18734+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18735+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18736+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18737+GLAPI void APIENTRY glCompileShader (GLuint);
18738+GLAPI GLuint APIENTRY glCreateProgram (void);
18739+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18740+GLAPI void APIENTRY glDeleteProgram (GLuint);
18741+GLAPI void APIENTRY glDeleteShader (GLuint);
18742+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18743+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18744+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18745+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18746+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18747+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18748+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18749+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18750+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18751+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18752+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18753+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18754+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18755+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18756+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18757+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18758+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18759+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18760+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18761+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18762+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18763+GLAPI void APIENTRY glLinkProgram (GLuint);
18764+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18765+GLAPI void APIENTRY glUseProgram (GLuint);
18766+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18767+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18768+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18769+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18770+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18771+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18772+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18773+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18774+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18775+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18776+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18777+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18778+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18779+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18780+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18781+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18782+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18783+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18784+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18785+GLAPI void APIENTRY glValidateProgram (GLuint);
18786+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18787+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18788+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18789+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18790+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18791+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18792+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18793+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18794+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18795+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18796+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18797+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18798+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18799+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18800+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18801+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18802+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18803+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18804+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18805+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18806+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18807+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18808+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18809+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18810+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18811+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18812+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18813+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18814+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18815+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18816+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18817+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18818+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18819+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18820+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18821+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18822+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18823+#endif /* GL_GLEXT_PROTOTYPES */
18824+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18825+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18826+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18827+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18828+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18829+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18830+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18831+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18832+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18833+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18834+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18835+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18836+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18837+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18838+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18839+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18840+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18841+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18842+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18843+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18844+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18845+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18846+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18847+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18848+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18849+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18850+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18851+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18852+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18853+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18854+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18855+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18856+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18857+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18858+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18859+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18860+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18861+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18862+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18863+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18864+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18865+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18866+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18867+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18868+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18869+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18870+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18871+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18872+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18873+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18874+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18875+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18876+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18877+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18878+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18879+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18880+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18881+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18882+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18883+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18884+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18885+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18886+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18887+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18888+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18889+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18890+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18891+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18892+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18893+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18894+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18895+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18896+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18897+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18898+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18899+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18900+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18901+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18902+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18903+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18904+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18905+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18906+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18907+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18908+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18909+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18910+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18911+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18912+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18913+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18914+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18915+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18916+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18917+#endif
18918+
18919+#ifndef GL_VERSION_2_1
18920+#define GL_VERSION_2_1 1
18921+#ifdef GL_GLEXT_PROTOTYPES
18922+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18923+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18924+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18925+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18926+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18927+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18928+#endif /* GL_GLEXT_PROTOTYPES */
18929+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18930+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18931+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18932+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18933+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18934+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18935+#endif
18936+
18937+#ifndef GL_ARB_multitexture
18938+#define GL_ARB_multitexture 1
18939+#ifdef GL_GLEXT_PROTOTYPES
18940+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18941+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18942+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18943+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18944+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18945+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18946+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18947+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18948+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18949+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18950+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18951+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18952+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18953+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18954+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18955+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18956+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18957+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18958+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18959+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18960+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18961+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18962+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18963+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18964+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18965+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18966+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18967+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18968+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18969+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18970+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18971+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18972+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18973+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18974+#endif /* GL_GLEXT_PROTOTYPES */
18975+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18976+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18977+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18978+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18979+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18980+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18981+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18982+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18983+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18984+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18985+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18986+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18987+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18988+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18989+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18990+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18991+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18992+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18993+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18994+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18995+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18996+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18997+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18998+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18999+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
19000+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
19001+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
19002+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
19003+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
19004+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
19005+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
19006+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
19007+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
19008+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
19009+#endif
19010+
19011+#ifndef GL_ARB_transpose_matrix
19012+#define GL_ARB_transpose_matrix 1
19013+#ifdef GL_GLEXT_PROTOTYPES
19014+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
19015+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
19016+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
19017+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
19018+#endif /* GL_GLEXT_PROTOTYPES */
19019+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19020+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19021+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19022+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19023+#endif
19024+
19025+#ifndef GL_ARB_multisample
19026+#define GL_ARB_multisample 1
19027+#ifdef GL_GLEXT_PROTOTYPES
19028+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
19029+#endif /* GL_GLEXT_PROTOTYPES */
19030+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
19031+#endif
19032+
19033+#ifndef GL_ARB_texture_env_add
19034+#define GL_ARB_texture_env_add 1
19035+#endif
19036+
19037+#ifndef GL_ARB_texture_cube_map
19038+#define GL_ARB_texture_cube_map 1
19039+#endif
19040+
19041+#ifndef GL_ARB_texture_compression
19042+#define GL_ARB_texture_compression 1
19043+#ifdef GL_GLEXT_PROTOTYPES
19044+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19045+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19046+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
19047+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19048+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19049+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
19050+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
19051+#endif /* GL_GLEXT_PROTOTYPES */
19052+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
19053+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
19054+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
19055+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
19056+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
19057+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
19058+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
19059+#endif
19060+
19061+#ifndef GL_ARB_texture_border_clamp
19062+#define GL_ARB_texture_border_clamp 1
19063+#endif
19064+
19065+#ifndef GL_ARB_point_parameters
19066+#define GL_ARB_point_parameters 1
19067+#ifdef GL_GLEXT_PROTOTYPES
19068+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
19069+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
19070+#endif /* GL_GLEXT_PROTOTYPES */
19071+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
19072+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
19073+#endif
19074+
19075+#ifndef GL_ARB_vertex_blend
19076+#define GL_ARB_vertex_blend 1
19077+#ifdef GL_GLEXT_PROTOTYPES
19078+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
19079+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
19080+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
19081+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
19082+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
19083+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
19084+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
19085+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
19086+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19087+GLAPI void APIENTRY glVertexBlendARB (GLint);
19088+#endif /* GL_GLEXT_PROTOTYPES */
19089+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
19090+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
19091+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
19092+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
19093+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
19094+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
19095+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
19096+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
19097+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19098+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
19099+#endif
19100+
19101+#ifndef GL_ARB_matrix_palette
19102+#define GL_ARB_matrix_palette 1
19103+#ifdef GL_GLEXT_PROTOTYPES
19104+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
19105+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
19106+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
19107+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
19108+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19109+#endif /* GL_GLEXT_PROTOTYPES */
19110+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
19111+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
19112+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
19113+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
19114+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19115+#endif
19116+
19117+#ifndef GL_ARB_texture_env_combine
19118+#define GL_ARB_texture_env_combine 1
19119+#endif
19120+
19121+#ifndef GL_ARB_texture_env_crossbar
19122+#define GL_ARB_texture_env_crossbar 1
19123+#endif
19124+
19125+#ifndef GL_ARB_texture_env_dot3
19126+#define GL_ARB_texture_env_dot3 1
19127+#endif
19128+
19129+#ifndef GL_ARB_texture_mirrored_repeat
19130+#define GL_ARB_texture_mirrored_repeat 1
19131+#endif
19132+
19133+#ifndef GL_ARB_depth_texture
19134+#define GL_ARB_depth_texture 1
19135+#endif
19136+
19137+#ifndef GL_ARB_shadow
19138+#define GL_ARB_shadow 1
19139+#endif
19140+
19141+#ifndef GL_ARB_shadow_ambient
19142+#define GL_ARB_shadow_ambient 1
19143+#endif
19144+
19145+#ifndef GL_ARB_window_pos
19146+#define GL_ARB_window_pos 1
19147+#ifdef GL_GLEXT_PROTOTYPES
19148+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19149+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19150+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19151+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19152+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19153+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19154+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19155+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19156+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19157+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19158+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19159+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19160+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19161+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19162+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19163+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19164+#endif /* GL_GLEXT_PROTOTYPES */
19165+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19166+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19167+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19168+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19169+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19170+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19171+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19172+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19173+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19174+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19175+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19176+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19177+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19178+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19179+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19180+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19181+#endif
19182+
19183+#ifndef GL_ARB_vertex_program
19184+#define GL_ARB_vertex_program 1
19185+#ifdef GL_GLEXT_PROTOTYPES
19186+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19187+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19188+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19189+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19190+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19191+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19192+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19193+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19194+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19195+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19196+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19197+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19198+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19199+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19200+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19201+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19202+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19203+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19204+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19205+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19206+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19207+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19208+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19209+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19210+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19211+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19212+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19213+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19214+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19215+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19216+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19217+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19218+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19219+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19220+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19221+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19222+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19223+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19224+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19225+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19226+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19227+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19228+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19229+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19230+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19231+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19232+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19233+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19234+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19235+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19236+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19237+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19238+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19239+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19240+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19241+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19242+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19243+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19244+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19245+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19246+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19247+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19248+#endif /* GL_GLEXT_PROTOTYPES */
19249+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19250+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19251+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19252+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19253+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19254+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19255+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19256+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19257+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19258+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19259+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19260+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19261+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19262+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19263+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19264+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19265+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19266+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19267+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19268+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19269+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19270+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19271+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19272+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19273+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19274+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19275+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19276+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19277+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19278+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19279+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19280+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19281+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19282+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19283+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19284+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19285+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19286+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19287+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19288+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19289+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19290+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19291+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19292+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19293+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19294+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19295+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19296+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19297+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19298+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19299+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19300+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19301+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19302+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19303+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19304+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19305+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19306+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19307+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19308+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19309+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19310+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19311+#endif
19312+
19313+#ifndef GL_ARB_fragment_program
19314+#define GL_ARB_fragment_program 1
19315+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19316+#endif
19317+
19318+#ifndef GL_ARB_vertex_buffer_object
19319+#define GL_ARB_vertex_buffer_object 1
19320+#ifdef GL_GLEXT_PROTOTYPES
19321+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19322+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19323+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19324+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19325+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19326+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19327+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19328+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19329+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19330+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19331+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19332+#endif /* GL_GLEXT_PROTOTYPES */
19333+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19334+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19335+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19336+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19337+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19338+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19339+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19340+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19341+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19342+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19343+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19344+#endif
19345+
19346+#ifndef GL_ARB_occlusion_query
19347+#define GL_ARB_occlusion_query 1
19348+#ifdef GL_GLEXT_PROTOTYPES
19349+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19350+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19351+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19352+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19353+GLAPI void APIENTRY glEndQueryARB (GLenum);
19354+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19355+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19356+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19357+#endif /* GL_GLEXT_PROTOTYPES */
19358+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19359+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19360+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19361+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19362+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19363+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19364+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19365+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19366+#endif
19367+
19368+#ifndef GL_ARB_shader_objects
19369+#define GL_ARB_shader_objects 1
19370+#ifdef GL_GLEXT_PROTOTYPES
19371+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19372+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19373+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19374+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19375+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19376+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19377+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19378+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19379+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19380+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19381+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19382+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19383+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19384+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19385+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19386+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19387+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19388+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19389+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19390+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19391+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19392+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19393+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19394+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19395+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19396+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19397+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19398+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19399+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19400+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19401+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19402+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19403+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19404+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19405+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19406+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19407+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19408+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19409+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19410+#endif /* GL_GLEXT_PROTOTYPES */
19411+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19412+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19413+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19414+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19415+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19416+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19417+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19418+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19419+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19420+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19421+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19422+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19423+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19424+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19425+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19426+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19427+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19428+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19429+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19430+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19431+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19432+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19433+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19434+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19435+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19436+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19437+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19438+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19439+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19440+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19441+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19442+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19443+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19444+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19445+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19446+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19447+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19448+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19449+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19450+#endif
19451+
19452+#ifndef GL_ARB_vertex_shader
19453+#define GL_ARB_vertex_shader 1
19454+#ifdef GL_GLEXT_PROTOTYPES
19455+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19456+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19457+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19458+#endif /* GL_GLEXT_PROTOTYPES */
19459+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19460+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19461+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19462+#endif
19463+
19464+#ifndef GL_ARB_fragment_shader
19465+#define GL_ARB_fragment_shader 1
19466+#endif
19467+
19468+#ifndef GL_ARB_shading_language_100
19469+#define GL_ARB_shading_language_100 1
19470+#endif
19471+
19472+#ifndef GL_ARB_texture_non_power_of_two
19473+#define GL_ARB_texture_non_power_of_two 1
19474+#endif
19475+
19476+#ifndef GL_ARB_point_sprite
19477+#define GL_ARB_point_sprite 1
19478+#endif
19479+
19480+#ifndef GL_ARB_fragment_program_shadow
19481+#define GL_ARB_fragment_program_shadow 1
19482+#endif
19483+
19484+#ifndef GL_ARB_draw_buffers
19485+#define GL_ARB_draw_buffers 1
19486+#ifdef GL_GLEXT_PROTOTYPES
19487+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19488+#endif /* GL_GLEXT_PROTOTYPES */
19489+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19490+#endif
19491+
19492+#ifndef GL_ARB_texture_rectangle
19493+#define GL_ARB_texture_rectangle 1
19494+#endif
19495+
19496+#ifndef GL_ARB_color_buffer_float
19497+#define GL_ARB_color_buffer_float 1
19498+#ifdef GL_GLEXT_PROTOTYPES
19499+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19500+#endif /* GL_GLEXT_PROTOTYPES */
19501+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19502+#endif
19503+
19504+#ifndef GL_ARB_half_float_pixel
19505+#define GL_ARB_half_float_pixel 1
19506+#endif
19507+
19508+#ifndef GL_ARB_texture_float
19509+#define GL_ARB_texture_float 1
19510+#endif
19511+
19512+#ifndef GL_ARB_pixel_buffer_object
19513+#define GL_ARB_pixel_buffer_object 1
19514+#endif
19515+
19516+#ifndef GL_EXT_abgr
19517+#define GL_EXT_abgr 1
19518+#endif
19519+
19520+#ifndef GL_EXT_blend_color
19521+#define GL_EXT_blend_color 1
19522+#ifdef GL_GLEXT_PROTOTYPES
19523+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19524+#endif /* GL_GLEXT_PROTOTYPES */
19525+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19526+#endif
19527+
19528+#ifndef GL_EXT_polygon_offset
19529+#define GL_EXT_polygon_offset 1
19530+#ifdef GL_GLEXT_PROTOTYPES
19531+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19532+#endif /* GL_GLEXT_PROTOTYPES */
19533+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19534+#endif
19535+
19536+#ifndef GL_EXT_texture
19537+#define GL_EXT_texture 1
19538+#endif
19539+
19540+#ifndef GL_EXT_texture3D
19541+#define GL_EXT_texture3D 1
19542+#ifdef GL_GLEXT_PROTOTYPES
19543+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19544+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19545+#endif /* GL_GLEXT_PROTOTYPES */
19546+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
19547+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
19548+#endif
19549+
19550+#ifndef GL_SGIS_texture_filter4
19551+#define GL_SGIS_texture_filter4 1
19552+#ifdef GL_GLEXT_PROTOTYPES
19553+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19554+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19555+#endif /* GL_GLEXT_PROTOTYPES */
19556+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19557+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19558+#endif
19559+
19560+#ifndef GL_EXT_subtexture
19561+#define GL_EXT_subtexture 1
19562+#ifdef GL_GLEXT_PROTOTYPES
19563+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19564+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19565+#endif /* GL_GLEXT_PROTOTYPES */
19566+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19567+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19568+#endif
19569+
19570+#ifndef GL_EXT_copy_texture
19571+#define GL_EXT_copy_texture 1
19572+#ifdef GL_GLEXT_PROTOTYPES
19573+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19574+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19575+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19576+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19577+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19578+#endif /* GL_GLEXT_PROTOTYPES */
19579+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19580+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19581+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19582+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19583+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19584+#endif
19585+
19586+#ifndef GL_EXT_histogram
19587+#define GL_EXT_histogram 1
19588+#ifdef GL_GLEXT_PROTOTYPES
19589+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19590+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19591+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19592+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19593+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19594+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19595+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19596+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19597+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19598+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19599+#endif /* GL_GLEXT_PROTOTYPES */
19600+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19601+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19602+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19603+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19604+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19605+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19606+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19607+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19608+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19609+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19610+#endif
19611+
19612+#ifndef GL_EXT_convolution
19613+#define GL_EXT_convolution 1
19614+#ifdef GL_GLEXT_PROTOTYPES
19615+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19616+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19617+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19618+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19619+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19620+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19621+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19622+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19623+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19624+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19625+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19626+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19627+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19628+#endif /* GL_GLEXT_PROTOTYPES */
19629+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19630+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19631+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19632+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19633+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19634+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19635+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19636+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19637+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19638+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19639+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19640+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19641+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19642+#endif
19643+
19644+#ifndef GL_SGI_color_matrix
19645+#define GL_SGI_color_matrix 1
19646+#endif
19647+
19648+#ifndef GL_SGI_color_table
19649+#define GL_SGI_color_table 1
19650+#ifdef GL_GLEXT_PROTOTYPES
19651+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19652+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19653+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19654+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19655+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19656+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19657+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19658+#endif /* GL_GLEXT_PROTOTYPES */
19659+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19660+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19661+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19662+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19663+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19664+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19665+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19666+#endif
19667+
19668+#ifndef GL_SGIX_pixel_texture
19669+#define GL_SGIX_pixel_texture 1
19670+#ifdef GL_GLEXT_PROTOTYPES
19671+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19672+#endif /* GL_GLEXT_PROTOTYPES */
19673+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19674+#endif
19675+
19676+#ifndef GL_SGIS_pixel_texture
19677+#define GL_SGIS_pixel_texture 1
19678+#ifdef GL_GLEXT_PROTOTYPES
19679+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19680+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19681+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19682+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19683+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19684+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19685+#endif /* GL_GLEXT_PROTOTYPES */
19686+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19687+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19688+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19689+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19690+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19691+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19692+#endif
19693+
19694+#ifndef GL_SGIS_texture4D
19695+#define GL_SGIS_texture4D 1
19696+#ifdef GL_GLEXT_PROTOTYPES
19697+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19698+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19699+#endif /* GL_GLEXT_PROTOTYPES */
19700+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
19701+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
19702+#endif
19703+
19704+#ifndef GL_SGI_texture_color_table
19705+#define GL_SGI_texture_color_table 1
19706+#endif
19707+
19708+#ifndef GL_EXT_cmyka
19709+#define GL_EXT_cmyka 1
19710+#endif
19711+
19712+#ifndef GL_EXT_texture_object
19713+#define GL_EXT_texture_object 1
19714+#ifdef GL_GLEXT_PROTOTYPES
19715+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19716+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19717+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19718+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19719+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19720+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19721+#endif /* GL_GLEXT_PROTOTYPES */
19722+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19723+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19724+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19725+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19726+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19727+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19728+#endif
19729+
19730+#ifndef GL_SGIS_detail_texture
19731+#define GL_SGIS_detail_texture 1
19732+#ifdef GL_GLEXT_PROTOTYPES
19733+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19734+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19735+#endif /* GL_GLEXT_PROTOTYPES */
19736+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19737+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19738+#endif
19739+
19740+#ifndef GL_SGIS_sharpen_texture
19741+#define GL_SGIS_sharpen_texture 1
19742+#ifdef GL_GLEXT_PROTOTYPES
19743+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19744+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19745+#endif /* GL_GLEXT_PROTOTYPES */
19746+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19747+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19748+#endif
19749+
19750+#ifndef GL_EXT_packed_pixels
19751+#define GL_EXT_packed_pixels 1
19752+#endif
19753+
19754+#ifndef GL_SGIS_texture_lod
19755+#define GL_SGIS_texture_lod 1
19756+#endif
19757+
19758+#ifndef GL_SGIS_multisample
19759+#define GL_SGIS_multisample 1
19760+#ifdef GL_GLEXT_PROTOTYPES
19761+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19762+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19763+#endif /* GL_GLEXT_PROTOTYPES */
19764+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19765+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19766+#endif
19767+
19768+#ifndef GL_EXT_rescale_normal
19769+#define GL_EXT_rescale_normal 1
19770+#endif
19771+
19772+#ifndef GL_EXT_vertex_array
19773+#define GL_EXT_vertex_array 1
19774+#ifdef GL_GLEXT_PROTOTYPES
19775+GLAPI void APIENTRY glArrayElementEXT (GLint);
19776+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19777+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19778+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19779+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19780+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19781+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19782+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19783+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19784+#endif /* GL_GLEXT_PROTOTYPES */
19785+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19786+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19787+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19788+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19789+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19790+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19791+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19792+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19793+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19794+#endif
19795+
19796+#ifndef GL_EXT_misc_attribute
19797+#define GL_EXT_misc_attribute 1
19798+#endif
19799+
19800+#ifndef GL_SGIS_generate_mipmap
19801+#define GL_SGIS_generate_mipmap 1
19802+#endif
19803+
19804+#ifndef GL_SGIX_clipmap
19805+#define GL_SGIX_clipmap 1
19806+#endif
19807+
19808+#ifndef GL_SGIX_shadow
19809+#define GL_SGIX_shadow 1
19810+#endif
19811+
19812+#ifndef GL_SGIS_texture_edge_clamp
19813+#define GL_SGIS_texture_edge_clamp 1
19814+#endif
19815+
19816+#ifndef GL_SGIS_texture_border_clamp
19817+#define GL_SGIS_texture_border_clamp 1
19818+#endif
19819+
19820+#ifndef GL_EXT_blend_minmax
19821+#define GL_EXT_blend_minmax 1
19822+#ifdef GL_GLEXT_PROTOTYPES
19823+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19824+#endif /* GL_GLEXT_PROTOTYPES */
19825+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19826+#endif
19827+
19828+#ifndef GL_EXT_blend_subtract
19829+#define GL_EXT_blend_subtract 1
19830+#endif
19831+
19832+#ifndef GL_EXT_blend_logic_op
19833+#define GL_EXT_blend_logic_op 1
19834+#endif
19835+
19836+#ifndef GL_SGIX_interlace
19837+#define GL_SGIX_interlace 1
19838+#endif
19839+
19840+#ifndef GL_SGIX_pixel_tiles
19841+#define GL_SGIX_pixel_tiles 1
19842+#endif
19843+
19844+#ifndef GL_SGIX_texture_select
19845+#define GL_SGIX_texture_select 1
19846+#endif
19847+
19848+#ifndef GL_SGIX_sprite
19849+#define GL_SGIX_sprite 1
19850+#ifdef GL_GLEXT_PROTOTYPES
19851+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19852+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19853+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19854+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19855+#endif /* GL_GLEXT_PROTOTYPES */
19856+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19857+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19858+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19859+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19860+#endif
19861+
19862+#ifndef GL_SGIX_texture_multi_buffer
19863+#define GL_SGIX_texture_multi_buffer 1
19864+#endif
19865+
19866+#ifndef GL_EXT_point_parameters
19867+#define GL_EXT_point_parameters 1
19868+#ifdef GL_GLEXT_PROTOTYPES
19869+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19870+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19871+/* ERO Begin */
19872+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19873+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19874+/* ERO end */
19875+#endif /* GL_GLEXT_PROTOTYPES */
19876+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19877+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19878+#endif
19879+
19880+#ifndef GL_SGIS_point_parameters
19881+#define GL_SGIS_point_parameters 1
19882+#ifdef GL_GLEXT_PROTOTYPES
19883+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19884+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19885+#endif /* GL_GLEXT_PROTOTYPES */
19886+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19887+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19888+#endif
19889+
19890+#ifndef GL_SGIX_instruments
19891+#define GL_SGIX_instruments 1
19892+#ifdef GL_GLEXT_PROTOTYPES
19893+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19894+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19895+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19896+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19897+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19898+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19899+#endif /* GL_GLEXT_PROTOTYPES */
19900+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19901+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19902+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19903+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19904+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19905+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19906+#endif
19907+
19908+#ifndef GL_SGIX_texture_scale_bias
19909+#define GL_SGIX_texture_scale_bias 1
19910+#endif
19911+
19912+#ifndef GL_SGIX_framezoom
19913+#define GL_SGIX_framezoom 1
19914+#ifdef GL_GLEXT_PROTOTYPES
19915+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19916+#endif /* GL_GLEXT_PROTOTYPES */
19917+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19918+#endif
19919+
19920+#ifndef GL_SGIX_tag_sample_buffer
19921+#define GL_SGIX_tag_sample_buffer 1
19922+#ifdef GL_GLEXT_PROTOTYPES
19923+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19924+#endif /* GL_GLEXT_PROTOTYPES */
19925+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19926+#endif
19927+
19928+#ifndef GL_SGIX_polynomial_ffd
19929+#define GL_SGIX_polynomial_ffd 1
19930+#ifdef GL_GLEXT_PROTOTYPES
19931+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19932+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19933+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19934+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19935+#endif /* GL_GLEXT_PROTOTYPES */
19936+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
19937+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
19938+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19939+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19940+#endif
19941+
19942+#ifndef GL_SGIX_reference_plane
19943+#define GL_SGIX_reference_plane 1
19944+#ifdef GL_GLEXT_PROTOTYPES
19945+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19946+#endif /* GL_GLEXT_PROTOTYPES */
19947+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19948+#endif
19949+
19950+#ifndef GL_SGIX_flush_raster
19951+#define GL_SGIX_flush_raster 1
19952+#ifdef GL_GLEXT_PROTOTYPES
19953+GLAPI void APIENTRY glFlushRasterSGIX (void);
19954+#endif /* GL_GLEXT_PROTOTYPES */
19955+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19956+#endif
19957+
19958+#ifndef GL_SGIX_depth_texture
19959+#define GL_SGIX_depth_texture 1
19960+#endif
19961+
19962+#ifndef GL_SGIS_fog_function
19963+#define GL_SGIS_fog_function 1
19964+#ifdef GL_GLEXT_PROTOTYPES
19965+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19966+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19967+#endif /* GL_GLEXT_PROTOTYPES */
19968+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19969+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19970+#endif
19971+
19972+#ifndef GL_SGIX_fog_offset
19973+#define GL_SGIX_fog_offset 1
19974+#endif
19975+
19976+#ifndef GL_HP_image_transform
19977+#define GL_HP_image_transform 1
19978+#ifdef GL_GLEXT_PROTOTYPES
19979+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19980+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19981+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19982+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19983+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19984+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19985+#endif /* GL_GLEXT_PROTOTYPES */
19986+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19987+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19988+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19989+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19990+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19991+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19992+#endif
19993+
19994+#ifndef GL_HP_convolution_border_modes
19995+#define GL_HP_convolution_border_modes 1
19996+#endif
19997+
19998+#ifndef GL_SGIX_texture_add_env
19999+#define GL_SGIX_texture_add_env 1
20000+#endif
20001+
20002+#ifndef GL_EXT_color_subtable
20003+#define GL_EXT_color_subtable 1
20004+#ifdef GL_GLEXT_PROTOTYPES
20005+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
20006+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
20007+#endif /* GL_GLEXT_PROTOTYPES */
20008+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
20009+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
20010+#endif
20011+
20012+#ifndef GL_PGI_vertex_hints
20013+#define GL_PGI_vertex_hints 1
20014+#endif
20015+
20016+#ifndef GL_PGI_misc_hints
20017+#define GL_PGI_misc_hints 1
20018+#ifdef GL_GLEXT_PROTOTYPES
20019+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
20020+#endif /* GL_GLEXT_PROTOTYPES */
20021+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
20022+#endif
20023+
20024+#ifndef GL_EXT_paletted_texture
20025+#define GL_EXT_paletted_texture 1
20026+#ifdef GL_GLEXT_PROTOTYPES
20027+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
20028+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
20029+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
20030+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
20031+#endif /* GL_GLEXT_PROTOTYPES */
20032+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
20033+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
20034+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20035+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20036+#endif
20037+
20038+#ifndef GL_EXT_clip_volume_hint
20039+#define GL_EXT_clip_volume_hint 1
20040+#endif
20041+
20042+#ifndef GL_SGIX_list_priority
20043+#define GL_SGIX_list_priority 1
20044+#ifdef GL_GLEXT_PROTOTYPES
20045+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
20046+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
20047+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
20048+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
20049+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
20050+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
20051+#endif /* GL_GLEXT_PROTOTYPES */
20052+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
20053+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
20054+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
20055+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
20056+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
20057+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
20058+#endif
20059+
20060+#ifndef GL_SGIX_ir_instrument1
20061+#define GL_SGIX_ir_instrument1 1
20062+#endif
20063+
20064+#ifndef GL_SGIX_calligraphic_fragment
20065+#define GL_SGIX_calligraphic_fragment 1
20066+#endif
20067+
20068+#ifndef GL_SGIX_texture_lod_bias
20069+#define GL_SGIX_texture_lod_bias 1
20070+#endif
20071+
20072+#ifndef GL_SGIX_shadow_ambient
20073+#define GL_SGIX_shadow_ambient 1
20074+#endif
20075+
20076+#ifndef GL_EXT_index_texture
20077+#define GL_EXT_index_texture 1
20078+#endif
20079+
20080+#ifndef GL_EXT_index_material
20081+#define GL_EXT_index_material 1
20082+#ifdef GL_GLEXT_PROTOTYPES
20083+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
20084+#endif /* GL_GLEXT_PROTOTYPES */
20085+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
20086+#endif
20087+
20088+#ifndef GL_EXT_index_func
20089+#define GL_EXT_index_func 1
20090+#ifdef GL_GLEXT_PROTOTYPES
20091+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
20092+#endif /* GL_GLEXT_PROTOTYPES */
20093+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
20094+#endif
20095+
20096+#ifndef GL_EXT_index_array_formats
20097+#define GL_EXT_index_array_formats 1
20098+#endif
20099+
20100+#ifndef GL_EXT_compiled_vertex_array
20101+#define GL_EXT_compiled_vertex_array 1
20102+#ifdef GL_GLEXT_PROTOTYPES
20103+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
20104+GLAPI void APIENTRY glUnlockArraysEXT (void);
20105+#endif /* GL_GLEXT_PROTOTYPES */
20106+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
20107+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
20108+#endif
20109+
20110+#ifndef GL_EXT_cull_vertex
20111+#define GL_EXT_cull_vertex 1
20112+#ifdef GL_GLEXT_PROTOTYPES
20113+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
20114+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
20115+#endif /* GL_GLEXT_PROTOTYPES */
20116+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20117+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20118+#endif
20119+
20120+#ifndef GL_SGIX_ycrcb
20121+#define GL_SGIX_ycrcb 1
20122+#endif
20123+
20124+#ifndef GL_SGIX_fragment_lighting
20125+#define GL_SGIX_fragment_lighting 1
20126+#ifdef GL_GLEXT_PROTOTYPES
20127+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20128+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20129+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20130+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20131+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20132+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20133+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20134+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20135+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20136+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20137+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20138+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20139+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20140+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20141+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20142+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20143+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20144+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20145+#endif /* GL_GLEXT_PROTOTYPES */
20146+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20147+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20148+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20149+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20150+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20151+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20152+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20153+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20154+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20155+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20156+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20157+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20158+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20159+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20160+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20161+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20162+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20163+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20164+#endif
20165+
20166+#ifndef GL_IBM_rasterpos_clip
20167+#define GL_IBM_rasterpos_clip 1
20168+#endif
20169+
20170+#ifndef GL_HP_texture_lighting
20171+#define GL_HP_texture_lighting 1
20172+#endif
20173+
20174+#ifndef GL_EXT_draw_range_elements
20175+#define GL_EXT_draw_range_elements 1
20176+#ifdef GL_GLEXT_PROTOTYPES
20177+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20178+#endif /* GL_GLEXT_PROTOTYPES */
20179+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20180+#endif
20181+
20182+#ifndef GL_WIN_phong_shading
20183+#define GL_WIN_phong_shading 1
20184+#endif
20185+
20186+#ifndef GL_WIN_specular_fog
20187+#define GL_WIN_specular_fog 1
20188+#endif
20189+
20190+#ifndef GL_EXT_light_texture
20191+#define GL_EXT_light_texture 1
20192+#ifdef GL_GLEXT_PROTOTYPES
20193+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20194+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20195+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20196+#endif /* GL_GLEXT_PROTOTYPES */
20197+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20198+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20199+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20200+#endif
20201+
20202+#ifndef GL_SGIX_blend_alpha_minmax
20203+#define GL_SGIX_blend_alpha_minmax 1
20204+#endif
20205+
20206+#ifndef GL_EXT_bgra
20207+#define GL_EXT_bgra 1
20208+#endif
20209+
20210+#ifndef GL_SGIX_async
20211+#define GL_SGIX_async 1
20212+#ifdef GL_GLEXT_PROTOTYPES
20213+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20214+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20215+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20216+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20217+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20218+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20219+#endif /* GL_GLEXT_PROTOTYPES */
20220+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20221+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20222+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20223+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20224+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20225+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20226+#endif
20227+
20228+#ifndef GL_SGIX_async_pixel
20229+#define GL_SGIX_async_pixel 1
20230+#endif
20231+
20232+#ifndef GL_SGIX_async_histogram
20233+#define GL_SGIX_async_histogram 1
20234+#endif
20235+
20236+#ifndef GL_INTEL_parallel_arrays
20237+#define GL_INTEL_parallel_arrays 1
20238+#ifdef GL_GLEXT_PROTOTYPES
20239+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20240+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20241+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20242+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20243+#endif /* GL_GLEXT_PROTOTYPES */
20244+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20245+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20246+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20247+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20248+#endif
20249+
20250+#ifndef GL_HP_occlusion_test
20251+#define GL_HP_occlusion_test 1
20252+#endif
20253+
20254+#ifndef GL_EXT_pixel_transform
20255+#define GL_EXT_pixel_transform 1
20256+#ifdef GL_GLEXT_PROTOTYPES
20257+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20258+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20259+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20260+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20261+/* ERO Begin */
20262+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20263+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20264+/* ERO End */
20265+#endif /* GL_GLEXT_PROTOTYPES */
20266+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20267+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20268+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20269+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20270+/* ERO Begin */
20271+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20272+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20273+/* ERO End */
20274+#endif
20275+
20276+#ifndef GL_EXT_pixel_transform_color_table
20277+#define GL_EXT_pixel_transform_color_table 1
20278+#endif
20279+
20280+#ifndef GL_EXT_shared_texture_palette
20281+#define GL_EXT_shared_texture_palette 1
20282+#endif
20283+
20284+#ifndef GL_EXT_separate_specular_color
20285+#define GL_EXT_separate_specular_color 1
20286+#endif
20287+
20288+#ifndef GL_EXT_secondary_color
20289+#define GL_EXT_secondary_color 1
20290+#ifdef GL_GLEXT_PROTOTYPES
20291+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20292+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20293+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20294+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20295+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20296+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20297+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20298+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20299+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20300+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20301+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20302+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20303+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20304+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20305+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20306+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20307+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20308+#endif /* GL_GLEXT_PROTOTYPES */
20309+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20310+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20311+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20312+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20313+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20314+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20315+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20316+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20317+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20318+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20319+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20320+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20321+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20322+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20323+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20324+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20325+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20326+#endif
20327+
20328+#ifndef GL_EXT_texture_perturb_normal
20329+#define GL_EXT_texture_perturb_normal 1
20330+#ifdef GL_GLEXT_PROTOTYPES
20331+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20332+#endif /* GL_GLEXT_PROTOTYPES */
20333+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20334+#endif
20335+
20336+#ifndef GL_EXT_multi_draw_arrays
20337+#define GL_EXT_multi_draw_arrays 1
20338+#ifdef GL_GLEXT_PROTOTYPES
20339+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20340+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20341+#endif /* GL_GLEXT_PROTOTYPES */
20342+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20343+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20344+#endif
20345+
20346+#ifndef GL_EXT_fog_coord
20347+#define GL_EXT_fog_coord 1
20348+#ifdef GL_GLEXT_PROTOTYPES
20349+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20350+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20351+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20352+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20353+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20354+#endif /* GL_GLEXT_PROTOTYPES */
20355+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20356+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20357+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20358+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20359+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20360+#endif
20361+
20362+#ifndef GL_REND_screen_coordinates
20363+#define GL_REND_screen_coordinates 1
20364+#endif
20365+
20366+#ifndef GL_EXT_coordinate_frame
20367+#define GL_EXT_coordinate_frame 1
20368+#ifdef GL_GLEXT_PROTOTYPES
20369+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20370+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20371+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20372+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20373+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20374+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20375+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20376+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20377+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20378+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20379+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20380+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20381+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20382+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20383+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20384+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20385+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20386+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20387+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20388+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20389+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20390+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20391+#endif /* GL_GLEXT_PROTOTYPES */
20392+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20393+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20394+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20395+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20396+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20397+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20398+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20399+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20400+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20401+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20402+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20403+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20404+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20405+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20406+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20407+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20408+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20409+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20410+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20411+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20412+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20413+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20414+#endif
20415+
20416+#ifndef GL_EXT_texture_env_combine
20417+#define GL_EXT_texture_env_combine 1
20418+#endif
20419+
20420+#ifndef GL_APPLE_specular_vector
20421+#define GL_APPLE_specular_vector 1
20422+#endif
20423+
20424+#ifndef GL_APPLE_transform_hint
20425+#define GL_APPLE_transform_hint 1
20426+#endif
20427+
20428+#ifndef GL_SGIX_fog_scale
20429+#define GL_SGIX_fog_scale 1
20430+#endif
20431+
20432+#ifndef GL_SUNX_constant_data
20433+#define GL_SUNX_constant_data 1
20434+#ifdef GL_GLEXT_PROTOTYPES
20435+GLAPI void APIENTRY glFinishTextureSUNX (void);
20436+#endif /* GL_GLEXT_PROTOTYPES */
20437+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20438+#endif
20439+
20440+#ifndef GL_SUN_global_alpha
20441+#define GL_SUN_global_alpha 1
20442+#ifdef GL_GLEXT_PROTOTYPES
20443+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20444+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20445+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20446+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20447+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20448+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20449+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20450+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20451+#endif /* GL_GLEXT_PROTOTYPES */
20452+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20453+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20454+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20455+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20456+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20457+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20458+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20459+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20460+#endif
20461+
20462+#ifndef GL_SUN_triangle_list
20463+#define GL_SUN_triangle_list 1
20464+#ifdef GL_GLEXT_PROTOTYPES
20465+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20466+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20467+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20468+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20469+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20470+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20471+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20472+#endif /* GL_GLEXT_PROTOTYPES */
20473+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20474+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20475+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20476+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20477+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20478+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20479+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20480+#endif
20481+
20482+#ifndef GL_SUN_vertex
20483+#define GL_SUN_vertex 1
20484+#ifdef GL_GLEXT_PROTOTYPES
20485+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20486+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20487+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20488+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20489+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20490+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20491+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20492+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20493+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20494+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20495+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20496+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20497+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20498+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20499+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20500+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20501+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20502+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20503+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20504+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20505+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20506+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20507+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20508+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20509+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20510+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20511+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20512+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20513+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20514+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20515+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20516+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20517+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20518+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20519+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20520+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20521+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20522+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20523+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20524+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20525+#endif /* GL_GLEXT_PROTOTYPES */
20526+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20527+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20528+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20529+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20530+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20531+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20532+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20533+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20534+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20535+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20536+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20537+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20538+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20539+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20540+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20541+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20542+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20543+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20544+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20545+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20546+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20547+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20548+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20549+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20550+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20551+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20552+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20553+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20554+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20555+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20556+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20557+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20558+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20559+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20560+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20561+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20562+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20563+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20564+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20565+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20566+#endif
20567+
20568+#ifndef GL_EXT_blend_func_separate
20569+#define GL_EXT_blend_func_separate 1
20570+#ifdef GL_GLEXT_PROTOTYPES
20571+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20572+#endif /* GL_GLEXT_PROTOTYPES */
20573+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20574+#endif
20575+
20576+#ifndef GL_INGR_blend_func_separate
20577+#define GL_INGR_blend_func_separate 1
20578+#ifdef GL_GLEXT_PROTOTYPES
20579+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20580+#endif /* GL_GLEXT_PROTOTYPES */
20581+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20582+#endif
20583+
20584+#ifndef GL_INGR_color_clamp
20585+#define GL_INGR_color_clamp 1
20586+#endif
20587+
20588+#ifndef GL_INGR_interlace_read
20589+#define GL_INGR_interlace_read 1
20590+#endif
20591+
20592+#ifndef GL_EXT_stencil_wrap
20593+#define GL_EXT_stencil_wrap 1
20594+#endif
20595+
20596+#ifndef GL_EXT_422_pixels
20597+#define GL_EXT_422_pixels 1
20598+#endif
20599+
20600+#ifndef GL_NV_texgen_reflection
20601+#define GL_NV_texgen_reflection 1
20602+#endif
20603+
20604+#ifndef GL_SUN_convolution_border_modes
20605+#define GL_SUN_convolution_border_modes 1
20606+#endif
20607+
20608+#ifndef GL_EXT_texture_env_add
20609+#define GL_EXT_texture_env_add 1
20610+#endif
20611+
20612+#ifndef GL_EXT_texture_lod_bias
20613+#define GL_EXT_texture_lod_bias 1
20614+#endif
20615+
20616+#ifndef GL_EXT_texture_filter_anisotropic
20617+#define GL_EXT_texture_filter_anisotropic 1
20618+#endif
20619+
20620+#ifndef GL_EXT_vertex_weighting
20621+#define GL_EXT_vertex_weighting 1
20622+#ifdef GL_GLEXT_PROTOTYPES
20623+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20624+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20625+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20626+#endif /* GL_GLEXT_PROTOTYPES */
20627+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20628+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20629+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20630+#endif
20631+
20632+#ifndef GL_NV_light_max_exponent
20633+#define GL_NV_light_max_exponent 1
20634+#endif
20635+
20636+#ifndef GL_NV_vertex_array_range
20637+#define GL_NV_vertex_array_range 1
20638+#ifdef GL_GLEXT_PROTOTYPES
20639+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20640+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20641+#endif /* GL_GLEXT_PROTOTYPES */
20642+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20643+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20644+#endif
20645+
20646+#ifndef GL_NV_register_combiners
20647+#define GL_NV_register_combiners 1
20648+#ifdef GL_GLEXT_PROTOTYPES
20649+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20650+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20651+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20652+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20653+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20654+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20655+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20656+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20657+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20658+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20659+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20660+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20661+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20662+#endif /* GL_GLEXT_PROTOTYPES */
20663+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20664+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20665+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20666+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20667+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20668+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20669+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20670+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20671+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20672+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20673+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20674+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20675+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20676+#endif
20677+
20678+#ifndef GL_NV_fog_distance
20679+#define GL_NV_fog_distance 1
20680+#endif
20681+
20682+#ifndef GL_NV_texgen_emboss
20683+#define GL_NV_texgen_emboss 1
20684+#endif
20685+
20686+#ifndef GL_NV_blend_square
20687+#define GL_NV_blend_square 1
20688+#endif
20689+
20690+#ifndef GL_NV_texture_env_combine4
20691+#define GL_NV_texture_env_combine4 1
20692+#endif
20693+
20694+#ifndef GL_MESA_resize_buffers
20695+#define GL_MESA_resize_buffers 1
20696+#ifdef GL_GLEXT_PROTOTYPES
20697+GLAPI void APIENTRY glResizeBuffersMESA (void);
20698+#endif /* GL_GLEXT_PROTOTYPES */
20699+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20700+#endif
20701+
20702+#ifndef GL_MESA_window_pos
20703+#define GL_MESA_window_pos 1
20704+#ifdef GL_GLEXT_PROTOTYPES
20705+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20706+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20707+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20708+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20709+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20710+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20711+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20712+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20713+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20714+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20715+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20716+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20717+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20718+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20719+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20720+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20721+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20722+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20723+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20724+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20725+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20726+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20727+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20728+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20729+#endif /* GL_GLEXT_PROTOTYPES */
20730+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20731+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20732+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20733+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20734+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20735+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20736+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20737+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20738+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20739+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20740+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20741+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20742+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20743+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20744+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20745+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20746+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20747+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20748+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20749+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20750+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20751+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20752+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20753+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20754+#endif
20755+
20756+#ifndef GL_IBM_cull_vertex
20757+#define GL_IBM_cull_vertex 1
20758+#endif
20759+
20760+#ifndef GL_IBM_multimode_draw_arrays
20761+#define GL_IBM_multimode_draw_arrays 1
20762+#ifdef GL_GLEXT_PROTOTYPES
20763+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20764+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20765+#endif /* GL_GLEXT_PROTOTYPES */
20766+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20767+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20768+#endif
20769+
20770+#ifndef GL_IBM_vertex_array_lists
20771+#define GL_IBM_vertex_array_lists 1
20772+#ifdef GL_GLEXT_PROTOTYPES
20773+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20774+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20775+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20776+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20777+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20778+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20779+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20780+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20781+#endif /* GL_GLEXT_PROTOTYPES */
20782+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20783+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20784+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20785+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20786+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20787+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20788+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20789+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20790+#endif
20791+
20792+#ifndef GL_SGIX_subsample
20793+#define GL_SGIX_subsample 1
20794+#endif
20795+
20796+#ifndef GL_SGIX_ycrcba
20797+#define GL_SGIX_ycrcba 1
20798+#endif
20799+
20800+#ifndef GL_SGIX_ycrcb_subsample
20801+#define GL_SGIX_ycrcb_subsample 1
20802+#endif
20803+
20804+#ifndef GL_SGIX_depth_pass_instrument
20805+#define GL_SGIX_depth_pass_instrument 1
20806+#endif
20807+
20808+#ifndef GL_3DFX_texture_compression_FXT1
20809+#define GL_3DFX_texture_compression_FXT1 1
20810+#endif
20811+
20812+#ifndef GL_3DFX_multisample
20813+#define GL_3DFX_multisample 1
20814+#endif
20815+
20816+#ifndef GL_3DFX_tbuffer
20817+#define GL_3DFX_tbuffer 1
20818+#ifdef GL_GLEXT_PROTOTYPES
20819+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20820+#endif /* GL_GLEXT_PROTOTYPES */
20821+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20822+#endif
20823+
20824+#ifndef GL_EXT_multisample
20825+#define GL_EXT_multisample 1
20826+#ifdef GL_GLEXT_PROTOTYPES
20827+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20828+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20829+#endif /* GL_GLEXT_PROTOTYPES */
20830+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20831+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20832+#endif
20833+
20834+#ifndef GL_SGIX_vertex_preclip
20835+#define GL_SGIX_vertex_preclip 1
20836+#endif
20837+
20838+#ifndef GL_SGIX_convolution_accuracy
20839+#define GL_SGIX_convolution_accuracy 1
20840+#endif
20841+
20842+#ifndef GL_SGIX_resample
20843+#define GL_SGIX_resample 1
20844+#endif
20845+
20846+#ifndef GL_SGIS_point_line_texgen
20847+#define GL_SGIS_point_line_texgen 1
20848+#endif
20849+
20850+#ifndef GL_SGIS_texture_color_mask
20851+#define GL_SGIS_texture_color_mask 1
20852+#ifdef GL_GLEXT_PROTOTYPES
20853+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20854+#endif /* GL_GLEXT_PROTOTYPES */
20855+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20856+#endif
20857+
20858+#ifndef GL_SGIX_igloo_interface
20859+#define GL_SGIX_igloo_interface 1
20860+#ifdef GL_GLEXT_PROTOTYPES
20861+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20862+#endif /* GL_GLEXT_PROTOTYPES */
20863+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20864+#endif
20865+
20866+#ifndef GL_EXT_texture_env_dot3
20867+#define GL_EXT_texture_env_dot3 1
20868+#endif
20869+
20870+#ifndef GL_ATI_texture_mirror_once
20871+#define GL_ATI_texture_mirror_once 1
20872+#endif
20873+
20874+#ifndef GL_NV_fence
20875+#define GL_NV_fence 1
20876+#ifdef GL_GLEXT_PROTOTYPES
20877+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20878+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20879+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20880+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20881+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20882+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20883+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20884+#endif /* GL_GLEXT_PROTOTYPES */
20885+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20886+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20887+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20888+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20889+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20890+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20891+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20892+#endif
20893+
20894+#ifndef GL_NV_evaluators
20895+#define GL_NV_evaluators 1
20896+#ifdef GL_GLEXT_PROTOTYPES
20897+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20898+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20899+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20900+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20901+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20902+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20903+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20904+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20905+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20906+#endif /* GL_GLEXT_PROTOTYPES */
20907+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20908+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20909+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20910+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20911+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20912+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20913+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20914+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20915+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20916+#endif
20917+
20918+#ifndef GL_NV_packed_depth_stencil
20919+#define GL_NV_packed_depth_stencil 1
20920+#endif
20921+
20922+#ifndef GL_NV_register_combiners2
20923+#define GL_NV_register_combiners2 1
20924+#ifdef GL_GLEXT_PROTOTYPES
20925+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20926+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20927+#endif /* GL_GLEXT_PROTOTYPES */
20928+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20929+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20930+#endif
20931+
20932+#ifndef GL_NV_texture_compression_vtc
20933+#define GL_NV_texture_compression_vtc 1
20934+#endif
20935+
20936+#ifndef GL_NV_texture_rectangle
20937+#define GL_NV_texture_rectangle 1
20938+#endif
20939+
20940+#ifndef GL_NV_texture_shader
20941+#define GL_NV_texture_shader 1
20942+#endif
20943+
20944+#ifndef GL_NV_texture_shader2
20945+#define GL_NV_texture_shader2 1
20946+#endif
20947+
20948+#ifndef GL_NV_vertex_array_range2
20949+#define GL_NV_vertex_array_range2 1
20950+#endif
20951+
20952+#ifndef GL_NV_vertex_program
20953+#define GL_NV_vertex_program 1
20954+#ifdef GL_GLEXT_PROTOTYPES
20955+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20956+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20957+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20958+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20959+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20960+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20961+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20962+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20963+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20964+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20965+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20966+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20967+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20968+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20969+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20970+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20971+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20972+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20973+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20974+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20975+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20976+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20977+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20978+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20979+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20980+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20981+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20982+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20983+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20984+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20985+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20986+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20987+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20988+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20989+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20990+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20991+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20992+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20993+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20994+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20995+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20996+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20997+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20998+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20999+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
21000+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
21001+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
21002+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
21003+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
21004+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
21005+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
21006+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
21007+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
21008+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
21009+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
21010+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
21011+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
21012+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
21013+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
21014+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
21015+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
21016+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
21017+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
21018+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
21019+#endif /* GL_GLEXT_PROTOTYPES */
21020+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
21021+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
21022+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21023+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
21024+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
21025+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
21026+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
21027+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21028+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
21029+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
21030+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
21031+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
21032+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
21033+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
21034+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
21035+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
21036+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21037+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
21038+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21039+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
21040+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
21041+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
21042+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21043+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
21044+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
21045+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
21046+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
21047+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
21048+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
21049+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
21050+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
21051+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
21052+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
21053+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
21054+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
21055+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
21056+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
21057+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
21058+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
21059+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
21060+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
21061+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
21062+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
21063+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21064+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
21065+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21066+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
21067+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
21068+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
21069+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
21070+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
21071+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21072+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21073+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21074+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21075+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21076+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21077+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21078+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21079+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21080+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21081+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21082+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21083+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
21084+#endif
21085+
21086+#ifndef GL_SGIX_texture_coordinate_clamp
21087+#define GL_SGIX_texture_coordinate_clamp 1
21088+#endif
21089+
21090+#ifndef GL_SGIX_scalebias_hint
21091+#define GL_SGIX_scalebias_hint 1
21092+#endif
21093+
21094+#ifndef GL_OML_interlace
21095+#define GL_OML_interlace 1
21096+#endif
21097+
21098+#ifndef GL_OML_subsample
21099+#define GL_OML_subsample 1
21100+#endif
21101+
21102+#ifndef GL_OML_resample
21103+#define GL_OML_resample 1
21104+#endif
21105+
21106+#ifndef GL_NV_copy_depth_to_color
21107+#define GL_NV_copy_depth_to_color 1
21108+#endif
21109+
21110+#ifndef GL_ATI_envmap_bumpmap
21111+#define GL_ATI_envmap_bumpmap 1
21112+#ifdef GL_GLEXT_PROTOTYPES
21113+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
21114+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
21115+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
21116+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21117+#endif /* GL_GLEXT_PROTOTYPES */
21118+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21119+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21120+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21121+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21122+#endif
21123+
21124+#ifndef GL_ATI_fragment_shader
21125+#define GL_ATI_fragment_shader 1
21126+#ifdef GL_GLEXT_PROTOTYPES
21127+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21128+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21129+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21130+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21131+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21132+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21133+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21134+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21135+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21136+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21137+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21138+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21139+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21140+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21141+#endif /* GL_GLEXT_PROTOTYPES */
21142+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21143+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21144+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21145+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21146+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21147+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21148+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21149+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21150+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21151+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
21152+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21153+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21154+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
21155+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21156+#endif
21157+
21158+#ifndef GL_ATI_pn_triangles
21159+#define GL_ATI_pn_triangles 1
21160+#ifdef GL_GLEXT_PROTOTYPES
21161+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21162+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21163+#endif /* GL_GLEXT_PROTOTYPES */
21164+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21165+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21166+#endif
21167+
21168+#ifndef GL_ATI_vertex_array_object
21169+#define GL_ATI_vertex_array_object 1
21170+#ifdef GL_GLEXT_PROTOTYPES
21171+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21172+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21173+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21174+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21175+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21176+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21177+/* ERO Begin */
21178+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21179+/* ERO End */
21180+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21181+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21182+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21183+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21184+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21185+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21186+#endif /* GL_GLEXT_PROTOTYPES */
21187+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21188+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21189+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21190+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21191+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21192+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21193+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21194+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21195+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21196+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21197+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21198+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21199+#endif
21200+
21201+#ifndef GL_EXT_vertex_shader
21202+#define GL_EXT_vertex_shader 1
21203+#ifdef GL_GLEXT_PROTOTYPES
21204+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21205+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21206+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21207+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21208+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21209+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21210+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21211+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21212+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21213+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21214+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21215+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21216+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21217+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21218+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21219+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21220+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21221+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21222+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21223+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21224+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21225+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21226+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21227+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21228+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21229+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21230+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21231+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21232+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21233+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21234+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21235+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21236+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21237+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21238+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21239+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21240+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21241+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21242+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21243+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21244+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21245+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21246+#endif /* GL_GLEXT_PROTOTYPES */
21247+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21248+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21249+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21250+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21251+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21252+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21253+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21254+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21255+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21256+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21257+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21258+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21259+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21260+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21261+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21262+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21263+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21264+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21265+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21266+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21267+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21268+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21269+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21270+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21271+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21272+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21273+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21274+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21275+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21276+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21277+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21278+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21279+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21280+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21281+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21282+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21283+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21284+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21285+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21286+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21287+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21288+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21289+#endif
21290+
21291+#ifndef GL_ATI_vertex_streams
21292+#define GL_ATI_vertex_streams 1
21293+#ifdef GL_GLEXT_PROTOTYPES
21294+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21295+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21296+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21297+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21298+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21299+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21300+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21301+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21302+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21303+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21304+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21305+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21306+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21307+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21308+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21309+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21310+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21311+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21312+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21313+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21314+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21315+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21316+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21317+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21318+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21319+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21320+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21321+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21322+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21323+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21324+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21325+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21326+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21327+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21328+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21329+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21330+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21331+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21332+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21333+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21334+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21335+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21336+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21337+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21338+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21339+#endif /* GL_GLEXT_PROTOTYPES */
21340+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21341+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21342+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21343+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21344+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21345+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21346+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21347+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21348+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21349+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21350+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21351+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21352+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21353+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21354+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21355+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21356+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21357+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21358+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21359+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21360+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21361+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21362+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21363+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21364+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21365+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21366+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21367+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21368+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21369+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21370+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21371+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21372+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21373+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21374+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21375+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21376+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21377+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21378+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21379+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21380+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21381+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21382+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21383+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21384+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21385+#endif
21386+
21387+#ifndef GL_ATI_element_array
21388+#define GL_ATI_element_array 1
21389+#ifdef GL_GLEXT_PROTOTYPES
21390+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21391+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21392+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21393+#endif /* GL_GLEXT_PROTOTYPES */
21394+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21395+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21396+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21397+#endif
21398+
21399+#ifndef GL_SUN_mesh_array
21400+#define GL_SUN_mesh_array 1
21401+#ifdef GL_GLEXT_PROTOTYPES
21402+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21403+#endif /* GL_GLEXT_PROTOTYPES */
21404+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21405+#endif
21406+
21407+#ifndef GL_SUN_slice_accum
21408+#define GL_SUN_slice_accum 1
21409+#endif
21410+
21411+#ifndef GL_NV_multisample_filter_hint
21412+#define GL_NV_multisample_filter_hint 1
21413+#endif
21414+
21415+#ifndef GL_NV_depth_clamp
21416+#define GL_NV_depth_clamp 1
21417+#endif
21418+
21419+#ifndef GL_NV_occlusion_query
21420+#define GL_NV_occlusion_query 1
21421+#ifdef GL_GLEXT_PROTOTYPES
21422+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21423+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21424+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21425+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21426+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21427+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21428+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21429+#endif /* GL_GLEXT_PROTOTYPES */
21430+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21431+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21432+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21433+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21434+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21435+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21436+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21437+#endif
21438+
21439+#ifndef GL_NV_point_sprite
21440+#define GL_NV_point_sprite 1
21441+#ifdef GL_GLEXT_PROTOTYPES
21442+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21443+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21444+#endif /* GL_GLEXT_PROTOTYPES */
21445+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21446+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21447+#endif
21448+
21449+#ifndef GL_NV_texture_shader3
21450+#define GL_NV_texture_shader3 1
21451+#endif
21452+
21453+#ifndef GL_NV_vertex_program1_1
21454+#define GL_NV_vertex_program1_1 1
21455+#endif
21456+
21457+#ifndef GL_EXT_shadow_funcs
21458+#define GL_EXT_shadow_funcs 1
21459+#endif
21460+
21461+#ifndef GL_EXT_stencil_two_side
21462+#define GL_EXT_stencil_two_side 1
21463+#ifdef GL_GLEXT_PROTOTYPES
21464+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21465+#endif /* GL_GLEXT_PROTOTYPES */
21466+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21467+#endif
21468+
21469+#ifndef GL_ATI_text_fragment_shader
21470+#define GL_ATI_text_fragment_shader 1
21471+#endif
21472+
21473+#ifndef GL_APPLE_client_storage
21474+#define GL_APPLE_client_storage 1
21475+#endif
21476+
21477+#ifndef GL_APPLE_element_array
21478+#define GL_APPLE_element_array 1
21479+#ifdef GL_GLEXT_PROTOTYPES
21480+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21481+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21482+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21483+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21484+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21485+#endif /* GL_GLEXT_PROTOTYPES */
21486+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21487+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21488+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21489+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21490+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21491+#endif
21492+
21493+#ifndef GL_APPLE_fence
21494+#define GL_APPLE_fence 1
21495+#ifdef GL_GLEXT_PROTOTYPES
21496+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21497+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21498+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21499+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21500+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21501+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21502+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21503+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21504+#endif /* GL_GLEXT_PROTOTYPES */
21505+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21506+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21507+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21508+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21509+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21510+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21511+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21512+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21513+#endif
21514+
21515+#ifndef GL_APPLE_vertex_array_object
21516+#define GL_APPLE_vertex_array_object 1
21517+#ifdef GL_GLEXT_PROTOTYPES
21518+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21519+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21520+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21521+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21522+#endif /* GL_GLEXT_PROTOTYPES */
21523+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21524+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21525+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21526+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21527+#endif
21528+
21529+#ifndef GL_APPLE_vertex_array_range
21530+#define GL_APPLE_vertex_array_range 1
21531+#ifdef GL_GLEXT_PROTOTYPES
21532+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21533+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21534+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21535+#endif /* GL_GLEXT_PROTOTYPES */
21536+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21537+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21538+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21539+#endif
21540+
21541+#ifndef GL_APPLE_ycbcr_422
21542+#define GL_APPLE_ycbcr_422 1
21543+#endif
21544+
21545+#ifndef GL_S3_s3tc
21546+#define GL_S3_s3tc 1
21547+#endif
21548+
21549+#ifndef GL_ATI_draw_buffers
21550+#define GL_ATI_draw_buffers 1
21551+#ifdef GL_GLEXT_PROTOTYPES
21552+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21553+#endif /* GL_GLEXT_PROTOTYPES */
21554+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21555+#endif
21556+
21557+#ifndef GL_ATI_pixel_format_float
21558+#define GL_ATI_pixel_format_float 1
21559+/* This is really a WGL extension, but defines some associated GL enums.
21560+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21561+ */
21562+#endif
21563+
21564+#ifndef GL_ATI_texture_env_combine3
21565+#define GL_ATI_texture_env_combine3 1
21566+#endif
21567+
21568+#ifndef GL_ATI_texture_float
21569+#define GL_ATI_texture_float 1
21570+#endif
21571+
21572+#ifndef GL_NV_float_buffer
21573+#define GL_NV_float_buffer 1
21574+#endif
21575+
21576+#ifndef GL_NV_fragment_program
21577+#define GL_NV_fragment_program 1
21578+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21579+#ifdef GL_GLEXT_PROTOTYPES
21580+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21581+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21582+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21583+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21584+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21585+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21586+#endif /* GL_GLEXT_PROTOTYPES */
21587+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21588+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21589+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21590+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21591+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21592+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21593+#endif
21594+
21595+#ifndef GL_NV_half_float
21596+#define GL_NV_half_float 1
21597+#ifdef GL_GLEXT_PROTOTYPES
21598+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21599+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21600+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21601+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21602+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21603+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21604+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21605+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21606+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21607+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21608+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21609+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21610+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21611+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21612+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21613+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21614+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21615+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21616+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21617+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21618+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21619+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21620+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21621+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21622+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21623+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21624+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21625+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21626+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21627+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21628+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21629+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21630+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21631+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21632+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21633+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21634+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21635+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21636+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21637+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21638+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21639+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21640+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21641+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21642+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21643+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21644+#endif /* GL_GLEXT_PROTOTYPES */
21645+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21646+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21647+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21648+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21649+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21650+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21651+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21652+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21653+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21654+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21655+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21656+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21657+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21658+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21659+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21660+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21661+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21662+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21663+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21664+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21665+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21666+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21667+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21668+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21669+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21670+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21671+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21672+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21673+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21674+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21675+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21676+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21677+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21678+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21679+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21680+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21681+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21682+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21683+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21684+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21685+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21686+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21687+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21688+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21689+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21690+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21691+#endif
21692+
21693+#ifndef GL_NV_pixel_data_range
21694+#define GL_NV_pixel_data_range 1
21695+#ifdef GL_GLEXT_PROTOTYPES
21696+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21697+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21698+#endif /* GL_GLEXT_PROTOTYPES */
21699+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21700+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21701+#endif
21702+
21703+#ifndef GL_NV_primitive_restart
21704+#define GL_NV_primitive_restart 1
21705+#ifdef GL_GLEXT_PROTOTYPES
21706+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21707+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21708+#endif /* GL_GLEXT_PROTOTYPES */
21709+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21710+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21711+#endif
21712+
21713+#ifndef GL_NV_texture_expand_normal
21714+#define GL_NV_texture_expand_normal 1
21715+#endif
21716+
21717+#ifndef GL_NV_vertex_program2
21718+#define GL_NV_vertex_program2 1
21719+#endif
21720+
21721+#ifndef GL_ATI_map_object_buffer
21722+#define GL_ATI_map_object_buffer 1
21723+#ifdef GL_GLEXT_PROTOTYPES
21724+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21725+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21726+#endif /* GL_GLEXT_PROTOTYPES */
21727+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21728+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21729+#endif
21730+
21731+#ifndef GL_ATI_separate_stencil
21732+#define GL_ATI_separate_stencil 1
21733+#ifdef GL_GLEXT_PROTOTYPES
21734+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21735+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21736+#endif /* GL_GLEXT_PROTOTYPES */
21737+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21738+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21739+#endif
21740+
21741+#ifndef GL_ATI_vertex_attrib_array_object
21742+#define GL_ATI_vertex_attrib_array_object 1
21743+#ifdef GL_GLEXT_PROTOTYPES
21744+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21745+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21746+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21747+#endif /* GL_GLEXT_PROTOTYPES */
21748+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21749+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21750+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21751+#endif
21752+
21753+#ifndef GL_OES_read_format
21754+#define GL_OES_read_format 1
21755+#endif
21756+
21757+#ifndef GL_EXT_depth_bounds_test
21758+#define GL_EXT_depth_bounds_test 1
21759+#ifdef GL_GLEXT_PROTOTYPES
21760+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21761+#endif /* GL_GLEXT_PROTOTYPES */
21762+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21763+#endif
21764+
21765+#ifndef GL_EXT_texture_mirror_clamp
21766+#define GL_EXT_texture_mirror_clamp 1
21767+#endif
21768+
21769+#ifndef GL_EXT_blend_equation_separate
21770+#define GL_EXT_blend_equation_separate 1
21771+#ifdef GL_GLEXT_PROTOTYPES
21772+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21773+#endif /* GL_GLEXT_PROTOTYPES */
21774+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21775+#endif
21776+
21777+#ifndef GL_MESA_pack_invert
21778+#define GL_MESA_pack_invert 1
21779+#endif
21780+
21781+#ifndef GL_MESA_ycbcr_texture
21782+#define GL_MESA_ycbcr_texture 1
21783+#endif
21784+
21785+#ifndef GL_EXT_pixel_buffer_object
21786+#define GL_EXT_pixel_buffer_object 1
21787+#endif
21788+
21789+#ifndef GL_NV_fragment_program_option
21790+#define GL_NV_fragment_program_option 1
21791+#endif
21792+
21793+#ifndef GL_NV_fragment_program2
21794+#define GL_NV_fragment_program2 1
21795+#endif
21796+
21797+#ifndef GL_NV_vertex_program2_option
21798+#define GL_NV_vertex_program2_option 1
21799+#endif
21800+
21801+#ifndef GL_NV_vertex_program3
21802+#define GL_NV_vertex_program3 1
21803+#endif
21804+
21805+#ifndef GL_EXT_framebuffer_object
21806+#define GL_EXT_framebuffer_object 1
21807+#ifdef GL_GLEXT_PROTOTYPES
21808+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21809+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21810+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21811+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21812+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21813+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21814+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21815+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21816+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21817+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21818+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21819+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21820+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21821+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21822+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21823+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21824+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21825+#endif /* GL_GLEXT_PROTOTYPES */
21826+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21827+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21828+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21829+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21830+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21831+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21832+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21833+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21834+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21835+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21836+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21837+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21838+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21839+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21840+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21841+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21842+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21843+#endif
21844+
21845+#ifndef GL_GREMEDY_string_marker
21846+#define GL_GREMEDY_string_marker 1
21847+#ifdef GL_GLEXT_PROTOTYPES
21848+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21849+#endif /* GL_GLEXT_PROTOTYPES */
21850+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21851+#endif
21852+
21853+#ifndef GL_EXT_packed_depth_stencil
21854+#define GL_EXT_packed_depth_stencil 1
21855+#endif
21856+
21857+#ifndef GL_EXT_stencil_clear_tag
21858+#define GL_EXT_stencil_clear_tag 1
21859+#ifdef GL_GLEXT_PROTOTYPES
21860+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21861+#endif /* GL_GLEXT_PROTOTYPES */
21862+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21863+#endif
21864+
21865+#ifndef GL_EXT_texture_sRGB
21866+#define GL_EXT_texture_sRGB 1
21867+#endif
21868+
21869+#ifndef GL_EXT_framebuffer_blit
21870+#define GL_EXT_framebuffer_blit 1
21871+#ifdef GL_GLEXT_PROTOTYPES
21872+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21873+#endif /* GL_GLEXT_PROTOTYPES */
21874+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21875+#endif
21876+
21877+#ifndef GL_EXT_framebuffer_multisample
21878+#define GL_EXT_framebuffer_multisample 1
21879+#ifdef GL_GLEXT_PROTOTYPES
21880+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21881+#endif /* GL_GLEXT_PROTOTYPES */
21882+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21883+#endif
21884+
21885+#ifndef GL_MESAX_texture_stack
21886+#define GL_MESAX_texture_stack 1
21887+#endif
21888+
21889+#ifndef GL_EXT_timer_query
21890+#define GL_EXT_timer_query 1
21891+#ifdef GL_GLEXT_PROTOTYPES
21892+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21893+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21894+#endif /* GL_GLEXT_PROTOTYPES */
21895+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21896+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21897+#endif
21898+
21899+#ifndef GL_EXT_gpu_program_parameters
21900+#define GL_EXT_gpu_program_parameters 1
21901+#ifdef GL_GLEXT_PROTOTYPES
21902+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21903+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21904+#endif /* GL_GLEXT_PROTOTYPES */
21905+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21906+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21907+#endif
21908+
21909+#ifndef GL_APPLE_flush_buffer_range
21910+#define GL_APPLE_flush_buffer_range 1
21911+#ifdef GL_GLEXT_PROTOTYPES
21912+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21913+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21914+#endif /* GL_GLEXT_PROTOTYPES */
21915+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21916+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21917+#endif
21918+
21919+#ifndef GL_NV_gpu_program4
21920+#define GL_NV_gpu_program4 1
21921+#ifdef GL_GLEXT_PROTOTYPES
21922+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21923+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21924+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21925+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21926+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21927+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21928+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21929+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21930+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21931+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21932+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21933+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21934+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21935+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21936+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21937+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21938+#endif /* GL_GLEXT_PROTOTYPES */
21939+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21940+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21941+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21942+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21943+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21944+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21945+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21946+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21947+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21948+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21949+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21950+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21951+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21952+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21953+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21954+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21955+#endif
21956+
21957+#ifndef GL_NV_geometry_program4
21958+#define GL_NV_geometry_program4 1
21959+#ifdef GL_GLEXT_PROTOTYPES
21960+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21961+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21962+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21963+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21964+#endif /* GL_GLEXT_PROTOTYPES */
21965+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21966+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21967+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21968+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21969+#endif
21970+
21971+#ifndef GL_EXT_geometry_shader4
21972+#define GL_EXT_geometry_shader4 1
21973+#ifdef GL_GLEXT_PROTOTYPES
21974+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21975+#endif /* GL_GLEXT_PROTOTYPES */
21976+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21977+#endif
21978+
21979+#ifndef GL_NV_vertex_program4
21980+#define GL_NV_vertex_program4 1
21981+#ifdef GL_GLEXT_PROTOTYPES
21982+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21983+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21984+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21985+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21986+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21987+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21988+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21989+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21990+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21991+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21992+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21993+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21994+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21995+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21996+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21997+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21998+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21999+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
22000+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
22001+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
22002+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
22003+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
22004+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
22005+#endif /* GL_GLEXT_PROTOTYPES */
22006+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
22007+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
22008+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
22009+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
22010+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
22011+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
22012+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
22013+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
22014+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
22015+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
22016+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
22017+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
22018+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
22019+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
22020+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
22021+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
22022+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
22023+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
22024+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
22025+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
22026+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
22027+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
22028+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
22029+#endif
22030+
22031+#ifndef GL_EXT_gpu_shader4
22032+#define GL_EXT_gpu_shader4 1
22033+#ifdef GL_GLEXT_PROTOTYPES
22034+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
22035+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
22036+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
22037+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
22038+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
22039+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
22040+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
22041+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
22042+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
22043+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
22044+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
22045+#endif /* GL_GLEXT_PROTOTYPES */
22046+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
22047+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
22048+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
22049+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
22050+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
22051+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
22052+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
22053+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22054+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22055+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22056+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22057+#endif
22058+
22059+#ifndef GL_EXT_draw_instanced
22060+#define GL_EXT_draw_instanced 1
22061+#ifdef GL_GLEXT_PROTOTYPES
22062+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
22063+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
22064+#endif /* GL_GLEXT_PROTOTYPES */
22065+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
22066+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
22067+#endif
22068+
22069+#ifndef GL_EXT_packed_float
22070+#define GL_EXT_packed_float 1
22071+#endif
22072+
22073+#ifndef GL_EXT_texture_array
22074+#define GL_EXT_texture_array 1
22075+#endif
22076+
22077+#ifndef GL_EXT_texture_buffer_object
22078+#define GL_EXT_texture_buffer_object 1
22079+#ifdef GL_GLEXT_PROTOTYPES
22080+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
22081+#endif /* GL_GLEXT_PROTOTYPES */
22082+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
22083+#endif
22084+
22085+#ifndef GL_EXT_texture_compression_latc
22086+#define GL_EXT_texture_compression_latc 1
22087+#endif
22088+
22089+#ifndef GL_EXT_texture_compression_rgtc
22090+#define GL_EXT_texture_compression_rgtc 1
22091+#endif
22092+
22093+#ifndef GL_EXT_texture_shared_exponent
22094+#define GL_EXT_texture_shared_exponent 1
22095+#endif
22096+
22097+#ifndef GL_NV_depth_buffer_float
22098+#define GL_NV_depth_buffer_float 1
22099+#ifdef GL_GLEXT_PROTOTYPES
22100+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
22101+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
22102+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
22103+#endif /* GL_GLEXT_PROTOTYPES */
22104+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
22105+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
22106+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
22107+#endif
22108+
22109+#ifndef GL_NV_fragment_program4
22110+#define GL_NV_fragment_program4 1
22111+#endif
22112+
22113+#ifndef GL_NV_framebuffer_multisample_coverage
22114+#define GL_NV_framebuffer_multisample_coverage 1
22115+#ifdef GL_GLEXT_PROTOTYPES
22116+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22117+#endif /* GL_GLEXT_PROTOTYPES */
22118+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22119+#endif
22120+
22121+#ifndef GL_EXT_framebuffer_sRGB
22122+#define GL_EXT_framebuffer_sRGB 1
22123+#endif
22124+
22125+#ifndef GL_NV_geometry_shader4
22126+#define GL_NV_geometry_shader4 1
22127+#endif
22128+
22129+#ifndef GL_NV_parameter_buffer_object
22130+#define GL_NV_parameter_buffer_object 1
22131+#ifdef GL_GLEXT_PROTOTYPES
22132+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22133+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22134+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22135+#endif /* GL_GLEXT_PROTOTYPES */
22136+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22137+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22138+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22139+#endif
22140+
22141+#ifndef GL_EXT_draw_buffers2
22142+#define GL_EXT_draw_buffers2 1
22143+#ifdef GL_GLEXT_PROTOTYPES
22144+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22145+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22146+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22147+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22148+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22149+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22150+#endif /* GL_GLEXT_PROTOTYPES */
22151+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22152+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22153+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22154+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22155+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22156+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22157+#endif
22158+
22159+#ifndef GL_NV_transform_feedback
22160+#define GL_NV_transform_feedback 1
22161+#ifdef GL_GLEXT_PROTOTYPES
22162+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22163+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22164+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22165+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22166+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22167+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22168+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22169+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22170+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22171+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22172+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22173+#endif /* GL_GLEXT_PROTOTYPES */
22174+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22175+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22176+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22177+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22178+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22179+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22180+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22181+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22182+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22183+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22184+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22185+#endif
22186+
22187+#ifndef GL_EXT_bindable_uniform
22188+#define GL_EXT_bindable_uniform 1
22189+#ifdef GL_GLEXT_PROTOTYPES
22190+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22191+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22192+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22193+#endif /* GL_GLEXT_PROTOTYPES */
22194+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22195+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22196+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22197+#endif
22198+
22199+#ifndef GL_EXT_texture_integer
22200+#define GL_EXT_texture_integer 1
22201+#ifdef GL_GLEXT_PROTOTYPES
22202+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22203+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22204+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22205+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22206+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22207+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22208+#endif /* GL_GLEXT_PROTOTYPES */
22209+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22210+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22211+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22212+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22213+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22214+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22215+#endif
22216+
22217+
22218+#ifdef __cplusplus
22219+}
22220+#endif
22221+
22222+#endif
22223+
22224+
22225+/* ERO */
22226+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22227Index: qemu-0.12.4/target-i386/mesa_glu.h
22228===================================================================
22229--- /dev/null
22230+++ qemu-0.12.4/target-i386/mesa_glu.h
22231@@ -0,0 +1,354 @@
22232+/*
22233+** License Applicability. Except to the extent portions of this file are
22234+** made subject to an alternative license as permitted in the SGI Free
22235+** Software License B, Version 1.1 (the "License"), the contents of this
22236+** file are subject only to the provisions of the License. You may not use
22237+** this file except in compliance with the License. You may obtain a copy
22238+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22239+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22240+**
22241+** http://oss.sgi.com/projects/FreeB
22242+**
22243+** Note that, as provided in the License, the Software is distributed on an
22244+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22245+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22246+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22247+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22248+**
22249+** Original Code. The Original Code is: OpenGL Sample Implementation,
22250+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22251+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22252+** Copyright in any portions created by third parties is as indicated
22253+** elsewhere herein. All Rights Reserved.
22254+**
22255+** Additional Notice Provisions: This software was created using the
22256+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22257+** not been independently verified as being compliant with the OpenGL(R)
22258+** version 1.2.1 Specification.
22259+*/
22260+
22261+#ifndef __glu_h__
22262+#define __glu_h__
22263+
22264+#if defined(USE_MGL_NAMESPACE)
22265+#include "glu_mangle.h"
22266+#endif
22267+
22268+//#include <GL/gl.h>
22269+#include "mesa_gl.h"
22270+
22271+#ifndef GLAPIENTRY
22272+#define GLAPIENTRY
22273+#endif
22274+
22275+#ifndef GLAPIENTRYP
22276+#define GLAPIENTRYP GLAPIENTRY *
22277+#endif
22278+
22279+#ifdef GLAPI
22280+#undef GLAPI
22281+#endif
22282+
22283+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22284+# define GLAPI __declspec(dllexport)
22285+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22286+# define GLAPI __declspec(dllimport)
22287+# else /* for use with static link lib build of Win32 edition only */
22288+# define GLAPI extern
22289+# endif /* _STATIC_MESA support */
22290+
22291+
22292+#ifndef GLAPI
22293+#define GLAPI
22294+#endif
22295+
22296+#ifdef __cplusplus
22297+extern "C" {
22298+#endif
22299+
22300+/*************************************************************/
22301+
22302+/* Extensions */
22303+#define GLU_EXT_object_space_tess 1
22304+#define GLU_EXT_nurbs_tessellator 1
22305+
22306+/* Boolean */
22307+#define GLU_FALSE 0
22308+#define GLU_TRUE 1
22309+
22310+/* Version */
22311+#define GLU_VERSION_1_1 1
22312+#define GLU_VERSION_1_2 1
22313+#define GLU_VERSION_1_3 1
22314+
22315+/* StringName */
22316+#define GLU_VERSION 100800
22317+#define GLU_EXTENSIONS 100801
22318+
22319+/* ErrorCode */
22320+#define GLU_INVALID_ENUM 100900
22321+#define GLU_INVALID_VALUE 100901
22322+#define GLU_OUT_OF_MEMORY 100902
22323+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22324+#define GLU_INVALID_OPERATION 100904
22325+
22326+/* NurbsDisplay */
22327+/* GLU_FILL */
22328+#define GLU_OUTLINE_POLYGON 100240
22329+#define GLU_OUTLINE_PATCH 100241
22330+
22331+/* NurbsCallback */
22332+#define GLU_NURBS_ERROR 100103
22333+#define GLU_ERROR 100103
22334+#define GLU_NURBS_BEGIN 100164
22335+#define GLU_NURBS_BEGIN_EXT 100164
22336+#define GLU_NURBS_VERTEX 100165
22337+#define GLU_NURBS_VERTEX_EXT 100165
22338+#define GLU_NURBS_NORMAL 100166
22339+#define GLU_NURBS_NORMAL_EXT 100166
22340+#define GLU_NURBS_COLOR 100167
22341+#define GLU_NURBS_COLOR_EXT 100167
22342+#define GLU_NURBS_TEXTURE_COORD 100168
22343+#define GLU_NURBS_TEX_COORD_EXT 100168
22344+#define GLU_NURBS_END 100169
22345+#define GLU_NURBS_END_EXT 100169
22346+#define GLU_NURBS_BEGIN_DATA 100170
22347+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22348+#define GLU_NURBS_VERTEX_DATA 100171
22349+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22350+#define GLU_NURBS_NORMAL_DATA 100172
22351+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22352+#define GLU_NURBS_COLOR_DATA 100173
22353+#define GLU_NURBS_COLOR_DATA_EXT 100173
22354+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22355+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22356+#define GLU_NURBS_END_DATA 100175
22357+#define GLU_NURBS_END_DATA_EXT 100175
22358+
22359+/* NurbsError */
22360+#define GLU_NURBS_ERROR1 100251
22361+#define GLU_NURBS_ERROR2 100252
22362+#define GLU_NURBS_ERROR3 100253
22363+#define GLU_NURBS_ERROR4 100254
22364+#define GLU_NURBS_ERROR5 100255
22365+#define GLU_NURBS_ERROR6 100256
22366+#define GLU_NURBS_ERROR7 100257
22367+#define GLU_NURBS_ERROR8 100258
22368+#define GLU_NURBS_ERROR9 100259
22369+#define GLU_NURBS_ERROR10 100260
22370+#define GLU_NURBS_ERROR11 100261
22371+#define GLU_NURBS_ERROR12 100262
22372+#define GLU_NURBS_ERROR13 100263
22373+#define GLU_NURBS_ERROR14 100264
22374+#define GLU_NURBS_ERROR15 100265
22375+#define GLU_NURBS_ERROR16 100266
22376+#define GLU_NURBS_ERROR17 100267
22377+#define GLU_NURBS_ERROR18 100268
22378+#define GLU_NURBS_ERROR19 100269
22379+#define GLU_NURBS_ERROR20 100270
22380+#define GLU_NURBS_ERROR21 100271
22381+#define GLU_NURBS_ERROR22 100272
22382+#define GLU_NURBS_ERROR23 100273
22383+#define GLU_NURBS_ERROR24 100274
22384+#define GLU_NURBS_ERROR25 100275
22385+#define GLU_NURBS_ERROR26 100276
22386+#define GLU_NURBS_ERROR27 100277
22387+#define GLU_NURBS_ERROR28 100278
22388+#define GLU_NURBS_ERROR29 100279
22389+#define GLU_NURBS_ERROR30 100280
22390+#define GLU_NURBS_ERROR31 100281
22391+#define GLU_NURBS_ERROR32 100282
22392+#define GLU_NURBS_ERROR33 100283
22393+#define GLU_NURBS_ERROR34 100284
22394+#define GLU_NURBS_ERROR35 100285
22395+#define GLU_NURBS_ERROR36 100286
22396+#define GLU_NURBS_ERROR37 100287
22397+
22398+/* NurbsProperty */
22399+#define GLU_AUTO_LOAD_MATRIX 100200
22400+#define GLU_CULLING 100201
22401+#define GLU_SAMPLING_TOLERANCE 100203
22402+#define GLU_DISPLAY_MODE 100204
22403+#define GLU_PARAMETRIC_TOLERANCE 100202
22404+#define GLU_SAMPLING_METHOD 100205
22405+#define GLU_U_STEP 100206
22406+#define GLU_V_STEP 100207
22407+#define GLU_NURBS_MODE 100160
22408+#define GLU_NURBS_MODE_EXT 100160
22409+#define GLU_NURBS_TESSELLATOR 100161
22410+#define GLU_NURBS_TESSELLATOR_EXT 100161
22411+#define GLU_NURBS_RENDERER 100162
22412+#define GLU_NURBS_RENDERER_EXT 100162
22413+
22414+/* NurbsSampling */
22415+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22416+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22417+#define GLU_OBJECT_PATH_LENGTH 100209
22418+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22419+#define GLU_PATH_LENGTH 100215
22420+#define GLU_PARAMETRIC_ERROR 100216
22421+#define GLU_DOMAIN_DISTANCE 100217
22422+
22423+/* NurbsTrim */
22424+#define GLU_MAP1_TRIM_2 100210
22425+#define GLU_MAP1_TRIM_3 100211
22426+
22427+/* QuadricDrawStyle */
22428+#define GLU_POINT 100010
22429+#define GLU_LINE 100011
22430+#define GLU_FILL 100012
22431+#define GLU_SILHOUETTE 100013
22432+
22433+/* QuadricCallback */
22434+/* GLU_ERROR */
22435+
22436+/* QuadricNormal */
22437+#define GLU_SMOOTH 100000
22438+#define GLU_FLAT 100001
22439+#define GLU_NONE 100002
22440+
22441+/* QuadricOrientation */
22442+#define GLU_OUTSIDE 100020
22443+#define GLU_INSIDE 100021
22444+
22445+/* TessCallback */
22446+#define GLU_TESS_BEGIN 100100
22447+#define GLU_BEGIN 100100
22448+#define GLU_TESS_VERTEX 100101
22449+#define GLU_VERTEX 100101
22450+#define GLU_TESS_END 100102
22451+#define GLU_END 100102
22452+#define GLU_TESS_ERROR 100103
22453+#define GLU_TESS_EDGE_FLAG 100104
22454+#define GLU_EDGE_FLAG 100104
22455+#define GLU_TESS_COMBINE 100105
22456+#define GLU_TESS_BEGIN_DATA 100106
22457+#define GLU_TESS_VERTEX_DATA 100107
22458+#define GLU_TESS_END_DATA 100108
22459+#define GLU_TESS_ERROR_DATA 100109
22460+#define GLU_TESS_EDGE_FLAG_DATA 100110
22461+#define GLU_TESS_COMBINE_DATA 100111
22462+
22463+/* TessContour */
22464+#define GLU_CW 100120
22465+#define GLU_CCW 100121
22466+#define GLU_INTERIOR 100122
22467+#define GLU_EXTERIOR 100123
22468+#define GLU_UNKNOWN 100124
22469+
22470+/* TessProperty */
22471+#define GLU_TESS_WINDING_RULE 100140
22472+#define GLU_TESS_BOUNDARY_ONLY 100141
22473+#define GLU_TESS_TOLERANCE 100142
22474+
22475+/* TessError */
22476+#define GLU_TESS_ERROR1 100151
22477+#define GLU_TESS_ERROR2 100152
22478+#define GLU_TESS_ERROR3 100153
22479+#define GLU_TESS_ERROR4 100154
22480+#define GLU_TESS_ERROR5 100155
22481+#define GLU_TESS_ERROR6 100156
22482+#define GLU_TESS_ERROR7 100157
22483+#define GLU_TESS_ERROR8 100158
22484+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22485+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22486+#define GLU_TESS_MISSING_END_POLYGON 100153
22487+#define GLU_TESS_MISSING_END_CONTOUR 100154
22488+#define GLU_TESS_COORD_TOO_LARGE 100155
22489+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22490+
22491+/* TessWinding */
22492+#define GLU_TESS_WINDING_ODD 100130
22493+#define GLU_TESS_WINDING_NONZERO 100131
22494+#define GLU_TESS_WINDING_POSITIVE 100132
22495+#define GLU_TESS_WINDING_NEGATIVE 100133
22496+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22497+
22498+/*************************************************************/
22499+
22500+
22501+#ifdef __cplusplus
22502+class GLUnurbs;
22503+class GLUquadric;
22504+class GLUtesselator;
22505+#else
22506+typedef struct GLUnurbs GLUnurbs;
22507+typedef struct GLUquadric GLUquadric;
22508+typedef struct GLUtesselator GLUtesselator;
22509+#endif
22510+
22511+typedef GLUnurbs GLUnurbsObj;
22512+typedef GLUquadric GLUquadricObj;
22513+typedef GLUtesselator GLUtesselatorObj;
22514+typedef GLUtesselator GLUtriangulatorObj;
22515+
22516+#define GLU_TESS_MAX_COORD 1.0e150
22517+
22518+/* Internal convenience typedefs */
22519+typedef void (GLAPIENTRYP _GLUfuncptr)();
22520+
22521+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22522+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22523+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22524+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22525+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22526+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22527+GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22528+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22529+GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22530+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22531+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22532+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22533+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22534+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22535+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22536+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22537+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22538+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22539+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22540+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22541+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22542+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22543+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22544+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22545+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22546+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22547+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22548+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22549+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22550+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22551+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22552+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22553+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22554+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22555+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22556+GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
22557+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22558+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22559+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22560+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22561+GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
22562+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22563+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22564+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22565+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22566+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22567+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22568+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22569+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22570+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22571+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22572+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22573+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22574+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22575+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22576+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22577+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22578+GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
22579+GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
22580+
22581+#ifdef __cplusplus
22582+}
22583+#endif
22584+
22585+#endif /* __glu_h__ */
22586Index: qemu-0.12.4/target-i386/mesa_glx.h
22587===================================================================
22588--- /dev/null
22589+++ qemu-0.12.4/target-i386/mesa_glx.h
22590@@ -0,0 +1,510 @@
22591+/*
22592+ * Mesa 3-D graphics library
22593+ * Version: 6.5
22594+ *
22595+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22596+ *
22597+ * Permission is hereby granted, free of charge, to any person obtaining a
22598+ * copy of this software and associated documentation files (the "Software"),
22599+ * to deal in the Software without restriction, including without limitation
22600+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22601+ * and/or sell copies of the Software, and to permit persons to whom the
22602+ * Software is furnished to do so, subject to the following conditions:
22603+ *
22604+ * The above copyright notice and this permission notice shall be included
22605+ * in all copies or substantial portions of the Software.
22606+ *
22607+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22608+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22609+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22610+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22611+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22612+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22613+ */
22614+
22615+
22616+#ifndef GLX_H
22617+#define GLX_H
22618+
22619+
22620+#ifdef __VMS
22621+#include <GL/vms_x_fix.h>
22622+# ifdef __cplusplus
22623+/* VMS Xlib.h gives problems with C++.
22624+ * this avoids a bunch of trivial warnings */
22625+#pragma message disable nosimpint
22626+#endif
22627+#endif
22628+#include <X11/Xlib.h>
22629+#include <X11/Xutil.h>
22630+#ifdef __VMS
22631+# ifdef __cplusplus
22632+#pragma message enable nosimpint
22633+#endif
22634+#endif
22635+#include <mesa_gl.h>
22636+
22637+
22638+#if defined(USE_MGL_NAMESPACE)
22639+#include "glx_mangle.h"
22640+#endif
22641+
22642+
22643+#ifdef __cplusplus
22644+extern "C" {
22645+#endif
22646+
22647+
22648+#define GLX_VERSION_1_1 1
22649+#define GLX_VERSION_1_2 1
22650+#define GLX_VERSION_1_3 1
22651+#define GLX_VERSION_1_4 1
22652+
22653+#define GLX_EXTENSION_NAME "GLX"
22654+
22655+
22656+
22657+/*
22658+ * Tokens for glXChooseVisual and glXGetConfig:
22659+ */
22660+#define GLX_USE_GL 1
22661+#define GLX_BUFFER_SIZE 2
22662+#define GLX_LEVEL 3
22663+#define GLX_RGBA 4
22664+#define GLX_DOUBLEBUFFER 5
22665+#define GLX_STEREO 6
22666+#define GLX_AUX_BUFFERS 7
22667+#define GLX_RED_SIZE 8
22668+#define GLX_GREEN_SIZE 9
22669+#define GLX_BLUE_SIZE 10
22670+#define GLX_ALPHA_SIZE 11
22671+#define GLX_DEPTH_SIZE 12
22672+#define GLX_STENCIL_SIZE 13
22673+#define GLX_ACCUM_RED_SIZE 14
22674+#define GLX_ACCUM_GREEN_SIZE 15
22675+#define GLX_ACCUM_BLUE_SIZE 16
22676+#define GLX_ACCUM_ALPHA_SIZE 17
22677+
22678+
22679+/*
22680+ * Error codes returned by glXGetConfig:
22681+ */
22682+#define GLX_BAD_SCREEN 1
22683+#define GLX_BAD_ATTRIBUTE 2
22684+#define GLX_NO_EXTENSION 3
22685+#define GLX_BAD_VISUAL 4
22686+#define GLX_BAD_CONTEXT 5
22687+#define GLX_BAD_VALUE 6
22688+#define GLX_BAD_ENUM 7
22689+
22690+
22691+/*
22692+ * GLX 1.1 and later:
22693+ */
22694+#define GLX_VENDOR 1
22695+#define GLX_VERSION 2
22696+#define GLX_EXTENSIONS 3
22697+
22698+
22699+/*
22700+ * GLX 1.3 and later:
22701+ */
22702+#define GLX_CONFIG_CAVEAT 0x20
22703+#define GLX_DONT_CARE 0xFFFFFFFF
22704+#define GLX_X_VISUAL_TYPE 0x22
22705+#define GLX_TRANSPARENT_TYPE 0x23
22706+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22707+#define GLX_TRANSPARENT_RED_VALUE 0x25
22708+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22709+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22710+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22711+#define GLX_WINDOW_BIT 0x00000001
22712+#define GLX_PIXMAP_BIT 0x00000002
22713+#define GLX_PBUFFER_BIT 0x00000004
22714+#define GLX_AUX_BUFFERS_BIT 0x00000010
22715+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22716+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22717+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22718+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22719+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22720+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22721+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22722+#define GLX_NONE 0x8000
22723+#define GLX_SLOW_CONFIG 0x8001
22724+#define GLX_TRUE_COLOR 0x8002
22725+#define GLX_DIRECT_COLOR 0x8003
22726+#define GLX_PSEUDO_COLOR 0x8004
22727+#define GLX_STATIC_COLOR 0x8005
22728+#define GLX_GRAY_SCALE 0x8006
22729+#define GLX_STATIC_GRAY 0x8007
22730+#define GLX_TRANSPARENT_RGB 0x8008
22731+#define GLX_TRANSPARENT_INDEX 0x8009
22732+#define GLX_VISUAL_ID 0x800B
22733+#define GLX_SCREEN 0x800C
22734+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22735+#define GLX_DRAWABLE_TYPE 0x8010
22736+#define GLX_RENDER_TYPE 0x8011
22737+#define GLX_X_RENDERABLE 0x8012
22738+#define GLX_FBCONFIG_ID 0x8013
22739+#define GLX_RGBA_TYPE 0x8014
22740+#define GLX_COLOR_INDEX_TYPE 0x8015
22741+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22742+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22743+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22744+#define GLX_PRESERVED_CONTENTS 0x801B
22745+#define GLX_LARGEST_PBUFFER 0x801C
22746+#define GLX_WIDTH 0x801D
22747+#define GLX_HEIGHT 0x801E
22748+#define GLX_EVENT_MASK 0x801F
22749+#define GLX_DAMAGED 0x8020
22750+#define GLX_SAVED 0x8021
22751+#define GLX_WINDOW 0x8022
22752+#define GLX_PBUFFER 0x8023
22753+#define GLX_PBUFFER_HEIGHT 0x8040
22754+#define GLX_PBUFFER_WIDTH 0x8041
22755+#define GLX_RGBA_BIT 0x00000001
22756+#define GLX_COLOR_INDEX_BIT 0x00000002
22757+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22758+
22759+
22760+/*
22761+ * GLX 1.4 and later:
22762+ */
22763+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22764+#define GLX_SAMPLES 0x186a1 /*100001*/
22765+
22766+
22767+
22768+typedef struct __GLXcontextRec *GLXContext;
22769+typedef XID GLXPixmap;
22770+typedef XID GLXDrawable;
22771+/* GLX 1.3 and later */
22772+typedef struct __GLXFBConfigRec *GLXFBConfig;
22773+typedef XID GLXFBConfigID;
22774+typedef XID GLXContextID;
22775+typedef XID GLXWindow;
22776+typedef XID GLXPbuffer;
22777+
22778+
22779+
22780+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22781+ int *attribList );
22782+
22783+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22784+ GLXContext shareList, Bool direct );
22785+
22786+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22787+
22788+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22789+ GLXContext ctx);
22790+
22791+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22792+ unsigned long mask );
22793+
22794+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22795+
22796+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22797+ Pixmap pixmap );
22798+
22799+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22800+
22801+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22802+
22803+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22804+
22805+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22806+
22807+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22808+ int attrib, int *value );
22809+
22810+extern GLXContext glXGetCurrentContext( void );
22811+
22812+extern GLXDrawable glXGetCurrentDrawable( void );
22813+
22814+extern void glXWaitGL( void );
22815+
22816+extern void glXWaitX( void );
22817+
22818+extern void glXUseXFont( Font font, int first, int count, int list );
22819+
22820+
22821+
22822+/* GLX 1.1 and later */
22823+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22824+
22825+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22826+
22827+extern const char *glXGetClientString( Display *dpy, int name );
22828+
22829+
22830+/* GLX 1.2 and later */
22831+extern Display *glXGetCurrentDisplay( void );
22832+
22833+
22834+/* GLX 1.3 and later */
22835+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22836+ const int *attribList, int *nitems );
22837+
22838+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22839+ int attribute, int *value );
22840+
22841+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22842+ int *nelements );
22843+
22844+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22845+ GLXFBConfig config );
22846+
22847+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22848+ Window win, const int *attribList );
22849+
22850+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22851+
22852+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22853+ Pixmap pixmap, const int *attribList );
22854+
22855+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22856+
22857+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22858+ const int *attribList );
22859+
22860+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22861+
22862+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22863+ unsigned int *value );
22864+
22865+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22866+ int renderType, GLXContext shareList,
22867+ Bool direct );
22868+
22869+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22870+ GLXDrawable read, GLXContext ctx );
22871+
22872+extern GLXDrawable glXGetCurrentReadDrawable( void );
22873+
22874+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22875+ int *value );
22876+
22877+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22878+ unsigned long mask );
22879+
22880+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22881+ unsigned long *mask );
22882+
22883+
22884+/* GLX 1.4 and later */
22885+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22886+
22887+
22888+#ifndef GLX_GLXEXT_LEGACY
22889+
22890+#include <mesa_glxext.h>
22891+
22892+#else
22893+
22894+
22895+
22896+/*
22897+ * ARB 2. GLX_ARB_get_proc_address
22898+ */
22899+#ifndef GLX_ARB_get_proc_address
22900+#define GLX_ARB_get_proc_address 1
22901+
22902+typedef void (*__GLXextFuncPtr)(void);
22903+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22904+
22905+#endif /* GLX_ARB_get_proc_address */
22906+
22907+
22908+
22909+#endif /* GLX_GLXEXT_LEGACY */
22910+
22911+
22912+/**
22913+ ** The following aren't in glxext.h yet.
22914+ **/
22915+
22916+
22917+/*
22918+ * ???. GLX_NV_vertex_array_range
22919+ */
22920+#ifndef GLX_NV_vertex_array_range
22921+#define GLX_NV_vertex_array_range
22922+
22923+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22924+extern void glXFreeMemoryNV(GLvoid *pointer);
22925+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22926+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22927+
22928+#endif /* GLX_NV_vertex_array_range */
22929+
22930+
22931+/*
22932+ * ???. GLX_MESA_allocate_memory
22933+ */
22934+#ifndef GLX_MESA_allocate_memory
22935+#define GLX_MESA_allocate_memory 1
22936+
22937+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22938+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22939+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22940+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22941+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22942+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22943+
22944+#endif /* GLX_MESA_allocate_memory */
22945+
22946+
22947+/*
22948+ * ARB ?. GLX_ARB_render_texture
22949+ * XXX This was never finalized!
22950+ */
22951+#ifndef GLX_ARB_render_texture
22952+#define GLX_ARB_render_texture 1
22953+
22954+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22955+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22956+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22957+
22958+#endif /* GLX_ARB_render_texture */
22959+
22960+
22961+#ifndef GLX_ATI_render_texture
22962+#define GLX_ATI_render_texture 1
22963+
22964+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22965+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22966+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22967+
22968+#endif /* GLX_ATI_render_texture */
22969+
22970+
22971+/*
22972+ * Remove this when glxext.h is updated.
22973+ */
22974+#ifndef GLX_NV_float_buffer
22975+#define GLX_NV_float_buffer 1
22976+
22977+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22978+
22979+#endif /* GLX_NV_float_buffer */
22980+
22981+
22982+
22983+/*
22984+ * #?. GLX_MESA_swap_frame_usage
22985+ */
22986+#ifndef GLX_MESA_swap_frame_usage
22987+#define GLX_MESA_swap_frame_usage 1
22988+
22989+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22990+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22991+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22992+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22993+
22994+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22995+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22996+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22997+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22998+
22999+#endif /* GLX_MESA_swap_frame_usage */
23000+
23001+
23002+
23003+/*
23004+ * #?. GLX_MESA_swap_control
23005+ */
23006+#ifndef GLX_MESA_swap_control
23007+#define GLX_MESA_swap_control 1
23008+
23009+extern int glXSwapIntervalMESA(unsigned int interval);
23010+extern int glXGetSwapIntervalMESA(void);
23011+
23012+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
23013+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
23014+
23015+#endif /* GLX_MESA_swap_control */
23016+
23017+
23018+
23019+/*
23020+ * #?. GLX_EXT_texture_from_pixmap
23021+ * XXX not finished?
23022+ */
23023+#ifndef GLX_EXT_texture_from_pixmap
23024+#define GLX_EXT_texture_from_pixmap 1
23025+
23026+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23027+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23028+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23029+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23030+#define GLX_Y_INVERTED_EXT 0x20D4
23031+
23032+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23033+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23034+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23035+
23036+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23037+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23038+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23039+
23040+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23041+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23042+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23043+
23044+#define GLX_TEXTURE_1D_EXT 0x20DB
23045+#define GLX_TEXTURE_2D_EXT 0x20DC
23046+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23047+
23048+#define GLX_FRONT_LEFT_EXT 0x20DE
23049+#define GLX_FRONT_RIGHT_EXT 0x20DF
23050+#define GLX_BACK_LEFT_EXT 0x20E0
23051+#define GLX_BACK_RIGHT_EXT 0x20E1
23052+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23053+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23054+#define GLX_AUX0_EXT 0x20E2
23055+#define GLX_AUX1_EXT 0x20E3
23056+#define GLX_AUX2_EXT 0x20E4
23057+#define GLX_AUX3_EXT 0x20E5
23058+#define GLX_AUX4_EXT 0x20E6
23059+#define GLX_AUX5_EXT 0x20E7
23060+#define GLX_AUX6_EXT 0x20E8
23061+#define GLX_AUX7_EXT 0x20E9
23062+#define GLX_AUX8_EXT 0x20EA
23063+#define GLX_AUX9_EXT 0x20EB
23064+
23065+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23066+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
23067+
23068+#endif /* GLX_EXT_texture_from_pixmap */
23069+
23070+
23071+
23072+
23073+/*** Should these go here, or in another header? */
23074+/*
23075+** GLX Events
23076+*/
23077+typedef struct {
23078+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
23079+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
23080+ unsigned long serial; /* # of last request processed by server */
23081+ Bool send_event; /* true if this came for SendEvent request */
23082+ Display *display; /* display the event was read from */
23083+ GLXDrawable drawable; /* XID of Drawable */
23084+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
23085+ unsigned int aux_buffer; /* which aux buffer was affected */
23086+ int x, y;
23087+ int width, height;
23088+ int count; /* if nonzero, at least this many more */
23089+} GLXPbufferClobberEvent;
23090+
23091+typedef union __GLXEvent {
23092+ GLXPbufferClobberEvent glxpbufferclobber;
23093+ long pad[24];
23094+} GLXEvent;
23095+
23096+#ifdef __cplusplus
23097+}
23098+#endif
23099+
23100+#endif
23101Index: qemu-0.12.4/target-i386/mesa_glxext.h
23102===================================================================
23103--- /dev/null
23104+++ qemu-0.12.4/target-i386/mesa_glxext.h
23105@@ -0,0 +1,785 @@
23106+#ifndef __glxext_h_
23107+#define __glxext_h_
23108+
23109+#ifdef __cplusplus
23110+extern "C" {
23111+#endif
23112+
23113+/*
23114+** Copyright (c) 2007 The Khronos Group Inc.
23115+**
23116+** Permission is hereby granted, free of charge, to any person obtaining a
23117+** copy of this software and/or associated documentation files (the
23118+** "Materials"), to deal in the Materials without restriction, including
23119+** without limitation the rights to use, copy, modify, merge, publish,
23120+** distribute, sublicense, and/or sell copies of the Materials, and to
23121+** permit persons to whom the Materials are furnished to do so, subject to
23122+** the following conditions:
23123+**
23124+** The above copyright notice and this permission notice shall be included
23125+** in all copies or substantial portions of the Materials.
23126+**
23127+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23128+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23129+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23130+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23131+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23132+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23133+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23134+*/
23135+
23136+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23137+#define WIN32_LEAN_AND_MEAN 1
23138+#include <windows.h>
23139+#endif
23140+
23141+#ifndef APIENTRY
23142+#define APIENTRY
23143+#endif
23144+#ifndef APIENTRYP
23145+#define APIENTRYP APIENTRY *
23146+#endif
23147+#ifndef GLAPI
23148+#define GLAPI extern
23149+#endif
23150+
23151+/*************************************************************/
23152+
23153+/* Header file version number, required by OpenGL ABI for Linux */
23154+/* glxext.h last updated 2007/04/21 */
23155+/* Current version at http://www.opengl.org/registry/ */
23156+#define GLX_GLXEXT_VERSION 19
23157+
23158+#ifndef GLX_VERSION_1_3
23159+#define GLX_WINDOW_BIT 0x00000001
23160+#define GLX_PIXMAP_BIT 0x00000002
23161+#define GLX_PBUFFER_BIT 0x00000004
23162+#define GLX_RGBA_BIT 0x00000001
23163+#define GLX_COLOR_INDEX_BIT 0x00000002
23164+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23165+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23166+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23167+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23168+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23169+#define GLX_AUX_BUFFERS_BIT 0x00000010
23170+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23171+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23172+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23173+#define GLX_CONFIG_CAVEAT 0x20
23174+#define GLX_X_VISUAL_TYPE 0x22
23175+#define GLX_TRANSPARENT_TYPE 0x23
23176+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23177+#define GLX_TRANSPARENT_RED_VALUE 0x25
23178+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23179+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23180+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23181+#define GLX_DONT_CARE 0xFFFFFFFF
23182+#define GLX_NONE 0x8000
23183+#define GLX_SLOW_CONFIG 0x8001
23184+#define GLX_TRUE_COLOR 0x8002
23185+#define GLX_DIRECT_COLOR 0x8003
23186+#define GLX_PSEUDO_COLOR 0x8004
23187+#define GLX_STATIC_COLOR 0x8005
23188+#define GLX_GRAY_SCALE 0x8006
23189+#define GLX_STATIC_GRAY 0x8007
23190+#define GLX_TRANSPARENT_RGB 0x8008
23191+#define GLX_TRANSPARENT_INDEX 0x8009
23192+#define GLX_VISUAL_ID 0x800B
23193+#define GLX_SCREEN 0x800C
23194+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23195+#define GLX_DRAWABLE_TYPE 0x8010
23196+#define GLX_RENDER_TYPE 0x8011
23197+#define GLX_X_RENDERABLE 0x8012
23198+#define GLX_FBCONFIG_ID 0x8013
23199+#define GLX_RGBA_TYPE 0x8014
23200+#define GLX_COLOR_INDEX_TYPE 0x8015
23201+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23202+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23203+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23204+#define GLX_PRESERVED_CONTENTS 0x801B
23205+#define GLX_LARGEST_PBUFFER 0x801C
23206+#define GLX_WIDTH 0x801D
23207+#define GLX_HEIGHT 0x801E
23208+#define GLX_EVENT_MASK 0x801F
23209+#define GLX_DAMAGED 0x8020
23210+#define GLX_SAVED 0x8021
23211+#define GLX_WINDOW 0x8022
23212+#define GLX_PBUFFER 0x8023
23213+#define GLX_PBUFFER_HEIGHT 0x8040
23214+#define GLX_PBUFFER_WIDTH 0x8041
23215+#endif
23216+
23217+#ifndef GLX_VERSION_1_4
23218+#define GLX_SAMPLE_BUFFERS 100000
23219+#define GLX_SAMPLES 100001
23220+#endif
23221+
23222+#ifndef GLX_ARB_get_proc_address
23223+#endif
23224+
23225+#ifndef GLX_ARB_multisample
23226+#define GLX_SAMPLE_BUFFERS_ARB 100000
23227+#define GLX_SAMPLES_ARB 100001
23228+#endif
23229+
23230+#ifndef GLX_ARB_fbconfig_float
23231+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23232+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23233+#endif
23234+
23235+#ifndef GLX_SGIS_multisample
23236+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23237+#define GLX_SAMPLES_SGIS 100001
23238+#endif
23239+
23240+#ifndef GLX_EXT_visual_info
23241+#define GLX_X_VISUAL_TYPE_EXT 0x22
23242+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23243+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23244+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23245+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23246+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23247+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23248+#define GLX_NONE_EXT 0x8000
23249+#define GLX_TRUE_COLOR_EXT 0x8002
23250+#define GLX_DIRECT_COLOR_EXT 0x8003
23251+#define GLX_PSEUDO_COLOR_EXT 0x8004
23252+#define GLX_STATIC_COLOR_EXT 0x8005
23253+#define GLX_GRAY_SCALE_EXT 0x8006
23254+#define GLX_STATIC_GRAY_EXT 0x8007
23255+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23256+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23257+#endif
23258+
23259+#ifndef GLX_SGI_swap_control
23260+#endif
23261+
23262+#ifndef GLX_SGI_video_sync
23263+#endif
23264+
23265+#ifndef GLX_SGI_make_current_read
23266+#endif
23267+
23268+#ifndef GLX_SGIX_video_source
23269+#endif
23270+
23271+#ifndef GLX_EXT_visual_rating
23272+#define GLX_VISUAL_CAVEAT_EXT 0x20
23273+#define GLX_SLOW_VISUAL_EXT 0x8001
23274+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23275+/* reuse GLX_NONE_EXT */
23276+#endif
23277+
23278+#ifndef GLX_EXT_import_context
23279+#define GLX_SHARE_CONTEXT_EXT 0x800A
23280+#define GLX_VISUAL_ID_EXT 0x800B
23281+#define GLX_SCREEN_EXT 0x800C
23282+#endif
23283+
23284+#ifndef GLX_SGIX_fbconfig
23285+#define GLX_WINDOW_BIT_SGIX 0x00000001
23286+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23287+#define GLX_RGBA_BIT_SGIX 0x00000001
23288+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23289+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23290+#define GLX_RENDER_TYPE_SGIX 0x8011
23291+#define GLX_X_RENDERABLE_SGIX 0x8012
23292+#define GLX_FBCONFIG_ID_SGIX 0x8013
23293+#define GLX_RGBA_TYPE_SGIX 0x8014
23294+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23295+/* reuse GLX_SCREEN_EXT */
23296+#endif
23297+
23298+#ifndef GLX_SGIX_pbuffer
23299+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23300+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23301+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23302+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23303+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23304+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23305+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23306+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23307+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23308+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23309+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23310+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23311+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23312+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23313+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23314+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23315+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23316+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23317+#define GLX_WIDTH_SGIX 0x801D
23318+#define GLX_HEIGHT_SGIX 0x801E
23319+#define GLX_EVENT_MASK_SGIX 0x801F
23320+#define GLX_DAMAGED_SGIX 0x8020
23321+#define GLX_SAVED_SGIX 0x8021
23322+#define GLX_WINDOW_SGIX 0x8022
23323+#define GLX_PBUFFER_SGIX 0x8023
23324+#endif
23325+
23326+#ifndef GLX_SGI_cushion
23327+#endif
23328+
23329+#ifndef GLX_SGIX_video_resize
23330+#define GLX_SYNC_FRAME_SGIX 0x00000000
23331+#define GLX_SYNC_SWAP_SGIX 0x00000001
23332+#endif
23333+
23334+#ifndef GLX_SGIX_dmbuffer
23335+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23336+#endif
23337+
23338+#ifndef GLX_SGIX_swap_group
23339+#endif
23340+
23341+#ifndef GLX_SGIX_swap_barrier
23342+#endif
23343+
23344+#ifndef GLX_SGIS_blended_overlay
23345+#define GLX_BLENDED_RGBA_SGIS 0x8025
23346+#endif
23347+
23348+#ifndef GLX_SGIS_shared_multisample
23349+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23350+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23351+#endif
23352+
23353+#ifndef GLX_SUN_get_transparent_index
23354+#endif
23355+
23356+#ifndef GLX_3DFX_multisample
23357+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23358+#define GLX_SAMPLES_3DFX 0x8051
23359+#endif
23360+
23361+#ifndef GLX_MESA_copy_sub_buffer
23362+#endif
23363+
23364+#ifndef GLX_MESA_pixmap_colormap
23365+#endif
23366+
23367+#ifndef GLX_MESA_release_buffers
23368+#endif
23369+
23370+#ifndef GLX_MESA_set_3dfx_mode
23371+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23372+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23373+#endif
23374+
23375+#ifndef GLX_SGIX_visual_select_group
23376+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23377+#endif
23378+
23379+#ifndef GLX_OML_swap_method
23380+#define GLX_SWAP_METHOD_OML 0x8060
23381+#define GLX_SWAP_EXCHANGE_OML 0x8061
23382+#define GLX_SWAP_COPY_OML 0x8062
23383+#define GLX_SWAP_UNDEFINED_OML 0x8063
23384+#endif
23385+
23386+#ifndef GLX_OML_sync_control
23387+#endif
23388+
23389+#ifndef GLX_NV_float_buffer
23390+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23391+#endif
23392+
23393+#ifndef GLX_SGIX_hyperpipe
23394+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23395+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23396+#define GLX_BAD_HYPERPIPE_SGIX 92
23397+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23398+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23399+#define GLX_PIPE_RECT_SGIX 0x00000001
23400+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23401+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23402+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23403+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23404+#endif
23405+
23406+#ifndef GLX_MESA_agp_offset
23407+#endif
23408+
23409+#ifndef GLX_EXT_fbconfig_packed_float
23410+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23411+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23412+#endif
23413+
23414+#ifndef GLX_EXT_framebuffer_sRGB
23415+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23416+#endif
23417+
23418+#ifndef GLX_EXT_texture_from_pixmap
23419+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23420+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23421+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23422+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23423+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23424+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23425+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23426+#define GLX_Y_INVERTED_EXT 0x20D4
23427+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23428+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23429+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23430+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23431+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23432+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23433+#define GLX_TEXTURE_1D_EXT 0x20DB
23434+#define GLX_TEXTURE_2D_EXT 0x20DC
23435+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23436+#define GLX_FRONT_LEFT_EXT 0x20DE
23437+#define GLX_FRONT_RIGHT_EXT 0x20DF
23438+#define GLX_BACK_LEFT_EXT 0x20E0
23439+#define GLX_BACK_RIGHT_EXT 0x20E1
23440+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23441+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23442+#define GLX_AUX0_EXT 0x20E2
23443+#define GLX_AUX1_EXT 0x20E3
23444+#define GLX_AUX2_EXT 0x20E4
23445+#define GLX_AUX3_EXT 0x20E5
23446+#define GLX_AUX4_EXT 0x20E6
23447+#define GLX_AUX5_EXT 0x20E7
23448+#define GLX_AUX6_EXT 0x20E8
23449+#define GLX_AUX7_EXT 0x20E9
23450+#define GLX_AUX8_EXT 0x20EA
23451+#define GLX_AUX9_EXT 0x20EB
23452+#endif
23453+
23454+
23455+/*************************************************************/
23456+
23457+#ifndef GLX_ARB_get_proc_address
23458+typedef void (*__GLXextFuncPtr)(void);
23459+#endif
23460+
23461+#ifndef GLX_SGIX_video_source
23462+typedef XID GLXVideoSourceSGIX;
23463+#endif
23464+
23465+#ifndef GLX_SGIX_fbconfig
23466+typedef XID GLXFBConfigIDSGIX;
23467+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23468+#endif
23469+
23470+#ifndef GLX_SGIX_pbuffer
23471+typedef XID GLXPbufferSGIX;
23472+typedef struct {
23473+ int type;
23474+ unsigned long serial; /* # of last request processed by server */
23475+ Bool send_event; /* true if this came for SendEvent request */
23476+ Display *display; /* display the event was read from */
23477+ GLXDrawable drawable; /* i.d. of Drawable */
23478+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23479+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23480+ unsigned int mask; /* mask indicating which buffers are affected*/
23481+ int x, y;
23482+ int width, height;
23483+ int count; /* if nonzero, at least this many more */
23484+} GLXBufferClobberEventSGIX;
23485+#endif
23486+
23487+#ifndef GLEXT_64_TYPES_DEFINED
23488+/* This code block is duplicated in glxext.h, so must be protected */
23489+#define GLEXT_64_TYPES_DEFINED
23490+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23491+/* (as used in the GLX_OML_sync_control extension). */
23492+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23493+#include <inttypes.h>
23494+#elif defined(__sun__) || defined(__digital__)
23495+#include <inttypes.h>
23496+#if defined(__STDC__)
23497+#if defined(__arch64__)
23498+typedef long int int64_t;
23499+typedef unsigned long int uint64_t;
23500+#else
23501+typedef long long int int64_t;
23502+typedef unsigned long long int uint64_t;
23503+#endif /* __arch64__ */
23504+#endif /* __STDC__ */
23505+#elif defined( __VMS )
23506+#include <inttypes.h>
23507+#elif defined(__SCO__) || defined(__USLC__)
23508+#include <stdint.h>
23509+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23510+typedef long int int32_t;
23511+typedef long long int int64_t;
23512+typedef unsigned long long int uint64_t;
23513+#elif defined(_WIN32) && defined(__GNUC__)
23514+#include <stdint.h>
23515+#elif defined(_WIN32)
23516+typedef __int32 int32_t;
23517+typedef __int64 int64_t;
23518+typedef unsigned __int64 uint64_t;
23519+#else
23520+#include <inttypes.h> /* Fallback option */
23521+#endif
23522+#endif
23523+
23524+#ifndef GLX_VERSION_1_3
23525+#define GLX_VERSION_1_3 1
23526+#ifdef GLX_GLXEXT_PROTOTYPES
23527+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23528+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23529+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23530+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23531+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23532+extern void glXDestroyWindow (Display *, GLXWindow);
23533+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23534+extern void glXDestroyPixmap (Display *, GLXPixmap);
23535+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23536+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23537+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23538+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23539+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23540+extern GLXDrawable glXGetCurrentReadDrawable (void);
23541+extern Display * glXGetCurrentDisplay (void);
23542+extern int glXQueryContext (Display *, GLXContext, int, int *);
23543+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23544+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23545+#endif /* GLX_GLXEXT_PROTOTYPES */
23546+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23547+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23548+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23549+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23550+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23551+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23552+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23553+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23554+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23555+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23556+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23557+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23558+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23559+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23560+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23561+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23562+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23563+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23564+#endif
23565+
23566+#ifndef GLX_VERSION_1_4
23567+#define GLX_VERSION_1_4 1
23568+#ifdef GLX_GLXEXT_PROTOTYPES
23569+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23570+#endif /* GLX_GLXEXT_PROTOTYPES */
23571+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23572+#endif
23573+
23574+#ifndef GLX_ARB_get_proc_address
23575+#define GLX_ARB_get_proc_address 1
23576+#ifdef GLX_GLXEXT_PROTOTYPES
23577+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23578+#endif /* GLX_GLXEXT_PROTOTYPES */
23579+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23580+#endif
23581+
23582+#ifndef GLX_ARB_multisample
23583+#define GLX_ARB_multisample 1
23584+#endif
23585+
23586+#ifndef GLX_ARB_fbconfig_float
23587+#define GLX_ARB_fbconfig_float 1
23588+#endif
23589+
23590+#ifndef GLX_SGIS_multisample
23591+#define GLX_SGIS_multisample 1
23592+#endif
23593+
23594+#ifndef GLX_EXT_visual_info
23595+#define GLX_EXT_visual_info 1
23596+#endif
23597+
23598+#ifndef GLX_SGI_swap_control
23599+#define GLX_SGI_swap_control 1
23600+#ifdef GLX_GLXEXT_PROTOTYPES
23601+extern int glXSwapIntervalSGI (int);
23602+#endif /* GLX_GLXEXT_PROTOTYPES */
23603+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23604+#endif
23605+
23606+#ifndef GLX_SGI_video_sync
23607+#define GLX_SGI_video_sync 1
23608+#ifdef GLX_GLXEXT_PROTOTYPES
23609+extern int glXGetVideoSyncSGI (unsigned int *);
23610+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23611+#endif /* GLX_GLXEXT_PROTOTYPES */
23612+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23613+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23614+#endif
23615+
23616+#ifndef GLX_SGI_make_current_read
23617+#define GLX_SGI_make_current_read 1
23618+#ifdef GLX_GLXEXT_PROTOTYPES
23619+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23620+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23621+#endif /* GLX_GLXEXT_PROTOTYPES */
23622+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23623+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23624+#endif
23625+
23626+#ifndef GLX_SGIX_video_source
23627+#define GLX_SGIX_video_source 1
23628+#ifdef _VL_H
23629+#ifdef GLX_GLXEXT_PROTOTYPES
23630+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23631+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23632+#endif /* GLX_GLXEXT_PROTOTYPES */
23633+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23634+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23635+#endif /* _VL_H */
23636+#endif
23637+
23638+#ifndef GLX_EXT_visual_rating
23639+#define GLX_EXT_visual_rating 1
23640+#endif
23641+
23642+#ifndef GLX_EXT_import_context
23643+#define GLX_EXT_import_context 1
23644+#ifdef GLX_GLXEXT_PROTOTYPES
23645+extern Display * glXGetCurrentDisplayEXT (void);
23646+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23647+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23648+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23649+extern void glXFreeContextEXT (Display *, GLXContext);
23650+#endif /* GLX_GLXEXT_PROTOTYPES */
23651+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23652+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23653+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23654+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23655+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23656+#endif
23657+
23658+#ifndef GLX_SGIX_fbconfig
23659+#define GLX_SGIX_fbconfig 1
23660+#ifdef GLX_GLXEXT_PROTOTYPES
23661+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23662+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23663+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23664+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23665+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23666+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23667+#endif /* GLX_GLXEXT_PROTOTYPES */
23668+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23669+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23670+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23671+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23672+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23673+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23674+#endif
23675+
23676+#ifndef GLX_SGIX_pbuffer
23677+#define GLX_SGIX_pbuffer 1
23678+#ifdef GLX_GLXEXT_PROTOTYPES
23679+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23680+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23681+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23682+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23683+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23684+#endif /* GLX_GLXEXT_PROTOTYPES */
23685+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23686+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23687+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23688+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23689+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23690+#endif
23691+
23692+#ifndef GLX_SGI_cushion
23693+#define GLX_SGI_cushion 1
23694+#ifdef GLX_GLXEXT_PROTOTYPES
23695+extern void glXCushionSGI (Display *, Window, float);
23696+#endif /* GLX_GLXEXT_PROTOTYPES */
23697+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23698+#endif
23699+
23700+#ifndef GLX_SGIX_video_resize
23701+#define GLX_SGIX_video_resize 1
23702+#ifdef GLX_GLXEXT_PROTOTYPES
23703+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23704+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23705+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23706+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23707+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23708+#endif /* GLX_GLXEXT_PROTOTYPES */
23709+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23710+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23711+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23712+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23713+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23714+#endif
23715+
23716+#ifndef GLX_SGIX_dmbuffer
23717+#define GLX_SGIX_dmbuffer 1
23718+#ifdef _DM_BUFFER_H_
23719+#ifdef GLX_GLXEXT_PROTOTYPES
23720+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23721+#endif /* GLX_GLXEXT_PROTOTYPES */
23722+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23723+#endif /* _DM_BUFFER_H_ */
23724+#endif
23725+
23726+#ifndef GLX_SGIX_swap_group
23727+#define GLX_SGIX_swap_group 1
23728+#ifdef GLX_GLXEXT_PROTOTYPES
23729+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23730+#endif /* GLX_GLXEXT_PROTOTYPES */
23731+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23732+#endif
23733+
23734+#ifndef GLX_SGIX_swap_barrier
23735+#define GLX_SGIX_swap_barrier 1
23736+#ifdef GLX_GLXEXT_PROTOTYPES
23737+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23738+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23739+#endif /* GLX_GLXEXT_PROTOTYPES */
23740+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23741+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23742+#endif
23743+
23744+#ifndef GLX_SUN_get_transparent_index
23745+#define GLX_SUN_get_transparent_index 1
23746+#ifdef GLX_GLXEXT_PROTOTYPES
23747+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23748+#endif /* GLX_GLXEXT_PROTOTYPES */
23749+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23750+#endif
23751+
23752+#ifndef GLX_MESA_copy_sub_buffer
23753+#define GLX_MESA_copy_sub_buffer 1
23754+#ifdef GLX_GLXEXT_PROTOTYPES
23755+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23756+#endif /* GLX_GLXEXT_PROTOTYPES */
23757+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23758+#endif
23759+
23760+#ifndef GLX_MESA_pixmap_colormap
23761+#define GLX_MESA_pixmap_colormap 1
23762+#ifdef GLX_GLXEXT_PROTOTYPES
23763+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23764+#endif /* GLX_GLXEXT_PROTOTYPES */
23765+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23766+#endif
23767+
23768+#ifndef GLX_MESA_release_buffers
23769+#define GLX_MESA_release_buffers 1
23770+#ifdef GLX_GLXEXT_PROTOTYPES
23771+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23772+#endif /* GLX_GLXEXT_PROTOTYPES */
23773+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23774+#endif
23775+
23776+#ifndef GLX_MESA_set_3dfx_mode
23777+#define GLX_MESA_set_3dfx_mode 1
23778+#ifdef GLX_GLXEXT_PROTOTYPES
23779+extern Bool glXSet3DfxModeMESA (int);
23780+#endif /* GLX_GLXEXT_PROTOTYPES */
23781+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23782+#endif
23783+
23784+#ifndef GLX_SGIX_visual_select_group
23785+#define GLX_SGIX_visual_select_group 1
23786+#endif
23787+
23788+#ifndef GLX_OML_swap_method
23789+#define GLX_OML_swap_method 1
23790+#endif
23791+
23792+#ifndef GLX_OML_sync_control
23793+#define GLX_OML_sync_control 1
23794+#ifdef GLX_GLXEXT_PROTOTYPES
23795+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23796+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23797+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23798+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23799+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23800+#endif /* GLX_GLXEXT_PROTOTYPES */
23801+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23802+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23803+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23804+typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
23805+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23806+#endif
23807+
23808+#ifndef GLX_NV_float_buffer
23809+#define GLX_NV_float_buffer 1
23810+#endif
23811+
23812+#ifndef GLX_SGIX_hyperpipe
23813+#define GLX_SGIX_hyperpipe 1
23814+
23815+typedef struct {
23816+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23817+ int networkId;
23818+} GLXHyperpipeNetworkSGIX;
23819+
23820+typedef struct {
23821+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23822+ int channel;
23823+ unsigned int
23824+ participationType;
23825+ int timeSlice;
23826+} GLXHyperpipeConfigSGIX;
23827+
23828+typedef struct {
23829+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23830+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23831+ int destXOrigin, destYOrigin, destWidth, destHeight;
23832+} GLXPipeRect;
23833+
23834+typedef struct {
23835+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23836+ int XOrigin, YOrigin, maxHeight, maxWidth;
23837+} GLXPipeRectLimits;
23838+
23839+#ifdef GLX_GLXEXT_PROTOTYPES
23840+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23841+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23842+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23843+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23844+extern int glXBindHyperpipeSGIX (Display *, int);
23845+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23846+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23847+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23848+#endif /* GLX_GLXEXT_PROTOTYPES */
23849+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23850+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23851+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23852+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23853+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23854+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23855+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23856+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23857+#endif
23858+
23859+#ifndef GLX_MESA_agp_offset
23860+#define GLX_MESA_agp_offset 1
23861+#ifdef GLX_GLXEXT_PROTOTYPES
23862+extern unsigned int glXGetAGPOffsetMESA (const void *);
23863+#endif /* GLX_GLXEXT_PROTOTYPES */
23864+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23865+#endif
23866+
23867+#ifndef GLX_EXT_fbconfig_packed_float
23868+#define GLX_EXT_fbconfig_packed_float 1
23869+#endif
23870+
23871+#ifndef GLX_EXT_framebuffer_sRGB
23872+#define GLX_EXT_framebuffer_sRGB 1
23873+#endif
23874+
23875+#ifndef GLX_EXT_texture_from_pixmap
23876+#define GLX_EXT_texture_from_pixmap 1
23877+#ifdef GLX_GLXEXT_PROTOTYPES
23878+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23879+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23880+#endif /* GLX_GLXEXT_PROTOTYPES */
23881+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23882+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23883+#endif
23884+
23885+
23886+#ifdef __cplusplus
23887+}
23888+#endif
23889+
23890+#endif
23891Index: qemu-0.12.4/target-i386/mesa_mipmap.c
23892===================================================================
23893--- /dev/null
23894+++ qemu-0.12.4/target-i386/mesa_mipmap.c
23895@@ -0,0 +1,824 @@
23896+
23897+/*
23898+ * Mesa 3-D graphics library
23899+ * Version: 3.4
23900+ * Copyright (C) 1995-2000 Brian Paul
23901+ *
23902+ * This library is free software; you can redistribute it and/or
23903+ * modify it under the terms of the GNU Library General Public
23904+ * License as published by the Free Software Foundation; either
23905+ * version 2 of the License, or (at your option) any later version.
23906+ *
23907+ * This library is distributed in the hope that it will be useful,
23908+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23909+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23910+ * Library General Public License for more details.
23911+ *
23912+ * You should have received a copy of the GNU Library General Public
23913+ * License along with this library; if not, write to the Free
23914+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23915+ */
23916+
23917+
23918+#ifdef PC_HEADER
23919+#include "all.h"
23920+#else
23921+#include <assert.h>
23922+#include <math.h>
23923+#include <stdio.h>
23924+#include <stdlib.h>
23925+//#include "gluP.h"
23926+#endif
23927+
23928+
23929+/*
23930+ * Compute ceiling of integer quotient of A divided by B:
23931+ */
23932+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23933+
23934+
23935+
23936+#ifdef EPSILON
23937+#undef EPSILON
23938+#endif
23939+#define EPSILON 0.001
23940+
23941+
23942+/* To work around optimizer bug in MSVC4.1 */
23943+#if defined(__WIN32__) && !defined(OPENSTEP)
23944+void
23945+dummy(GLuint j, GLuint k)
23946+{
23947+}
23948+#else
23949+#define dummy(J, K)
23950+#endif
23951+
23952+
23953+static GLint GLAPIENTRY
23954+mesa_gluScaleImage(GLenum format,
23955+ GLsizei widthin, GLsizei heightin,
23956+ GLenum typein, const void *datain,
23957+ GLsizei widthout, GLsizei heightout,
23958+ GLenum typeout, void *dataout)
23959+{
23960+ GLint components, i, j, k;
23961+ GLfloat *tempin, *tempout;
23962+ GLfloat sx, sy;
23963+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23964+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23965+ GLint sizein, sizeout;
23966+ GLint rowstride, rowlen;
23967+
23968+
23969+ /* Determine number of components per pixel */
23970+ switch (format) {
23971+ case GL_COLOR_INDEX:
23972+ case GL_STENCIL_INDEX:
23973+ case GL_DEPTH_COMPONENT:
23974+ case GL_RED:
23975+ case GL_GREEN:
23976+ case GL_BLUE:
23977+ case GL_ALPHA:
23978+ case GL_LUMINANCE:
23979+ components = 1;
23980+ break;
23981+ case GL_LUMINANCE_ALPHA:
23982+ components = 2;
23983+ break;
23984+ case GL_RGB:
23985+ case GL_BGR:
23986+ components = 3;
23987+ break;
23988+ case GL_RGBA:
23989+ case GL_BGRA:
23990+#ifdef GL_EXT_abgr
23991+ case GL_ABGR_EXT:
23992+#endif
23993+ components = 4;
23994+ break;
23995+ default:
23996+ return GLU_INVALID_ENUM;
23997+ }
23998+
23999+ /* Determine bytes per input datum */
24000+ switch (typein) {
24001+ case GL_UNSIGNED_BYTE:
24002+ sizein = sizeof(GLubyte);
24003+ break;
24004+ case GL_BYTE:
24005+ sizein = sizeof(GLbyte);
24006+ break;
24007+ case GL_UNSIGNED_SHORT:
24008+ sizein = sizeof(GLushort);
24009+ break;
24010+ case GL_SHORT:
24011+ sizein = sizeof(GLshort);
24012+ break;
24013+ case GL_UNSIGNED_INT:
24014+ sizein = sizeof(GLuint);
24015+ break;
24016+ case GL_INT:
24017+ sizein = sizeof(GLint);
24018+ break;
24019+ case GL_FLOAT:
24020+ sizein = sizeof(GLfloat);
24021+ break;
24022+ case GL_BITMAP:
24023+ /* not implemented yet */
24024+ default:
24025+ return GL_INVALID_ENUM;
24026+ }
24027+
24028+ /* Determine bytes per output datum */
24029+ switch (typeout) {
24030+ case GL_UNSIGNED_BYTE:
24031+ sizeout = sizeof(GLubyte);
24032+ break;
24033+ case GL_BYTE:
24034+ sizeout = sizeof(GLbyte);
24035+ break;
24036+ case GL_UNSIGNED_SHORT:
24037+ sizeout = sizeof(GLushort);
24038+ break;
24039+ case GL_SHORT:
24040+ sizeout = sizeof(GLshort);
24041+ break;
24042+ case GL_UNSIGNED_INT:
24043+ sizeout = sizeof(GLuint);
24044+ break;
24045+ case GL_INT:
24046+ sizeout = sizeof(GLint);
24047+ break;
24048+ case GL_FLOAT:
24049+ sizeout = sizeof(GLfloat);
24050+ break;
24051+ case GL_BITMAP:
24052+ /* not implemented yet */
24053+ default:
24054+ return GL_INVALID_ENUM;
24055+ }
24056+
24057+ /* Get glPixelStore state */
24058+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24059+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24060+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24061+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24062+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24063+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24064+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24065+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24066+
24067+ /* Allocate storage for intermediate images */
24068+ tempin = (GLfloat *) malloc(widthin * heightin
24069+ * components * sizeof(GLfloat));
24070+ if (!tempin) {
24071+ return GLU_OUT_OF_MEMORY;
24072+ }
24073+ tempout = (GLfloat *) malloc(widthout * heightout
24074+ * components * sizeof(GLfloat));
24075+ if (!tempout) {
24076+ free(tempin);
24077+ return GLU_OUT_OF_MEMORY;
24078+ }
24079+
24080+
24081+ /*
24082+ * Unpack the pixel data and convert to floating point
24083+ */
24084+
24085+ if (unpackrowlength > 0) {
24086+ rowlen = unpackrowlength;
24087+ }
24088+ else {
24089+ rowlen = widthin;
24090+ }
24091+ if (sizein >= unpackalignment) {
24092+ rowstride = components * rowlen;
24093+ }
24094+ else {
24095+ rowstride = unpackalignment / sizein
24096+ * CEILING(components * rowlen * sizein, unpackalignment);
24097+ }
24098+
24099+ switch (typein) {
24100+ case GL_UNSIGNED_BYTE:
24101+ k = 0;
24102+ for (i = 0; i < heightin; i++) {
24103+ GLubyte *ubptr = (GLubyte *) datain
24104+ + i * rowstride
24105+ + unpackskiprows * rowstride + unpackskippixels * components;
24106+ for (j = 0; j < widthin * components; j++) {
24107+ dummy(j, k);
24108+ tempin[k++] = (GLfloat) * ubptr++;
24109+ }
24110+ }
24111+ break;
24112+ case GL_BYTE:
24113+ k = 0;
24114+ for (i = 0; i < heightin; i++) {
24115+ GLbyte *bptr = (GLbyte *) datain
24116+ + i * rowstride
24117+ + unpackskiprows * rowstride + unpackskippixels * components;
24118+ for (j = 0; j < widthin * components; j++) {
24119+ dummy(j, k);
24120+ tempin[k++] = (GLfloat) * bptr++;
24121+ }
24122+ }
24123+ break;
24124+ case GL_UNSIGNED_SHORT:
24125+ k = 0;
24126+ for (i = 0; i < heightin; i++) {
24127+ GLushort *usptr = (GLushort *) datain
24128+ + i * rowstride
24129+ + unpackskiprows * rowstride + unpackskippixels * components;
24130+ for (j = 0; j < widthin * components; j++) {
24131+ dummy(j, k);
24132+ tempin[k++] = (GLfloat) * usptr++;
24133+ }
24134+ }
24135+ break;
24136+ case GL_SHORT:
24137+ k = 0;
24138+ for (i = 0; i < heightin; i++) {
24139+ GLshort *sptr = (GLshort *) datain
24140+ + i * rowstride
24141+ + unpackskiprows * rowstride + unpackskippixels * components;
24142+ for (j = 0; j < widthin * components; j++) {
24143+ dummy(j, k);
24144+ tempin[k++] = (GLfloat) * sptr++;
24145+ }
24146+ }
24147+ break;
24148+ case GL_UNSIGNED_INT:
24149+ k = 0;
24150+ for (i = 0; i < heightin; i++) {
24151+ GLuint *uiptr = (GLuint *) datain
24152+ + i * rowstride
24153+ + unpackskiprows * rowstride + unpackskippixels * components;
24154+ for (j = 0; j < widthin * components; j++) {
24155+ dummy(j, k);
24156+ tempin[k++] = (GLfloat) * uiptr++;
24157+ }
24158+ }
24159+ break;
24160+ case GL_INT:
24161+ k = 0;
24162+ for (i = 0; i < heightin; i++) {
24163+ GLint *iptr = (GLint *) datain
24164+ + i * rowstride
24165+ + unpackskiprows * rowstride + unpackskippixels * components;
24166+ for (j = 0; j < widthin * components; j++) {
24167+ dummy(j, k);
24168+ tempin[k++] = (GLfloat) * iptr++;
24169+ }
24170+ }
24171+ break;
24172+ case GL_FLOAT:
24173+ k = 0;
24174+ for (i = 0; i < heightin; i++) {
24175+ GLfloat *fptr = (GLfloat *) datain
24176+ + i * rowstride
24177+ + unpackskiprows * rowstride + unpackskippixels * components;
24178+ for (j = 0; j < widthin * components; j++) {
24179+ dummy(j, k);
24180+ tempin[k++] = *fptr++;
24181+ }
24182+ }
24183+ break;
24184+ default:
24185+ return GLU_INVALID_ENUM;
24186+ }
24187+
24188+
24189+ /*
24190+ * Scale the image!
24191+ */
24192+
24193+ if (widthout > 1)
24194+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24195+ else
24196+ sx = (GLfloat) (widthin - 1);
24197+ if (heightout > 1)
24198+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24199+ else
24200+ sy = (GLfloat) (heightin - 1);
24201+
24202+/*#define POINT_SAMPLE*/
24203+#ifdef POINT_SAMPLE
24204+ for (i = 0; i < heightout; i++) {
24205+ GLint ii = i * sy;
24206+ for (j = 0; j < widthout; j++) {
24207+ GLint jj = j * sx;
24208+
24209+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24210+ GLfloat *dst = tempout + (i * widthout + j) * components;
24211+
24212+ for (k = 0; k < components; k++) {
24213+ *dst++ = *src++;
24214+ }
24215+ }
24216+ }
24217+#else
24218+ if (sx < 1.0 && sy < 1.0) {
24219+ /* magnify both width and height: use weighted sample of 4 pixels */
24220+ GLint i0, i1, j0, j1;
24221+ GLfloat alpha, beta;
24222+ GLfloat *src00, *src01, *src10, *src11;
24223+ GLfloat s1, s2;
24224+ GLfloat *dst;
24225+
24226+ for (i = 0; i < heightout; i++) {
24227+ i0 = i * sy;
24228+ i1 = i0 + 1;
24229+ if (i1 >= heightin)
24230+ i1 = heightin - 1;
24231+/* i1 = (i+1) * sy - EPSILON;*/
24232+ alpha = i * sy - i0;
24233+ for (j = 0; j < widthout; j++) {
24234+ j0 = j * sx;
24235+ j1 = j0 + 1;
24236+ if (j1 >= widthin)
24237+ j1 = widthin - 1;
24238+/* j1 = (j+1) * sx - EPSILON; */
24239+ beta = j * sx - j0;
24240+
24241+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24242+ src00 = tempin + (i0 * widthin + j0) * components;
24243+ src01 = tempin + (i0 * widthin + j1) * components;
24244+ src10 = tempin + (i1 * widthin + j0) * components;
24245+ src11 = tempin + (i1 * widthin + j1) * components;
24246+
24247+ dst = tempout + (i * widthout + j) * components;
24248+
24249+ for (k = 0; k < components; k++) {
24250+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24251+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24252+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24253+ }
24254+ }
24255+ }
24256+ }
24257+ else {
24258+ /* shrink width and/or height: use an unweighted box filter */
24259+ GLint i0, i1;
24260+ GLint j0, j1;
24261+ GLint ii, jj;
24262+ GLfloat sum, *dst;
24263+
24264+ for (i = 0; i < heightout; i++) {
24265+ i0 = i * sy;
24266+ i1 = i0 + 1;
24267+ if (i1 >= heightin)
24268+ i1 = heightin - 1;
24269+/* i1 = (i+1) * sy - EPSILON; */
24270+ for (j = 0; j < widthout; j++) {
24271+ j0 = j * sx;
24272+ j1 = j0 + 1;
24273+ if (j1 >= widthin)
24274+ j1 = widthin - 1;
24275+/* j1 = (j+1) * sx - EPSILON; */
24276+
24277+ dst = tempout + (i * widthout + j) * components;
24278+
24279+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24280+ for (k = 0; k < components; k++) {
24281+ sum = 0.0;
24282+ for (ii = i0; ii <= i1; ii++) {
24283+ for (jj = j0; jj <= j1; jj++) {
24284+ sum += *(tempin + (ii * widthin + jj) * components + k);
24285+ }
24286+ }
24287+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24288+ *dst++ = sum;
24289+ }
24290+ }
24291+ }
24292+ }
24293+#endif
24294+
24295+
24296+ /*
24297+ * Return output image
24298+ */
24299+
24300+ if (packrowlength > 0) {
24301+ rowlen = packrowlength;
24302+ }
24303+ else {
24304+ rowlen = widthout;
24305+ }
24306+ if (sizeout >= packalignment) {
24307+ rowstride = components * rowlen;
24308+ }
24309+ else {
24310+ rowstride = packalignment / sizeout
24311+ * CEILING(components * rowlen * sizeout, packalignment);
24312+ }
24313+
24314+ switch (typeout) {
24315+ case GL_UNSIGNED_BYTE:
24316+ k = 0;
24317+ for (i = 0; i < heightout; i++) {
24318+ GLubyte *ubptr = (GLubyte *) dataout
24319+ + i * rowstride
24320+ + packskiprows * rowstride + packskippixels * components;
24321+ for (j = 0; j < widthout * components; j++) {
24322+ dummy(j, k + i);
24323+ *ubptr++ = (GLubyte) tempout[k++];
24324+ }
24325+ }
24326+ break;
24327+ case GL_BYTE:
24328+ k = 0;
24329+ for (i = 0; i < heightout; i++) {
24330+ GLbyte *bptr = (GLbyte *) dataout
24331+ + i * rowstride
24332+ + packskiprows * rowstride + packskippixels * components;
24333+ for (j = 0; j < widthout * components; j++) {
24334+ dummy(j, k + i);
24335+ *bptr++ = (GLbyte) tempout[k++];
24336+ }
24337+ }
24338+ break;
24339+ case GL_UNSIGNED_SHORT:
24340+ k = 0;
24341+ for (i = 0; i < heightout; i++) {
24342+ GLushort *usptr = (GLushort *) dataout
24343+ + i * rowstride
24344+ + packskiprows * rowstride + packskippixels * components;
24345+ for (j = 0; j < widthout * components; j++) {
24346+ dummy(j, k + i);
24347+ *usptr++ = (GLushort) tempout[k++];
24348+ }
24349+ }
24350+ break;
24351+ case GL_SHORT:
24352+ k = 0;
24353+ for (i = 0; i < heightout; i++) {
24354+ GLshort *sptr = (GLshort *) dataout
24355+ + i * rowstride
24356+ + packskiprows * rowstride + packskippixels * components;
24357+ for (j = 0; j < widthout * components; j++) {
24358+ dummy(j, k + i);
24359+ *sptr++ = (GLshort) tempout[k++];
24360+ }
24361+ }
24362+ break;
24363+ case GL_UNSIGNED_INT:
24364+ k = 0;
24365+ for (i = 0; i < heightout; i++) {
24366+ GLuint *uiptr = (GLuint *) dataout
24367+ + i * rowstride
24368+ + packskiprows * rowstride + packskippixels * components;
24369+ for (j = 0; j < widthout * components; j++) {
24370+ dummy(j, k + i);
24371+ *uiptr++ = (GLuint) tempout[k++];
24372+ }
24373+ }
24374+ break;
24375+ case GL_INT:
24376+ k = 0;
24377+ for (i = 0; i < heightout; i++) {
24378+ GLint *iptr = (GLint *) dataout
24379+ + i * rowstride
24380+ + packskiprows * rowstride + packskippixels * components;
24381+ for (j = 0; j < widthout * components; j++) {
24382+ dummy(j, k + i);
24383+ *iptr++ = (GLint) tempout[k++];
24384+ }
24385+ }
24386+ break;
24387+ case GL_FLOAT:
24388+ k = 0;
24389+ for (i = 0; i < heightout; i++) {
24390+ GLfloat *fptr = (GLfloat *) dataout
24391+ + i * rowstride
24392+ + packskiprows * rowstride + packskippixels * components;
24393+ for (j = 0; j < widthout * components; j++) {
24394+ dummy(j, k + i);
24395+ *fptr++ = tempout[k++];
24396+ }
24397+ }
24398+ break;
24399+ default:
24400+ return GLU_INVALID_ENUM;
24401+ }
24402+
24403+
24404+ /* free temporary image storage */
24405+ free(tempin);
24406+ free(tempout);
24407+
24408+ return 0;
24409+}
24410+
24411+
24412+
24413+/*
24414+ * Return the largest k such that 2^k <= n.
24415+ */
24416+static GLint
24417+ilog2(GLint n)
24418+{
24419+ GLint k;
24420+
24421+ if (n <= 0)
24422+ return 0;
24423+ for (k = 0; n >>= 1; k++);
24424+ return k;
24425+}
24426+
24427+
24428+
24429+/*
24430+ * Find the value nearest to n which is also a power of two.
24431+ */
24432+static GLint
24433+round2(GLint n)
24434+{
24435+ GLint m;
24436+
24437+ for (m = 1; m < n; m *= 2);
24438+
24439+ /* m>=n */
24440+ if (m - n <= n - m / 2) {
24441+ return m;
24442+ }
24443+ else {
24444+ return m / 2;
24445+ }
24446+}
24447+
24448+
24449+/*
24450+ * Given an pixel format and datatype, return the number of bytes to
24451+ * store one pixel.
24452+ */
24453+static GLint
24454+bytes_per_pixel(GLenum format, GLenum type)
24455+{
24456+ GLint n, m;
24457+
24458+ switch (format) {
24459+ case GL_COLOR_INDEX:
24460+ case GL_STENCIL_INDEX:
24461+ case GL_DEPTH_COMPONENT:
24462+ case GL_RED:
24463+ case GL_GREEN:
24464+ case GL_BLUE:
24465+ case GL_ALPHA:
24466+ case GL_LUMINANCE:
24467+ n = 1;
24468+ break;
24469+ case GL_LUMINANCE_ALPHA:
24470+ n = 2;
24471+ break;
24472+ case GL_RGB:
24473+ case GL_BGR:
24474+ n = 3;
24475+ break;
24476+ case GL_RGBA:
24477+ case GL_BGRA:
24478+#ifdef GL_EXT_abgr
24479+ case GL_ABGR_EXT:
24480+#endif
24481+ n = 4;
24482+ break;
24483+ default:
24484+ n = 0;
24485+ }
24486+
24487+ switch (type) {
24488+ case GL_UNSIGNED_BYTE:
24489+ m = sizeof(GLubyte);
24490+ break;
24491+ case GL_BYTE:
24492+ m = sizeof(GLbyte);
24493+ break;
24494+ case GL_BITMAP:
24495+ m = 1;
24496+ break;
24497+ case GL_UNSIGNED_SHORT:
24498+ m = sizeof(GLushort);
24499+ break;
24500+ case GL_SHORT:
24501+ m = sizeof(GLshort);
24502+ break;
24503+ case GL_UNSIGNED_INT:
24504+ m = sizeof(GLuint);
24505+ break;
24506+ case GL_INT:
24507+ m = sizeof(GLint);
24508+ break;
24509+ case GL_FLOAT:
24510+ m = sizeof(GLfloat);
24511+ break;
24512+ default:
24513+ m = 0;
24514+ }
24515+
24516+ return n * m;
24517+}
24518+
24519+
24520+
24521+/*
24522+ * WARNING: This function isn't finished and has never been tested!!!!
24523+ */
24524+GLint GLAPIENTRY
24525+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24526+ GLsizei width, GLenum format, GLenum type, const void *data)
24527+{
24528+ GLubyte *texture;
24529+ GLint levels, max_levels;
24530+ GLint new_width, max_width;
24531+ GLint i, j, k, l;
24532+
24533+ if (width < 1)
24534+ return GLU_INVALID_VALUE;
24535+
24536+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24537+ max_levels = ilog2(max_width) + 1;
24538+
24539+ /* Compute how many mipmap images to make */
24540+ levels = ilog2(width) + 1;
24541+ if (levels > max_levels) {
24542+ levels = max_levels;
24543+ }
24544+
24545+ new_width = 1 << (levels - 1);
24546+
24547+ texture = (GLubyte *) malloc(new_width * components);
24548+ if (!texture) {
24549+ return GLU_OUT_OF_MEMORY;
24550+ }
24551+
24552+ if (width != new_width) {
24553+ /* initial rescaling */
24554+ switch (type) {
24555+ case GL_UNSIGNED_BYTE:
24556+ {
24557+ GLubyte *ub_data = (GLubyte *) data;
24558+ for (i = 0; i < new_width; i++) {
24559+ j = i * width / new_width;
24560+ for (k = 0; k < components; k++) {
24561+ texture[i * components + k] = ub_data[j * components + k];
24562+ }
24563+ }
24564+ }
24565+ break;
24566+ default:
24567+ /* Not implemented */
24568+ return GLU_ERROR;
24569+ }
24570+ }
24571+
24572+ /* generate and load mipmap images */
24573+ for (l = 0; l < levels; l++) {
24574+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24575+ format, GL_UNSIGNED_BYTE, texture);
24576+
24577+ /* Scale image down to 1/2 size */
24578+ new_width = new_width / 2;
24579+ for (i = 0; i < new_width; i++) {
24580+ for (k = 0; k < components; k++) {
24581+ GLint sample1, sample2;
24582+ sample1 = (GLint) texture[i * 2 * components + k];
24583+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24584+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24585+ }
24586+ }
24587+ }
24588+
24589+ free(texture);
24590+
24591+ return 0;
24592+}
24593+
24594+
24595+
24596+GLint GLAPIENTRY
24597+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24598+ GLsizei width, GLsizei height, GLenum format,
24599+ GLenum type, const void *data)
24600+{
24601+ GLint w, h, maxsize;
24602+ void *image, *newimage;
24603+ GLint neww, newh, level, bpp;
24604+ int error;
24605+ GLboolean done;
24606+ GLint retval = 0;
24607+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24608+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24609+
24610+ if (width < 1 || height < 1)
24611+ return GLU_INVALID_VALUE;
24612+
24613+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24614+
24615+ w = round2(width);
24616+ if (w > maxsize) {
24617+ w = maxsize;
24618+ }
24619+ h = round2(height);
24620+ if (h > maxsize) {
24621+ h = maxsize;
24622+ }
24623+
24624+ bpp = bytes_per_pixel(format, type);
24625+ if (bpp == 0) {
24626+ /* probably a bad format or type enum */
24627+ return GLU_INVALID_ENUM;
24628+ }
24629+
24630+ /* Get current glPixelStore values */
24631+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24632+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24633+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24634+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24635+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24636+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24637+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24638+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24639+
24640+ /* set pixel packing */
24641+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24642+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24643+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24644+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24645+
24646+ done = GL_FALSE;
24647+
24648+ if (w != width || h != height) {
24649+ /* must rescale image to get "top" mipmap texture image */
24650+ image = malloc((w + 4) * h * bpp);
24651+ if (!image) {
24652+ return GLU_OUT_OF_MEMORY;
24653+ }
24654+ error = mesa_gluScaleImage(format, width, height, type, data,
24655+ w, h, type, image);
24656+ if (error) {
24657+ retval = error;
24658+ done = GL_TRUE;
24659+ }
24660+ }
24661+ else {
24662+ image = (void *) data;
24663+ }
24664+
24665+ level = 0;
24666+ while (!done) {
24667+ if (image != data) {
24668+ /* set pixel unpacking */
24669+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24670+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24671+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24672+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24673+ }
24674+
24675+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24676+
24677+ if (w == 1 && h == 1)
24678+ break;
24679+
24680+ neww = (w < 2) ? 1 : w / 2;
24681+ newh = (h < 2) ? 1 : h / 2;
24682+ newimage = malloc((neww + 4) * newh * bpp);
24683+ if (!newimage) {
24684+ return GLU_OUT_OF_MEMORY;
24685+ }
24686+
24687+ error = mesa_gluScaleImage(format, w, h, type, image,
24688+ neww, newh, type, newimage);
24689+ if (error) {
24690+ retval = error;
24691+ done = GL_TRUE;
24692+ }
24693+
24694+ if (image != data) {
24695+ free(image);
24696+ }
24697+ image = newimage;
24698+
24699+ w = neww;
24700+ h = newh;
24701+ level++;
24702+ }
24703+
24704+ if (image != data) {
24705+ free(image);
24706+ }
24707+
24708+ /* Restore original glPixelStore state */
24709+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24710+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24711+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24712+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24713+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24714+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24715+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24716+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24717+
24718+ return retval;
24719+}
24720Index: qemu-0.12.4/target-i386/opengl_exec.c
24721===================================================================
24722--- /dev/null
24723+++ qemu-0.12.4/target-i386/opengl_exec.c
24724@@ -0,0 +1,3931 @@
24725+/*
24726+ * Host-side implementation of GL/GLX API
24727+ *
24728+ * Copyright (c) 2006,2007 Even Rouault
24729+ *
24730+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24731+ * of this software and associated documentation files (the "Software"), to deal
24732+ * in the Software without restriction, including without limitation the rights
24733+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24734+ * copies of the Software, and to permit persons to whom the Software is
24735+ * furnished to do so, subject to the following conditions:
24736+ *
24737+ * The above copyright notice and this permission notice shall be included in
24738+ * all copies or substantial portions of the Software.
24739+ *
24740+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24741+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24742+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24743+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24744+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24745+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24746+ * THE SOFTWARE.
24747+ */
24748+
24749+
24750+#include <stdio.h>
24751+#include <stdlib.h>
24752+#include <assert.h>
24753+#include <string.h>
24754+
24755+#include <X11/Xlib.h>
24756+#include <X11/Xutil.h>
24757+
24758+#define GL_GLEXT_PROTOTYPES
24759+#define GLX_GLXEXT_PROTOTYPES
24760+
24761+#include <mesa_gl.h>
24762+#include <mesa_glx.h>
24763+
24764+// TODO
24765+typedef long unsigned int target_phys_addr_t;
24766+
24767+#include "opengl_func.h"
24768+
24769+#include "mesa_glu.h"
24770+#include "mesa_mipmap.c"
24771+
24772+#include "../qemu-common.h"
24773+
24774+//#define SYSTEMATIC_ERROR_CHECK
24775+#define BUFFER_BEGINEND
24776+#define glGetError() 0
24777+
24778+#define GET_EXT_PTR(type, funcname, args_decl) \
24779+ static int detect_##funcname = 0; \
24780+ static type(*ptr_func_##funcname)args_decl = NULL; \
24781+ if (detect_##funcname == 0) \
24782+ { \
24783+ detect_##funcname = 1; \
24784+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24785+ assert (ptr_func_##funcname); \
24786+ }
24787+
24788+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24789+ static int detect_##funcname = 0; \
24790+ static type(*ptr_func_##funcname)args_decl = NULL; \
24791+ if (detect_##funcname == 0) \
24792+ { \
24793+ detect_##funcname = 1; \
24794+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24795+ }
24796+
24797+#ifndef WIN32
24798+#include <dlfcn.h>
24799+#endif
24800+
24801+static void *get_glu_ptr(const char *name)
24802+{
24803+ static void *handle = (void *) -1;
24804+
24805+ if (handle == (void *) -1) {
24806+#ifndef WIN32
24807+ handle = dlopen("libGLU.so", RTLD_LAZY);
24808+ if (!handle)
24809+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24810+#else
24811+ handle = (void *) LoadLibrary("glu32.dll");
24812+ if (!handle)
24813+ fprintf(stderr, "can't load glu32.dll\n");
24814+#endif
24815+ }
24816+ if (handle) {
24817+#ifndef WIN32
24818+ return dlsym(handle, name);
24819+#else
24820+ return GetProcAddress(handle, name);
24821+#endif
24822+ }
24823+ return NULL;
24824+}
24825+
24826+#define GET_GLU_PTR(type, funcname, args_decl) \
24827+ static int detect_##funcname = 0; \
24828+ static type(*ptr_func_##funcname)args_decl = NULL; \
24829+ if (detect_##funcname == 0) \
24830+ { \
24831+ detect_##funcname = 1; \
24832+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24833+ }
24834+
24835+int display_function_call = 0;
24836+
24837+static const int defaultAttribList[] = {
24838+ GLX_RGBA,
24839+ GLX_RED_SIZE, 1,
24840+ GLX_GREEN_SIZE, 1,
24841+ GLX_BLUE_SIZE, 1,
24842+ GLX_DOUBLEBUFFER,
24843+ None
24844+};
24845+
24846+static XVisualInfo *get_default_visual(Display *dpy)
24847+{
24848+ static XVisualInfo *vis = NULL;
24849+ XVisualInfo theTemplate;
24850+ int numVisuals;
24851+
24852+ if (vis)
24853+ return vis;
24854+ fprintf(stderr, "get_default_visual\n");
24855+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24856+ * (int*)defaultAttribList); */
24857+ theTemplate.screen = 0;
24858+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24859+
24860+ return vis;
24861+}
24862+
24863+
24864+static Display *parent_dpy = NULL;
24865+static Window qemu_parent_window = 0;
24866+
24867+static Window active_win = 0; /* FIXME */
24868+static int active_win_x = 0;
24869+static int active_win_y = 0;
24870+
24871+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24872+{
24873+ parent_dpy = _dpy;
24874+ qemu_parent_window = _parent_window;
24875+ if (active_win)
24876+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24877+ active_win_y);
24878+}
24879+
24880+static int local_connection = 0;
24881+void opengl_exec_set_local_connection()
24882+{
24883+ local_connection = 1;
24884+}
24885+
24886+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24887+ XVisualInfo *vis, const char *name,
24888+ int x, int y, int width, int height)
24889+{
24890+ int scrnum;
24891+ XSetWindowAttributes attr = { 0 };
24892+ unsigned long mask;
24893+ Window root;
24894+ Window win;
24895+
24896+ scrnum = DefaultScreen(dpy);
24897+ root = RootWindow(dpy, scrnum);
24898+
24899+ /* window attributes */
24900+ attr.background_pixel = 0xff000000;
24901+ attr.border_pixel = 0;
24902+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24903+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24904+ attr.save_under = True;
24905+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24906+ attr.override_redirect = True;
24907+ // else
24908+ // attr.override_redirect = True;
24909+ attr.cursor = None;
24910+ mask =
24911+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24912+ CWOverrideRedirect | CWSaveUnder;
24913+
24914+ if (local_parent_window)
24915+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24916+ vis->depth, InputOutput, vis->visual, mask, &attr);
24917+ else if (qemu_parent_window)
24918+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24919+ vis->depth, InputOutput, vis->visual, mask, &attr);
24920+ else
24921+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24922+ InputOutput, vis->visual, mask, &attr);
24923+
24924+ /* set hints and properties */
24925+ {
24926+ XSizeHints sizehints;
24927+
24928+ sizehints.x = x;
24929+ sizehints.y = y;
24930+ sizehints.width = width;
24931+ sizehints.height = height;
24932+ sizehints.flags = USSize | USPosition;
24933+ XSetWMNormalHints(dpy, win, &sizehints);
24934+ XSetStandardProperties(dpy, win, name, name, None,
24935+ (char **) NULL, 0, &sizehints);
24936+ }
24937+
24938+ XSync(dpy, 0);
24939+
24940+ /*
24941+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24942+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24943+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24944+ * } } */
24945+
24946+ /* TODO */
24947+ if (!active_win)
24948+ active_win = win;
24949+
24950+ return win;
24951+}
24952+
24953+typedef struct {
24954+ void *key;
24955+ void *value;
24956+} Assoc;
24957+
24958+#define MAX_HANDLED_PROCESS 100
24959+#define MAX_ASSOC_SIZE 100
24960+
24961+#define MAX_FBCONFIG 10
24962+
24963+#include "opengl_utils.h"
24964+
24965+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24966+
24967+
24968+typedef struct {
24969+ int x;
24970+ int y;
24971+ int width;
24972+ int height;
24973+ int map_state;
24974+} WindowPosStruct;
24975+
24976+typedef struct {
24977+ GLbitfield mask;
24978+ int activeTextureIndex;
24979+} ClientState;
24980+
24981+#define MAX_CLIENT_STATE_STACK_SIZE 16
24982+
24983+typedef struct {
24984+ int ref;
24985+ int fake_ctxt;
24986+ int fake_shareList;
24987+ GLXContext context;
24988+ GLXDrawable drawable;
24989+
24990+ void *vertexPointer;
24991+ void *normalPointer;
24992+ void *colorPointer;
24993+ void *secondaryColorPointer;
24994+ void *indexPointer;
24995+ void *texCoordPointer[NB_MAX_TEXTURES];
24996+ void *edgeFlagPointer;
24997+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24998+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24999+ void *weightPointer;
25000+ void *matrixIndexPointer;
25001+ void *fogCoordPointer;
25002+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
25003+ void *interleavedArrays;
25004+ void *elementPointerATI;
25005+
25006+ int vertexPointerSize;
25007+ int normalPointerSize;
25008+ int colorPointerSize;
25009+ int secondaryColorPointerSize;
25010+ int indexPointerSize;
25011+ int texCoordPointerSize[NB_MAX_TEXTURES];
25012+ int edgeFlagPointerSize;
25013+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
25014+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
25015+ int weightPointerSize;
25016+ int matrixIndexPointerSize;
25017+ int fogCoordPointerSize;
25018+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
25019+ int interleavedArraysSize;
25020+ int elementPointerATISize;
25021+
25022+ int selectBufferSize;
25023+ void *selectBufferPtr;
25024+ int feedbackBufferSize;
25025+ void *feedbackBufferPtr;
25026+
25027+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
25028+ int clientStateSp;
25029+ int activeTextureIndex;
25030+
25031+ unsigned int ownTabTextures[32768];
25032+ unsigned int *tabTextures;
25033+ RangeAllocator ownTextureAllocator;
25034+ RangeAllocator *textureAllocator;
25035+
25036+ unsigned int ownTabBuffers[32768];
25037+ unsigned int *tabBuffers;
25038+ RangeAllocator ownBufferAllocator;
25039+ RangeAllocator *bufferAllocator;
25040+
25041+ unsigned int ownTabLists[32768];
25042+ unsigned int *tabLists;
25043+ RangeAllocator ownListAllocator;
25044+ RangeAllocator *listAllocator;
25045+
25046+#ifdef SYSTEMATIC_ERROR_CHECK
25047+ int last_error;
25048+#endif
25049+} GLState;
25050+
25051+typedef struct {
25052+ int process_id;
25053+ int instr_counter;
25054+
25055+ int x, y, width, height;
25056+ WindowPosStruct currentDrawablePos;
25057+
25058+ int next_available_context_number;
25059+ int next_available_pbuffer_number;
25060+
25061+ int nb_states;
25062+ GLState default_state;
25063+ GLState **glstates;
25064+ GLState *current_state;
25065+
25066+ int nfbconfig;
25067+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
25068+ int fbconfigs_max[MAX_FBCONFIG];
25069+ int nfbconfig_total;
25070+
25071+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
25072+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
25073+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
25074+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
25075+
25076+ Display *dpy;
25077+
25078+ int began;
25079+ int primitive;
25080+ int bufsize;
25081+ int bufstart;
25082+ arg_t *cmdbuf;
25083+} ProcessStruct;
25084+
25085+static ProcessStruct processes[MAX_HANDLED_PROCESS];
25086+
25087+void init_process_tab()
25088+{
25089+ memset(processes, 0, sizeof(processes));
25090+}
25091+
25092+#define ARG_TO_CHAR(x) (char)(x)
25093+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
25094+#define ARG_TO_SHORT(x) (short)(x)
25095+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
25096+#define ARG_TO_INT(x) (int)(x)
25097+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
25098+#define ARG_TO_FLOAT(x) (*(float*)&(x))
25099+#define ARG_TO_DOUBLE(x) (*(double*)(x))
25100+
25101+#include "server_stub.c"
25102+
25103+/* ---- */
25104+
25105+#ifdef BUFFER_BEGINEND
25106+/* A user of the following two functions must not buffer any calls that
25107+ * may throw an error (i.e. errors conditions must be checked before
25108+ * storing in the buffer) or return values. */
25109+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
25110+{
25111+ arg_t *ret;
25112+
25113+ if (unlikely(process->bufstart + elems > process->bufsize)) {
25114+ process->bufsize = (process->bufsize ?: 0x100) << 1;
25115+ process->cmdbuf = qemu_realloc(process->cmdbuf,
25116+ process->bufsize * sizeof(arg_t));
25117+ }
25118+
25119+ ret = process->cmdbuf + process->bufstart;
25120+ process->bufstart += elems;
25121+ return ret;
25122+}
25123+
25124+static inline void cmd_buffer_replay(ProcessStruct *process)
25125+{
25126+ Signature *sig;
25127+ int func_number;
25128+ int ret_int;
25129+ char ret_char;
25130+ arg_t *call = process->cmdbuf;
25131+
25132+ while (process->bufstart) {
25133+ func_number = *call ++;
25134+ sig = (Signature *) tab_opengl_calls[func_number];
25135+
25136+ execute_func(func_number, call, &ret_int, &ret_char);
25137+
25138+ call += sig->nb_args;
25139+ process->bufstart -= sig->nb_args + 1;
25140+ }
25141+}
25142+#endif
25143+
25144+/* ---- */
25145+
25146+typedef void *ClientGLXDrawable;
25147+static inline ClientGLXDrawable to_drawable(arg_t arg)
25148+{
25149+#ifdef TARGET_X86_64
25150+ if (arg > (unsigned long) -1) {
25151+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25152+ exit(-1);
25153+ }
25154+#endif
25155+ return (void *) (unsigned long) arg;
25156+}
25157+
25158+GLXContext get_association_fakecontext_glxcontext(
25159+ ProcessStruct *process, int fakecontext)
25160+{
25161+ int i;
25162+
25163+ for (i = 0;
25164+ i < MAX_ASSOC_SIZE &&
25165+ process->association_fakecontext_glxcontext[i].key; i++)
25166+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25167+ fakecontext)
25168+ return (GLXContext)
25169+ process->association_fakecontext_glxcontext[i].value;
25170+
25171+ return NULL;
25172+}
25173+
25174+void set_association_fakecontext_glxcontext(
25175+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25176+{
25177+ int i;
25178+
25179+ for (i = 0;
25180+ i < MAX_ASSOC_SIZE &&
25181+ process->association_fakecontext_glxcontext[i].key; i++)
25182+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25183+ fakecontext)
25184+ break;
25185+
25186+ if (i < MAX_ASSOC_SIZE) {
25187+ process->association_fakecontext_glxcontext[i].key =
25188+ (void *) (long) fakecontext;
25189+ process->association_fakecontext_glxcontext[i].value =
25190+ (void *) glxcontext;
25191+ } else
25192+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25193+}
25194+
25195+void unset_association_fakecontext_glxcontext(
25196+ ProcessStruct *process, int fakecontext)
25197+{
25198+ int i;
25199+
25200+ for (i = 0;
25201+ i < MAX_ASSOC_SIZE &&
25202+ process->association_fakecontext_glxcontext[i].key; i++)
25203+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25204+ fakecontext) {
25205+ memmove(&process->association_fakecontext_glxcontext[i],
25206+ &process->association_fakecontext_glxcontext[i + 1],
25207+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25208+ return;
25209+ }
25210+}
25211+
25212+/* ---- */
25213+
25214+XVisualInfo *get_association_fakecontext_visual(
25215+ ProcessStruct *process, int fakecontext)
25216+{
25217+ int i;
25218+
25219+ for (i = 0;
25220+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25221+ i++)
25222+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25223+ fakecontext)
25224+ return process->association_fakecontext_visual[i].value;
25225+
25226+ return NULL;
25227+}
25228+
25229+void set_association_fakecontext_visual(ProcessStruct *process,
25230+ int fakecontext, XVisualInfo *visual)
25231+{
25232+ int i;
25233+
25234+ for (i = 0;
25235+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25236+ i++)
25237+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25238+ fakecontext)
25239+ break;
25240+
25241+ if (i < MAX_ASSOC_SIZE) {
25242+ process->association_fakecontext_visual[i].key =
25243+ (void *) (long) fakecontext;
25244+ process->association_fakecontext_visual[i].value = (void *) visual;
25245+ } else
25246+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25247+}
25248+
25249+/* ---- */
25250+
25251+GLXPbuffer get_association_fakepbuffer_pbuffer(
25252+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25253+{
25254+ int i;
25255+
25256+ for (i = 0; i < MAX_ASSOC_SIZE &&
25257+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25258+ if ((ClientGLXDrawable)
25259+ process->association_fakepbuffer_pbuffer[i].key ==
25260+ fakepbuffer)
25261+ return (GLXPbuffer)
25262+ process->association_fakepbuffer_pbuffer[i].value;
25263+
25264+ return 0;
25265+}
25266+
25267+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25268+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25269+{
25270+ int i;
25271+
25272+ for (i = 0;
25273+ i < MAX_ASSOC_SIZE &&
25274+ process->association_fakepbuffer_pbuffer[i].key; i++)
25275+ if ((ClientGLXDrawable)
25276+ process->association_fakepbuffer_pbuffer[i].key ==
25277+ fakepbuffer)
25278+ break;
25279+
25280+ if (i < MAX_ASSOC_SIZE) {
25281+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25282+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25283+ } else
25284+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25285+}
25286+
25287+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25288+ ClientGLXDrawable fakepbuffer)
25289+{
25290+ int i;
25291+
25292+ for (i = 0; i < MAX_ASSOC_SIZE &&
25293+ process->association_fakepbuffer_pbuffer[i].key; i++)
25294+ if ((ClientGLXDrawable)
25295+ process->association_fakepbuffer_pbuffer[i].key ==
25296+ fakepbuffer) {
25297+ memmove(&process->association_fakepbuffer_pbuffer[i],
25298+ &process->association_fakepbuffer_pbuffer[i + 1],
25299+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25300+ return;
25301+ }
25302+}
25303+
25304+/* ---- */
25305+
25306+GLXDrawable get_association_clientdrawable_serverdrawable(
25307+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25308+{
25309+ int i;
25310+
25311+ for (i = 0; i < MAX_ASSOC_SIZE &&
25312+ process->association_clientdrawable_serverdrawable[i].key;
25313+ i++)
25314+ if ((ClientGLXDrawable) process->
25315+ association_clientdrawable_serverdrawable[i].key ==
25316+ clientdrawable)
25317+ return (GLXDrawable) process->
25318+ association_clientdrawable_serverdrawable[i].value;
25319+
25320+ return (GLXDrawable) 0;
25321+}
25322+
25323+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25324+ ProcessStruct *process, GLXDrawable serverdrawable)
25325+{
25326+ int i;
25327+
25328+ for (i = 0; i < MAX_ASSOC_SIZE &&
25329+ process->association_clientdrawable_serverdrawable[i].key;
25330+ i ++)
25331+ if ((GLXDrawable) process->
25332+ association_clientdrawable_serverdrawable[i].value ==
25333+ serverdrawable)
25334+ return (ClientGLXDrawable)
25335+ process->association_clientdrawable_serverdrawable[i].key;
25336+
25337+ return NULL;
25338+}
25339+
25340+void set_association_clientdrawable_serverdrawable(
25341+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25342+ GLXDrawable serverdrawable)
25343+{
25344+ int i;
25345+
25346+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25347+ i ++)
25348+ if ((ClientGLXDrawable) process->
25349+ association_clientdrawable_serverdrawable[i].key ==
25350+ clientdrawable)
25351+ break;
25352+
25353+ if (i < MAX_ASSOC_SIZE) {
25354+ process->association_clientdrawable_serverdrawable[i].key =
25355+ (void *) clientdrawable;
25356+ process->association_clientdrawable_serverdrawable[i].value =
25357+ (void *) serverdrawable;
25358+ } else
25359+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25360+}
25361+
25362+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25363+{
25364+ XWindowAttributes window_attributes_return;
25365+ Window child;
25366+ int x, y;
25367+ Window root = DefaultRootWindow(dpy);
25368+
25369+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25370+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25371+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25372+ * window_attributes_return.height); */
25373+ pos->x = x;
25374+ pos->y = y;
25375+ pos->width = window_attributes_return.width;
25376+ pos->height = window_attributes_return.height;
25377+ pos->map_state = window_attributes_return.map_state;
25378+}
25379+
25380+static int is_gl_vendor_ati(Display *dpy)
25381+{
25382+ static int is_gl_vendor_ati_flag = 0;
25383+ static int has_init = 0;
25384+
25385+ if (has_init == 0) {
25386+ has_init = 1;
25387+ is_gl_vendor_ati_flag =
25388+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25389+ }
25390+ return is_gl_vendor_ati_flag;
25391+}
25392+
25393+static int get_server_texture(ProcessStruct *process,
25394+ unsigned int client_texture)
25395+{
25396+ unsigned int server_texture = 0;
25397+
25398+ if (client_texture < 32768) {
25399+ server_texture = process->current_state->tabTextures[client_texture];
25400+ } else {
25401+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25402+ }
25403+ return server_texture;
25404+}
25405+
25406+static int get_server_buffer(ProcessStruct *process,
25407+ unsigned int client_buffer)
25408+{
25409+ unsigned int server_buffer = 0;
25410+
25411+ if (client_buffer < 32768) {
25412+ server_buffer = process->current_state->tabBuffers[client_buffer];
25413+ } else {
25414+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25415+ }
25416+ return server_buffer;
25417+}
25418+
25419+
25420+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25421+{
25422+ unsigned int server_list = 0;
25423+
25424+ if (client_list < 32768) {
25425+ server_list = process->current_state->tabLists[client_list];
25426+ } else {
25427+ fprintf(stderr, "invalid list name %d\n", client_list);
25428+ }
25429+ return server_list;
25430+}
25431+
25432+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25433+{
25434+ int i;
25435+ int nbtotal = 0;
25436+
25437+ for (i = 0; i < process->nfbconfig; i++) {
25438+ assert(client_fbconfig >= 1 + nbtotal);
25439+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25440+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25441+ }
25442+ nbtotal += process->fbconfigs_max[i];
25443+ }
25444+ return 0;
25445+}
25446+
25447+typedef struct {
25448+ int attribListLength;
25449+ int *attribList;
25450+ XVisualInfo *visInfo;
25451+} AssocAttribListVisual;
25452+
25453+static int nTabAssocAttribListVisual = 0;
25454+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25455+
25456+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25457+ int
25458+ booleanMustHaveValue)
25459+{
25460+ int i = 0;
25461+
25462+ while (attribList[i]) {
25463+ if (booleanMustHaveValue ||
25464+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25465+ attribList[i] == GLX_DOUBLEBUFFER ||
25466+ attribList[i] == GLX_STEREO)) {
25467+ i += 2;
25468+ } else {
25469+ i++;
25470+ }
25471+ }
25472+ return i + 1;
25473+}
25474+
25475+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25476+{
25477+ if (_attribList == NULL)
25478+ return 0;
25479+ int attribListLength =
25480+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25481+ int i;
25482+
25483+ int *attribList = malloc(sizeof(int) * attribListLength);
25484+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25485+
25486+ i = 0;
25487+ while (attribList[i]) {
25488+ if (!
25489+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25490+ attribList[i] == GLX_DOUBLEBUFFER ||
25491+ attribList[i] == GLX_STEREO)) {
25492+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25493+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25494+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25495+ attribList[i + 1] = 0;
25496+ }
25497+ i += 2;
25498+ } else {
25499+ i++;
25500+ }
25501+ }
25502+
25503+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25504+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25505+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25506+ attribListLength * sizeof(int)) == 0) {
25507+ free(attribList);
25508+ return (tabAssocAttribListVisual[i].
25509+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25510+ visualid : 0;
25511+ }
25512+ }
25513+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25514+
25515+ tabAssocAttribListVisual = realloc(
25516+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25517+ (nTabAssocAttribListVisual + 1));
25518+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25519+ attribListLength;
25520+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25521+ (int *) malloc(sizeof(int) * attribListLength);
25522+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25523+ attribList, sizeof(int) * attribListLength);
25524+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25525+ nTabAssocAttribListVisual++;
25526+ free(attribList);
25527+ return (visInfo) ? visInfo->visualid : 0;
25528+}
25529+
25530+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25531+ int visualid)
25532+{
25533+ int i, n;
25534+ XVisualInfo template;
25535+ XVisualInfo *visInfo;
25536+
25537+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25538+ if (tabAssocAttribListVisual[i].visInfo &&
25539+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25540+ return tabAssocAttribListVisual[i].visInfo;
25541+ }
25542+ }
25543+ template.visualid = visualid;
25544+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25545+ tabAssocAttribListVisual =
25546+ realloc(tabAssocAttribListVisual,
25547+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25548+ 1));
25549+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25550+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25551+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25552+ nTabAssocAttribListVisual++;
25553+ return visInfo;
25554+}
25555+
25556+typedef struct {
25557+ int x;
25558+ int y;
25559+ int width;
25560+ int height;
25561+ int xhot;
25562+ int yhot;
25563+ int *pixels;
25564+} ClientCursor;
25565+
25566+#if 0
25567+static ClientCursor client_cursor = { 0 };
25568+#endif
25569+
25570+static void do_glClientActiveTextureARB(int texture)
25571+{
25572+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25573+
25574+ if (ptr_func_glClientActiveTextureARB) {
25575+ ptr_func_glClientActiveTextureARB(texture);
25576+ }
25577+}
25578+
25579+#ifdef CURSOR_TRICK
25580+static void do_glActiveTextureARB(int texture)
25581+{
25582+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25583+
25584+ if (ptr_func_glActiveTextureARB) {
25585+ ptr_func_glActiveTextureARB(texture);
25586+ }
25587+}
25588+
25589+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25590+{
25591+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25592+
25593+ if (ptr_func_glUseProgramObjectARB) {
25594+ ptr_func_glUseProgramObjectARB(programObj);
25595+ }
25596+}
25597+#endif
25598+
25599+static void destroy_gl_state(GLState *state)
25600+{
25601+ int i;
25602+
25603+ if (state->vertexPointer)
25604+ free(state->vertexPointer);
25605+ if (state->normalPointer)
25606+ free(state->normalPointer);
25607+ if (state->indexPointer)
25608+ free(state->indexPointer);
25609+ if (state->colorPointer)
25610+ free(state->colorPointer);
25611+ if (state->secondaryColorPointer)
25612+ free(state->secondaryColorPointer);
25613+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25614+ if (state->texCoordPointer[i])
25615+ free(state->texCoordPointer[i]);
25616+ }
25617+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25618+ if (state->vertexAttribPointer[i])
25619+ free(state->vertexAttribPointer[i]);
25620+ }
25621+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25622+ if (state->vertexAttribPointerNV[i])
25623+ free(state->vertexAttribPointerNV[i]);
25624+ }
25625+ if (state->weightPointer)
25626+ free(state->weightPointer);
25627+ if (state->matrixIndexPointer)
25628+ free(state->matrixIndexPointer);
25629+ if (state->fogCoordPointer)
25630+ free(state->fogCoordPointer);
25631+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25632+ if (state->variantPointerEXT[i])
25633+ free(state->variantPointerEXT[i]);
25634+ }
25635+ if (state->interleavedArrays)
25636+ free(state->interleavedArrays);
25637+ if (state->elementPointerATI)
25638+ free(state->elementPointerATI);
25639+}
25640+
25641+static void init_gl_state(GLState *state)
25642+{
25643+ state->textureAllocator = &state->ownTextureAllocator;
25644+ state->tabTextures = state->ownTabTextures;
25645+ state->bufferAllocator = &state->ownBufferAllocator;
25646+ state->tabBuffers = state->ownTabBuffers;
25647+ state->listAllocator = &state->ownListAllocator;
25648+ state->tabLists = state->ownTabLists;
25649+}
25650+
25651+/*
25652+ * Translate the nth element of list from type to GLuint.
25653+ */
25654+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25655+{
25656+ GLbyte *bptr;
25657+ GLubyte *ubptr;
25658+ GLshort *sptr;
25659+ GLushort *usptr;
25660+ GLint *iptr;
25661+ GLuint *uiptr;
25662+ GLfloat *fptr;
25663+
25664+ switch (type) {
25665+ case GL_BYTE:
25666+ bptr = (GLbyte *) list;
25667+ return (GLuint) *(bptr + n);
25668+ case GL_UNSIGNED_BYTE:
25669+ ubptr = (GLubyte *) list;
25670+ return (GLuint) *(ubptr + n);
25671+ case GL_SHORT:
25672+ sptr = (GLshort *) list;
25673+ return (GLuint) *(sptr + n);
25674+ case GL_UNSIGNED_SHORT:
25675+ usptr = (GLushort *) list;
25676+ return (GLuint) *(usptr + n);
25677+ case GL_INT:
25678+ iptr = (GLint *) list;
25679+ return (GLuint) *(iptr + n);
25680+ case GL_UNSIGNED_INT:
25681+ uiptr = (GLuint *) list;
25682+ return (GLuint) *(uiptr + n);
25683+ case GL_FLOAT:
25684+ fptr = (GLfloat *) list;
25685+ return (GLuint) *(fptr + n);
25686+ case GL_2_BYTES:
25687+ ubptr = ((GLubyte *) list) + 2 * n;
25688+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25689+ case GL_3_BYTES:
25690+ ubptr = ((GLubyte *) list) + 3 * n;
25691+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25692+ (GLuint) *(ubptr + 2);
25693+ case GL_4_BYTES:
25694+ ubptr = ((GLubyte *) list) + 4 * n;
25695+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25696+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25697+ default:
25698+ return 0;
25699+ }
25700+}
25701+
25702+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25703+ GLXContext shareList, int fake_shareList)
25704+{
25705+ process->glstates =
25706+ realloc(process->glstates,
25707+ (process->nb_states + 1) * sizeof(GLState *));
25708+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25709+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25710+ process->glstates[process->nb_states]->ref = 1;
25711+ process->glstates[process->nb_states]->context = ctxt;
25712+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25713+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25714+ init_gl_state(process->glstates[process->nb_states]);
25715+ if (shareList && fake_shareList) {
25716+ int i;
25717+
25718+ for (i = 0; i < process->nb_states; i++) {
25719+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25720+ process->glstates[i]->ref++;
25721+ process->glstates[process->nb_states]->textureAllocator =
25722+ process->glstates[i]->textureAllocator;
25723+ process->glstates[process->nb_states]->tabTextures =
25724+ process->glstates[i]->tabTextures;
25725+ process->glstates[process->nb_states]->bufferAllocator =
25726+ process->glstates[i]->bufferAllocator;
25727+ process->glstates[process->nb_states]->tabBuffers =
25728+ process->glstates[i]->tabBuffers;
25729+ process->glstates[process->nb_states]->listAllocator =
25730+ process->glstates[i]->listAllocator;
25731+ process->glstates[process->nb_states]->tabLists =
25732+ process->glstates[i]->tabLists;
25733+ break;
25734+ }
25735+ }
25736+ }
25737+ process->nb_states++;
25738+}
25739+
25740+static ProcessStruct *process;
25741+
25742+void do_disconnect_current(void)
25743+{
25744+ int i;
25745+ Display *dpy = process->dpy;
25746+
25747+ glXMakeCurrent(dpy, 0, NULL);
25748+
25749+ for (i = 0; i < MAX_ASSOC_SIZE &&
25750+ process->association_fakecontext_glxcontext[i].key; i ++) {
25751+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25752+
25753+ fprintf(stderr, "Destroy context corresponding to fake_context"
25754+ " = %ld\n", (long) process->
25755+ association_fakecontext_glxcontext[i].key);
25756+ glXDestroyContext(dpy, ctxt);
25757+ }
25758+
25759+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25760+
25761+ for (i = 0; i < MAX_ASSOC_SIZE &&
25762+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25763+ GLXPbuffer pbuffer = (GLXPbuffer)
25764+ process->association_fakepbuffer_pbuffer[i].value;
25765+
25766+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25767+ " = %ld\n", (long) process->
25768+ association_fakepbuffer_pbuffer[i].key);
25769+ if (!is_gl_vendor_ati(dpy))
25770+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25771+ }
25772+
25773+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25774+ association_clientdrawable_serverdrawable[i].key; i ++) {
25775+ Window win = (Window) process->
25776+ association_clientdrawable_serverdrawable[i].value;
25777+
25778+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25779+ "= %p\n", (int) win, process->
25780+ association_clientdrawable_serverdrawable[i].key);
25781+
25782+ XDestroyWindow(dpy, win);
25783+ if (active_win == win)
25784+ active_win = 0;
25785+
25786+ int loop = 1; // 1;
25787+ while (loop) {
25788+ while (XPending(dpy) > 0) {
25789+ XEvent event;
25790+
25791+ XNextEvent(dpy, &event);
25792+ switch (event.type) {
25793+ case DestroyNotify:
25794+ {
25795+ if (((XDestroyWindowEvent *) &event)->window == win)
25796+ loop = 0;
25797+ break;
25798+ }
25799+ }
25800+ }
25801+ break; /* TODO */
25802+ }
25803+ }
25804+
25805+ for (i = 0; i < process->nb_states; i++) {
25806+ destroy_gl_state(process->glstates[i]);
25807+ free(process->glstates[i]);
25808+ }
25809+ destroy_gl_state(&process->default_state);
25810+ free(process->glstates);
25811+
25812+ if (process->cmdbuf)
25813+ qemu_free(process->cmdbuf);
25814+
25815+ for (i = 0; &processes[i] != process; i ++);
25816+ memmove(&processes[i], &processes[i + 1],
25817+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25818+}
25819+
25820+static const int beginend_allowed[GL_N_CALLS] = {
25821+#undef MAGIC_MACRO
25822+#define MAGIC_MACRO(name) [name ## _func] = 1,
25823+#include "gl_beginend.h"
25824+};
25825+
25826+void do_context_switch(Display *dpy, pid_t pid, int call)
25827+{
25828+ int i;
25829+
25830+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25831+ if (processes[i].process_id == pid) {
25832+ process = &processes[i];
25833+ break;
25834+ } else if (processes[i].process_id == 0) {
25835+ process = &processes[i];
25836+ memset(process, 0, sizeof(ProcessStruct));
25837+ process->process_id = pid;
25838+ init_gl_state(&process->default_state);
25839+ process->current_state = &process->default_state;
25840+ process->dpy = dpy;
25841+ break;
25842+ }
25843+ if (process == NULL) {
25844+ fprintf(stderr, "Too many processes !\n");
25845+ exit(-1);
25846+ }
25847+
25848+ switch (call) {
25849+ case _init32_func:
25850+ case _init64_func:
25851+ case _exit_process_func:
25852+ case glXMakeCurrent_func:
25853+ /* Do nothing */
25854+ break;
25855+
25856+ default:
25857+#if 0
25858+ glFlush();
25859+ glFinish();
25860+ glXSwapBuffers(dpy, drawable);
25861+ if (process->current_state == &process->default_state)
25862+ /* Where do commands like glViewport go when no drawable or
25863+ * context are current - i.e. after a call to
25864+ * glXMakeCurrent(dpy, 0, 0) ? */;
25865+ else
25866+#endif
25867+ glXMakeCurrent(dpy, process->current_state->drawable,
25868+ process->current_state->context);
25869+ }
25870+}
25871+
25872+int do_function_call(int func_number, arg_t *args, char *ret_string)
25873+{
25874+ char ret_char = 0;
25875+ int ret_int = 0;
25876+ const char *ret_str = NULL;
25877+ Display *dpy = process->dpy;
25878+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25879+ int ret_type = signature->ret_type;
25880+
25881+ if (parent_dpy)
25882+ dpy = parent_dpy;
25883+
25884+ process->instr_counter++;
25885+ if (display_function_call)
25886+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25887+ tab_opengl_calls_name[func_number]);
25888+
25889+#ifdef BUFFER_BEGINEND
25890+ if (process->began) {
25891+ /* Need to check for any errors now because later we won't have
25892+ * a chance to report them. */
25893+ if (beginend_allowed[func_number]) {
25894+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25895+
25896+ /* TODO: pointer arguments */
25897+ buf[0] = func_number;
25898+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25899+ } else if (likely(func_number == glEnd_func)) {
25900+ process->began = 0;
25901+
25902+ glBegin(process->primitive);
25903+ cmd_buffer_replay(process);
25904+ glEnd();
25905+ } else {
25906+ /* TODO: properly report */
25907+#ifdef SYSTEMATIC_ERROR_CHECK
25908+ process->current_state->last_error = INVALID_OPERATION;
25909+#endif
25910+ }
25911+
25912+ func_number = -1;
25913+ }
25914+#endif
25915+
25916+ switch (func_number) {
25917+ case -1:
25918+ break;
25919+
25920+ case _init_func:
25921+ *(int *) args[1] = 1;
25922+ break;
25923+
25924+ case _synchronize_func:
25925+ ret_int = 1;
25926+ break;
25927+
25928+ case _exit_process_func:
25929+ do_disconnect_current();
25930+ break;
25931+
25932+ case _changeWindowState_func:
25933+ {
25934+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25935+
25936+ if (display_function_call)
25937+ fprintf(stderr, "client_drawable=%p\n",
25938+ (void *) client_drawable);
25939+
25940+ GLXDrawable drawable =
25941+ get_association_clientdrawable_serverdrawable(
25942+ process, client_drawable);
25943+ if (drawable) {
25944+ if (args[1] == IsViewable) {
25945+ WindowPosStruct pos;
25946+
25947+ _get_window_pos(dpy, drawable, &pos);
25948+ if (pos.map_state != args[1]) {
25949+ XMapWindow(dpy, drawable);
25950+
25951+ int loop = 1; // 1;
25952+
25953+ while (loop) {
25954+ while (XPending(dpy) > 0) {
25955+ XEvent event;
25956+
25957+ XNextEvent(dpy, &event);
25958+ switch (event.type) {
25959+ case ConfigureNotify:
25960+ {
25961+ if (((XConfigureEvent *) &event)->
25962+ window == drawable) {
25963+ loop = 0;
25964+ }
25965+ break;
25966+ }
25967+ }
25968+ }
25969+ break; /* TODO */
25970+ }
25971+ }
25972+ }
25973+ }
25974+
25975+ break;
25976+ }
25977+
25978+ case _moveResizeWindow_func:
25979+ {
25980+ int *params = (int *) args[1];
25981+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25982+
25983+ if (display_function_call)
25984+ fprintf(stderr, "client_drawable=%p\n",
25985+ (void *) client_drawable);
25986+
25987+ GLXDrawable drawable =
25988+ get_association_clientdrawable_serverdrawable(
25989+ process, client_drawable);
25990+ if (drawable) {
25991+ WindowPosStruct pos;
25992+
25993+ _get_window_pos(dpy, drawable, &pos);
25994+ if (!
25995+ (params[0] == pos.x && params[1] == pos.y &&
25996+ params[2] == pos.width && params[3] == pos.height)) {
25997+ int redim = !(params[2] == pos.width &&
25998+ params[3] == pos.height);
25999+ active_win_x = params[0];
26000+ active_win_y = params[1];
26001+
26002+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
26003+ pos.x, pos.y, pos.width, pos.height);
26004+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
26005+ params[0], params[1], params[2], params[3]);
26006+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
26007+ params[2], params[3]);
26008+ int loop = 0; // = 1
26009+
26010+ while (loop) {
26011+ while (XPending(dpy) > 0) {
26012+ XEvent event;
26013+
26014+ XNextEvent(dpy, &event);
26015+ switch (event.type) {
26016+ case ConfigureNotify:
26017+ {
26018+ if (((XConfigureEvent *) &event)->
26019+ window == drawable) {
26020+ loop = 0;
26021+ }
26022+ break;
26023+ }
26024+ }
26025+ }
26026+ }
26027+ /* The window should have resized by now, but force the
26028+ * new size anyway. */
26029+ _get_window_pos(dpy, drawable, &pos);
26030+ pos.width = params[2];
26031+ pos.height = params[3];
26032+ process->currentDrawablePos = pos;
26033+ // if (getenv("FORCE_GL_VIEWPORT"))
26034+ if (redim)
26035+ glViewport(0, 0, pos.width, pos.height);
26036+ }
26037+ }
26038+ break;
26039+ }
26040+
26041+ case _send_cursor_func:
26042+ {
26043+#if 0
26044+ int x = args[0];
26045+ int y = args[1];
26046+ int width = args[2];
26047+ int height = args[3];
26048+ int xhot = args[4];
26049+ int yhot = args[5];
26050+ int *pixels = (int *) args[6];
26051+
26052+ client_cursor.x = x;
26053+ client_cursor.y = y;
26054+ client_cursor.width = width;
26055+ client_cursor.height = height;
26056+ client_cursor.xhot = xhot;
26057+ client_cursor.yhot = yhot;
26058+ if (pixels) {
26059+ client_cursor.pixels =
26060+ realloc(client_cursor.pixels,
26061+ client_cursor.width * client_cursor.height *
26062+ sizeof(int));
26063+ memcpy(client_cursor.pixels, pixels,
26064+ client_cursor.width * client_cursor.height *
26065+ sizeof(int));
26066+ }
26067+ int in_window = (x >= 0 && y >= 0 &&
26068+ x < process->currentDrawablePos.width &&
26069+ y < process->currentDrawablePos.height);
26070+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
26071+ // "in window" : "not in window");
26072+#endif
26073+ break;
26074+ }
26075+
26076+#ifdef BUFFER_BEGINEND
26077+ case glBegin_func:
26078+ process->began = 1;
26079+ process->primitive = args[0];
26080+ break;
26081+#endif
26082+
26083+ case glXWaitGL_func:
26084+ {
26085+ glXWaitGL();
26086+ ret_int = 0;
26087+ break;
26088+ }
26089+
26090+ case glXWaitX_func:
26091+ {
26092+ glXWaitX();
26093+ ret_int = 0;
26094+ break;
26095+ }
26096+
26097+ case glXChooseVisual_func:
26098+ {
26099+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
26100+ break;
26101+ }
26102+
26103+ case glXQueryExtensionsString_func:
26104+ {
26105+ ret_str = glXQueryExtensionsString(dpy, 0);
26106+ break;
26107+ }
26108+
26109+ case glXQueryServerString_func:
26110+ {
26111+ ret_str = glXQueryServerString(dpy, 0, args[2]);
26112+ break;
26113+ }
26114+
26115+ case glXGetClientString_func:
26116+ {
26117+ ret_str = glXGetClientString(dpy, args[1]);
26118+ break;
26119+ }
26120+
26121+ case glXGetScreenDriver_func:
26122+ {
26123+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26124+
26125+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26126+ break;
26127+ }
26128+
26129+ case glXGetDriverConfig_func:
26130+ {
26131+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26132+
26133+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26134+ break;
26135+ }
26136+
26137+ case glXCreateContext_func:
26138+ {
26139+ int visualid = (int) args[1];
26140+ int fake_shareList = (int) args[2];
26141+
26142+ if (1 || display_function_call)
26143+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26144+ fake_shareList);
26145+
26146+ GLXContext shareList = get_association_fakecontext_glxcontext(
26147+ process, fake_shareList);
26148+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26149+ GLXContext ctxt;
26150+
26151+ if (vis) {
26152+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26153+ } else {
26154+ vis = get_default_visual(dpy);
26155+ int saved_visualid = vis->visualid;
26156+
26157+ vis->visualid = visualid ?: saved_visualid;
26158+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26159+ vis->visualid = saved_visualid;
26160+ }
26161+
26162+ if (ctxt) {
26163+ int fake_ctxt =++ process->next_available_context_number;
26164+
26165+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26166+ set_association_fakecontext_glxcontext(process,
26167+ fake_ctxt, ctxt);
26168+ ret_int = fake_ctxt;
26169+
26170+ _create_context(process, ctxt, fake_ctxt, shareList,
26171+ fake_shareList);
26172+ } else {
26173+ ret_int = 0;
26174+ }
26175+
26176+ break;
26177+ }
26178+
26179+
26180+ case glXCreateNewContext_func:
26181+ {
26182+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26183+ (Display *, GLXFBConfig, int, GLXContext, int));
26184+ int client_fbconfig = args[1];
26185+
26186+ ret_int = 0;
26187+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26188+
26189+ if (fbconfig) {
26190+ int fake_shareList = args[3];
26191+ GLXContext shareList = get_association_fakecontext_glxcontext(
26192+ process, fake_shareList);
26193+ process->next_available_context_number++;
26194+ int fake_ctxt = process->next_available_context_number;
26195+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26196+ dpy, fbconfig, args[2], shareList, args[4]);
26197+ set_association_fakecontext_glxcontext(
26198+ process, fake_ctxt, ctxt);
26199+ ret_int = fake_ctxt;
26200+
26201+ _create_context(process, ctxt, fake_ctxt, shareList,
26202+ fake_shareList);
26203+ }
26204+ break;
26205+ }
26206+
26207+ case glXCopyContext_func:
26208+ {
26209+ int fake_src_ctxt = (int) args[1];
26210+ int fake_dst_ctxt = (int) args[2];
26211+ GLXContext src_ctxt;
26212+ GLXContext dst_ctxt;
26213+
26214+ if (display_function_call)
26215+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26216+ fake_src_ctxt, fake_dst_ctxt);
26217+
26218+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26219+ process, fake_src_ctxt)))
26220+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26221+ fake_src_ctxt);
26222+ else
26223+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26224+ process, fake_dst_ctxt))) {
26225+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26226+ fake_dst_ctxt);
26227+ } else
26228+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26229+
26230+ break;
26231+ }
26232+
26233+ case glXDestroyContext_func:
26234+ {
26235+ int fake_ctxt = (int) args[1];
26236+
26237+ if (display_function_call)
26238+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26239+
26240+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26241+ process, fake_ctxt);
26242+ if (ctxt == NULL) {
26243+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26244+ (void *) (long) fake_ctxt);
26245+ } else {
26246+ int i;
26247+
26248+ for (i = 0; i < process->nb_states; i ++) {
26249+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26250+ if (ctxt == process->current_state->context)
26251+ process->current_state = &process->default_state;
26252+
26253+ int fake_shareList =
26254+ process->glstates[i]->fake_shareList;
26255+ process->glstates[i]->ref--;
26256+ if (process->glstates[i]->ref == 0) {
26257+ fprintf(stderr,
26258+ "destroy_gl_state fake_ctxt = %d\n",
26259+ process->glstates[i]->fake_ctxt);
26260+ destroy_gl_state(process->glstates[i]);
26261+ free(process->glstates[i]);
26262+ memmove(&process->glstates[i],
26263+ &process->glstates[i + 1],
26264+ (process->nb_states - i - 1) *
26265+ sizeof(GLState *));
26266+ process->nb_states --;
26267+ }
26268+
26269+ if (fake_shareList) {
26270+ for (i = 0; i < process->nb_states; i++) {
26271+ if (process->glstates[i]->fake_ctxt ==
26272+ fake_shareList) {
26273+ process->glstates[i]->ref--;
26274+ if (process->glstates[i]->ref == 0) {
26275+ fprintf(stderr,
26276+ "destroy_gl_state fake_ctxt = %d\n",
26277+ process->glstates[i]->
26278+ fake_ctxt);
26279+ destroy_gl_state(process->
26280+ glstates[i]);
26281+ free(process->glstates[i]);
26282+ memmove(&process->glstates[i],
26283+ &process->glstates[i + 1],
26284+ (process->nb_states - i - 1) *
26285+ sizeof(GLState *));
26286+ process->nb_states --;
26287+ }
26288+ break;
26289+ }
26290+ }
26291+ }
26292+
26293+ glXDestroyContext(dpy, ctxt);
26294+ unset_association_fakecontext_glxcontext(
26295+ process, fake_ctxt);
26296+
26297+ break;
26298+ }
26299+ }
26300+ }
26301+ break;
26302+ }
26303+
26304+ case glXQueryVersion_func:
26305+ {
26306+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26307+ break;
26308+ }
26309+
26310+ case glGetString_func:
26311+ {
26312+ ret_str = (char *) glGetString(args[0]);
26313+ break;
26314+ }
26315+
26316+ case glXMakeCurrent_func:
26317+ {
26318+ int i;
26319+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26320+ GLXDrawable drawable = 0;
26321+ int fake_ctxt = (int) args[2];
26322+
26323+ if (display_function_call)
26324+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26325+ (void *) client_drawable, fake_ctxt);
26326+
26327+ if (client_drawable == 0 && fake_ctxt == 0) {
26328+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26329+ process->current_state = &process->default_state;
26330+ } else if ((drawable = (GLXDrawable)
26331+ get_association_fakepbuffer_pbuffer(
26332+ process, client_drawable))) {
26333+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26334+ process, fake_ctxt);
26335+ if (ctxt == NULL) {
26336+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26337+ fake_ctxt);
26338+ ret_int = 0;
26339+ } else
26340+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26341+ } else {
26342+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26343+ process, fake_ctxt);
26344+ if (ctxt == NULL) {
26345+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26346+ ret_int = 0;
26347+ } else {
26348+ drawable = get_association_clientdrawable_serverdrawable(
26349+ process, client_drawable);
26350+ if (drawable == 0) {
26351+ XVisualInfo *vis = get_association_fakecontext_visual(
26352+ process, fake_ctxt);
26353+ if (vis == NULL)
26354+ vis = get_default_visual(dpy);
26355+ /* if (local_connection) drawable = client_drawable;
26356+ * else */
26357+ {
26358+ if ((int) (long) client_drawable ==
26359+ RootWindow(dpy, 0) &&
26360+ local_connection) {
26361+ drawable = (GLXDrawable) client_drawable;
26362+ } else {
26363+ drawable = create_window(
26364+ dpy, local_connection ?
26365+ (Window) client_drawable :
26366+ 0, vis, "", 0, 0, 16, 16);
26367+ }
26368+ }
26369+ set_association_clientdrawable_serverdrawable(process,
26370+ client_drawable, drawable);
26371+ }
26372+
26373+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26374+ }
26375+ }
26376+
26377+ if (ret_int) {
26378+ for (i = 0; i < process->nb_states; i ++) {
26379+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26380+ /* HACK !!! REMOVE */
26381+ process->current_state = process->glstates[i];
26382+ process->current_state->drawable = drawable;
26383+ break;
26384+ }
26385+ }
26386+
26387+ if (i == process->nb_states) {
26388+ fprintf(stderr, "error remembering the new context\n");
26389+ exit(-1);
26390+ }
26391+ }
26392+ break;
26393+ }
26394+
26395+ case glXSwapBuffers_func:
26396+ {
26397+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26398+
26399+ if (display_function_call)
26400+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26401+
26402+ GLXDrawable drawable =
26403+ get_association_clientdrawable_serverdrawable(
26404+ process, client_drawable);
26405+ if (!drawable) {
26406+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26407+ (void *) client_drawable);
26408+ } else {
26409+#ifdef CURSOR_TRICK
26410+ if (client_cursor.pixels && local_connection == 0) {
26411+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26412+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26413+
26414+ glMatrixMode(GL_PROJECTION);
26415+ glPushMatrix();
26416+ glLoadIdentity();
26417+ glOrtho(0, process->currentDrawablePos.width,
26418+ process->currentDrawablePos.height, 0, -1, 1);
26419+ glMatrixMode(GL_MODELVIEW);
26420+ glPushMatrix();
26421+ glLoadIdentity();
26422+ glPixelZoom(1, -1);
26423+
26424+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26425+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26426+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26427+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26428+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26429+ glShadeModel(GL_SMOOTH);
26430+
26431+ glEnable(GL_BLEND);
26432+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26433+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26434+
26435+ int i, numUnits;
26436+
26437+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26438+ for (i = 0; i < numUnits; i++) {
26439+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26440+ glDisable(GL_TEXTURE_1D);
26441+ glDisable(GL_TEXTURE_2D);
26442+ glDisable(GL_TEXTURE_3D);
26443+ }
26444+ glDisable(GL_ALPHA_TEST);
26445+ glDisable(GL_DEPTH_TEST);
26446+ glDisable(GL_STENCIL_TEST);
26447+ glDisable(GL_SCISSOR_TEST);
26448+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26449+ glDisable(GL_VERTEX_PROGRAM_ARB);
26450+ do_glUseProgramObjectARB(0);
26451+
26452+ // memset(client_cursor.pixels, 255, client_cursor.width
26453+ // * client_cursor.height * sizeof(int));
26454+
26455+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26456+ client_cursor.y - client_cursor.yhot);
26457+ glDrawPixels(client_cursor.width, client_cursor.height,
26458+ GL_BGRA, GL_UNSIGNED_BYTE,
26459+ client_cursor.pixels);
26460+
26461+ glMatrixMode(GL_MODELVIEW);
26462+ glPopMatrix();
26463+
26464+ glMatrixMode(GL_PROJECTION);
26465+ glPopMatrix();
26466+
26467+ glPopClientAttrib();
26468+ glPopAttrib();
26469+ }
26470+#endif
26471+
26472+ ////////// HORRIBLE HORRIBLE HACK
26473+ if (drawable != active_win && active_win) {
26474+ glXMakeCurrent(dpy, active_win,
26475+ processes[0].current_state->context);
26476+ glXSwapBuffers(dpy, active_win);
26477+ glXMakeCurrent(dpy, process->current_state->drawable,
26478+ process->current_state->context);
26479+ }
26480+ glXSwapBuffers(dpy, drawable);
26481+ }
26482+ break;
26483+ }
26484+
26485+ case glXIsDirect_func:
26486+ {
26487+ int fake_ctxt = (int) args[1];
26488+
26489+ if (display_function_call)
26490+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26491+ GLXContext ctxt =
26492+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26493+ if (ctxt == NULL) {
26494+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26495+ ret_char = False;
26496+ } else {
26497+ ret_char = glXIsDirect(dpy, ctxt);
26498+ }
26499+ break;
26500+ }
26501+
26502+ case glXGetConfig_func:
26503+ {
26504+ int visualid = args[1];
26505+ XVisualInfo *vis = NULL;
26506+
26507+ if (visualid)
26508+ vis = get_visual_info_from_visual_id(dpy, visualid);
26509+ if (vis == NULL)
26510+ vis = get_default_visual(dpy);
26511+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26512+ break;
26513+ }
26514+
26515+ case glXGetConfig_extended_func:
26516+ {
26517+ int visualid = args[1];
26518+ int n = args[2];
26519+ int i;
26520+ XVisualInfo *vis = NULL;
26521+ int *attribs = (int *) args[3];
26522+ int *values = (int *) args[4];
26523+ int *res = (int *) args[5];
26524+
26525+ if (visualid)
26526+ vis = get_visual_info_from_visual_id(dpy, visualid);
26527+ if (vis == NULL)
26528+ vis = get_default_visual(dpy);
26529+
26530+ for (i = 0; i < n; i++) {
26531+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26532+ }
26533+ break;
26534+ }
26535+
26536+ case glXUseXFont_func:
26537+ {
26538+ /* implementation is client-side only :-) */
26539+ break;
26540+ }
26541+
26542+ case glXQueryExtension_func:
26543+ {
26544+ ret_int =
26545+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26546+ break;
26547+ }
26548+
26549+ case glXChooseFBConfig_func:
26550+ {
26551+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26552+ (Display *, int, int *, int *));
26553+ if (process->nfbconfig == MAX_FBCONFIG) {
26554+ *(int *) args[3] = 0;
26555+ ret_int = 0;
26556+ } else {
26557+ GLXFBConfig *fbconfigs =
26558+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26559+ (int *) args[3]);
26560+ if (fbconfigs) {
26561+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26562+ process->fbconfigs_max[process->nfbconfig] =
26563+ *(int *) args[3];
26564+ process->nfbconfig++;
26565+ ret_int = 1 + process->nfbconfig_total;
26566+ process->nfbconfig_total +=
26567+ process->fbconfigs_max[process->nfbconfig];
26568+ } else {
26569+ ret_int = 0;
26570+ }
26571+ }
26572+ break;
26573+ }
26574+
26575+ case glXChooseFBConfigSGIX_func:
26576+ {
26577+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26578+ (Display *, int, int *, int *));
26579+ if (process->nfbconfig == MAX_FBCONFIG) {
26580+ *(int *) args[3] = 0;
26581+ ret_int = 0;
26582+ } else {
26583+ GLXFBConfigSGIX *fbconfigs =
26584+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26585+ (int *) args[2],
26586+ (int *) args[3]);
26587+ if (fbconfigs) {
26588+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26589+ process->fbconfigs_max[process->nfbconfig] =
26590+ *(int *) args[3];
26591+ process->nfbconfig++;
26592+ ret_int = 1 + process->nfbconfig_total;
26593+ process->nfbconfig_total +=
26594+ process->fbconfigs_max[process->nfbconfig];
26595+ } else {
26596+ ret_int = 0;
26597+ }
26598+ }
26599+ break;
26600+ }
26601+
26602+ case glXGetFBConfigs_func:
26603+ {
26604+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26605+ (Display *, int, int *));
26606+ if (process->nfbconfig == MAX_FBCONFIG) {
26607+ *(int *) args[2] = 0;
26608+ ret_int = 0;
26609+ } else {
26610+ GLXFBConfig *fbconfigs =
26611+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26612+ if (fbconfigs) {
26613+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26614+ process->fbconfigs_max[process->nfbconfig] =
26615+ *(int *) args[2];
26616+ process->nfbconfig++;
26617+ ret_int = 1 + process->nfbconfig_total;
26618+ process->nfbconfig_total +=
26619+ process->fbconfigs_max[process->nfbconfig];
26620+ } else {
26621+ ret_int = 0;
26622+ }
26623+ }
26624+ break;
26625+ }
26626+
26627+ case glXCreatePbuffer_func:
26628+ {
26629+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26630+ (Display *, GLXFBConfig, int *));
26631+ int client_fbconfig = args[1];
26632+
26633+ ret_int = 0;
26634+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26635+
26636+ if (fbconfig) {
26637+ GLXPbuffer pbuffer =
26638+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26639+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26640+ if (pbuffer) {
26641+ ClientGLXDrawable fake_pbuffer = to_drawable(
26642+ ++ process->next_available_pbuffer_number);
26643+
26644+ set_association_fakepbuffer_pbuffer(
26645+ process, fake_pbuffer, pbuffer);
26646+ fprintf(stderr,
26647+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26648+ fake_pbuffer, (int) (long) pbuffer);
26649+ ret_int = (int) (long) fake_pbuffer;
26650+ }
26651+ }
26652+ break;
26653+ }
26654+
26655+ case glXCreateGLXPbufferSGIX_func:
26656+ {
26657+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26658+ (Display *, GLXFBConfig, int, int, int *));
26659+ int client_fbconfig = args[1];
26660+
26661+ ret_int = 0;
26662+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26663+
26664+ if (fbconfig) {
26665+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26666+ dpy, fbconfig,
26667+ args[2], args[3], (int *) args[4]);
26668+ if (pbuffer) {
26669+ ClientGLXDrawable fake_pbuffer = to_drawable(
26670+ ++ process->next_available_pbuffer_number);
26671+
26672+ set_association_fakepbuffer_pbuffer(
26673+ process, fake_pbuffer, pbuffer);
26674+ ret_int = (int) (long) fake_pbuffer;
26675+ }
26676+ }
26677+ break;
26678+ }
26679+
26680+ case glXDestroyPbuffer_func:
26681+ {
26682+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26683+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26684+
26685+ if (display_function_call)
26686+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26687+
26688+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26689+ process, fake_pbuffer);
26690+ if (pbuffer == 0) {
26691+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26692+ fake_pbuffer);
26693+ } else {
26694+ if (!is_gl_vendor_ati(dpy))
26695+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26696+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26697+ }
26698+ break;
26699+ }
26700+
26701+ case glXDestroyGLXPbufferSGIX_func:
26702+ {
26703+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26704+ (Display *, GLXPbuffer));
26705+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26706+
26707+ if (display_function_call)
26708+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26709+
26710+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26711+ process, fake_pbuffer);
26712+ if (pbuffer == 0) {
26713+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26714+ fake_pbuffer);
26715+ } else {
26716+ if (!is_gl_vendor_ati(dpy))
26717+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26718+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26719+ }
26720+ break;
26721+ }
26722+
26723+ case glXBindTexImageATI_func:
26724+ {
26725+ GET_EXT_PTR(void, glXBindTexImageATI,
26726+ (Display *, GLXPbuffer, int));
26727+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26728+
26729+ if (display_function_call)
26730+ fprintf(stderr, "fake_pbuffer=%p\n",
26731+ fake_pbuffer);
26732+
26733+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26734+ process, fake_pbuffer);
26735+ if (pbuffer == 0) {
26736+ fprintf(stderr,
26737+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26738+ fake_pbuffer);
26739+ } else {
26740+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26741+ }
26742+ break;
26743+ }
26744+
26745+ case glXReleaseTexImageATI_func:
26746+ {
26747+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26748+ (Display *, GLXPbuffer, int));
26749+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26750+
26751+ if (display_function_call)
26752+ fprintf(stderr, "fake_pbuffer=%d\n",
26753+ (int) (long) fake_pbuffer);
26754+
26755+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26756+ process, fake_pbuffer);
26757+ if (pbuffer == 0) {
26758+ fprintf(stderr,
26759+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26760+ (int) (long) fake_pbuffer);
26761+ } else {
26762+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26763+ }
26764+ break;
26765+ }
26766+
26767+ case glXBindTexImageARB_func:
26768+ {
26769+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26770+ (Display *, GLXPbuffer, int));
26771+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26772+
26773+ if (display_function_call)
26774+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26775+
26776+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26777+ process, fake_pbuffer);
26778+ if (pbuffer == 0) {
26779+ fprintf(stderr,
26780+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26781+ fake_pbuffer);
26782+ ret_int = 0;
26783+ } else {
26784+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26785+ }
26786+ break;
26787+ }
26788+
26789+ case glXReleaseTexImageARB_func:
26790+ {
26791+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26792+ (Display *, GLXPbuffer, int));
26793+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26794+
26795+ if (display_function_call)
26796+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26797+
26798+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26799+ process, fake_pbuffer);
26800+ if (pbuffer == 0) {
26801+ fprintf(stderr,
26802+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26803+ fake_pbuffer);
26804+ ret_int = 0;
26805+ } else {
26806+ ret_int =
26807+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26808+ }
26809+ break;
26810+ }
26811+
26812+ case glXGetFBConfigAttrib_func:
26813+ {
26814+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26815+ (Display *, GLXFBConfig, int, int *));
26816+ int client_fbconfig = args[1];
26817+
26818+ ret_int = 0;
26819+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26820+
26821+ if (fbconfig)
26822+ ret_int =
26823+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26824+ (int *) args[3]);
26825+ break;
26826+ }
26827+
26828+ case glXGetFBConfigAttrib_extended_func:
26829+ {
26830+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26831+ (Display *, GLXFBConfig, int, int *));
26832+ int client_fbconfig = args[1];
26833+ int n = args[2];
26834+ int i;
26835+ int *attribs = (int *) args[3];
26836+ int *values = (int *) args[4];
26837+ int *res = (int *) args[5];
26838+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26839+
26840+ for (i = 0; i < n; i++) {
26841+ if (fbconfig) {
26842+ res[i] =
26843+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26844+ attribs[i], &values[i]);
26845+ } else {
26846+ res[i] = 0;
26847+ }
26848+ }
26849+ break;
26850+ }
26851+
26852+ case glXGetFBConfigAttribSGIX_func:
26853+ {
26854+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26855+ (Display *, GLXFBConfigSGIX, int, int *));
26856+ int client_fbconfig = args[1];
26857+
26858+ ret_int = 0;
26859+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26860+
26861+ if (fbconfig)
26862+ ret_int =
26863+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26864+ (GLXFBConfigSGIX)
26865+ fbconfig, args[2],
26866+ (int *) args[3]);
26867+ break;
26868+ }
26869+
26870+ case glXQueryContext_func:
26871+ {
26872+ GET_EXT_PTR(int, glXQueryContext,
26873+ (Display *, GLXContext, int, int *));
26874+ int fake_ctxt = (int) args[1];
26875+
26876+ if (display_function_call)
26877+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26878+ GLXContext ctxt =
26879+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26880+ if (ctxt == NULL) {
26881+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26882+ ret_int = 0;
26883+ } else {
26884+ ret_int =
26885+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26886+ (int *) args[3]);
26887+ }
26888+ break;
26889+ }
26890+
26891+ case glXQueryDrawable_func:
26892+ {
26893+ GET_EXT_PTR(void, glXQueryDrawable,
26894+ (Display *, GLXDrawable, int, int *));
26895+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26896+ GLXDrawable drawable =
26897+ get_association_clientdrawable_serverdrawable(
26898+ process, client_drawable);
26899+
26900+ if (display_function_call)
26901+ fprintf(stderr, "client_drawable=%p\n",
26902+ client_drawable);
26903+
26904+ if (!drawable)
26905+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26906+ client_drawable);
26907+ else
26908+ ptr_func_glXQueryDrawable(dpy, drawable,
26909+ args[2], (int *) args[3]);
26910+
26911+ break;
26912+ }
26913+
26914+ case glXQueryGLXPbufferSGIX_func:
26915+ {
26916+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26917+ (Display *, GLXFBConfigSGIX, int, int *));
26918+ int client_fbconfig = args[1];
26919+
26920+ ret_int = 0;
26921+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26922+
26923+ if (fbconfig)
26924+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26925+ (GLXFBConfigSGIX) fbconfig,
26926+ args[2], (int *) args[3]);
26927+ break;
26928+ }
26929+
26930+ case glXCreateContextWithConfigSGIX_func:
26931+ {
26932+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26933+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26934+ int client_fbconfig = args[1];
26935+
26936+ ret_int = 0;
26937+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26938+
26939+ if (fbconfig) {
26940+ GLXContext shareList = get_association_fakecontext_glxcontext(
26941+ process, (int) args[3]);
26942+ process->next_available_context_number++;
26943+ int fake_ctxt = process->next_available_context_number;
26944+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26945+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26946+ shareList, args[4]);
26947+ set_association_fakecontext_glxcontext(
26948+ process, fake_ctxt, ctxt);
26949+ ret_int = fake_ctxt;
26950+ }
26951+ break;
26952+ }
26953+
26954+ case glXGetVisualFromFBConfig_func:
26955+ {
26956+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26957+ (Display *, GLXFBConfig));
26958+ int client_fbconfig = args[1];
26959+
26960+ ret_int = 0;
26961+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26962+
26963+ if (fbconfig) {
26964+ XVisualInfo *vis =
26965+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26966+ ret_int = (vis) ? vis->visualid : 0;
26967+ if (vis) {
26968+ tabAssocAttribListVisual =
26969+ realloc(tabAssocAttribListVisual,
26970+ sizeof(AssocAttribListVisual) *
26971+ (nTabAssocAttribListVisual + 1));
26972+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26973+ attribListLength = 0;
26974+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26975+ attribList = NULL;
26976+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26977+ visInfo = vis;
26978+ nTabAssocAttribListVisual++;
26979+ }
26980+ if (display_function_call)
26981+ fprintf(stderr, "visualid = %d\n", ret_int);
26982+ }
26983+ break;
26984+ }
26985+
26986+ case glXSwapIntervalSGI_func:
26987+ {
26988+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26989+
26990+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26991+ break;
26992+ }
26993+
26994+ case glXGetProcAddress_fake_func:
26995+ {
26996+ if (display_function_call)
26997+ fprintf(stderr, "%s\n", (char *) args[0]);
26998+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26999+ break;
27000+ }
27001+
27002+ case glXGetProcAddress_global_fake_func:
27003+ {
27004+ int nbElts = args[0];
27005+ char *huge_buffer = (char *) args[1];
27006+ char *result = (char *) args[2];
27007+ int i;
27008+
27009+ for (i = 0; i < nbElts; i++) {
27010+ int len = strlen(huge_buffer);
27011+
27012+ result[i] =
27013+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
27014+ NULL;
27015+ huge_buffer += len + 1;
27016+ }
27017+ break;
27018+ }
27019+
27020+/* Begin of texture stuff */
27021+ case glBindTexture_func:
27022+ case glBindTextureEXT_func:
27023+ {
27024+ int target = args[0];
27025+ unsigned int client_texture = args[1];
27026+ unsigned int server_texture;
27027+
27028+ if (client_texture == 0) {
27029+ glBindTexture(target, 0);
27030+ } else {
27031+ alloc_value(process->current_state->textureAllocator,
27032+ client_texture);
27033+ server_texture =
27034+ process->current_state->tabTextures[client_texture];
27035+ if (server_texture == 0) {
27036+ glGenTextures(1, &server_texture);
27037+ process->current_state->tabTextures[client_texture] =
27038+ server_texture;
27039+ }
27040+ glBindTexture(target, server_texture);
27041+ }
27042+ break;
27043+ }
27044+
27045+ case glGenTextures_fake_func:
27046+ {
27047+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
27048+ int i;
27049+ int n = args[0];
27050+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
27051+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27052+
27053+ alloc_range(process->current_state->textureAllocator, n,
27054+ clientTabTextures);
27055+
27056+ ptr_func_glGenTextures(n, serverTabTextures);
27057+ for (i = 0; i < n; i++) {
27058+ process->current_state->tabTextures[clientTabTextures[i]] =
27059+ serverTabTextures[i];
27060+ }
27061+
27062+ free(clientTabTextures);
27063+ free(serverTabTextures);
27064+ break;
27065+ }
27066+
27067+
27068+ case glDeleteTextures_func:
27069+ {
27070+ GET_EXT_PTR(void, glDeleteTextures,
27071+ (GLsizei n, const GLuint *textures));
27072+ int i;
27073+ int n = args[0];
27074+ unsigned int *clientTabTextures = (unsigned int *) args[1];
27075+
27076+ delete_range(process->current_state->textureAllocator, n,
27077+ clientTabTextures);
27078+
27079+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27080+
27081+ for (i = 0; i < n; i++) {
27082+ serverTabTextures[i] =
27083+ get_server_texture(process, clientTabTextures[i]);
27084+ }
27085+ ptr_func_glDeleteTextures(n, serverTabTextures);
27086+ for (i = 0; i < n; i++) {
27087+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
27088+ }
27089+ free(serverTabTextures);
27090+ break;
27091+ }
27092+
27093+ case glPrioritizeTextures_func:
27094+ {
27095+ GET_EXT_PTR(void, glPrioritizeTextures,
27096+ (GLsizei n, const GLuint *textures,
27097+ const GLclampf *priorities));
27098+
27099+ int i;
27100+ int n = args[0];
27101+ unsigned int *textures = (unsigned int *) args[1];
27102+
27103+ for (i = 0; i < n; i++) {
27104+ textures[i] = get_server_texture(process, textures[i]);
27105+ }
27106+ ptr_func_glPrioritizeTextures(n, textures,
27107+ (const GLclampf *) args[2]);
27108+ break;
27109+ }
27110+
27111+ case glAreTexturesResident_func:
27112+ {
27113+ GET_EXT_PTR(void, glAreTexturesResident,
27114+ (GLsizei n, const GLuint *textures,
27115+ GLboolean *residences));
27116+ int i;
27117+ int n = args[0];
27118+ unsigned int *textures = (unsigned int *) args[1];
27119+
27120+ for (i = 0; i < n; i++) {
27121+ textures[i] = get_server_texture(process, textures[i]);
27122+ }
27123+ ptr_func_glAreTexturesResident(n, textures,
27124+ (GLboolean *) args[2]);
27125+ break;
27126+ }
27127+
27128+ case glIsTexture_func:
27129+ case glIsTextureEXT_func:
27130+ {
27131+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27132+ unsigned int client_texture = args[0];
27133+ unsigned int server_texture =
27134+ get_server_texture(process, client_texture);
27135+ if (server_texture)
27136+ ret_char = ptr_func_glIsTexture(server_texture);
27137+ else
27138+ ret_char = 0;
27139+ break;
27140+ }
27141+
27142+ case glFramebufferTexture1DEXT_func:
27143+ {
27144+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27145+ (int, int, int, int, int));
27146+ unsigned int client_texture = args[3];
27147+ unsigned int server_texture =
27148+ get_server_texture(process, client_texture);
27149+ if (server_texture)
27150+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27151+ server_texture, args[4]);
27152+ break;
27153+ }
27154+
27155+ case glFramebufferTexture2DEXT_func:
27156+ {
27157+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27158+ (int, int, int, int, int));
27159+ unsigned int client_texture = args[3];
27160+ unsigned int server_texture =
27161+ get_server_texture(process, client_texture);
27162+ if (server_texture)
27163+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27164+ server_texture, args[4]);
27165+ break;
27166+ }
27167+
27168+ case glFramebufferTexture3DEXT_func:
27169+ {
27170+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27171+ (int, int, int, int, int, int));
27172+ unsigned int client_texture = args[3];
27173+ unsigned int server_texture =
27174+ get_server_texture(process, client_texture);
27175+ if (server_texture)
27176+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27177+ server_texture, args[4],
27178+ args[5]);
27179+ break;
27180+ }
27181+/* End of texture stuff */
27182+
27183+/* Begin of list stuff */
27184+ case glIsList_func:
27185+ {
27186+ unsigned int client_list = args[0];
27187+ unsigned int server_list = get_server_list(process, client_list);
27188+
27189+ if (server_list)
27190+ ret_char = glIsList(server_list);
27191+ else
27192+ ret_char = 0;
27193+ break;
27194+ }
27195+
27196+ case glDeleteLists_func:
27197+ {
27198+ int i;
27199+ unsigned int first_client = args[0];
27200+ int n = args[1];
27201+
27202+ unsigned int first_server =
27203+ get_server_list(process, first_client);
27204+ for (i = 0; i < n; i++) {
27205+ if (get_server_list(process, first_client + i) !=
27206+ first_server + i)
27207+ break;
27208+ }
27209+ if (i == n) {
27210+ glDeleteLists(first_server, n);
27211+ } else {
27212+ for (i = 0; i < n; i++) {
27213+ glDeleteLists(get_server_list(process, first_client + i),
27214+ 1);
27215+ }
27216+ }
27217+
27218+ for (i = 0; i < n; i++) {
27219+ process->current_state->tabLists[first_client + i] = 0;
27220+ }
27221+ delete_consecutive_values(process->current_state->listAllocator,
27222+ first_client, n);
27223+ break;
27224+ }
27225+
27226+ case glGenLists_fake_func:
27227+ {
27228+ int i;
27229+ int n = args[0];
27230+ unsigned int server_first = glGenLists(n);
27231+
27232+ if (server_first) {
27233+ unsigned int client_first =
27234+ alloc_range(process->current_state->listAllocator, n,
27235+ NULL);
27236+ for (i = 0; i < n; i++) {
27237+ process->current_state->tabLists[client_first + i] =
27238+ server_first + i;
27239+ }
27240+ }
27241+ break;
27242+ }
27243+
27244+ case glNewList_func:
27245+ {
27246+ unsigned int client_list = args[0];
27247+ int mode = args[1];
27248+
27249+ alloc_value(process->current_state->listAllocator, client_list);
27250+ unsigned int server_list = get_server_list(process, client_list);
27251+
27252+ if (server_list == 0) {
27253+ server_list = glGenLists(1);
27254+ process->current_state->tabLists[client_list] = server_list;
27255+ }
27256+ glNewList(server_list, mode);
27257+ break;
27258+ }
27259+
27260+ case glCallList_func:
27261+ {
27262+ unsigned int client_list = args[0];
27263+ unsigned int server_list = get_server_list(process, client_list);
27264+
27265+ glCallList(server_list);
27266+ break;
27267+ }
27268+
27269+ case glCallLists_func:
27270+ {
27271+ int i;
27272+ int n = args[0];
27273+ int type = args[1];
27274+ const GLvoid *lists = (const GLvoid *) args[2];
27275+ int *new_lists = malloc(sizeof(int) * n);
27276+
27277+ for (i = 0; i < n; i++) {
27278+ new_lists[i] =
27279+ get_server_list(process, translate_id(i, type, lists));
27280+ }
27281+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27282+ free(new_lists);
27283+ break;
27284+ }
27285+
27286+
27287+/* End of list stuff */
27288+
27289+/* Begin of buffer stuff */
27290+ case glBindBufferARB_func:
27291+ {
27292+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27293+ int target = args[0];
27294+ unsigned int client_buffer = args[1];
27295+ unsigned int server_buffer;
27296+
27297+ if (client_buffer == 0) {
27298+ ptr_func_glBindBufferARB(target, 0);
27299+ } else {
27300+ server_buffer = get_server_buffer(process, client_buffer);
27301+ ptr_func_glBindBufferARB(target, server_buffer);
27302+ }
27303+ break;
27304+ }
27305+
27306+ case glGenBuffersARB_fake_func:
27307+ {
27308+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27309+ int i;
27310+ int n = args[0];
27311+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27312+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27313+
27314+ alloc_range(process->current_state->bufferAllocator, n,
27315+ clientTabBuffers);
27316+
27317+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27318+ for (i = 0; i < n; i++) {
27319+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27320+ serverTabBuffers[i];
27321+ }
27322+
27323+ free(clientTabBuffers);
27324+ free(serverTabBuffers);
27325+ break;
27326+ }
27327+
27328+
27329+ case glDeleteBuffersARB_func:
27330+ {
27331+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27332+ int i;
27333+ int n = args[0];
27334+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27335+
27336+ delete_range(process->current_state->bufferAllocator, n,
27337+ clientTabBuffers);
27338+
27339+ int *serverTabBuffers = malloc(n * sizeof(int));
27340+
27341+ for (i = 0; i < n; i++) {
27342+ serverTabBuffers[i] =
27343+ get_server_buffer(process, clientTabBuffers[i]);
27344+ }
27345+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27346+ for (i = 0; i < n; i++) {
27347+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27348+ }
27349+ free(serverTabBuffers);
27350+ break;
27351+ }
27352+
27353+ case glIsBufferARB_func:
27354+ {
27355+ GET_EXT_PTR(int, glIsBufferARB, (int));
27356+ unsigned int client_buffer = args[0];
27357+ unsigned int server_buffer =
27358+ get_server_buffer(process, client_buffer);
27359+ if (server_buffer)
27360+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27361+ else
27362+ ret_int = 0;
27363+ break;
27364+ }
27365+
27366+/* End of buffer stuff */
27367+
27368+ case glShaderSourceARB_fake_func:
27369+ {
27370+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27371+ int size = args[1];
27372+ int i;
27373+ int acc_length = 0;
27374+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27375+ int *tab_length = (int *) args[3];
27376+
27377+ for (i = 0; i < size; i++) {
27378+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27379+ acc_length += tab_length[i];
27380+ }
27381+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27382+ tab_length);
27383+ free(tab_prog);
27384+ break;
27385+ }
27386+
27387+ case glShaderSource_fake_func:
27388+ {
27389+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27390+ int size = args[1];
27391+ int i;
27392+ int acc_length = 0;
27393+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27394+ int *tab_length = (int *) args[3];
27395+
27396+ for (i = 0; i < size; i++) {
27397+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27398+ acc_length += tab_length[i];
27399+ }
27400+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27401+ free(tab_prog);
27402+ break;
27403+ }
27404+
27405+ case glVertexPointer_fake_func:
27406+ {
27407+ int offset = args[0];
27408+ int size = args[1];
27409+ int type = args[2];
27410+ int stride = args[3];
27411+ int bytes_size = args[4];
27412+
27413+ process->current_state->vertexPointerSize =
27414+ MAX(process->current_state->vertexPointerSize,
27415+ offset + bytes_size);
27416+ process->current_state->vertexPointer =
27417+ realloc(process->current_state->vertexPointer,
27418+ process->current_state->vertexPointerSize);
27419+ memcpy(process->current_state->vertexPointer + offset,
27420+ (void *) args[5], bytes_size);
27421+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27422+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27423+ glVertexPointer(size, type, stride,
27424+ process->current_state->vertexPointer);
27425+ break;
27426+ }
27427+
27428+ case glNormalPointer_fake_func:
27429+ {
27430+ int offset = args[0];
27431+ int type = args[1];
27432+ int stride = args[2];
27433+ int bytes_size = args[3];
27434+
27435+ process->current_state->normalPointerSize =
27436+ MAX(process->current_state->normalPointerSize,
27437+ offset + bytes_size);
27438+ process->current_state->normalPointer =
27439+ realloc(process->current_state->normalPointer,
27440+ process->current_state->normalPointerSize);
27441+ memcpy(process->current_state->normalPointer + offset,
27442+ (void *) args[4], bytes_size);
27443+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27444+ // byte_size=%d\n", type, stride, bytes_size);
27445+ glNormalPointer(type, stride,
27446+ process->current_state->normalPointer);
27447+ break;
27448+ }
27449+
27450+ case glIndexPointer_fake_func:
27451+ {
27452+ int offset = args[0];
27453+ int type = args[1];
27454+ int stride = args[2];
27455+ int bytes_size = args[3];
27456+
27457+ process->current_state->indexPointerSize =
27458+ MAX(process->current_state->indexPointerSize,
27459+ offset + bytes_size);
27460+ process->current_state->indexPointer =
27461+ realloc(process->current_state->indexPointer,
27462+ process->current_state->indexPointerSize);
27463+ memcpy(process->current_state->indexPointer + offset,
27464+ (void *) args[4], bytes_size);
27465+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27466+ // byte_size=%d\n", type, stride, bytes_size);
27467+ glIndexPointer(type, stride,
27468+ process->current_state->indexPointer);
27469+ break;
27470+ }
27471+
27472+ case glEdgeFlagPointer_fake_func:
27473+ {
27474+ int offset = args[0];
27475+ int stride = args[1];
27476+ int bytes_size = args[2];
27477+
27478+ process->current_state->edgeFlagPointerSize =
27479+ MAX(process->current_state->edgeFlagPointerSize,
27480+ offset + bytes_size);
27481+ process->current_state->edgeFlagPointer =
27482+ realloc(process->current_state->edgeFlagPointer,
27483+ process->current_state->edgeFlagPointerSize);
27484+ memcpy(process->current_state->edgeFlagPointer + offset,
27485+ (void *) args[3], bytes_size);
27486+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27487+ // bytes_size=%d\n", stride, bytes_size);
27488+ glEdgeFlagPointer(stride,
27489+ process->current_state->edgeFlagPointer);
27490+ break;
27491+ }
27492+
27493+ case glVertexAttribPointerARB_fake_func:
27494+ {
27495+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27496+ (int, int, int, int, int, void *));
27497+ int offset = args[0];
27498+ int index = args[1];
27499+ int size = args[2];
27500+ int type = args[3];
27501+ int normalized = args[4];
27502+ int stride = args[5];
27503+ int bytes_size = args[6];
27504+
27505+ process->current_state->vertexAttribPointerSize[index] =
27506+ MAX(process->current_state->vertexAttribPointerSize[index],
27507+ offset + bytes_size);
27508+ process->current_state->vertexAttribPointer[index] =
27509+ realloc(process->current_state->vertexAttribPointer[index],
27510+ process->current_state->
27511+ vertexAttribPointerSize[index]);
27512+ memcpy(process->current_state->vertexAttribPointer[index] +
27513+ offset, (void *) args[7], bytes_size);
27514+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27515+ stride,
27516+ process->current_state->
27517+ vertexAttribPointer[index]);
27518+ break;
27519+ }
27520+
27521+ case glVertexAttribPointerNV_fake_func:
27522+ {
27523+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27524+ (int, int, int, int, void *));
27525+ int offset = args[0];
27526+ int index = args[1];
27527+ int size = args[2];
27528+ int type = args[3];
27529+ int stride = args[4];
27530+ int bytes_size = args[5];
27531+
27532+ process->current_state->vertexAttribPointerNVSize[index] =
27533+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27534+ offset + bytes_size);
27535+ process->current_state->vertexAttribPointerNV[index] =
27536+ realloc(process->current_state->vertexAttribPointerNV[index],
27537+ process->current_state->
27538+ vertexAttribPointerNVSize[index]);
27539+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27540+ offset, (void *) args[6], bytes_size);
27541+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27542+ process->current_state->
27543+ vertexAttribPointerNV[index]);
27544+ break;
27545+ }
27546+
27547+ case glColorPointer_fake_func:
27548+ {
27549+ int offset = args[0];
27550+ int size = args[1];
27551+ int type = args[2];
27552+ int stride = args[3];
27553+ int bytes_size = args[4];
27554+
27555+ process->current_state->colorPointerSize =
27556+ MAX(process->current_state->colorPointerSize,
27557+ offset + bytes_size);
27558+ process->current_state->colorPointer =
27559+ realloc(process->current_state->colorPointer,
27560+ process->current_state->colorPointerSize);
27561+ memcpy(process->current_state->colorPointer + offset,
27562+ (void *) args[5], bytes_size);
27563+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27564+ // bytes_size);
27565+ glColorPointer(size, type, stride,
27566+ process->current_state->colorPointer);
27567+
27568+ break;
27569+ }
27570+
27571+ case glSecondaryColorPointer_fake_func:
27572+ {
27573+ GET_EXT_PTR(void, glSecondaryColorPointer,
27574+ (int, int, int, void *));
27575+ int offset = args[0];
27576+ int size = args[1];
27577+ int type = args[2];
27578+ int stride = args[3];
27579+ int bytes_size = args[4];
27580+
27581+ process->current_state->secondaryColorPointerSize =
27582+ MAX(process->current_state->secondaryColorPointerSize,
27583+ offset + bytes_size);
27584+ process->current_state->secondaryColorPointer =
27585+ realloc(process->current_state->secondaryColorPointer,
27586+ process->current_state->secondaryColorPointerSize);
27587+ memcpy(process->current_state->secondaryColorPointer + offset,
27588+ (void *) args[5], bytes_size);
27589+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27590+ // = %d\n", bytes_size);
27591+ ptr_func_glSecondaryColorPointer(size, type, stride,
27592+ process->current_state->
27593+ secondaryColorPointer);
27594+
27595+ break;
27596+ }
27597+
27598+ case glPushClientAttrib_func:
27599+ {
27600+ int mask = args[0];
27601+
27602+ if (process->current_state->clientStateSp <
27603+ MAX_CLIENT_STATE_STACK_SIZE) {
27604+ process->current_state->clientStateStack[process->
27605+ current_state->
27606+ clientStateSp].mask =
27607+ mask;
27608+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27609+ process->current_state->clientStateStack[process->
27610+ current_state->
27611+ clientStateSp].
27612+ activeTextureIndex =
27613+ process->current_state->activeTextureIndex;
27614+ }
27615+ process->current_state->clientStateSp++;
27616+ }
27617+ glPushClientAttrib(mask);
27618+ break;
27619+ }
27620+
27621+ case glPopClientAttrib_func:
27622+ {
27623+ if (process->current_state->clientStateSp > 0) {
27624+ process->current_state->clientStateSp--;
27625+ if (process->current_state->
27626+ clientStateStack[process->current_state->clientStateSp].
27627+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27628+ process->current_state->activeTextureIndex =
27629+ process->current_state->clientStateStack[process->
27630+ current_state->
27631+ clientStateSp].
27632+ activeTextureIndex;
27633+ }
27634+ }
27635+ glPopClientAttrib();
27636+ break;
27637+ }
27638+
27639+ case glClientActiveTexture_func:
27640+ case glClientActiveTextureARB_func:
27641+ {
27642+ int activeTexture = args[0];
27643+
27644+ process->current_state->activeTextureIndex =
27645+ activeTexture - GL_TEXTURE0_ARB;
27646+ do_glClientActiveTextureARB(activeTexture);
27647+ break;
27648+ }
27649+
27650+ case glTexCoordPointer_fake_func:
27651+ {
27652+ int offset = args[0];
27653+ int index = args[1];
27654+ int size = args[2];
27655+ int type = args[3];
27656+ int stride = args[4];
27657+ int bytes_size = args[5];
27658+
27659+ process->current_state->texCoordPointerSize[index] =
27660+ MAX(process->current_state->texCoordPointerSize[index],
27661+ offset + bytes_size);
27662+ process->current_state->texCoordPointer[index] =
27663+ realloc(process->current_state->texCoordPointer[index],
27664+ process->current_state->texCoordPointerSize[index]);
27665+ memcpy(process->current_state->texCoordPointer[index] + offset,
27666+ (void *) args[6], bytes_size);
27667+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27668+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27669+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27670+ glTexCoordPointer(size, type, stride,
27671+ process->current_state->texCoordPointer[index]);
27672+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27673+ process->current_state->
27674+ activeTextureIndex);
27675+ break;
27676+ }
27677+
27678+ case glWeightPointerARB_fake_func:
27679+ {
27680+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27681+ int offset = args[0];
27682+ int size = args[1];
27683+ int type = args[2];
27684+ int stride = args[3];
27685+ int bytes_size = args[4];
27686+
27687+ process->current_state->weightPointerSize =
27688+ MAX(process->current_state->weightPointerSize,
27689+ offset + bytes_size);
27690+ process->current_state->weightPointer =
27691+ realloc(process->current_state->weightPointer,
27692+ process->current_state->weightPointerSize);
27693+ memcpy(process->current_state->weightPointer + offset,
27694+ (void *) args[5], bytes_size);
27695+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27696+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27697+ * bytes_size); */
27698+ ptr_func_glWeightPointerARB(size, type, stride,
27699+ process->current_state->
27700+ weightPointer);
27701+ break;
27702+ }
27703+
27704+ case glMatrixIndexPointerARB_fake_func:
27705+ {
27706+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27707+ (int, int, int, void *));
27708+ int offset = args[0];
27709+ int size = args[1];
27710+ int type = args[2];
27711+ int stride = args[3];
27712+ int bytes_size = args[4];
27713+
27714+ process->current_state->matrixIndexPointerSize =
27715+ MAX(process->current_state->matrixIndexPointerSize,
27716+ offset + bytes_size);
27717+ process->current_state->matrixIndexPointer =
27718+ realloc(process->current_state->matrixIndexPointer,
27719+ process->current_state->matrixIndexPointerSize);
27720+ memcpy(process->current_state->matrixIndexPointer + offset,
27721+ (void *) args[5], bytes_size);
27722+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27723+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27724+ * bytes_size); */
27725+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27726+ process->current_state->
27727+ matrixIndexPointer);
27728+ break;
27729+ }
27730+
27731+ case glFogCoordPointer_fake_func:
27732+ {
27733+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27734+ int offset = args[0];
27735+ int type = args[1];
27736+ int stride = args[2];
27737+ int bytes_size = args[3];
27738+
27739+ process->current_state->fogCoordPointerSize =
27740+ MAX(process->current_state->fogCoordPointerSize,
27741+ offset + bytes_size);
27742+ process->current_state->fogCoordPointer =
27743+ realloc(process->current_state->fogCoordPointer,
27744+ process->current_state->fogCoordPointerSize);
27745+ memcpy(process->current_state->fogCoordPointer + offset,
27746+ (void *) args[4], bytes_size);
27747+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27748+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27749+ ptr_func_glFogCoordPointer(type, stride,
27750+ process->current_state->
27751+ fogCoordPointer);
27752+ break;
27753+ }
27754+
27755+ case glVariantPointerEXT_fake_func:
27756+ {
27757+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27758+ int offset = args[0];
27759+ int id = args[1];
27760+ int type = args[2];
27761+ int stride = args[3];
27762+ int bytes_size = args[4];
27763+
27764+ process->current_state->variantPointerEXTSize[id] =
27765+ MAX(process->current_state->variantPointerEXTSize[id],
27766+ offset + bytes_size);
27767+ process->current_state->variantPointerEXT[id] =
27768+ realloc(process->current_state->variantPointerEXT[id],
27769+ process->current_state->variantPointerEXTSize[id]);
27770+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27771+ (void *) args[5], bytes_size);
27772+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27773+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27774+ ptr_func_glVariantPointerEXT(id, type, stride,
27775+ process->current_state->
27776+ variantPointerEXT[id]);
27777+ break;
27778+ }
27779+
27780+ case glInterleavedArrays_fake_func:
27781+ {
27782+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27783+ int offset = args[0];
27784+ int format = args[1];
27785+ int stride = args[2];
27786+ int bytes_size = args[3];
27787+
27788+ process->current_state->interleavedArraysSize =
27789+ MAX(process->current_state->interleavedArraysSize,
27790+ offset + bytes_size);
27791+ process->current_state->interleavedArrays =
27792+ realloc(process->current_state->interleavedArrays,
27793+ process->current_state->interleavedArraysSize);
27794+ memcpy(process->current_state->interleavedArrays + offset,
27795+ (void *) args[4], bytes_size);
27796+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27797+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27798+ ptr_func_glInterleavedArrays(format, stride,
27799+ process->current_state->
27800+ interleavedArrays);
27801+ break;
27802+ }
27803+
27804+ case glElementPointerATI_fake_func:
27805+ {
27806+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27807+ int type = args[0];
27808+ int bytes_size = args[1];
27809+
27810+ process->current_state->elementPointerATISize = bytes_size;
27811+ process->current_state->elementPointerATI =
27812+ realloc(process->current_state->elementPointerATI,
27813+ process->current_state->elementPointerATISize);
27814+ memcpy(process->current_state->elementPointerATI,
27815+ (void *) args[2], bytes_size);
27816+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27817+ // byte_size=%d\n", type, bytes_size);
27818+ ptr_func_glElementPointerATI(type,
27819+ process->current_state->
27820+ elementPointerATI);
27821+ break;
27822+ }
27823+
27824+ case glTexCoordPointer01_fake_func:
27825+ {
27826+ int size = args[0];
27827+ int type = args[1];
27828+ int stride = args[2];
27829+ int bytes_size = args[3];
27830+
27831+ process->current_state->texCoordPointerSize[0] = bytes_size;
27832+ process->current_state->texCoordPointer[0] =
27833+ realloc(process->current_state->texCoordPointer[0],
27834+ bytes_size);
27835+ memcpy(process->current_state->texCoordPointer[0],
27836+ (void *) args[4], bytes_size);
27837+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27838+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27839+ * bytes_size); */
27840+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27841+ glTexCoordPointer(size, type, stride,
27842+ process->current_state->texCoordPointer[0]);
27843+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27844+ glTexCoordPointer(size, type, stride,
27845+ process->current_state->texCoordPointer[0]);
27846+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27847+ process->current_state->
27848+ activeTextureIndex);
27849+ break;
27850+ }
27851+
27852+ case glTexCoordPointer012_fake_func:
27853+ {
27854+ int size = args[0];
27855+ int type = args[1];
27856+ int stride = args[2];
27857+ int bytes_size = args[3];
27858+
27859+ process->current_state->texCoordPointerSize[0] = bytes_size;
27860+ process->current_state->texCoordPointer[0] =
27861+ realloc(process->current_state->texCoordPointer[0],
27862+ bytes_size);
27863+ memcpy(process->current_state->texCoordPointer[0],
27864+ (void *) args[4], bytes_size);
27865+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27866+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27867+ * bytes_size); */
27868+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27869+ glTexCoordPointer(size, type, stride,
27870+ process->current_state->texCoordPointer[0]);
27871+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27872+ glTexCoordPointer(size, type, stride,
27873+ process->current_state->texCoordPointer[0]);
27874+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27875+ glTexCoordPointer(size, type, stride,
27876+ process->current_state->texCoordPointer[0]);
27877+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27878+ process->current_state->
27879+ activeTextureIndex);
27880+ break;
27881+ }
27882+
27883+ case glVertexAndNormalPointer_fake_func:
27884+ {
27885+ int vertexPointerSize = args[0];
27886+ int vertexPointerType = args[1];
27887+ int vertexPointerStride = args[2];
27888+ int normalPointerType = args[3];
27889+ int normalPointerStride = args[4];
27890+ int bytes_size = args[5];
27891+ void *ptr = (void *) args[6];
27892+
27893+ process->current_state->vertexPointerSize = bytes_size;
27894+ process->current_state->vertexPointer =
27895+ realloc(process->current_state->vertexPointer, bytes_size);
27896+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27897+ glVertexPointer(vertexPointerSize, vertexPointerType,
27898+ vertexPointerStride,
27899+ process->current_state->vertexPointer);
27900+ glNormalPointer(normalPointerType, normalPointerStride,
27901+ process->current_state->vertexPointer);
27902+ break;
27903+ }
27904+
27905+ case glVertexNormalPointerInterlaced_fake_func:
27906+ {
27907+ int i = 0;
27908+ int offset = args[i++];
27909+ int vertexPointerSize = args[i++];
27910+ int vertexPointerType = args[i++];
27911+ int stride = args[i++];
27912+ int normalPointerOffset = args[i++];
27913+ int normalPointerType = args[i++];
27914+ int bytes_size = args[i++];
27915+ void *ptr = (void *) args[i++];
27916+
27917+ process->current_state->vertexPointerSize =
27918+ MAX(process->current_state->vertexPointerSize,
27919+ offset + bytes_size);
27920+ process->current_state->vertexPointer =
27921+ realloc(process->current_state->vertexPointer,
27922+ process->current_state->vertexPointerSize);
27923+ memcpy(process->current_state->vertexPointer + offset, ptr,
27924+ bytes_size);
27925+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27926+ process->current_state->vertexPointer);
27927+ glNormalPointer(normalPointerType, stride,
27928+ process->current_state->vertexPointer +
27929+ normalPointerOffset);
27930+ break;
27931+ }
27932+
27933+ case glTuxRacerDrawElements_fake_func:
27934+ {
27935+ int mode = args[0];
27936+ int count = args[1];
27937+ int isColorEnabled = args[2];
27938+ void *ptr = (void *) args[3];
27939+ int stride =
27940+ 6 * sizeof(float) +
27941+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27942+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27943+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27944+ if (isColorEnabled)
27945+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27946+ ptr + 6 * sizeof(float));
27947+ glDrawArrays(mode, 0, count);
27948+ break;
27949+ }
27950+
27951+ case glVertexNormalColorPointerInterlaced_fake_func:
27952+ {
27953+ int i = 0;
27954+ int offset = args[i++];
27955+ int vertexPointerSize = args[i++];
27956+ int vertexPointerType = args[i++];
27957+ int stride = args[i++];
27958+ int normalPointerOffset = args[i++];
27959+ int normalPointerType = args[i++];
27960+ int colorPointerOffset = args[i++];
27961+ int colorPointerSize = args[i++];
27962+ int colorPointerType = args[i++];
27963+ int bytes_size = args[i++];
27964+ void *ptr = (void *) args[i++];
27965+
27966+ process->current_state->vertexPointerSize =
27967+ MAX(process->current_state->vertexPointerSize,
27968+ offset + bytes_size);
27969+ process->current_state->vertexPointer =
27970+ realloc(process->current_state->vertexPointer,
27971+ process->current_state->vertexPointerSize);
27972+ memcpy(process->current_state->vertexPointer + offset, ptr,
27973+ bytes_size);
27974+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27975+ process->current_state->vertexPointer);
27976+ glNormalPointer(normalPointerType, stride,
27977+ process->current_state->vertexPointer +
27978+ normalPointerOffset);
27979+ glColorPointer(colorPointerSize, colorPointerType, stride,
27980+ process->current_state->vertexPointer +
27981+ colorPointerOffset);
27982+ break;
27983+ }
27984+
27985+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27986+ {
27987+ int i = 0;
27988+ int offset = args[i++];
27989+ int vertexPointerSize = args[i++];
27990+ int vertexPointerType = args[i++];
27991+ int stride = args[i++];
27992+ int colorPointerOffset = args[i++];
27993+ int colorPointerSize = args[i++];
27994+ int colorPointerType = args[i++];
27995+ int texCoord0PointerOffset = args[i++];
27996+ int texCoord0PointerSize = args[i++];
27997+ int texCoord0PointerType = args[i++];
27998+ int bytes_size = args[i++];
27999+ void *ptr = (void *) args[i++];
28000+
28001+ process->current_state->vertexPointerSize =
28002+ MAX(process->current_state->vertexPointerSize,
28003+ offset + bytes_size);
28004+ process->current_state->vertexPointer =
28005+ realloc(process->current_state->vertexPointer,
28006+ process->current_state->vertexPointerSize);
28007+ memcpy(process->current_state->vertexPointer + offset, ptr,
28008+ bytes_size);
28009+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28010+ process->current_state->vertexPointer);
28011+ glColorPointer(colorPointerSize, colorPointerType, stride,
28012+ process->current_state->vertexPointer +
28013+ colorPointerOffset);
28014+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28015+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28016+ stride,
28017+ process->current_state->vertexPointer +
28018+ texCoord0PointerOffset);
28019+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28020+ process->current_state->
28021+ activeTextureIndex);
28022+ break;
28023+ }
28024+
28025+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
28026+ {
28027+ int i = 0;
28028+ int offset = args[i++];
28029+ int vertexPointerSize = args[i++];
28030+ int vertexPointerType = args[i++];
28031+ int stride = args[i++];
28032+ int normalPointerOffset = args[i++];
28033+ int normalPointerType = args[i++];
28034+ int texCoord0PointerOffset = args[i++];
28035+ int texCoord0PointerSize = args[i++];
28036+ int texCoord0PointerType = args[i++];
28037+ int bytes_size = args[i++];
28038+ void *ptr = (void *) args[i++];
28039+
28040+ process->current_state->vertexPointerSize =
28041+ MAX(process->current_state->vertexPointerSize,
28042+ offset + bytes_size);
28043+ process->current_state->vertexPointer =
28044+ realloc(process->current_state->vertexPointer,
28045+ process->current_state->vertexPointerSize);
28046+ memcpy(process->current_state->vertexPointer + offset, ptr,
28047+ bytes_size);
28048+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28049+ process->current_state->vertexPointer);
28050+ glNormalPointer(normalPointerType, stride,
28051+ process->current_state->vertexPointer +
28052+ normalPointerOffset);
28053+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28054+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28055+ stride,
28056+ process->current_state->vertexPointer +
28057+ texCoord0PointerOffset);
28058+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28059+ process->current_state->
28060+ activeTextureIndex);
28061+ break;
28062+ }
28063+
28064+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
28065+ {
28066+ int i = 0;
28067+ int offset = args[i++];
28068+ int vertexPointerSize = args[i++];
28069+ int vertexPointerType = args[i++];
28070+ int stride = args[i++];
28071+ int normalPointerOffset = args[i++];
28072+ int normalPointerType = args[i++];
28073+ int texCoord0PointerOffset = args[i++];
28074+ int texCoord0PointerSize = args[i++];
28075+ int texCoord0PointerType = args[i++];
28076+ int texCoord1PointerOffset = args[i++];
28077+ int texCoord1PointerSize = args[i++];
28078+ int texCoord1PointerType = args[i++];
28079+ int bytes_size = args[i++];
28080+ void *ptr = (void *) args[i++];
28081+
28082+ process->current_state->vertexPointerSize =
28083+ MAX(process->current_state->vertexPointerSize,
28084+ offset + bytes_size);
28085+ process->current_state->vertexPointer =
28086+ realloc(process->current_state->vertexPointer,
28087+ process->current_state->vertexPointerSize);
28088+ memcpy(process->current_state->vertexPointer + offset, ptr,
28089+ bytes_size);
28090+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28091+ process->current_state->vertexPointer);
28092+ glNormalPointer(normalPointerType, stride,
28093+ process->current_state->vertexPointer +
28094+ normalPointerOffset);
28095+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28096+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28097+ stride,
28098+ process->current_state->vertexPointer +
28099+ texCoord0PointerOffset);
28100+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28101+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28102+ stride,
28103+ process->current_state->vertexPointer +
28104+ texCoord1PointerOffset);
28105+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28106+ process->current_state->
28107+ activeTextureIndex);
28108+ break;
28109+ }
28110+
28111+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
28112+ {
28113+ int i = 0;
28114+ int offset = args[i++];
28115+ int vertexPointerSize = args[i++];
28116+ int vertexPointerType = args[i++];
28117+ int stride = args[i++];
28118+ int normalPointerOffset = args[i++];
28119+ int normalPointerType = args[i++];
28120+ int texCoord0PointerOffset = args[i++];
28121+ int texCoord0PointerSize = args[i++];
28122+ int texCoord0PointerType = args[i++];
28123+ int texCoord1PointerOffset = args[i++];
28124+ int texCoord1PointerSize = args[i++];
28125+ int texCoord1PointerType = args[i++];
28126+ int texCoord2PointerOffset = args[i++];
28127+ int texCoord2PointerSize = args[i++];
28128+ int texCoord2PointerType = args[i++];
28129+ int bytes_size = args[i++];
28130+ void *ptr = (void *) args[i++];
28131+
28132+ process->current_state->vertexPointerSize =
28133+ MAX(process->current_state->vertexPointerSize,
28134+ offset + bytes_size);
28135+ process->current_state->vertexPointer =
28136+ realloc(process->current_state->vertexPointer,
28137+ process->current_state->vertexPointerSize);
28138+ memcpy(process->current_state->vertexPointer + offset, ptr,
28139+ bytes_size);
28140+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28141+ process->current_state->vertexPointer);
28142+ glNormalPointer(normalPointerType, stride,
28143+ process->current_state->vertexPointer +
28144+ normalPointerOffset);
28145+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28146+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28147+ stride,
28148+ process->current_state->vertexPointer +
28149+ texCoord0PointerOffset);
28150+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28151+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28152+ stride,
28153+ process->current_state->vertexPointer +
28154+ texCoord1PointerOffset);
28155+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28156+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28157+ stride,
28158+ process->current_state->vertexPointer +
28159+ texCoord2PointerOffset);
28160+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28161+ process->current_state->
28162+ activeTextureIndex);
28163+ break;
28164+ }
28165+
28166+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28167+ {
28168+ int i = 0;
28169+ int offset = args[i++];
28170+ int vertexPointerSize = args[i++];
28171+ int vertexPointerType = args[i++];
28172+ int stride = args[i++];
28173+ int normalPointerOffset = args[i++];
28174+ int normalPointerType = args[i++];
28175+ int colorPointerOffset = args[i++];
28176+ int colorPointerSize = args[i++];
28177+ int colorPointerType = args[i++];
28178+ int texCoord0PointerOffset = args[i++];
28179+ int texCoord0PointerSize = args[i++];
28180+ int texCoord0PointerType = args[i++];
28181+ int bytes_size = args[i++];
28182+ void *ptr = (void *) args[i++];
28183+
28184+ process->current_state->vertexPointerSize =
28185+ MAX(process->current_state->vertexPointerSize,
28186+ offset + bytes_size);
28187+ process->current_state->vertexPointer =
28188+ realloc(process->current_state->vertexPointer,
28189+ process->current_state->vertexPointerSize);
28190+ memcpy(process->current_state->vertexPointer + offset, ptr,
28191+ bytes_size);
28192+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28193+ process->current_state->vertexPointer);
28194+ glNormalPointer(normalPointerType, stride,
28195+ process->current_state->vertexPointer +
28196+ normalPointerOffset);
28197+ glColorPointer(colorPointerSize, colorPointerType, stride,
28198+ process->current_state->vertexPointer +
28199+ colorPointerOffset);
28200+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28201+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28202+ stride,
28203+ process->current_state->vertexPointer +
28204+ texCoord0PointerOffset);
28205+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28206+ process->current_state->
28207+ activeTextureIndex);
28208+ break;
28209+ }
28210+
28211+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28212+ {
28213+ int i = 0;
28214+ int offset = args[i++];
28215+ int vertexPointerSize = args[i++];
28216+ int vertexPointerType = args[i++];
28217+ int stride = args[i++];
28218+ int normalPointerOffset = args[i++];
28219+ int normalPointerType = args[i++];
28220+ int colorPointerOffset = args[i++];
28221+ int colorPointerSize = args[i++];
28222+ int colorPointerType = args[i++];
28223+ int texCoord0PointerOffset = args[i++];
28224+ int texCoord0PointerSize = args[i++];
28225+ int texCoord0PointerType = args[i++];
28226+ int texCoord1PointerOffset = args[i++];
28227+ int texCoord1PointerSize = args[i++];
28228+ int texCoord1PointerType = args[i++];
28229+ int bytes_size = args[i++];
28230+ void *ptr = (void *) args[i++];
28231+
28232+ process->current_state->vertexPointerSize =
28233+ MAX(process->current_state->vertexPointerSize,
28234+ offset + bytes_size);
28235+ process->current_state->vertexPointer =
28236+ realloc(process->current_state->vertexPointer,
28237+ process->current_state->vertexPointerSize);
28238+ memcpy(process->current_state->vertexPointer + offset, ptr,
28239+ bytes_size);
28240+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28241+ process->current_state->vertexPointer);
28242+ glNormalPointer(normalPointerType, stride,
28243+ process->current_state->vertexPointer +
28244+ normalPointerOffset);
28245+ glColorPointer(colorPointerSize, colorPointerType, stride,
28246+ process->current_state->vertexPointer +
28247+ colorPointerOffset);
28248+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28249+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28250+ stride,
28251+ process->current_state->vertexPointer +
28252+ texCoord0PointerOffset);
28253+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28254+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28255+ stride,
28256+ process->current_state->vertexPointer +
28257+ texCoord1PointerOffset);
28258+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28259+ process->current_state->
28260+ activeTextureIndex);
28261+ break;
28262+ }
28263+
28264+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28265+ {
28266+ int i = 0;
28267+ int offset = args[i++];
28268+ int vertexPointerSize = args[i++];
28269+ int vertexPointerType = args[i++];
28270+ int stride = args[i++];
28271+ int normalPointerOffset = args[i++];
28272+ int normalPointerType = args[i++];
28273+ int colorPointerOffset = args[i++];
28274+ int colorPointerSize = args[i++];
28275+ int colorPointerType = args[i++];
28276+ int texCoord0PointerOffset = args[i++];
28277+ int texCoord0PointerSize = args[i++];
28278+ int texCoord0PointerType = args[i++];
28279+ int texCoord1PointerOffset = args[i++];
28280+ int texCoord1PointerSize = args[i++];
28281+ int texCoord1PointerType = args[i++];
28282+ int texCoord2PointerOffset = args[i++];
28283+ int texCoord2PointerSize = args[i++];
28284+ int texCoord2PointerType = args[i++];
28285+ int bytes_size = args[i++];
28286+ void *ptr = (void *) args[i++];
28287+
28288+ process->current_state->vertexPointerSize =
28289+ MAX(process->current_state->vertexPointerSize,
28290+ offset + bytes_size);
28291+ process->current_state->vertexPointer =
28292+ realloc(process->current_state->vertexPointer,
28293+ process->current_state->vertexPointerSize);
28294+ memcpy(process->current_state->vertexPointer + offset, ptr,
28295+ bytes_size);
28296+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28297+ process->current_state->vertexPointer);
28298+ glNormalPointer(normalPointerType, stride,
28299+ process->current_state->vertexPointer +
28300+ normalPointerOffset);
28301+ glColorPointer(colorPointerSize, colorPointerType, stride,
28302+ process->current_state->vertexPointer +
28303+ colorPointerOffset);
28304+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28305+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28306+ stride,
28307+ process->current_state->vertexPointer +
28308+ texCoord0PointerOffset);
28309+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28310+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28311+ stride,
28312+ process->current_state->vertexPointer +
28313+ texCoord1PointerOffset);
28314+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28315+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28316+ stride,
28317+ process->current_state->vertexPointer +
28318+ texCoord2PointerOffset);
28319+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28320+ process->current_state->
28321+ activeTextureIndex);
28322+ break;
28323+ }
28324+
28325+ case _glVertexPointer_buffer_func:
28326+ {
28327+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28328+ break;
28329+ }
28330+
28331+ case _glNormalPointer_buffer_func:
28332+ {
28333+ glNormalPointer(args[0], args[1], (void *) args[2]);
28334+ break;
28335+ }
28336+
28337+ case _glColorPointer_buffer_func:
28338+ {
28339+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28340+ break;
28341+ }
28342+
28343+ case _glSecondaryColorPointer_buffer_func:
28344+ {
28345+ GET_EXT_PTR(void, glSecondaryColorPointer,
28346+ (int, int, int, void *));
28347+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28348+ (void *) args[3]);
28349+ break;
28350+ }
28351+
28352+ case _glIndexPointer_buffer_func:
28353+ {
28354+ glIndexPointer(args[0], args[1], (void *) args[2]);
28355+ break;
28356+ }
28357+
28358+ case _glTexCoordPointer_buffer_func:
28359+ {
28360+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28361+ break;
28362+ }
28363+
28364+ case _glEdgeFlagPointer_buffer_func:
28365+ {
28366+ glEdgeFlagPointer(args[0], (void *) args[1]);
28367+ break;
28368+ }
28369+
28370+ case _glVertexAttribPointerARB_buffer_func:
28371+ {
28372+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28373+ (int, int, int, int, int, void *));
28374+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28375+ args[3], args[4],
28376+ (void *) args[5]);
28377+ break;
28378+ }
28379+
28380+ case _glWeightPointerARB_buffer_func:
28381+ {
28382+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28383+
28384+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28385+ (void *) args[3]);
28386+ break;
28387+ }
28388+
28389+ case _glMatrixIndexPointerARB_buffer_func:
28390+ {
28391+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28392+ (int, int, int, void *));
28393+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28394+ (void *) args[3]);
28395+ break;
28396+ }
28397+
28398+ case _glFogCoordPointer_buffer_func:
28399+ {
28400+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28401+
28402+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28403+ break;
28404+ }
28405+
28406+ case _glVariantPointerEXT_buffer_func:
28407+ {
28408+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28409+
28410+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28411+ (void *) args[3]);
28412+ break;
28413+ }
28414+
28415+ case _glDrawElements_buffer_func:
28416+ {
28417+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28418+ break;
28419+ }
28420+
28421+ case _glDrawRangeElements_buffer_func:
28422+ {
28423+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28424+ (void *) args[5]);
28425+ break;
28426+ }
28427+
28428+ case _glMultiDrawElements_buffer_func:
28429+ {
28430+ GET_EXT_PTR(void, glMultiDrawElements,
28431+ (int, int *, int, void **, int));
28432+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28433+ (void **) args[3], args[4]);
28434+ break;
28435+ }
28436+
28437+ case _glGetError_fake_func:
28438+ {
28439+ break;
28440+ }
28441+
28442+ case glGetIntegerv_func:
28443+ {
28444+ glGetIntegerv(args[0], (int *) args[1]);
28445+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28446+ *(int *) args[1]);
28447+ break;
28448+ }
28449+
28450+ case _glReadPixels_pbo_func:
28451+ {
28452+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28453+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28454+ ARG_TO_UNSIGNED_INT(args[4]),
28455+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28456+ break;
28457+ }
28458+
28459+ case _glDrawPixels_pbo_func:
28460+ {
28461+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28462+ ARG_TO_UNSIGNED_INT(args[2]),
28463+ ARG_TO_UNSIGNED_INT(args[3]),
28464+ (const void *) (args[4]));
28465+ break;
28466+ }
28467+
28468+ case _glMapBufferARB_fake_func:
28469+ {
28470+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28471+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28472+ int target = args[0];
28473+ int size = args[1];
28474+ void *dst_ptr = (void *) args[2];
28475+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28476+
28477+ if (src_ptr) {
28478+ memcpy(dst_ptr, src_ptr, size);
28479+ ret_int = ptr_func_glUnmapBufferARB(target);
28480+ } else {
28481+ ret_int = 0;
28482+ }
28483+ break;
28484+ }
28485+
28486+ case fake_gluBuild2DMipmaps_func:
28487+ {
28488+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28489+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28490+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28491+ const GLvoid *arg_6));
28492+ if (ptr_func_gluBuild2DMipmaps == NULL)
28493+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28494+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28495+ ARG_TO_INT(args[1]),
28496+ ARG_TO_INT(args[2]),
28497+ ARG_TO_INT(args[3]),
28498+ ARG_TO_UNSIGNED_INT(args[4]),
28499+ ARG_TO_UNSIGNED_INT(args[5]),
28500+ (const void *) (args[6]));
28501+ break;
28502+ }
28503+
28504+ case _glSelectBuffer_fake_func:
28505+ {
28506+ process->current_state->selectBufferSize = args[0] * 4;
28507+ process->current_state->selectBufferPtr =
28508+ realloc(process->current_state->selectBufferPtr,
28509+ process->current_state->selectBufferSize);
28510+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28511+ break;
28512+ }
28513+
28514+ case _glGetSelectBuffer_fake_func:
28515+ {
28516+ void *ptr = (void *) args[0];
28517+
28518+ memcpy(ptr, process->current_state->selectBufferPtr,
28519+ process->current_state->selectBufferSize);
28520+ break;
28521+ }
28522+
28523+ case _glFeedbackBuffer_fake_func:
28524+ {
28525+ process->current_state->feedbackBufferSize = args[0] * 4;
28526+ process->current_state->feedbackBufferPtr =
28527+ realloc(process->current_state->feedbackBufferPtr,
28528+ process->current_state->feedbackBufferSize);
28529+ glFeedbackBuffer(args[0], args[1],
28530+ process->current_state->feedbackBufferPtr);
28531+ break;
28532+ }
28533+
28534+ case _glGetFeedbackBuffer_fake_func:
28535+ {
28536+ void *ptr = (void *) args[0];
28537+
28538+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28539+ process->current_state->feedbackBufferSize);
28540+ break;
28541+ }
28542+
28543+ /*
28544+ * case glEnableClientState_func: { if (display_function_call)
28545+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28546+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28547+ *
28548+ * case glDisableClientState_func: { if (display_function_call)
28549+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28550+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28551+ *
28552+ * case glClientActiveTexture_func: case
28553+ * glClientActiveTextureARB_func: { if (display_function_call)
28554+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28555+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28556+ *
28557+ * case glActiveTextureARB_func: { if (display_function_call)
28558+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28559+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28560+ *
28561+ * case glLockArraysEXT_func: break;
28562+ *
28563+ * case glUnlockArraysEXT_func: break;
28564+ *
28565+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28566+ *
28567+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28568+ * break; }
28569+ *
28570+ * case glDrawElements_func: {
28571+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28572+ *
28573+ * case glDrawRangeElements_func: {
28574+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28575+ * break; } */
28576+
28577+ case glGetError_func:
28578+ {
28579+#ifdef SYSTEMATIC_ERROR_CHECK
28580+ ret_int = process->current_state->last_error;
28581+#else
28582+ ret_int = glGetError();
28583+#endif
28584+ break;
28585+ }
28586+
28587+ case glNewObjectBufferATI_func:
28588+ {
28589+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28590+
28591+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28592+ (void *) args[1], args[2]);
28593+ break;
28594+ }
28595+
28596+ case glClear_func:
28597+ /* HACK workaround for an unexplainable issue */
28598+ if (args[0] & GL_COLOR_BUFFER_BIT)
28599+ glClear(GL_COLOR_BUFFER_BIT);
28600+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28601+ glClear(GL_STENCIL_BUFFER_BIT);
28602+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28603+ glClear(GL_DEPTH_BUFFER_BIT);
28604+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28605+ glClear(GL_ACCUM_BUFFER_BIT);
28606+ break;
28607+
28608+ default:
28609+ execute_func(func_number, args, &ret_int, &ret_char);
28610+ break;
28611+ }
28612+
28613+#ifdef SYSTEMATIC_ERROR_CHECK
28614+ if (func_number == glGetError_func) {
28615+ process->current_state->last_error = 0;
28616+ } else {
28617+ process->current_state->last_error = glGetError();
28618+ if (process->current_state->last_error != 0) {
28619+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28620+ process->current_state->last_error);
28621+ }
28622+ }
28623+#endif
28624+
28625+ switch (ret_type) {
28626+ case TYPE_NONE:
28627+ break;
28628+
28629+ case TYPE_CHAR:
28630+ case TYPE_UNSIGNED_CHAR:
28631+ ret_int = ret_char;
28632+ break;
28633+
28634+ case TYPE_INT:
28635+ case TYPE_UNSIGNED_INT:
28636+ break;
28637+
28638+ case TYPE_CONST_CHAR:
28639+ {
28640+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28641+ break;
28642+ }
28643+
28644+ default:
28645+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28646+ exit(-1);
28647+ break;
28648+ }
28649+
28650+ if (display_function_call)
28651+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28652+ tab_opengl_calls_name[func_number]);
28653+
28654+ return ret_int;
28655+}
28656Index: qemu-0.12.4/target-i386/opengl_func.h
28657===================================================================
28658--- /dev/null
28659+++ qemu-0.12.4/target-i386/opengl_func.h
28660@@ -0,0 +1,1108 @@
28661+/*
28662+ * Main header for both host and guest sides
28663+ *
28664+ * Copyright (c) 2006,2007 Even Rouault
28665+ *
28666+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28667+ * of this software and associated documentation files (the "Software"), to deal
28668+ * in the Software without restriction, including without limitation the rights
28669+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28670+ * copies of the Software, and to permit persons to whom the Software is
28671+ * furnished to do so, subject to the following conditions:
28672+ *
28673+ * The above copyright notice and this permission notice shall be included in
28674+ * all copies or substantial portions of the Software.
28675+ *
28676+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28677+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28678+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28679+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28680+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28681+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28682+ * THE SOFTWARE.
28683+ */
28684+
28685+#include "mesa_gl.h"
28686+#include "mesa_glext.h"
28687+
28688+/* Argument list are internally of a type that can hold a target pointer
28689+ * or a host pointer. */
28690+typedef target_phys_addr_t arg_t;
28691+
28692+enum {
28693+ TYPE_NONE,
28694+ TYPE_CHAR,
28695+ TYPE_UNSIGNED_CHAR,
28696+ TYPE_SHORT,
28697+ TYPE_UNSIGNED_SHORT,
28698+ TYPE_INT,
28699+ TYPE_UNSIGNED_INT,
28700+ TYPE_FLOAT,
28701+ TYPE_DOUBLE,
28702+ TYPE_1CHAR,
28703+ TYPE_2CHAR,
28704+ TYPE_3CHAR,
28705+ TYPE_4CHAR,
28706+ TYPE_128UCHAR,
28707+ TYPE_1SHORT,
28708+ TYPE_2SHORT,
28709+ TYPE_3SHORT,
28710+ TYPE_4SHORT,
28711+ TYPE_1INT,
28712+ TYPE_2INT,
28713+ TYPE_3INT,
28714+ TYPE_4INT,
28715+ TYPE_1FLOAT,
28716+ TYPE_2FLOAT,
28717+ TYPE_3FLOAT,
28718+ TYPE_4FLOAT,
28719+ TYPE_16FLOAT,
28720+ TYPE_1DOUBLE,
28721+ TYPE_2DOUBLE,
28722+ TYPE_3DOUBLE,
28723+ TYPE_4DOUBLE,
28724+ TYPE_16DOUBLE,
28725+ TYPE_OUT_1INT,
28726+ TYPE_OUT_1FLOAT,
28727+ TYPE_OUT_4CHAR,
28728+ TYPE_OUT_4INT,
28729+ TYPE_OUT_4FLOAT,
28730+ TYPE_OUT_4DOUBLE,
28731+ TYPE_OUT_128UCHAR,
28732+ TYPE_CONST_CHAR,
28733+ TYPE_ARRAY_CHAR,
28734+ TYPE_ARRAY_SHORT,
28735+ TYPE_ARRAY_INT,
28736+ TYPE_ARRAY_FLOAT,
28737+ TYPE_ARRAY_DOUBLE,
28738+ TYPE_IN_IGNORED_POINTER,
28739+ TYPE_OUT_ARRAY_CHAR,
28740+ TYPE_OUT_ARRAY_SHORT,
28741+ TYPE_OUT_ARRAY_INT,
28742+ TYPE_OUT_ARRAY_FLOAT,
28743+ TYPE_OUT_ARRAY_DOUBLE,
28744+ TYPE_NULL_TERMINATED_STRING,
28745+
28746+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28747+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28748+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28749+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28750+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28751+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28752+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28753+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28754+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28755+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28756+ /* .... */
28757+ TYPE_LAST,
28758+ /* .... */
28759+ TYPE_1UCHAR = TYPE_CHAR,
28760+ TYPE_1USHORT = TYPE_1SHORT,
28761+ TYPE_1UINT = TYPE_1INT,
28762+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28763+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28764+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28765+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28766+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28767+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28768+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28769+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28770+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28771+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28772+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28773+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28774+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28775+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28776+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28777+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28778+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28779+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28780+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28781+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28782+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28783+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28784+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28785+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28786+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28787+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28788+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28789+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28790+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28791+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28792+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28793+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28794+};
28795+
28796+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28797+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28798+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28799+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28800+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28801+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28802+
28803+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28804+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28805+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28806+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28807+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28808+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28809+
28810+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28811+ case TYPE_ARRAY_CHAR: \
28812+ case TYPE_ARRAY_SHORT: \
28813+ case TYPE_ARRAY_INT: \
28814+ case TYPE_ARRAY_FLOAT: \
28815+ case TYPE_ARRAY_DOUBLE
28816+
28817+#define CASE_IN_KNOWN_SIZE_POINTERS \
28818+ case TYPE_1CHAR:\
28819+ case TYPE_2CHAR:\
28820+ case TYPE_3CHAR:\
28821+ case TYPE_4CHAR:\
28822+ case TYPE_128UCHAR:\
28823+ case TYPE_1SHORT:\
28824+ case TYPE_2SHORT:\
28825+ case TYPE_3SHORT:\
28826+ case TYPE_4SHORT:\
28827+ case TYPE_1INT:\
28828+ case TYPE_2INT:\
28829+ case TYPE_3INT:\
28830+ case TYPE_4INT:\
28831+ case TYPE_1FLOAT:\
28832+ case TYPE_2FLOAT:\
28833+ case TYPE_3FLOAT:\
28834+ case TYPE_4FLOAT:\
28835+ case TYPE_16FLOAT:\
28836+ case TYPE_1DOUBLE:\
28837+ case TYPE_2DOUBLE:\
28838+ case TYPE_3DOUBLE:\
28839+ case TYPE_4DOUBLE:\
28840+ case TYPE_16DOUBLE
28841+
28842+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28843+ case TYPE_OUT_ARRAY_CHAR: \
28844+ case TYPE_OUT_ARRAY_SHORT: \
28845+ case TYPE_OUT_ARRAY_INT: \
28846+ case TYPE_OUT_ARRAY_FLOAT: \
28847+ case TYPE_OUT_ARRAY_DOUBLE
28848+
28849+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28850+ case TYPE_OUT_1INT: \
28851+ case TYPE_OUT_1FLOAT: \
28852+ case TYPE_OUT_4CHAR: \
28853+ case TYPE_OUT_4INT: \
28854+ case TYPE_OUT_4FLOAT: \
28855+ case TYPE_OUT_4DOUBLE: \
28856+ case TYPE_OUT_128UCHAR \
28857+
28858+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28859+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28860+
28861+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28862+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28863+
28864+
28865+#define IS_ARRAY_CHAR(type) (type == TYPE_ARRAY_CHAR || type == TYPE_1CHAR || type == TYPE_2CHAR || type == TYPE_3CHAR || type == TYPE_4CHAR || type == TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28866+#define IS_ARRAY_SHORT(type) (type == TYPE_ARRAY_SHORT || type == TYPE_1SHORT || type == TYPE_2SHORT || type == TYPE_3SHORT || type == TYPE_4SHORT || type == TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28867+#define IS_ARRAY_INT(type) (type == TYPE_ARRAY_INT || type == TYPE_1INT || type == TYPE_2INT || type == TYPE_3INT || type == TYPE_4INT || type == TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28868+#define IS_ARRAY_FLOAT(type) (type == TYPE_ARRAY_FLOAT || type == TYPE_1FLOAT || type == TYPE_2FLOAT || type == TYPE_3FLOAT || type == TYPE_4FLOAT || type == TYPE_16FLOAT || type == TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28869+#define IS_ARRAY_DOUBLE(type) (type == TYPE_ARRAY_DOUBLE || type == TYPE_1DOUBLE || type == TYPE_2DOUBLE || type == TYPE_3DOUBLE || type == TYPE_4DOUBLE || type == TYPE_16DOUBLE || type == TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28870+
28871+#define NB_MAX_TEXTURES 16
28872+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28873+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28874+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28875+
28876+static int tab_args_type_length[] = {
28877+ 0,
28878+ sizeof(char),
28879+ sizeof(unsigned char),
28880+ sizeof(short),
28881+ sizeof(unsigned short),
28882+ sizeof(int),
28883+ sizeof(unsigned int),
28884+ sizeof(float),
28885+ sizeof(double),
28886+ 1 * sizeof(char),
28887+ 2 * sizeof(char),
28888+ 3 * sizeof(char),
28889+ 4 * sizeof(char),
28890+ 128 * sizeof(char),
28891+ 1 * sizeof(short),
28892+ 2 * sizeof(short),
28893+ 3 * sizeof(short),
28894+ 4 * sizeof(short),
28895+ 1 * sizeof(int),
28896+ 2 * sizeof(int),
28897+ 3 * sizeof(int),
28898+ 4 * sizeof(int),
28899+ 1 * sizeof(float),
28900+ 2 * sizeof(float),
28901+ 3 * sizeof(float),
28902+ 4 * sizeof(float),
28903+ 16 * sizeof(float),
28904+ 1 * sizeof(double),
28905+ 2 * sizeof(double),
28906+ 3 * sizeof(double),
28907+ 4 * sizeof(double),
28908+ 16 * sizeof(double),
28909+ sizeof(int),
28910+ sizeof(float),
28911+ 4 * sizeof(char),
28912+ 4 * sizeof(int),
28913+ 4 * sizeof(float),
28914+ 4 * sizeof(double),
28915+ 128 * sizeof(char),
28916+ 0,
28917+ 0,
28918+ 0,
28919+ 0,
28920+ 0,
28921+ 0,
28922+ 0,
28923+ 0,
28924+ 0,
28925+ 0,
28926+ 0,
28927+ 0,
28928+ 0,
28929+
28930+ /* the following sizes are the size of 1 element of the array */
28931+ sizeof(char),
28932+ sizeof(short),
28933+ sizeof(int),
28934+ sizeof(float),
28935+ sizeof(double),
28936+ sizeof(char),
28937+ sizeof(short),
28938+ sizeof(int),
28939+ sizeof(float),
28940+ sizeof(double),
28941+};
28942+
28943+typedef struct {
28944+ int ret_type;
28945+ int has_out_parameters;
28946+ int nb_args;
28947+ int args_type[0];
28948+} Signature;
28949+
28950+static const int _init32_signature[] =
28951+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28952+static const int _init64_signature[] =
28953+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28954+
28955+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28956+
28957+static const int _serialized_calls_signature[] =
28958+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28959+
28960+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28961+
28962+static const int _changeWindowState_signature[] =
28963+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28964+
28965+static const int _moveResizeWindow_signature[] =
28966+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28967+
28968+static const int _send_cursor_signature[] =
28969+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28970+ TYPE_INT, TYPE_INT,
28971+ TYPE_INT, TYPE_INT,
28972+ TYPE_ARRAY_INT
28973+};
28974+
28975+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28976+static const int glXChooseVisual_signature[] =
28977+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28978+
28979+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28980+ GLXContext shareList, Bool direct )*/
28981+static const int glXCreateContext_signature[] =
28982+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28983+
28984+static const int glXCopyContext_signature[] =
28985+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28986+TYPE_INT };
28987+
28988+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28989+static const int glXDestroyContext_signature[] =
28990+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28991+
28992+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28993+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28994+/* making it asynchronous */
28995+static const int glXMakeCurrent_signature[] =
28996+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28997+
28998+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28999+ int attrib, int *value )*/
29000+static const int glXGetConfig_signature[] =
29001+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29002+TYPE_OUT_1INT };
29003+
29004+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
29005+static const int glXGetConfig_extended_signature[] =
29006+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29007+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29008+
29009+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
29010+static const int glXSwapBuffers_signature[] =
29011+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29012+
29013+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
29014+static const int glXQueryVersion_signature[] =
29015+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29016+
29017+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
29018+static const int glXQueryExtension_signature[] =
29019+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29020+
29021+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
29022+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
29023+
29024+/* GLX 1.1 and later */
29025+
29026+/* const char *glXGetClientString( Display *dpy, int name ) */
29027+static const int glXGetClientString_signature[] =
29028+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29029+
29030+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
29031+static const int glXQueryExtensionsString_signature[] =
29032+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29033+
29034+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
29035+static const int glXQueryServerString_signature[] =
29036+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29037+
29038+
29039+static const int glXGetProcAddress_fake_signature[] =
29040+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
29041+
29042+static const int glXGetProcAddress_global_fake_signature[] =
29043+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
29044+
29045+
29046+/* GLX 1.3 and later */
29047+
29048+/*
29049+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
29050+ const int *attribList, int *nitems ); */
29051+static const int glXChooseFBConfig_signature[] =
29052+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29053+TYPE_OUT_1INT };
29054+
29055+static const int glXChooseFBConfigSGIX_signature[] =
29056+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29057+TYPE_OUT_1INT };
29058+
29059+static const int glXGetFBConfigs_signature[] =
29060+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
29061+
29062+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
29063+static const int glXGetFBConfigAttrib_extended_signature[] =
29064+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29065+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29066+
29067+
29068+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
29069+ const int *attribList ) */
29070+static const int glXCreatePbuffer_signature[] =
29071+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
29072+
29073+static const int glXCreateGLXPbufferSGIX_signature[] =
29074+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29075+TYPE_ARRAY_INT };
29076+
29077+static const int glXDestroyPbuffer_signature[] =
29078+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29079+
29080+static const int glXDestroyGLXPbufferSGIX_signature[] =
29081+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29082+
29083+/* GLXContext glXCreateNewContext(Display * dpy
29084+ GLXFBConfig config
29085+ int renderType
29086+ GLXContext ShareList
29087+ Bool Direct) */
29088+static const int glXCreateNewContext_signature[] =
29089+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29090+TYPE_INT };
29091+
29092+static const int glXCreateContextWithConfigSGIX_signature[] =
29093+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29094+TYPE_INT };
29095+
29096+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
29097+static const int glXGetVisualFromFBConfig_signature[] =
29098+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29099+
29100+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
29101+static const int glXGetFBConfigAttrib_signature[] =
29102+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29103+TYPE_OUT_1INT };
29104+
29105+static const int glXGetFBConfigAttribSGIX_signature[] =
29106+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29107+TYPE_OUT_1INT };
29108+
29109+static const int glXQueryContext_signature[] =
29110+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29111+TYPE_OUT_1INT };
29112+
29113+static const int glXQueryGLXPbufferSGIX_signature[] =
29114+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29115+TYPE_OUT_1INT };
29116+
29117+static const int glXQueryDrawable_signature[] =
29118+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29119+TYPE_OUT_1INT };
29120+
29121+/* void glXUseXFont( Font font, int first, int count, int list ) */
29122+static const int glXUseXFont_signature[] =
29123+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29124+
29125+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29126+static const int glXIsDirect_signature[] =
29127+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29128+
29129+static const int glXGetScreenDriver_signature[] =
29130+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29131+
29132+static const int glXGetDriverConfig_signature[] =
29133+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29134+
29135+
29136+static const int glXWaitVideoSyncSGI_signature[] =
29137+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29138+
29139+static const int glXGetVideoSyncSGI_signature[] =
29140+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29141+
29142+static const int glXSwapIntervalSGI_signature[] =
29143+ { TYPE_INT, 0, 1, TYPE_INT };
29144+
29145+static const int glXBindTexImageATI_signature[] =
29146+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29147+static const int glXReleaseTexImageATI_signature[] =
29148+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29149+static const int glXBindTexImageARB_signature[] =
29150+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29151+static const int glXReleaseTexImageARB_signature[] =
29152+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29153+
29154+/* const GLubyte * glGetString( GLenum name ) */
29155+static const int glGetString_signature[] =
29156+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29157+
29158+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29159+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29160+static const int glShaderSourceARB_fake_signature[] =
29161+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29162+static const int glShaderSource_fake_signature[] =
29163+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29164+
29165+static const int glVertexPointer_fake_signature[] =
29166+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29167+TYPE_ARRAY_CHAR };
29168+static const int glNormalPointer_fake_signature[] =
29169+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29170+TYPE_ARRAY_CHAR };
29171+static const int glColorPointer_fake_signature[] =
29172+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29173+TYPE_ARRAY_CHAR };
29174+static const int glSecondaryColorPointer_fake_signature[] =
29175+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29176+TYPE_ARRAY_CHAR };
29177+static const int glIndexPointer_fake_signature[] =
29178+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29179+TYPE_ARRAY_CHAR };
29180+static const int glTexCoordPointer_fake_signature[] =
29181+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29182+TYPE_INT, TYPE_ARRAY_CHAR };
29183+static const int glEdgeFlagPointer_fake_signature[] =
29184+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29185+static const int glVertexAttribPointerARB_fake_signature[] =
29186+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29187+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29188+static const int glVertexAttribPointerNV_fake_signature[] =
29189+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29190+TYPE_INT, TYPE_ARRAY_CHAR };
29191+static const int glWeightPointerARB_fake_signature[] =
29192+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29193+TYPE_ARRAY_CHAR };
29194+static const int glMatrixIndexPointerARB_fake_signature[] =
29195+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29196+TYPE_ARRAY_CHAR };
29197+static const int glFogCoordPointer_fake_signature[] =
29198+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29199+TYPE_ARRAY_CHAR };
29200+static const int glInterleavedArrays_fake_signature[] =
29201+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29202+TYPE_ARRAY_CHAR };
29203+static const int glElementPointerATI_fake_signature[] =
29204+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29205+static const int glVariantPointerEXT_fake_signature[] =
29206+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29207+TYPE_ARRAY_CHAR };
29208+static const int glTuxRacerDrawElements_fake_signature[] =
29209+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29210+static const int glVertexAndNormalPointer_fake_signature[] =
29211+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29212+TYPE_INT, TYPE_ARRAY_CHAR };
29213+static const int glTexCoordPointer01_fake_signature[] =
29214+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29215+TYPE_ARRAY_CHAR };
29216+static const int glTexCoordPointer012_fake_signature[] =
29217+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29218+TYPE_ARRAY_CHAR };
29219+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29220+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29221+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29222+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29223+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29224+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29225+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29226+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29227+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29228+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29229+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29230+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29231+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29232+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29233+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29234+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29235+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29236+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29237+static const int
29238+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29239+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29240+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29241+TYPE_ARRAY_CHAR };
29242+static const int
29243+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29244+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29245+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29246+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29247+static const int
29248+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29249+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29250+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29251+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29252+
29253+static const int glGenTextures_fake_signature[] =
29254+ { TYPE_NONE, 0, 1, TYPE_INT };
29255+static const int glGenBuffersARB_fake_signature[] =
29256+ { TYPE_NONE, 0, 1, TYPE_INT };
29257+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29258+
29259+static const int _glDrawElements_buffer_signature[] =
29260+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29261+static const int _glDrawRangeElements_buffer_signature[] =
29262+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29263+TYPE_INT };
29264+static const int _glMultiDrawElements_buffer_signature[] =
29265+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29266+TYPE_INT };
29267+
29268+static const int _glVertexPointer_buffer_signature[] =
29269+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29270+static const int _glNormalPointer_buffer_signature[] =
29271+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29272+static const int _glColorPointer_buffer_signature[] =
29273+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29274+static const int _glSecondaryColorPointer_buffer_signature[] =
29275+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29276+static const int _glIndexPointer_buffer_signature[] =
29277+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29278+static const int _glTexCoordPointer_buffer_signature[] =
29279+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29280+static const int _glEdgeFlagPointer_buffer_signature[] =
29281+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29282+static const int _glVertexAttribPointerARB_buffer_signature[] =
29283+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29284+TYPE_INT };
29285+static const int _glWeightPointerARB_buffer_signature[] =
29286+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29287+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29288+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29289+static const int _glFogCoordPointer_buffer_signature[] =
29290+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29291+static const int _glVariantPointerEXT_buffer_signature[] =
29292+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29293+
29294+static const int _glReadPixels_pbo_signature[] =
29295+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29296+TYPE_INT, TYPE_INT };
29297+static const int _glDrawPixels_pbo_signature[] =
29298+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29299+static const int _glMapBufferARB_fake_signature[] =
29300+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29301+
29302+static const int _glSelectBuffer_fake_signature[] =
29303+ { TYPE_NONE, 0, 1, TYPE_INT };
29304+static const int _glGetSelectBuffer_fake_signature[] =
29305+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29306+static const int _glFeedbackBuffer_fake_signature[] =
29307+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29308+static const int _glGetFeedbackBuffer_fake_signature[] =
29309+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29310+
29311+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29312+
29313+#define timesynchro_func -1
29314+#define memorize_array_func -2
29315+#define reuse_array_func -3
29316+
29317+#include "gl_func.h"
29318+
29319+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29320+{
29321+ switch (pname) {
29322+ case GL_TEXTURE_MAG_FILTER:
29323+ case GL_TEXTURE_MIN_FILTER:
29324+ case GL_TEXTURE_WRAP_S:
29325+ case GL_TEXTURE_WRAP_T:
29326+ case GL_TEXTURE_PRIORITY:
29327+ case GL_TEXTURE_WRAP_R:
29328+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29329+/* case GL_SHADOW_AMBIENT_SGIX:*/
29330+ case GL_TEXTURE_MIN_LOD:
29331+ case GL_TEXTURE_MAX_LOD:
29332+ case GL_TEXTURE_BASE_LEVEL:
29333+ case GL_TEXTURE_MAX_LEVEL:
29334+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29335+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29336+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29337+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29338+ case GL_GENERATE_MIPMAP:
29339+/* case GL_GENERATE_MIPMAP_SGIS:*/
29340+ case GL_TEXTURE_COMPARE_SGIX:
29341+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29342+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29343+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29344+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29345+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29346+ case GL_TEXTURE_LOD_BIAS:
29347+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29348+ case GL_DEPTH_TEXTURE_MODE:
29349+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29350+ case GL_TEXTURE_COMPARE_MODE:
29351+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29352+ case GL_TEXTURE_COMPARE_FUNC:
29353+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29354+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29355+ return 1;
29356+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29357+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29358+ return 2;
29359+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29360+ return 3;
29361+ case GL_TEXTURE_BORDER_COLOR:
29362+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29363+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29364+ return 4;
29365+ default:
29366+ fprintf(err_file, "unhandled pname = %d\n", pname);
29367+ return 0;
29368+ }
29369+}
29370+
29371+static int __glLight_size(FILE *err_file, GLenum pname)
29372+{
29373+ switch (pname) {
29374+ case GL_AMBIENT:
29375+ case GL_DIFFUSE:
29376+ case GL_SPECULAR:
29377+ case GL_POSITION:
29378+ return 4;
29379+ break;
29380+
29381+ case GL_SPOT_DIRECTION:
29382+ return 3;
29383+ break;
29384+
29385+ case GL_SPOT_EXPONENT:
29386+ case GL_SPOT_CUTOFF:
29387+ case GL_CONSTANT_ATTENUATION:
29388+ case GL_LINEAR_ATTENUATION:
29389+ case GL_QUADRATIC_ATTENUATION:
29390+ return 1;
29391+ break;
29392+
29393+ default:
29394+ fprintf(err_file, "unhandled pname = %d\n", pname);
29395+ return 0;
29396+ }
29397+}
29398+
29399+static int __glMaterial_size(FILE *err_file, GLenum pname)
29400+{
29401+ switch (pname) {
29402+ case GL_AMBIENT:
29403+ case GL_DIFFUSE:
29404+ case GL_SPECULAR:
29405+ case GL_EMISSION:
29406+ case GL_AMBIENT_AND_DIFFUSE:
29407+ return 4;
29408+ break;
29409+
29410+ case GL_SHININESS:
29411+ return 1;
29412+ break;
29413+
29414+ case GL_COLOR_INDEXES:
29415+ return 3;
29416+ break;
29417+
29418+ default:
29419+ fprintf(err_file, "unhandled pname = %d\n", pname);
29420+ return 0;
29421+ }
29422+}
29423+
29424+static inline int compute_arg_length(FILE *err_file, int func_number,
29425+ int arg_i, arg_t *args)
29426+{
29427+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29428+ int *args_type = signature->args_type;
29429+
29430+ switch (func_number) {
29431+ case glProgramNamedParameter4fNV_func:
29432+ case glProgramNamedParameter4dNV_func:
29433+ case glProgramNamedParameter4fvNV_func:
29434+ case glProgramNamedParameter4dvNV_func:
29435+ case glGetProgramNamedParameterfvNV_func:
29436+ case glGetProgramNamedParameterdvNV_func:
29437+ if (arg_i == 2)
29438+ return 1 * args[arg_i - 1] *
29439+ tab_args_type_length[args_type[arg_i]];
29440+ break;
29441+
29442+ case glProgramStringARB_func:
29443+ case glLoadProgramNV_func:
29444+ case glGenProgramsNV_func:
29445+ case glDeleteProgramsNV_func:
29446+ case glGenProgramsARB_func:
29447+ case glDeleteProgramsARB_func:
29448+ case glRequestResidentProgramsNV_func:
29449+ case glDrawBuffers_func:
29450+ case glDrawBuffersARB_func:
29451+ case glDrawBuffersATI_func:
29452+ case glDeleteBuffers_func:
29453+ case glDeleteBuffersARB_func:
29454+ case glDeleteTextures_func:
29455+ case glDeleteTexturesEXT_func:
29456+ case glGenFramebuffersEXT_func:
29457+ case glDeleteFramebuffersEXT_func:
29458+ case glGenRenderbuffersEXT_func:
29459+ case glDeleteRenderbuffersEXT_func:
29460+ case glGenQueries_func:
29461+ case glGenQueriesARB_func:
29462+ case glDeleteQueries_func:
29463+ case glDeleteQueriesARB_func:
29464+ case glGenOcclusionQueriesNV_func:
29465+ case glDeleteOcclusionQueriesNV_func:
29466+ case glGenFencesNV_func:
29467+ case glDeleteFencesNV_func:
29468+ case glUniform1fv_func:
29469+ case glUniform1iv_func:
29470+ case glUniform1fvARB_func:
29471+ case glUniform1ivARB_func:
29472+ case glUniform1uivEXT_func:
29473+ case glVertexAttribs1dvNV_func:
29474+ case glVertexAttribs1fvNV_func:
29475+ case glVertexAttribs1svNV_func:
29476+ case glVertexAttribs1hvNV_func:
29477+ case glWeightbvARB_func:
29478+ case glWeightsvARB_func:
29479+ case glWeightivARB_func:
29480+ case glWeightfvARB_func:
29481+ case glWeightdvARB_func:
29482+ case glWeightubvARB_func:
29483+ case glWeightusvARB_func:
29484+ case glWeightuivARB_func:
29485+ case glPixelMapfv_func:
29486+ case glPixelMapuiv_func:
29487+ case glPixelMapusv_func:
29488+ case glProgramBufferParametersfvNV_func:
29489+ case glProgramBufferParametersIivNV_func:
29490+ case glProgramBufferParametersIuivNV_func:
29491+ case glTransformFeedbackAttribsNV_func:
29492+ case glTransformFeedbackVaryingsNV_func:
29493+ if (arg_i == signature->nb_args - 1)
29494+ return 1 * args[arg_i - 1] *
29495+ tab_args_type_length[args_type[arg_i]];
29496+ break;
29497+
29498+ case glUniform2fv_func:
29499+ case glUniform2iv_func:
29500+ case glUniform2fvARB_func:
29501+ case glUniform2ivARB_func:
29502+ case glUniform2uivEXT_func:
29503+ case glVertexAttribs2dvNV_func:
29504+ case glVertexAttribs2fvNV_func:
29505+ case glVertexAttribs2svNV_func:
29506+ case glVertexAttribs2hvNV_func:
29507+ case glDetailTexFuncSGIS_func:
29508+ case glSharpenTexFuncSGIS_func:
29509+ if (arg_i == signature->nb_args - 1)
29510+ return 2 * args[arg_i - 1] *
29511+ tab_args_type_length[args_type[arg_i]];
29512+ break;
29513+
29514+ case glUniform3fv_func:
29515+ case glUniform3iv_func:
29516+ case glUniform3fvARB_func:
29517+ case glUniform3ivARB_func:
29518+ case glUniform3uivEXT_func:
29519+ case glVertexAttribs3dvNV_func:
29520+ case glVertexAttribs3fvNV_func:
29521+ case glVertexAttribs3svNV_func:
29522+ case glVertexAttribs3hvNV_func:
29523+ if (arg_i == signature->nb_args - 1)
29524+ return 3 * args[arg_i - 1] *
29525+ tab_args_type_length[args_type[arg_i]];
29526+ break;
29527+
29528+ case glUniform4fv_func:
29529+ case glUniform4iv_func:
29530+ case glUniform4fvARB_func:
29531+ case glUniform4ivARB_func:
29532+ case glUniform4uivEXT_func:
29533+ case glVertexAttribs4dvNV_func:
29534+ case glVertexAttribs4fvNV_func:
29535+ case glVertexAttribs4svNV_func:
29536+ case glVertexAttribs4hvNV_func:
29537+ case glVertexAttribs4ubvNV_func:
29538+ case glProgramParameters4fvNV_func:
29539+ case glProgramParameters4dvNV_func:
29540+ case glProgramLocalParameters4fvEXT_func:
29541+ case glProgramEnvParameters4fvEXT_func:
29542+ case glProgramLocalParametersI4ivNV_func:
29543+ case glProgramLocalParametersI4uivNV_func:
29544+ case glProgramEnvParametersI4ivNV_func:
29545+ case glProgramEnvParametersI4uivNV_func:
29546+ if (arg_i == signature->nb_args - 1)
29547+ return 4 * args[arg_i - 1] *
29548+ tab_args_type_length[args_type[arg_i]];
29549+ break;
29550+
29551+ case glPrioritizeTextures_func:
29552+ case glPrioritizeTexturesEXT_func:
29553+ case glAreProgramsResidentNV_func:
29554+ case glAreTexturesResident_func:
29555+ case glAreTexturesResidentEXT_func:
29556+ if (arg_i == 1 || arg_i == 2)
29557+ return args[0] * tab_args_type_length[args_type[arg_i]];
29558+ break;
29559+
29560+ case glLightfv_func:
29561+ case glLightiv_func:
29562+ case glGetLightfv_func:
29563+ case glGetLightiv_func:
29564+ case glFragmentLightfvSGIX_func:
29565+ case glFragmentLightivSGIX_func:
29566+ case glGetFragmentLightfvSGIX_func:
29567+ case glGetFragmentLightivSGIX_func:
29568+ if (arg_i == signature->nb_args - 1)
29569+ return __glLight_size(err_file,
29570+ args[arg_i -
29571+ 1]) *
29572+ tab_args_type_length[args_type[arg_i]];
29573+ break;
29574+
29575+ case glLightModelfv_func:
29576+ case glLightModeliv_func:
29577+ if (arg_i == signature->nb_args - 1)
29578+ return ((args[arg_i - 1] ==
29579+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29580+ tab_args_type_length[args_type[arg_i]];
29581+ break;
29582+
29583+ case glFragmentLightModelfvSGIX_func:
29584+ case glFragmentLightModelivSGIX_func:
29585+ if (arg_i == signature->nb_args - 1)
29586+ return ((args[arg_i - 1] ==
29587+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29588+ tab_args_type_length[args_type[arg_i]];
29589+ break;
29590+
29591+ case glMaterialfv_func:
29592+ case glMaterialiv_func:
29593+ case glGetMaterialfv_func:
29594+ case glGetMaterialiv_func:
29595+ case glFragmentMaterialfvSGIX_func:
29596+ case glFragmentMaterialivSGIX_func:
29597+ case glGetFragmentMaterialfvSGIX_func:
29598+ case glGetFragmentMaterialivSGIX_func:
29599+ if (arg_i == signature->nb_args - 1)
29600+ return __glMaterial_size(err_file,
29601+ args[arg_i -
29602+ 1]) *
29603+ tab_args_type_length[args_type[arg_i]];
29604+ break;
29605+
29606+ case glTexParameterfv_func:
29607+ case glTexParameteriv_func:
29608+ case glGetTexParameterfv_func:
29609+ case glGetTexParameteriv_func:
29610+ case glTexParameterIivEXT_func:
29611+ case glTexParameterIuivEXT_func:
29612+ case glGetTexParameterIivEXT_func:
29613+ case glGetTexParameterIuivEXT_func:
29614+ if (arg_i == signature->nb_args - 1)
29615+ return __glTexParameter_size(err_file,
29616+ args[arg_i -
29617+ 1]) *
29618+ tab_args_type_length[args_type[arg_i]];
29619+ break;
29620+
29621+ case glFogiv_func:
29622+ case glFogfv_func:
29623+ if (arg_i == signature->nb_args - 1)
29624+ return ((args[arg_i - 1] ==
29625+ GL_FOG_COLOR) ? 4 : 1) *
29626+ tab_args_type_length[args_type[arg_i]];
29627+ break;
29628+
29629+ case glTexGendv_func:
29630+ case glTexGenfv_func:
29631+ case glTexGeniv_func:
29632+ case glGetTexGendv_func:
29633+ case glGetTexGenfv_func:
29634+ case glGetTexGeniv_func:
29635+ if (arg_i == signature->nb_args - 1)
29636+ return ((args[arg_i - 1] ==
29637+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29638+ tab_args_type_length[args_type[arg_i]];
29639+ break;
29640+
29641+ case glTexEnvfv_func:
29642+ case glTexEnviv_func:
29643+ case glGetTexEnvfv_func:
29644+ case glGetTexEnviv_func:
29645+ if (arg_i == signature->nb_args - 1)
29646+ return ((args[arg_i - 1] ==
29647+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29648+ tab_args_type_length[args_type[arg_i]];
29649+ break;
29650+
29651+ case glConvolutionParameterfv_func:
29652+ case glConvolutionParameteriv_func:
29653+ case glGetConvolutionParameterfv_func:
29654+ case glGetConvolutionParameteriv_func:
29655+ case glConvolutionParameterfvEXT_func:
29656+ case glConvolutionParameterivEXT_func:
29657+ case glGetConvolutionParameterfvEXT_func:
29658+ case glGetConvolutionParameterivEXT_func:
29659+ if (arg_i == signature->nb_args - 1)
29660+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29661+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29662+ args[arg_i - 1] ==
29663+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29664+ tab_args_type_length[args_type[arg_i]];
29665+ break;
29666+
29667+ case glGetVertexAttribfvARB_func:
29668+ case glGetVertexAttribfvNV_func:
29669+ case glGetVertexAttribfv_func:
29670+ case glGetVertexAttribdvARB_func:
29671+ case glGetVertexAttribdvNV_func:
29672+ case glGetVertexAttribdv_func:
29673+ case glGetVertexAttribivARB_func:
29674+ case glGetVertexAttribivNV_func:
29675+ case glGetVertexAttribiv_func:
29676+ case glGetVertexAttribIivEXT_func:
29677+ case glGetVertexAttribIuivEXT_func:
29678+ if (arg_i == signature->nb_args - 1)
29679+ return ((args[arg_i - 1] ==
29680+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29681+ tab_args_type_length[args_type[arg_i]];
29682+ break;
29683+
29684+
29685+ case glPointParameterfv_func:
29686+ case glPointParameterfvEXT_func:
29687+ case glPointParameterfvARB_func:
29688+ case glPointParameterfvSGIS_func:
29689+ case glPointParameteriv_func:
29690+ case glPointParameterivEXT_func:
29691+ if (arg_i == signature->nb_args - 1)
29692+ return ((args[arg_i - 1] ==
29693+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29694+ tab_args_type_length[args_type[arg_i]];
29695+ break;
29696+
29697+ case glUniformMatrix2fv_func:
29698+ case glUniformMatrix2fvARB_func:
29699+ if (arg_i == signature->nb_args - 1)
29700+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29701+ break;
29702+
29703+ case glUniformMatrix3fv_func:
29704+ case glUniformMatrix3fvARB_func:
29705+ if (arg_i == signature->nb_args - 1)
29706+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29707+ break;
29708+
29709+ case glUniformMatrix4fv_func:
29710+ case glUniformMatrix4fvARB_func:
29711+ if (arg_i == signature->nb_args - 1)
29712+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29713+ break;
29714+
29715+ case glUniformMatrix2x3fv_func:
29716+ case glUniformMatrix3x2fv_func:
29717+ if (arg_i == signature->nb_args - 1)
29718+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29719+ break;
29720+
29721+ case glUniformMatrix2x4fv_func:
29722+ case glUniformMatrix4x2fv_func:
29723+ if (arg_i == signature->nb_args - 1)
29724+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29725+ break;
29726+
29727+ case glUniformMatrix3x4fv_func:
29728+ case glUniformMatrix4x3fv_func:
29729+ if (arg_i == signature->nb_args - 1)
29730+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29731+ break;
29732+
29733+ case glSpriteParameterivSGIX_func:
29734+ case glSpriteParameterfvSGIX_func:
29735+ if (arg_i == signature->nb_args - 1)
29736+ return ((args[arg_i - 1] ==
29737+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29738+ tab_args_type_length[args_type[arg_i]];
29739+ break;
29740+
29741+ default:
29742+ break;
29743+ }
29744+
29745+ fprintf(err_file,
29746+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29747+ func_number, arg_i);
29748+ return 0;
29749+}
29750+
29751+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29752+ (func_number == glBitmap_func || \
29753+ func_number == _send_cursor_func || \
29754+ func_number == glTexImage1D_func || \
29755+ func_number == glTexImage2D_func || \
29756+ func_number == glTexImage3D_func || \
29757+ func_number == glBufferDataARB_func || \
29758+ func_number == glNewObjectBufferATI_func)
29759+
29760+#ifdef __amd64__
29761+#define _init_func _init64_func
29762+#else
29763+#ifdef __i386__
29764+#define _init_func _init32_func
29765+#else
29766+#error Unsupported ABI
29767+#endif
29768+#endif
29769Index: qemu-0.12.4/target-i386/opengl_player.c
29770===================================================================
29771--- /dev/null
29772+++ qemu-0.12.4/target-i386/opengl_player.c
29773@@ -0,0 +1,1461 @@
29774+/*
29775+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29776+ *
29777+ * Copyright (c) 2007 Even Rouault
29778+ *
29779+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29780+ * of this software and associated documentation files (the "Software"), to deal
29781+ * in the Software without restriction, including without limitation the rights
29782+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29783+ * copies of the Software, and to permit persons to whom the Software is
29784+ * furnished to do so, subject to the following conditions:
29785+ *
29786+ * The above copyright notice and this permission notice shall be included in
29787+ * all copies or substantial portions of the Software.
29788+ *
29789+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29790+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29791+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29792+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29793+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29794+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29795+ * THE SOFTWARE.
29796+ */
29797+
29798+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29799+
29800+#include <stdlib.h>
29801+#include <stdio.h>
29802+#include <string.h>
29803+#include <assert.h>
29804+#include <unistd.h>
29805+#include <sys/time.h>
29806+#include <math.h>
29807+
29808+#include <GL/gl.h>
29809+#include <X11/Xlib.h>
29810+
29811+// TODO
29812+typedef long unsigned int target_phys_addr_t;
29813+
29814+#include "opengl_func.h"
29815+#include "opengl_utils.h"
29816+
29817+//#include "ffmpeg/avcodec.h"
29818+
29819+extern void init_process_tab(void);
29820+extern int do_function_call(int, arg_t *, char *);
29821+
29822+void do_disconnect_current(void);
29823+void do_context_switch(Display *dpy, pid_t pid, int call);
29824+
29825+typedef struct {
29826+ int n_used;
29827+ unsigned int crc;
29828+ int size;
29829+ long long last_use;
29830+} RecordBufferedArray;
29831+
29832+typedef struct {
29833+ int size;
29834+ long file_offset;
29835+} ReplayBufferedArray;
29836+
29837+#define N_BUFFERED_ARRAYS 1024
29838+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29839+
29840+#define INSTR_WINDOW_SIZE 65536
29841+short instrWindow[INSTR_WINDOW_SIZE];
29842+int instrWindowCount = 0;
29843+int instrWindowPtr = 0;
29844+int instrWindowBeginPtr = 0;
29845+
29846+#include "ghash.c"
29847+
29848+#define PRIME 131
29849+
29850+typedef struct {
29851+ int iFirstOccur;
29852+ int nbOccur;
29853+ int hash;
29854+} SeqDesc;
29855+
29856+typedef struct {
29857+ int hash;
29858+ int offset;
29859+} HashElt;
29860+
29861+int sort_hash_N;
29862+short *sort_hash_tab;
29863+int count_compar;
29864+int collision_detected;
29865+
29866+static int sort_hash(const void *ptrA, const void *ptrB)
29867+{
29868+ const HashElt *a = (const HashElt *) ptrA;
29869+ const HashElt *b = (const HashElt *) ptrB;
29870+
29871+ count_compar++;
29872+ if (a->hash == b->hash) {
29873+ int j;
29874+
29875+ for (j = 0; j < sort_hash_N; j++) {
29876+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29877+ collision_detected = 1;
29878+ // fprintf(stderr, "collision de hash !\n");
29879+ return sort_hash_tab[a->offset + j] <
29880+ sort_hash_tab[b->offset + j] ? -1 : 1;
29881+ }
29882+ }
29883+ return a->offset - b->offset;
29884+ } else if (a->hash < b->hash)
29885+ return -1;
29886+ else
29887+ return 1;
29888+}
29889+
29890+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29891+{
29892+ const SeqDesc *a = (const SeqDesc *) ptrA;
29893+ const SeqDesc *b = (const SeqDesc *) ptrB;
29894+
29895+ return b->nbOccur - a->nbOccur;
29896+}
29897+
29898+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29899+{
29900+ const SeqDesc *a = (const SeqDesc *) ptrA;
29901+ const SeqDesc *b = (const SeqDesc *) ptrB;
29902+
29903+ return a->iFirstOccur - b->iFirstOccur;
29904+}
29905+
29906+void find_repeated_seq(short *tab, int iStart, int length)
29907+{
29908+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29909+ int N = 10;
29910+ int i;
29911+ int hash = 0;
29912+ int primeN = 1;
29913+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29914+
29915+ short *new_tab = malloc(sizeof(short) * length);
29916+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29917+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29918+ tab = new_tab;
29919+
29920+ sort_hash_N = N;
29921+ sort_hash_tab = tab;
29922+
29923+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29924+ for (i = 0; i < N; i++) {
29925+ primeN *= PRIME;
29926+ }
29927+ for (i = 0; i < length; i++) {
29928+ hash = hash * PRIME + tab[i];
29929+ if (i >= N) {
29930+ hash -= tab[i - N] * primeN;
29931+ }
29932+ if (i >= N - 1) {
29933+ tabHash[i - (N - 1)].offset = i - (N - 1);
29934+ tabHash[i - (N - 1)].hash =
29935+ /* (i == 100) ? tabHash[0].hash : */ hash;
29936+#if 0
29937+ void **p_n_occurences =
29938+ simple_hash_table_lookup_pointer(tableHash, hash);
29939+ if (p_n_occurences == NULL) {
29940+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29941+
29942+ seqDesc->iFirstOccur = i - (N - 1);
29943+ seqDesc->nbOccur = 1;
29944+ simple_hash_table_insert(tableHash, hash, seqDesc);
29945+ } else {
29946+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29947+ int j;
29948+
29949+ for (j = 0; j < N; j++) {
29950+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29951+ tab[(iStart + i - (N - 1) + j) % length])
29952+ break;
29953+ }
29954+ if (j != N)
29955+ fprintf(stderr, "arg\n");
29956+ seqDesc->nbOccur++;
29957+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29958+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29959+ // seqDesc->nbOccur);
29960+ }
29961+#endif
29962+ }
29963+ }
29964+ collision_detected = 0;
29965+ count_compar = 0;
29966+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29967+ if (!collision_detected) {
29968+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29969+ int nbSeqDesc = 0;
29970+ int lastI = 0;
29971+ int prevHash = tabHash[0].hash;
29972+
29973+ for (i = 1; i < length - N + 1; i++) {
29974+ if (tabHash[i].hash != prevHash) {
29975+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29976+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29977+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29978+ nbSeqDesc++;
29979+ lastI = i;
29980+ prevHash = tabHash[i].hash;
29981+ }
29982+ }
29983+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29984+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29985+ nbSeqDesc++;
29986+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29987+ for (i = 0; i < nbSeqDesc; i++) {
29988+ if (tabSeqDesc[i].nbOccur < 10)
29989+ break;
29990+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29991+ // tabSeqDesc[i].nbOccur);
29992+ }
29993+ nbSeqDesc = i;
29994+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29995+ sort_seq_desc_by_offset);
29996+ lastI = tabSeqDesc[0].iFirstOccur;
29997+ int maxI = 0;
29998+ int j = 0;
29999+
30000+ for (i = 1; i < nbSeqDesc; i++) {
30001+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
30002+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
30003+ maxI = i;
30004+ }
30005+ } else {
30006+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
30007+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
30008+ j++;
30009+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
30010+ lastI = tabSeqDesc[maxI].iFirstOccur;
30011+ while (i < nbSeqDesc &&
30012+ tabSeqDesc[i].iFirstOccur - lastI <= N)
30013+ i++;
30014+ if (i == nbSeqDesc)
30015+ break;
30016+ maxI = i;
30017+ }
30018+ }
30019+ nbSeqDesc = j;
30020+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
30021+ for (i = 0; i < nbSeqDesc; i++) {
30022+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
30023+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
30024+ tabSeqDesc[i].hash);
30025+ for (j = 0; j < N; j++)
30026+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
30027+ fprintf(stderr, "\n");
30028+ }
30029+ free(tabSeqDesc);
30030+ } else {
30031+ fprintf(stderr, "collision de hash !\n");
30032+ }
30033+
30034+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
30035+ count_compar);
30036+ // simple_hash_table_foreach(tableHash,
30037+ free(tabHash);
30038+ free(tab);
30039+#if 0
30040+ simple_hash_table_destroy(tableHash);
30041+#endif
30042+#if 0
30043+ int i, j, k;
30044+
30045+ for (i = 0; i < length; i++) {
30046+ int nMaxContiguous = 0;
30047+ int jMax = 0;
30048+
30049+ for (j = 0; j < length; j++) {
30050+ int nContiguous = 0;
30051+
30052+ for (k = 0; k < j - i; k++) {
30053+ if (tab[(iStart + i + k) % length] ==
30054+ tab[(iStart + i + j + k) % length]) {
30055+ nContiguous++;
30056+ } else
30057+ break;
30058+ }
30059+ if (nContiguous >= nMaxContiguous) {
30060+ nMaxContiguous = nContiguous;
30061+ jMax = j;
30062+ }
30063+ }
30064+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
30065+ iStart, i, i + jMax, nMaxContiguous);
30066+ }
30067+#endif
30068+}
30069+
30070+#define MAX_SERVER_STATE_STACK_SIZE 16
30071+
30072+typedef struct {
30073+ GLbitfield mask;
30074+ int matrixMode;
30075+ int lastMatrixOp;
30076+} ServerState;
30077+
30078+typedef struct {
30079+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
30080+ int stackAttribPtr;
30081+ int matrixMode;
30082+ int lastMatrixOp;
30083+} GLState;
30084+
30085+#define NB_STATES 100
30086+GLState states[NB_STATES];
30087+
30088+void usage()
30089+{
30090+ printf("Usage : opengl_player [OPTION] filename\n\n");
30091+ printf
30092+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
30093+ printf("'-' is supported and stands for standard input\n\n");
30094+ printf("The following options are available :\n");
30095+ printf
30096+ ("--debug : output debugging trace on stderr\n");
30097+ printf("--disable-real-time-play-back : play as fast as possible\n");
30098+ printf
30099+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
30100+ printf("--h or --help : display this help\n");
30101+}
30102+
30103+int main(int argc, char *argv[])
30104+{
30105+ static int args_size[50];
30106+ int i;
30107+ int visualid_fbconfig_read = -1;
30108+ int visualid_fbconfig_real = 0;
30109+ char *filename = "/tmp/debug_gl.bin";
30110+ int slowdown = 0;
30111+ int debug = 0;
30112+ char *ret_string;
30113+ arg_t args[50];
30114+ struct timeval start_time, last_time, current_time;
30115+ int noplay = 0;
30116+ int count_last_time = 0, count_current = 0;
30117+ int refresh_rate = 500;
30118+ int disable_real_time_play_back = 0;
30119+ int show_hard_disk_bandwith = 0;
30120+ int last_offset = 0;
30121+ int resize = 0;
30122+ int window_width = 0, window_height = 0;
30123+ int orig_window_width = 0;
30124+ int show_offset = 0;
30125+ int show_diff_offset = 0;
30126+ int last_cmd_offset = 0;
30127+ FILE *compressed_file = NULL;
30128+ int sizeBufferedArraysPlay = 0;
30129+ ReplayBufferedArray *replayBufferedArrays = NULL;
30130+ int currentState = 0;
30131+
30132+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30133+ memset(states, 0, sizeof(states));
30134+ for (i = 0; i < NB_STATES; i++) {
30135+ states[i].matrixMode = GL_MODELVIEW;
30136+ states[i].lastMatrixOp = -1;
30137+ }
30138+
30139+ /* avcodec_init(); AVCodec* avCodec =
30140+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30141+ * avCodecContext = avcodec_alloc_context(); */
30142+
30143+ for (i = 1; i < argc; i++) {
30144+ if (argv[i][0] == '-' && argv[i][1] == '-')
30145+ argv[i] = argv[i] + 1;
30146+
30147+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30148+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30149+ } else if (strcmp(argv[i], "-noplay") == 0) {
30150+ noplay = 1;
30151+ } else if (strcmp(argv[i], "-debug") == 0) {
30152+ debug = 1;
30153+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30154+ disable_real_time_play_back = 1;
30155+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30156+ show_hard_disk_bandwith = 1;
30157+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30158+ show_offset = 1;
30159+ } else
30160+ if (strncmp
30161+ (argv[i], "-show-diff-offset",
30162+ strlen("-show-diff-offset")) == 0) {
30163+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30164+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30165+ window_width = atoi(argv[i] + strlen("-width="));
30166+ resize = 1;
30167+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30168+ == 0) {
30169+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30170+ } else
30171+ if (strncmp
30172+ (argv[i], "-output-compressed-filename=",
30173+ strlen("-output-compressed-filename=")) == 0) {
30174+ char *compressed_filename =
30175+ argv[i] + strlen("-output-compressed-filename=");
30176+ compressed_file = fopen(compressed_filename, "wb");
30177+ } else if (strcmp(argv[i], "-") == 0) {
30178+ filename = NULL;
30179+ } else if (strcmp(argv[i], "-h") == 0 ||
30180+ strcmp(argv[i], "-help") == 0) {
30181+ usage();
30182+ return 0;
30183+ } else
30184+ filename = argv[i];
30185+ }
30186+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30187+
30188+ if (f == NULL) {
30189+ fprintf(stderr, "cannot open %s\n", filename);
30190+ return 0;
30191+ }
30192+ // FILE* fout = fopen("/tmp/raw", "wb");
30193+
30194+ init_process_tab();
30195+ ret_string = malloc(32768);
30196+
30197+ gettimeofday(&start_time, NULL);
30198+ gettimeofday(&last_time, NULL);
30199+
30200+// void* buffer= NULL;
30201+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30202+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30203+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30204+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30205+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30206+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30207+
30208+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30209+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30210+
30211+ long long instr_count = 0;
30212+
30213+ while (1) {
30214+ short func_number;
30215+ short memorize_array_play = -1;
30216+ short reuse_array_play = -1;
30217+
30218+ begin:
30219+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30220+ break;
30221+ if (func_number == _exit_process_func)
30222+ break;
30223+
30224+ if (func_number == _serialized_calls_func) {
30225+ continue;
30226+ }
30227+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30228+
30229+ /*
30230+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30231+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30232+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30233+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30234+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30235+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30236+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30237+
30238+ /* -1 is special code that indicates time synchro */
30239+ if (func_number == timesynchro_func) {
30240+ long long ts_file;
30241+ fread(&ts_file, sizeof(long long), 1, f);
30242+
30243+ if (compressed_file) {
30244+ WRITE_SHORT(timesynchro_func);
30245+ WRITE_LONGLONG(ts_file);
30246+ }
30247+
30248+ if (!disable_real_time_play_back) {
30249+ gettimeofday(&current_time, NULL);
30250+ long long ts_real =
30251+ (current_time.tv_sec -
30252+ start_time.tv_sec) * (long long) 1000000 +
30253+ current_time.tv_usec - start_time.tv_usec;
30254+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30255+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30256+ /* we're playing too fast */
30257+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30258+ // ts_real));
30259+ usleep((int) (ts_file - ts_real));
30260+ }
30261+ }
30262+ continue;
30263+ } else if (func_number == memorize_array_func) {
30264+ fread(&memorize_array_play, sizeof(short), 1, f);
30265+ goto begin;
30266+ } else if (func_number == reuse_array_func) {
30267+ fread(&reuse_array_play, sizeof(short), 1, f);
30268+ goto begin;
30269+ }
30270+
30271+ assert(func_number >= 0);
30272+
30273+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30274+ int nb_args = signature->nb_args;
30275+ int *args_type = signature->args_type;
30276+
30277+ for (i = 0; i < nb_args; i++) {
30278+ switch (args_type[i]) {
30279+#if 0
30280+ case TYPE_UNSIGNED_CHAR:
30281+ case TYPE_CHAR:
30282+ {
30283+ char c;
30284+
30285+ fread(&c, sizeof(c), 1, f);
30286+ args[i] = c;
30287+ break;
30288+ }
30289+
30290+ case TYPE_UNSIGNED_SHORT:
30291+ case TYPE_SHORT:
30292+ {
30293+ short s;
30294+
30295+ fread(&s, sizeof(s), 1, f);
30296+ args[i] = s;
30297+ break;
30298+ }
30299+
30300+ case TYPE_FLOAT:
30301+ fread(&args[i], sizeof(int), 1, f);
30302+ break;
30303+
30304+#endif
30305+ case TYPE_UNSIGNED_CHAR:
30306+ case TYPE_CHAR:
30307+ case TYPE_UNSIGNED_INT:
30308+ case TYPE_INT:
30309+ case TYPE_UNSIGNED_SHORT:
30310+ case TYPE_SHORT:
30311+ case TYPE_FLOAT:
30312+ {
30313+ int n;
30314+ fread(&n, sizeof(int), 1, f);
30315+ args[i] = n;
30316+ break;
30317+ }
30318+
30319+ case TYPE_NULL_TERMINATED_STRING:
30320+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30321+ fread(&args_size[i], sizeof(int), 1, f);
30322+ if (args_size[i]) {
30323+ args[i] = (long) malloc(args_size[i]);
30324+ fread((void *) args[i], args_size[i], 1, f);
30325+ } else {
30326+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30327+ fprintf(stderr, "call %s arg %d\n",
30328+ tab_opengl_calls_name[func_number], i);
30329+ }
30330+ args[i] = 0;
30331+ }
30332+ if (reuse_array_play >= 0) {
30333+ long current_pos = ftell(f);
30334+
30335+ args_size[i] =
30336+ replayBufferedArrays[reuse_array_play].size;
30337+ args[i] = (long) malloc(args_size[i]);
30338+ fseek(f,
30339+ replayBufferedArrays[reuse_array_play].file_offset,
30340+ SEEK_SET);
30341+ fread((void *) args[i], args_size[i], 1, f);
30342+ fseek(f, current_pos, SEEK_SET);
30343+ }
30344+ if (memorize_array_play >= 0) {
30345+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30346+ if (memorize_array_play == sizeBufferedArraysPlay) {
30347+ sizeBufferedArraysPlay++;
30348+ replayBufferedArrays =
30349+ realloc(replayBufferedArrays,
30350+ sizeBufferedArraysPlay *
30351+ sizeof(ReplayBufferedArray));
30352+ replayBufferedArrays[sizeBufferedArraysPlay -
30353+ 1].file_offset = 0;
30354+ }
30355+ replayBufferedArrays[memorize_array_play].file_offset =
30356+ ftell(f) - args_size[i];
30357+ replayBufferedArrays[memorize_array_play].size =
30358+ args_size[i];
30359+ }
30360+ break;
30361+
30362+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30363+ {
30364+ args_size[i] =
30365+ compute_arg_length(stderr, func_number, i, args);
30366+ args[i] =
30367+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30368+ fread((void *) args[i], args_size[i], 1, f);
30369+ break;
30370+ }
30371+
30372+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30373+ {
30374+ args_size[i] =
30375+ compute_arg_length(stderr, func_number, i, args);
30376+ args[i] = (long) malloc(args_size[i]);
30377+ break;
30378+ }
30379+
30380+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30381+ {
30382+ fread(&args_size[i], sizeof(int), 1, f);
30383+ if (args_size[i]) {
30384+ args[i] = (long) malloc(args_size[i]);
30385+ } else {
30386+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30387+ fprintf(stderr, "call %s arg %d\n",
30388+ tab_opengl_calls_name[func_number], i);
30389+ }
30390+ args[i] = 0;
30391+ }
30392+ break;
30393+ }
30394+
30395+ CASE_OUT_KNOWN_SIZE_POINTERS:
30396+ {
30397+ args_size[i] = tab_args_type_length[args_type[i]];
30398+ assert(args_size[i]);
30399+ args[i] = (long) malloc(args_size[i]);
30400+ break;
30401+ }
30402+
30403+ case TYPE_DOUBLE:
30404+ CASE_IN_KNOWN_SIZE_POINTERS:
30405+ args_size[i] = tab_args_type_length[args_type[i]];
30406+ args[i] = (long) malloc(args_size[i]);
30407+ fread((void *) args[i], args_size[i], 1, f);
30408+ break;
30409+
30410+ case TYPE_IN_IGNORED_POINTER:
30411+ args[i] = 0;
30412+ break;
30413+
30414+ default:
30415+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30416+ tab_opengl_calls_name[func_number], i);
30417+ do_disconnect_current();
30418+ return 0;
30419+ }
30420+ }
30421+ if (debug)
30422+ display_gl_call(stderr, func_number, args, args_size);
30423+
30424+ if (debug && reuse_array_play != -1)
30425+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30426+ if (debug && memorize_array_play != -1)
30427+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30428+
30429+ if (compressed_file) {
30430+ int reuse_array = -1;
30431+ int memorize_array = -1;
30432+ void *ptr = NULL;
30433+ int bytes_size = 0;
30434+ int do_default = 1;
30435+
30436+ switch (func_number) {
30437+ case glXMakeCurrent_func:
30438+ {
30439+ currentState = args[2];
30440+ assert(currentState >= 0 && currentState < NB_STATES);
30441+ break;
30442+ }
30443+
30444+ case glMatrixMode_func:
30445+ {
30446+ if (states[currentState].matrixMode == args[0]) {
30447+ do_default = 0;
30448+ } else {
30449+ states[currentState].matrixMode = args[0];
30450+ }
30451+ break;
30452+ }
30453+
30454+ case glLoadIdentity_func:
30455+ case glLoadMatrixd_func:
30456+ case glLoadMatrixf_func:
30457+ case glMultMatrixd_func:
30458+ case glMultMatrixf_func:
30459+ case glOrtho_func:
30460+ case glFrustum_func:
30461+ case glRotated_func:
30462+ case glRotatef_func:
30463+ case glScaled_func:
30464+ case glScalef_func:
30465+ case glTranslated_func:
30466+ case glTranslatef_func:
30467+ case glPushMatrix_func:
30468+ case glPopMatrix_func:
30469+ {
30470+ if (states[currentState].matrixMode == 5890) {
30471+ if (states[currentState].lastMatrixOp ==
30472+ glLoadIdentity_func &&
30473+ func_number == glLoadIdentity_func) {
30474+ do_default = 0;
30475+ }
30476+ states[currentState].lastMatrixOp = func_number;
30477+ }
30478+ break;
30479+ }
30480+
30481+ case glPushAttrib_func:
30482+ {
30483+ if (states[currentState].stackAttribPtr <
30484+ MAX_SERVER_STATE_STACK_SIZE) {
30485+ int mask = args[0];
30486+
30487+ states[currentState].stackAttrib[states[currentState].
30488+ stackAttribPtr].
30489+ mask = mask;
30490+ if (mask & GL_TRANSFORM_BIT) {
30491+ states[currentState].
30492+ stackAttrib[states[currentState].
30493+ stackAttribPtr].matrixMode =
30494+ states[currentState].matrixMode;
30495+ states[currentState].
30496+ stackAttrib[states[currentState].
30497+ stackAttribPtr].lastMatrixOp =
30498+ states[currentState].lastMatrixOp;
30499+ }
30500+ states[currentState].stackAttribPtr++;
30501+ }
30502+ break;
30503+ }
30504+
30505+ case glPopAttrib_func:
30506+ {
30507+ if (states[currentState].stackAttribPtr > 0) {
30508+ --states[currentState].stackAttribPtr;
30509+ if (states[currentState].
30510+ stackAttrib[states[currentState].stackAttribPtr].
30511+ mask & GL_TRANSFORM_BIT) {
30512+ states[currentState].matrixMode =
30513+ states[currentState].
30514+ stackAttrib[states[currentState].
30515+ stackAttribPtr].matrixMode;
30516+ states[currentState].lastMatrixOp =
30517+ states[currentState].
30518+ stackAttrib[states[currentState].
30519+ stackAttribPtr].lastMatrixOp;
30520+ }
30521+ }
30522+ break;
30523+ }
30524+
30525+ case glBufferDataARB_func:
30526+ {
30527+ ptr = (void *) args[2];
30528+ bytes_size = args_size[2];
30529+ break;
30530+ }
30531+
30532+ case glVertexPointer_fake_func:
30533+ case glTexCoordPointer_fake_func:
30534+ case glTexCoordPointer01_fake_func:
30535+ case glDrawElements_func:
30536+ {
30537+ ptr = (void *) args[nb_args - 1];
30538+ bytes_size = args_size[nb_args - 1];
30539+ break;
30540+ }
30541+
30542+ default:
30543+ break;
30544+ }
30545+
30546+ if (ptr) {
30547+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30548+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30549+ int iMinUsed = -1;
30550+
30551+ instr_count++;
30552+
30553+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30554+ if (recordBufferedArrays[i].crc == crc) {
30555+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30556+ // crc);
30557+ reuse_array = i;
30558+ // fprintf(stderr, "reuse_array %d\n", i);
30559+ recordBufferedArrays[i].n_used++;
30560+ recordBufferedArrays[i].last_use = instr_count;
30561+ break;
30562+ } else if (recordBufferedArrays[i].n_used == 0) {
30563+ // fprintf(stderr, "memorize_array %d\n", i);
30564+ memorize_array = i;
30565+ recordBufferedArrays[i].n_used = 1;
30566+ recordBufferedArrays[i].crc = crc;
30567+ recordBufferedArrays[i].size = bytes_size;
30568+ recordBufferedArrays[i].last_use = instr_count;
30569+ break;
30570+ } else {
30571+ long long interest =
30572+ N_BUFFERED_ARRAYS *
30573+ recordBufferedArrays[i].n_used / (instr_count -
30574+ recordBufferedArrays
30575+ [i].
30576+ last_use)
30577+ /** recordBufferedArrays[i].size*/ ;
30578+ if (interest < minInterest) {
30579+ iMinUsed = i;
30580+ minInterest = interest;
30581+ }
30582+ }
30583+ }
30584+ static unsigned int *discardedCrcs = NULL;
30585+ static int nDiscardedCrcs = 0;
30586+
30587+ if (i == N_BUFFERED_ARRAYS) {
30588+ int j;
30589+
30590+ for (j = 0; j < nDiscardedCrcs; j++) {
30591+ if (discardedCrcs[j] == crc) {
30592+ fprintf(stderr,
30593+ "%x was discarded before and is asked now...\n",
30594+ crc);
30595+ discardedCrcs[j] =
30596+ recordBufferedArrays[iMinUsed].crc;
30597+ break;
30598+ }
30599+ }
30600+ if (j == nDiscardedCrcs) {
30601+ discardedCrcs =
30602+ realloc(discardedCrcs,
30603+ sizeof(int) * (nDiscardedCrcs + 1));
30604+ discardedCrcs[nDiscardedCrcs++] =
30605+ recordBufferedArrays[iMinUsed].crc;
30606+ }
30607+ fprintf(stderr, "discarding %x\n",
30608+ recordBufferedArrays[iMinUsed].crc);
30609+
30610+ memorize_array = iMinUsed;
30611+ recordBufferedArrays[iMinUsed].n_used = 1;
30612+ recordBufferedArrays[iMinUsed].crc = crc;
30613+ recordBufferedArrays[iMinUsed].size = bytes_size;
30614+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30615+ }
30616+
30617+ if (reuse_array != -1) {
30618+ WRITE_SHORT(reuse_array_func);
30619+ WRITE_SHORT(reuse_array);
30620+ } else if (memorize_array != -1) {
30621+ WRITE_SHORT(memorize_array_func);
30622+ WRITE_SHORT(memorize_array);
30623+ }
30624+ }
30625+
30626+ switch (func_number) {
30627+ case glXChooseVisual_func:
30628+ case glXQueryVersion_func:
30629+ case glXQueryExtension_func:
30630+ case glXGetClientString_func:
30631+ case glXQueryExtensionsString_func:
30632+ case glXQueryServerString_func:
30633+ case glXGetProcAddress_fake_func:
30634+ case glXGetProcAddress_global_fake_func:
30635+ case glXGetConfig_func:
30636+ case glXGetConfig_extended_func:
30637+ case glGetIntegerv_func:
30638+ case glGetFloatv_func:
30639+ case glGetBooleanv_func:
30640+ case glGetDoublev_func:
30641+ case glIsEnabled_func:
30642+ case _glGetError_fake_func:
30643+ case glGetString_func:
30644+ {
30645+ do_default = 0;
30646+ break;
30647+ }
30648+
30649+ case glLoadMatrixd_func:
30650+ {
30651+ int j;
30652+
30653+ WRITE_SHORT(glLoadMatrixf_func);
30654+ double *ptr = (double *) args[0];
30655+
30656+ for (j = 0; j < 16; j++) {
30657+ WRITE_FLOAT(ptr[j]);
30658+ }
30659+ do_default = 0;
30660+ break;
30661+ }
30662+
30663+ case glMultMatrixd_func:
30664+ {
30665+ int j;
30666+
30667+ WRITE_SHORT(glMultMatrixf_func);
30668+ double *ptr = (double *) args[0];
30669+
30670+ for (j = 0; j < 16; j++) {
30671+ WRITE_FLOAT(ptr[j]);
30672+ }
30673+ do_default = 0;
30674+ break;
30675+ }
30676+
30677+ case glTranslated_func:
30678+ {
30679+ WRITE_SHORT(glTranslatef_func);
30680+ WRITE_FLOAT(*(double *) args[0]);
30681+ WRITE_FLOAT(*(double *) args[1]);
30682+ WRITE_FLOAT(*(double *) args[2]);
30683+ do_default = 0;
30684+ break;
30685+ }
30686+
30687+ case glScalef_func:
30688+ {
30689+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30690+ && *(float *) &args[2] == 1)
30691+ do_default = 0;
30692+ break;
30693+ }
30694+
30695+ case glScaled_func:
30696+ {
30697+ if (!
30698+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30699+ && *(double *) args[2] == 1)) {
30700+ WRITE_SHORT(glScalef_func);
30701+ WRITE_FLOAT(*(double *) args[0]);
30702+ WRITE_FLOAT(*(double *) args[1]);
30703+ WRITE_FLOAT(*(double *) args[2]);
30704+ }
30705+ do_default = 0;
30706+ break;
30707+ }
30708+
30709+ case glRotated_func:
30710+ {
30711+ WRITE_SHORT(glRotatef_func);
30712+ WRITE_FLOAT(*(double *) args[0]);
30713+ WRITE_FLOAT(*(double *) args[1]);
30714+ WRITE_FLOAT(*(double *) args[2]);
30715+ WRITE_FLOAT(*(double *) args[3]);
30716+ do_default = 0;
30717+ break;
30718+ }
30719+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30720+
30721+ case glRasterPos2i_func:
30722+ {
30723+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30724+ WRITE_SHORT(glRasterPos2s_func);
30725+ WRITE_SHORT(args[0]);
30726+ WRITE_SHORT(args[1]);
30727+ do_default = 0;
30728+ }
30729+ break;
30730+ }
30731+
30732+ case glVertex2i_func:
30733+ {
30734+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30735+ WRITE_SHORT(glVertex2s_func);
30736+ WRITE_SHORT(args[0]);
30737+ WRITE_SHORT(args[1]);
30738+ do_default = 0;
30739+ }
30740+ break;
30741+ }
30742+
30743+ case glTexCoord2i_func:
30744+ {
30745+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30746+ WRITE_SHORT(glTexCoord2s_func);
30747+ WRITE_SHORT(args[0]);
30748+ WRITE_SHORT(args[1]);
30749+ do_default = 0;
30750+ }
30751+ break;
30752+ }
30753+
30754+ case glTexCoord2fv_func:
30755+ {
30756+ float *ptr = (float *) args[0];
30757+ float u = ptr[0];
30758+ float v = ptr[1];
30759+
30760+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30761+ int ui = (int) u;
30762+ int vi = (int) v;
30763+
30764+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30765+ WRITE_SHORT(glTexCoord2s_func);
30766+ WRITE_SHORT(ui);
30767+ WRITE_SHORT(vi);
30768+ do_default = 0;
30769+ }
30770+ }
30771+ break;
30772+ }
30773+
30774+ case glTexCoord2f_func:
30775+ {
30776+ float u = *(float *) &args[0];
30777+ float v = *(float *) &args[1];
30778+
30779+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30780+ int ui = (int) u;
30781+ int vi = (int) v;
30782+
30783+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30784+ WRITE_SHORT(glTexCoord2s_func);
30785+ WRITE_SHORT(ui);
30786+ WRITE_SHORT(vi);
30787+ do_default = 0;
30788+ }
30789+ }
30790+ break;
30791+ }
30792+
30793+ case glColor3f_func:
30794+ {
30795+ WRITE_SHORT(glColor3ub_func);
30796+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30797+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30798+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30799+ do_default = 0;
30800+ break;
30801+ }
30802+
30803+ case glColor4f_func:
30804+ {
30805+ if (*(float *) &args[3] == 1) {
30806+ WRITE_SHORT(glColor3ub_func);
30807+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30808+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30809+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30810+ } else {
30811+ WRITE_SHORT(glColor4ub_func);
30812+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30813+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30814+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30815+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30816+ }
30817+ do_default = 0;
30818+ break;
30819+ }
30820+
30821+ case glColor4fv_func:
30822+ {
30823+ float *ptr = (float *) args[0];
30824+
30825+ if (ptr[3] == 1) {
30826+ WRITE_SHORT(glColor3ub_func);
30827+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30828+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30829+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30830+ } else {
30831+ WRITE_SHORT(glColor4ub_func);
30832+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30833+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30834+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30835+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30836+ }
30837+ do_default = 0;
30838+ break;
30839+ }
30840+
30841+ case glColor3d_func:
30842+ {
30843+ WRITE_SHORT(glColor3ub_func);
30844+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30845+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30846+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30847+ do_default = 0;
30848+ break;
30849+ }
30850+
30851+ case glVertex3f_func:
30852+ {
30853+ if (*(float *) &args[2] == 0) {
30854+ WRITE_SHORT(glVertex2f_func);
30855+ WRITE_FLOAT(*(float *) &args[0]);
30856+ WRITE_FLOAT(*(float *) &args[1]);
30857+ do_default = 0;
30858+ }
30859+ break;
30860+ }
30861+
30862+ case glVertex3d_func:
30863+ {
30864+ WRITE_SHORT(glVertex3f_func);
30865+ WRITE_FLOAT(*(double *) args[0]);
30866+ WRITE_FLOAT(*(double *) args[1]);
30867+ WRITE_FLOAT(*(double *) args[2]);
30868+ do_default = 0;
30869+ break;
30870+ }
30871+
30872+ case glNormal3fv_func:
30873+ {
30874+ float *ptr = (float *) args[0];
30875+ float u = ptr[0];
30876+ float v = ptr[1];
30877+ float w = ptr[2];
30878+
30879+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30880+ && fabs(w - (int) w) < 1e-7) {
30881+ int ui = (int) u;
30882+ int vi = (int) v;
30883+ int wi = (int) w;
30884+
30885+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30886+ WRITE_SHORT(glNormal3sv_func);
30887+ WRITE_SHORT(ui);
30888+ WRITE_SHORT(vi);
30889+ WRITE_SHORT(wi);
30890+ do_default = 0;
30891+ }
30892+ }
30893+ break;
30894+ }
30895+
30896+ case glNormal3d_func:
30897+ {
30898+ WRITE_SHORT(glNormal3f_func);
30899+ WRITE_FLOAT(*(double *) args[0]);
30900+ WRITE_FLOAT(*(double *) args[1]);
30901+ WRITE_FLOAT(*(double *) args[2]);
30902+ do_default = 0;
30903+ break;
30904+ }
30905+
30906+ case glDrawElements_func:
30907+ {
30908+ int mode = args[0];
30909+ int count = args[1];
30910+ int type = args[2];
30911+
30912+ if (type == GL_UNSIGNED_INT) {
30913+ int j;
30914+ unsigned int *ptr = (unsigned int *) args[3];
30915+
30916+ for (j = 0; j < count; j++) {
30917+ if ((ptr[j] >> 16) != 0)
30918+ break;
30919+ }
30920+ if (j == count) {
30921+ WRITE_SHORT(func_number);
30922+ WRITE_INT(mode);
30923+ WRITE_INT(count);
30924+ WRITE_INT(GL_UNSIGNED_SHORT);
30925+ if (reuse_array != -1) {
30926+ WRITE_INT(0);
30927+ } else {
30928+ WRITE_INT(count * sizeof(short));
30929+ for (j = 0; j < count; j++) {
30930+ WRITE_SHORT(ptr[j]);
30931+ }
30932+ }
30933+ do_default = 0;
30934+ } else
30935+ do_default = 1;
30936+ } else if (reuse_array != -1) {
30937+ WRITE_SHORT(func_number);
30938+ WRITE_INT(mode);
30939+ WRITE_INT(count);
30940+ WRITE_INT(type);
30941+ WRITE_INT(0);
30942+ do_default = 0;
30943+ } else
30944+ do_default = 1;
30945+ break;
30946+ }
30947+
30948+ case glBufferDataARB_func:
30949+ {
30950+ if (reuse_array != -1) {
30951+ WRITE_SHORT(glBufferDataARB_func);
30952+ WRITE_INT(args[0]);
30953+ WRITE_INT(args[1]);
30954+ WRITE_INT(0);
30955+ WRITE_INT(args[3]);
30956+ do_default = 0;
30957+ }
30958+ break;
30959+ }
30960+
30961+ case glVertexPointer_fake_func:
30962+ case glTexCoordPointer_fake_func:
30963+ case glTexCoordPointer01_fake_func:
30964+ {
30965+ int offset = 0, index = 0, size, type, stride, bytes_size;
30966+ void *ptr;
30967+ int countarg = 0;
30968+
30969+ if (func_number == glVertexPointer_fake_func ||
30970+ func_number == glTexCoordPointer_fake_func)
30971+ offset = args[countarg++];
30972+ if (func_number == glTexCoordPointer_fake_func)
30973+ index = args[countarg++];
30974+ size = args[countarg++];
30975+ type = args[countarg++];
30976+ stride = args[countarg++];
30977+ bytes_size = args[countarg++];
30978+ ptr = (void *) args[countarg++];
30979+ if (type == GL_DOUBLE) {
30980+ int count;
30981+ int j, k;
30982+
30983+ if (stride == 0)
30984+ stride = size * sizeof(double);
30985+ assert((bytes_size % stride) == 0);
30986+ assert((offset % stride) == 0);
30987+ offset = (offset / stride) * size * sizeof(float);
30988+ count = bytes_size / stride;
30989+ WRITE_SHORT(func_number);
30990+ if (func_number == glVertexPointer_fake_func ||
30991+ func_number == glTexCoordPointer_fake_func)
30992+ WRITE_INT(offset);
30993+ if (func_number == glTexCoordPointer_fake_func)
30994+ WRITE_INT(index);
30995+ WRITE_INT(size);
30996+ WRITE_INT(GL_FLOAT);
30997+ WRITE_INT(0);
30998+ WRITE_INT(count * size * sizeof(float));
30999+ if (reuse_array != -1) {
31000+ WRITE_INT(0);
31001+ } else {
31002+ WRITE_INT(count * size * sizeof(float));
31003+ for (j = 0; j < count; j++) {
31004+ for (k = 0; k < size; k++) {
31005+ WRITE_FLOAT(*(double *)
31006+ (ptr + j * stride +
31007+ k * sizeof(double)));
31008+ }
31009+ }
31010+ }
31011+ do_default = 0;
31012+ } else if (reuse_array != -1) {
31013+ WRITE_SHORT(func_number);
31014+ if (func_number == glVertexPointer_fake_func ||
31015+ func_number == glTexCoordPointer_fake_func)
31016+ WRITE_INT(offset);
31017+ if (func_number == glTexCoordPointer_fake_func)
31018+ WRITE_INT(index);
31019+ WRITE_INT(size);
31020+ WRITE_INT(type);
31021+ WRITE_INT(stride);
31022+ WRITE_INT(bytes_size);
31023+ WRITE_INT(0);
31024+ do_default = 0;
31025+ } else
31026+ do_default = 1;
31027+ break;
31028+ }
31029+
31030+ default:
31031+ break;
31032+ }
31033+
31034+ if (do_default) {
31035+ fwrite(&func_number, sizeof(short), 1, compressed_file);
31036+ for (i = 0; i < nb_args; i++) {
31037+ switch (args_type[i]) {
31038+ case TYPE_UNSIGNED_CHAR:
31039+ case TYPE_CHAR:
31040+ {
31041+ char c = args[i];
31042+
31043+ fwrite(&c, sizeof(c), 1, compressed_file);
31044+ break;
31045+ }
31046+
31047+ case TYPE_UNSIGNED_SHORT:
31048+ case TYPE_SHORT:
31049+ {
31050+ short s = args[i];
31051+
31052+ fwrite(&s, sizeof(s), 1, compressed_file);
31053+ break;
31054+ }
31055+
31056+ case TYPE_UNSIGNED_INT:
31057+ case TYPE_INT:
31058+ case TYPE_FLOAT:{
31059+ int n = args[i];
31060+ fwrite(&n, sizeof(int), 1, compressed_file);
31061+ break;
31062+ }
31063+
31064+ case TYPE_NULL_TERMINATED_STRING:
31065+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31066+ fwrite(&args_size[i], sizeof(int), 1,
31067+ compressed_file);
31068+ if (args_size[i]) {
31069+ fwrite((void *) args[i], args_size[i], 1,
31070+ compressed_file);
31071+ }
31072+ break;
31073+
31074+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31075+ {
31076+ fwrite(&args_size[i], sizeof(int), 1,
31077+ compressed_file);
31078+ break;
31079+ }
31080+
31081+ CASE_OUT_KNOWN_SIZE_POINTERS:
31082+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31083+ {
31084+ break;
31085+ }
31086+
31087+ case TYPE_DOUBLE:
31088+ CASE_IN_KNOWN_SIZE_POINTERS:
31089+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31090+ fwrite((void *) args[i], args_size[i], 1,
31091+ compressed_file);
31092+ break;
31093+
31094+ case TYPE_IN_IGNORED_POINTER:
31095+ break;
31096+
31097+ default:
31098+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31099+ tab_opengl_calls_name[func_number], i);
31100+ do_disconnect_current();
31101+ return 0;
31102+ }
31103+ }
31104+ }
31105+ }
31106+
31107+ int new_offset = ftell(f);
31108+
31109+ if (show_offset ||
31110+ (show_diff_offset &&
31111+ new_offset - last_cmd_offset >= show_diff_offset)) {
31112+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
31113+ new_offset - last_cmd_offset);
31114+ }
31115+ last_cmd_offset = new_offset;
31116+
31117+ if (func_number == glXCreateContext_func &&
31118+ args[1] == visualid_fbconfig_read) {
31119+ args[1] = visualid_fbconfig_real;
31120+ }
31121+ if (debug) {
31122+ if (func_number == glBindProgramARB_func) {
31123+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31124+ (int) args[1]);
31125+ } else if (func_number == glXGetProcAddress_fake_func) {
31126+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31127+ (char *) args[0]);
31128+ }
31129+ }
31130+
31131+ if (debug && func_number == glEnable_func) {
31132+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31133+ } else if (debug && func_number == glDisable_func) {
31134+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31135+ }
31136+
31137+ if (resize) {
31138+ if (func_number == _moveResizeWindow_func) {
31139+ int *params = (int *) args[1];
31140+
31141+ orig_window_width = params[2];
31142+ window_height = params[3] =
31143+ params[3] * window_width / params[2];
31144+ params[2] = window_width;
31145+ // buffer = malloc(4 * window_width * window_height);
31146+ } else if (func_number == glViewport_func ||
31147+ func_number == glScissor_func) {
31148+ args[0] = args[0] * window_width / orig_window_width;
31149+ args[1] = args[1] * window_width / orig_window_width;
31150+ args[2] = args[2] * window_width / orig_window_width;
31151+ args[3] = args[3] * window_width / orig_window_width;
31152+ }
31153+ } else if (func_number == _moveResizeWindow_func) {
31154+ int *params = (int *) args[1];
31155+
31156+ window_width = params[2];
31157+ window_height = params[3];
31158+ // buffer = malloc(4 * window_width * window_height);
31159+ }
31160+
31161+ int ret =
31162+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31163+
31164+ if (func_number == glXSwapBuffers_func) {
31165+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31166+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31167+ * window_height, 1, fout); */
31168+
31169+ int diff_time;
31170+
31171+ count_current++;
31172+ gettimeofday(&current_time, NULL);
31173+ diff_time =
31174+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31175+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31176+ if (diff_time > refresh_rate) {
31177+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31178+ count_current - count_last_time, diff_time / 1000.,
31179+ (count_current - count_last_time) * 1000. / diff_time);
31180+ if (show_hard_disk_bandwith) {
31181+ int current_offset = ftell(f);
31182+
31183+ printf("bandwidth : %.1f MB/s\n",
31184+ (current_offset - last_offset) * 1e-6);
31185+ last_offset = current_offset;
31186+ }
31187+ last_time.tv_sec = current_time.tv_sec;
31188+ last_time.tv_usec = current_time.tv_usec;
31189+ count_last_time = count_current;
31190+ }
31191+ usleep(slowdown * 50000);
31192+ }
31193+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31194+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31195+ *(int *) args[1]);
31196+ }
31197+
31198+ if (func_number == glXGetVisualFromFBConfig_func) {
31199+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31200+ visualid_fbconfig_real = ret;
31201+ }
31202+
31203+ for (i = 0; i < nb_args; i++) {
31204+ switch (args_type[i]) {
31205+ case TYPE_UNSIGNED_INT:
31206+ case TYPE_INT:
31207+ case TYPE_UNSIGNED_CHAR:
31208+ case TYPE_CHAR:
31209+ case TYPE_UNSIGNED_SHORT:
31210+ case TYPE_SHORT:
31211+ case TYPE_FLOAT:
31212+ break;
31213+
31214+ case TYPE_NULL_TERMINATED_STRING:
31215+ CASE_POINTERS:
31216+ case TYPE_DOUBLE:
31217+ if (args[i])
31218+ free((void *) args[i]);
31219+ break;
31220+
31221+ case TYPE_IN_IGNORED_POINTER:
31222+ args[i] = 0;
31223+ break;
31224+
31225+ default:
31226+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31227+ tab_opengl_calls_name[func_number], i);
31228+ do_disconnect_current();
31229+ return 0;
31230+ }
31231+ }
31232+ }
31233+ return 0;
31234+}
31235Index: qemu-0.12.4/target-i386/opengl_server.c
31236===================================================================
31237--- /dev/null
31238+++ qemu-0.12.4/target-i386/opengl_server.c
31239@@ -0,0 +1,826 @@
31240+/*
31241+ * TCP/IP OpenGL server
31242+ *
31243+ * Copyright (c) 2007 Even Rouault
31244+ *
31245+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31246+ * of this software and associated documentation files (the "Software"), to deal
31247+ * in the Software without restriction, including without limitation the rights
31248+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31249+ * copies of the Software, and to permit persons to whom the Software is
31250+ * furnished to do so, subject to the following conditions:
31251+ *
31252+ * The above copyright notice and this permission notice shall be included in
31253+ * all copies or substantial portions of the Software.
31254+ *
31255+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31256+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31257+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31258+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31259+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31260+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31261+ * THE SOFTWARE.
31262+ */
31263+
31264+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31265+
31266+#include <stdio.h>
31267+#include <errno.h>
31268+#include <stdlib.h>
31269+#include <unistd.h>
31270+#include <string.h>
31271+#include <assert.h>
31272+#include <sys/types.h>
31273+#include <sys/socket.h>
31274+#include <netinet/in.h>
31275+#include <netinet/tcp.h>
31276+#include <netdb.h>
31277+#include <arpa/inet.h>
31278+#include <sys/time.h>
31279+#include <signal.h>
31280+
31281+#include <X11/Xlib.h>
31282+#include <X11/Xutil.h>
31283+
31284+#define PORT 5555
31285+
31286+#define ENABLE_GL_LOG
31287+
31288+#include "opengl_func.h"
31289+#include "opengl_utils.h"
31290+
31291+static int refresh_rate = 1000;
31292+static int must_save = 0;
31293+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31294+
31295+extern int display_function_call;
31296+extern void init_process_tab(void);
31297+extern int do_function_call(Display *, int, int, arg_t *, char *);
31298+extern void opengl_exec_set_local_connection(void);
31299+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31300+
31301+#ifdef ENABLE_GL_LOG
31302+static FILE* f = NULL;
31303+
31304+static char* filename = "/tmp/debug_gl.bin";
31305+
31306+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31307+
31308+static void inline write_gl_debug_cmd_char(char my_int)
31309+{
31310+ write_gl_debug_init();
31311+ fwrite(&my_int, sizeof(my_int), 1, f);
31312+}
31313+
31314+static void inline write_gl_debug_cmd_short(short my_int)
31315+{
31316+ write_gl_debug_init();
31317+ fwrite(&my_int, sizeof(my_int), 1, f);
31318+}
31319+
31320+static void inline write_gl_debug_cmd_int(int my_int)
31321+{
31322+ write_gl_debug_init();
31323+ fwrite(&my_int, sizeof(my_int), 1, f);
31324+}
31325+
31326+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31327+{
31328+ write_gl_debug_init();
31329+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31330+}
31331+
31332+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31333+{
31334+ write_gl_debug_init();
31335+ fwrite(&size, sizeof(int), 1, f);
31336+ if (size)
31337+ fwrite(buffer, size, 1, f);
31338+}
31339+
31340+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31341+{
31342+ write_gl_debug_init();
31343+ if (size)
31344+ fwrite(buffer, size, 1, f);
31345+}
31346+
31347+static void inline write_gl_debug_end()
31348+{
31349+ write_gl_debug_init();
31350+ fclose(f);
31351+ f = NULL;
31352+}
31353+
31354+#endif
31355+
31356+static void write_sock_data(int sock, void* data, int len)
31357+{
31358+ if (len && data)
31359+ {
31360+ int offset = 0;
31361+ while(offset < len)
31362+ {
31363+ int nwritten = write(sock, data + offset, len - offset);
31364+ if (nwritten == -1)
31365+ {
31366+ if (errno == EINTR)
31367+ continue;
31368+ perror("write");
31369+ assert(nwritten != -1);
31370+ }
31371+ offset += nwritten;
31372+ }
31373+ }
31374+}
31375+
31376+static void inline write_sock_int(int sock, int my_int)
31377+{
31378+ write_sock_data(sock, &my_int, sizeof(int));
31379+}
31380+
31381+static int total_read = 0;
31382+static void read_sock_data(int sock, void* data, int len)
31383+{
31384+ if (len)
31385+ {
31386+ int offset = 0;
31387+ while(offset < len)
31388+ {
31389+ int nread = read(sock, data + offset, len - offset);
31390+ if (nread == -1)
31391+ {
31392+ if (errno == EINTR)
31393+ continue;
31394+ perror("read");
31395+ assert(nread != -1);
31396+ }
31397+ if (nread == 0)
31398+ {
31399+ fprintf(stderr, "nread = 0\n");
31400+ }
31401+ assert(nread > 0);
31402+ offset += nread;
31403+ total_read += nread;
31404+ }
31405+ }
31406+}
31407+
31408+static int inline read_sock_int(int sock)
31409+{
31410+ int ret;
31411+ read_sock_data(sock, &ret, sizeof(int));
31412+ return ret;
31413+}
31414+
31415+static short inline read_sock_short(int sock)
31416+{
31417+ short ret;
31418+ read_sock_data(sock, &ret, sizeof(short));
31419+ return ret;
31420+}
31421+
31422+
31423+static Display* dpy = NULL;
31424+static int parent_xid = -1;
31425+
31426+
31427+static struct timeval last_time, current_time, time_stamp_start;
31428+static int count_last_time = 0, count_current = 0;
31429+
31430+static struct timeval last_read_time, current_read_time;
31431+
31432+int has_x_error = 0;
31433+
31434+int
31435+read_from_client (int sock)
31436+{
31437+ arg_t args[50];
31438+ int args_size[50];
31439+ char ret_string[32768];
31440+ char command_buffer[65536*16];
31441+
31442+ if (dpy == NULL)
31443+ {
31444+ init_process_tab();
31445+ dpy = XOpenDisplay(NULL);
31446+ if (parent_xid != -1)
31447+ {
31448+ opengl_exec_set_parent_window(dpy, parent_xid);
31449+ }
31450+ }
31451+
31452+ int i;
31453+ int func_number = read_sock_short(sock);
31454+
31455+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31456+ int ret_type = signature->ret_type;
31457+ int nb_args = signature->nb_args;
31458+ int* args_type = signature->args_type;
31459+ int pid = 0;
31460+
31461+ if (func_number == _serialized_calls_func)
31462+ {
31463+ int command_buffer_size = read_sock_int(sock);
31464+ int commmand_buffer_offset = 0;
31465+ read_sock_data(sock, command_buffer, command_buffer_size);
31466+ /* TODO: must convert if client is different word size */
31467+
31468+#ifdef ENABLE_GL_LOG
31469+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31470+#endif
31471+
31472+ while(commmand_buffer_offset < command_buffer_size)
31473+ {
31474+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31475+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31476+ {
31477+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31478+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31479+ commmand_buffer_offset, command_buffer_size);
31480+ exit(-1);
31481+ }
31482+
31483+#ifdef ENABLE_GL_LOG
31484+ if (must_save) write_gl_debug_cmd_short(func_number);
31485+#endif
31486+ commmand_buffer_offset += sizeof(short);
31487+
31488+
31489+ signature = (Signature*)tab_opengl_calls[func_number];
31490+ ret_type = signature->ret_type;
31491+ assert(ret_type == TYPE_NONE);
31492+ nb_args = signature->nb_args;
31493+ args_type = signature->args_type;
31494+
31495+ for(i=0;i<nb_args;i++)
31496+ {
31497+ switch(args_type[i])
31498+ {
31499+ case TYPE_UNSIGNED_CHAR:
31500+ case TYPE_CHAR:
31501+ {
31502+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31503+#ifdef ENABLE_GL_LOG
31504+ if (must_save) write_gl_debug_cmd_char(args[i]);
31505+#endif
31506+ commmand_buffer_offset += sizeof(int);
31507+ break;
31508+ }
31509+
31510+ case TYPE_UNSIGNED_SHORT:
31511+ case TYPE_SHORT:
31512+ {
31513+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31514+#ifdef ENABLE_GL_LOG
31515+ if (must_save) write_gl_debug_cmd_short(args[i]);
31516+#endif
31517+ commmand_buffer_offset += sizeof(int);
31518+ break;
31519+ }
31520+
31521+ case TYPE_UNSIGNED_INT:
31522+ case TYPE_INT:
31523+ case TYPE_FLOAT:
31524+ {
31525+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31526+#ifdef ENABLE_GL_LOG
31527+ if (must_save) write_gl_debug_cmd_int(args[i]);
31528+#endif
31529+ commmand_buffer_offset += sizeof(int);
31530+ break;
31531+ }
31532+
31533+ case TYPE_NULL_TERMINATED_STRING:
31534+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31535+ {
31536+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31537+ commmand_buffer_offset += sizeof(int);
31538+
31539+ if (args_size[i] == 0)
31540+ {
31541+ args[i] = 0;
31542+ }
31543+ else
31544+ {
31545+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31546+ }
31547+
31548+ if (args[i] == 0)
31549+ {
31550+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31551+ {
31552+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31553+ return 0;
31554+ }
31555+ }
31556+#ifdef ENABLE_GL_LOG
31557+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31558+#endif
31559+ commmand_buffer_offset += args_size[i];
31560+
31561+ break;
31562+ }
31563+
31564+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31565+ {
31566+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31567+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31568+#ifdef ENABLE_GL_LOG
31569+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31570+#endif
31571+ commmand_buffer_offset += args_size[i];
31572+ break;
31573+ }
31574+
31575+ CASE_OUT_POINTERS:
31576+ {
31577+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31578+ return 0;
31579+ break;
31580+ }
31581+
31582+ case TYPE_DOUBLE:
31583+ CASE_IN_KNOWN_SIZE_POINTERS:
31584+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31585+ args_size[i] = tab_args_type_length[args_type[i]];
31586+#ifdef ENABLE_GL_LOG
31587+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31588+#endif
31589+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31590+ break;
31591+
31592+ case TYPE_IN_IGNORED_POINTER:
31593+ args[i] = 0;
31594+ break;
31595+
31596+ default:
31597+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31598+ return 0;
31599+ break;
31600+ }
31601+ }
31602+
31603+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31604+
31605+ do_function_call(dpy, func_number, 1, args, ret_string);
31606+ }
31607+ }
31608+ else
31609+ {
31610+#ifdef ENABLE_GL_LOG
31611+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31612+#endif
31613+
31614+ for(i=0;i<nb_args;i++)
31615+ {
31616+ switch(args_type[i])
31617+ {
31618+ case TYPE_UNSIGNED_CHAR:
31619+ case TYPE_CHAR:
31620+ args[i] = read_sock_int(sock);
31621+#ifdef ENABLE_GL_LOG
31622+ if (must_save) write_gl_debug_cmd_char(args[i]);
31623+#endif
31624+ break;
31625+
31626+ case TYPE_UNSIGNED_SHORT:
31627+ case TYPE_SHORT:
31628+ args[i] = read_sock_int(sock);
31629+#ifdef ENABLE_GL_LOG
31630+ if (must_save) write_gl_debug_cmd_short(args[i]);
31631+#endif
31632+ break;
31633+
31634+ case TYPE_UNSIGNED_INT:
31635+ case TYPE_INT:
31636+ case TYPE_FLOAT:
31637+ args[i] = read_sock_int(sock);
31638+#ifdef ENABLE_GL_LOG
31639+ if (must_save) write_gl_debug_cmd_int(args[i]);
31640+#endif
31641+ break;
31642+
31643+ case TYPE_NULL_TERMINATED_STRING:
31644+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31645+ {
31646+ args_size[i] = read_sock_int(sock);
31647+ if (args_size[i])
31648+ {
31649+ args[i] = (long)malloc(args_size[i]);
31650+ read_sock_data(sock, (void*)args[i], args_size[i]);
31651+ }
31652+ else
31653+ {
31654+ args[i] = 0;
31655+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31656+ {
31657+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31658+ return 0;
31659+ }
31660+ }
31661+#ifdef ENABLE_GL_LOG
31662+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31663+#endif
31664+ break;
31665+ }
31666+
31667+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31668+ {
31669+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31670+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31671+ read_sock_data(sock, (void*)args[i], args_size[i]);
31672+#ifdef ENABLE_GL_LOG
31673+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31674+#endif
31675+ break;
31676+ }
31677+
31678+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31679+ {
31680+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31681+ args[i] = (long)malloc(args_size[i]);
31682+ break;
31683+ }
31684+
31685+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31686+ {
31687+ args_size[i] = read_sock_int(sock);
31688+ if (func_number == glGetProgramLocalParameterdvARB_func)
31689+ {
31690+ fprintf(stderr, "size = %d\n", args_size[i]);
31691+ }
31692+ if (args_size[i])
31693+ {
31694+ args[i] = (long)malloc(args_size[i]);
31695+ }
31696+ else
31697+ {
31698+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31699+ {
31700+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31701+ return 0;
31702+ };
31703+ args[i] = 0;
31704+ }
31705+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31706+#ifdef ENABLE_GL_LOG
31707+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31708+#endif
31709+ break;
31710+ }
31711+
31712+ CASE_OUT_KNOWN_SIZE_POINTERS:
31713+ {
31714+ args_size[i] = tab_args_type_length[args_type[i]];
31715+ assert(args_size[i]);
31716+ args[i] = (long)malloc(args_size[i]);
31717+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31718+ break;
31719+ }
31720+
31721+ case TYPE_DOUBLE:
31722+ CASE_IN_KNOWN_SIZE_POINTERS:
31723+ args_size[i] = tab_args_type_length[args_type[i]];
31724+ args[i] = (long)malloc(args_size[i]);
31725+ read_sock_data(sock, (void*)args[i], args_size[i]);
31726+#ifdef ENABLE_GL_LOG
31727+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31728+#endif
31729+ break;
31730+
31731+ case TYPE_IN_IGNORED_POINTER:
31732+ args[i] = 0;
31733+ break;
31734+
31735+ default:
31736+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31737+ return 0;
31738+ break;
31739+ }
31740+ }
31741+
31742+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31743+
31744+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31745+
31746+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31747+#ifdef ENABLE_GL_LOG
31748+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31749+ {
31750+ write_gl_debug_cmd_int(ret);
31751+ }
31752+#endif
31753+
31754+ for(i=0;i<nb_args;i++)
31755+ {
31756+ switch(args_type[i])
31757+ {
31758+ case TYPE_UNSIGNED_INT:
31759+ case TYPE_INT:
31760+ case TYPE_UNSIGNED_CHAR:
31761+ case TYPE_CHAR:
31762+ case TYPE_UNSIGNED_SHORT:
31763+ case TYPE_SHORT:
31764+ case TYPE_FLOAT:
31765+ break;
31766+
31767+ case TYPE_NULL_TERMINATED_STRING:
31768+ case TYPE_DOUBLE:
31769+ CASE_IN_POINTERS:
31770+ if (args[i]) free((void*)args[i]);
31771+ break;
31772+
31773+ CASE_OUT_POINTERS:
31774+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31775+ write_sock_data(sock, (void*)args[i], args_size[i]);
31776+ if (display_function_call)
31777+ {
31778+ if (args_type[i] == TYPE_OUT_1INT)
31779+ {
31780+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31781+ }
31782+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31783+ {
31784+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31785+ }
31786+ }
31787+ if (args[i]) free((void*)args[i]);
31788+ break;
31789+
31790+ case TYPE_IN_IGNORED_POINTER:
31791+ args[i] = 0;
31792+ break;
31793+
31794+ default:
31795+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31796+ return 0;
31797+ break;
31798+ }
31799+ }
31800+
31801+ if (signature->ret_type == TYPE_CONST_CHAR)
31802+ {
31803+ write_sock_int(sock, strlen(ret_string) + 1);
31804+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31805+ }
31806+ else if (signature->ret_type != TYPE_NONE)
31807+ {
31808+ write_sock_int(sock, ret);
31809+ }
31810+
31811+#ifdef ENABLE_GL_LOG
31812+ if (must_save && func_number == _exit_process_func)
31813+ {
31814+ write_gl_debug_end();
31815+ }
31816+#endif
31817+ if (func_number == _exit_process_func)
31818+ {
31819+ return -1;
31820+ }
31821+ else if (func_number == glXSwapBuffers_func)
31822+ {
31823+ int diff_time;
31824+ count_current++;
31825+ gettimeofday(&current_time, NULL);
31826+#ifdef ENABLE_GL_LOG
31827+ if (must_save && timestamp)
31828+ {
31829+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31830+ /* -1 is special code that indicates time synchro */
31831+ write_gl_debug_cmd_short(timesynchro_func);
31832+ write_gl_debug_cmd_longlong(ts);
31833+ }
31834+#endif
31835+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31836+ if (diff_time > refresh_rate)
31837+ {
31838+#ifdef ENABLE_GL_LOG
31839+ fflush(f);
31840+#endif
31841+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31842+ count_current - count_last_time,
31843+ diff_time / 1000.,
31844+ (count_current - count_last_time) * 1000. / diff_time);
31845+ last_time.tv_sec = current_time.tv_sec;
31846+ last_time.tv_usec = current_time.tv_usec;
31847+ count_last_time = count_current;
31848+ }
31849+ }
31850+ }
31851+ return 0;
31852+}
31853+
31854+int
31855+make_socket (uint16_t port)
31856+{
31857+ int sock;
31858+ struct sockaddr_in name;
31859+
31860+ /* Create the socket. */
31861+ sock = socket (PF_INET, SOCK_STREAM, 0);
31862+ if (sock < 0)
31863+ {
31864+ perror ("socket");
31865+ exit (EXIT_FAILURE);
31866+ }
31867+
31868+ /* Give the socket a name. */
31869+ name.sin_family = AF_INET;
31870+ name.sin_port = htons (port);
31871+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31872+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31873+ {
31874+ perror ("bind");
31875+ exit (EXIT_FAILURE);
31876+ }
31877+
31878+ return sock;
31879+}
31880+
31881+static int x_error_handler(Display *display,
31882+ XErrorEvent *error)
31883+{
31884+ char buf[64];
31885+ XGetErrorText(display, error->error_code, buf, 63);
31886+ fprintf (stderr, "The program received an X Window System error.\n"
31887+ "This probably reflects a bug in the program.\n"
31888+ "The error was '%s'.\n"
31889+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31890+ buf,
31891+ error->serial,
31892+ error->error_code,
31893+ error->request_code,
31894+ error->minor_code);
31895+ has_x_error = 1;
31896+ return 0;
31897+}
31898+
31899+void usage()
31900+{
31901+ printf("Usage : opengl_server [OPTION]\n\n");
31902+ printf("The following options are available :\n");
31903+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31904+ printf("--debug : output debugging trace on stderr\n");
31905+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31906+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31907+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31908+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31909+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31910+ printf(" or from another emulator, through TCP/IP\n");
31911+ printf("--h or --help : display this help\n");
31912+}
31913+
31914+int
31915+main (int argc, char* argv[])
31916+{
31917+ int sock;
31918+ fd_set active_fd_set, read_fd_set;
31919+ int i;
31920+ struct sockaddr_in clientname;
31921+ socklen_t size;
31922+ int port = PORT;
31923+ int different_windows = 0;
31924+
31925+ for(i=1;i<argc;i++)
31926+ {
31927+ if (argv[i][0] == '-' && argv[i][1] == '-')
31928+ argv[i] = argv[i]+1;
31929+
31930+ if (strcmp(argv[i], "-debug") == 0)
31931+ {
31932+ display_function_call = 1;
31933+ }
31934+ else if (strcmp(argv[i], "-save") == 0)
31935+ {
31936+ must_save = 1;
31937+ }
31938+ else if (strncmp(argv[i], "-port=",6) == 0)
31939+ {
31940+ port = atoi(argv[i] + 6);
31941+ }
31942+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31943+ {
31944+ filename = argv[i] + strlen("-filename=");
31945+ }
31946+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31947+ {
31948+ char* c = argv[i] + strlen("-parent-xid=");
31949+ parent_xid = strtol(c, NULL, 0);
31950+ different_windows = 1;
31951+ }
31952+ else if (strcmp(argv[i], "-different-windows") == 0)
31953+ {
31954+ different_windows = 1;
31955+ }
31956+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31957+ {
31958+ usage();
31959+ return 0;
31960+ }
31961+ else
31962+ {
31963+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31964+ usage();
31965+ return -1;
31966+ }
31967+ }
31968+
31969+ /* Create the socket and set it up to accept connections. */
31970+ sock = make_socket (port);
31971+
31972+ int flag = 1;
31973+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31974+ {
31975+ perror("setsockopt SO_REUSEADDR");
31976+ }
31977+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31978+ {
31979+ perror("setsockopt TCP_NODELAY");
31980+ }
31981+
31982+ if (listen (sock, 1) < 0)
31983+ {
31984+ perror ("listen");
31985+ exit (EXIT_FAILURE);
31986+ }
31987+
31988+ struct sigaction action;
31989+ action.sa_handler = SIG_IGN;
31990+ action.sa_flags = SA_NOCLDWAIT;
31991+ sigaction(SIGCHLD,&action,NULL);
31992+
31993+ FD_ZERO (&active_fd_set);
31994+ FD_SET (sock, &active_fd_set);
31995+
31996+ while(1)
31997+ {
31998+ int new, pid;
31999+
32000+ read_fd_set = active_fd_set;
32001+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
32002+ {
32003+ perror ("select");
32004+ exit (EXIT_FAILURE);
32005+ }
32006+
32007+ size = sizeof (clientname);
32008+ new = accept (sock, (struct sockaddr *) &clientname, &size);
32009+ if (new < 0)
32010+ {
32011+ perror ("accept");
32012+ exit (EXIT_FAILURE);
32013+ }
32014+ pid = fork();
32015+ if (pid == -1)
32016+ {
32017+ perror ("fork");
32018+ exit(EXIT_FAILURE);
32019+ }
32020+ if (pid == 0)
32021+ {
32022+ close(sock);
32023+
32024+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
32025+ inet_ntoa (clientname.sin_addr),
32026+ ntohs (clientname.sin_port));
32027+
32028+ gettimeofday(&last_time, NULL);
32029+ gettimeofday(&last_read_time, NULL);
32030+
32031+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
32032+ different_windows == 0)
32033+ {
32034+ opengl_exec_set_local_connection();
32035+ }
32036+
32037+ if (timestamp)
32038+ {
32039+ gettimeofday(&time_stamp_start, NULL);
32040+ }
32041+
32042+ XSetErrorHandler(x_error_handler);
32043+
32044+ while(1)
32045+ {
32046+ if (read_from_client (new) < 0)
32047+ {
32048+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
32049+
32050+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
32051+ inet_ntoa (clientname.sin_addr),
32052+ ntohs (clientname.sin_port));
32053+
32054+ return 0;
32055+ }
32056+ }
32057+ }
32058+ else
32059+ {
32060+ close(new);
32061+ }
32062+ }
32063+
32064+ return 0;
32065+}
32066Index: qemu-0.12.4/target-i386/opengl_utils.h
32067===================================================================
32068--- /dev/null
32069+++ qemu-0.12.4/target-i386/opengl_utils.h
32070@@ -0,0 +1,453 @@
32071+/*
32072+ * Functions used by host & client sides
32073+ *
32074+ * Copyright (c) 2007 Even Rouault
32075+ *
32076+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32077+ * of this software and associated documentation files (the "Software"), to deal
32078+ * in the Software without restriction, including without limitation the rights
32079+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32080+ * copies of the Software, and to permit persons to whom the Software is
32081+ * furnished to do so, subject to the following conditions:
32082+ *
32083+ * The above copyright notice and this permission notice shall be included in
32084+ * all copies or substantial portions of the Software.
32085+ *
32086+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32087+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32088+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32089+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32090+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32091+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32092+ * THE SOFTWARE.
32093+ */
32094+
32095+
32096+#ifndef _OPENGL_UTILS
32097+#define _OPENGL_UTILS
32098+
32099+typedef struct {
32100+ unsigned int *values;
32101+ int nbValues;
32102+} RangeAllocator;
32103+
32104+/*
32105+static void print_range(RangeAllocator* range)
32106+{
32107+ int i;
32108+ printf("%s", "table : ");
32109+ for(i=0;i<range->nbValues;i++)
32110+ {
32111+ printf("%d ", range->values[i]);
32112+ }
32113+ printf("\n");
32114+}
32115+*/
32116+
32117+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32118+{
32119+ if (value == 0)
32120+ return;
32121+ if (range->nbValues >= 1) {
32122+ int lower = 0;
32123+ int upper = range->nbValues - 1;
32124+
32125+ while (1) {
32126+ int mid = (lower + upper) / 2;
32127+
32128+ if (range->values[mid] > value)
32129+ upper = mid;
32130+ else if (range->values[mid] < value)
32131+ lower = mid;
32132+ else
32133+ break;
32134+ if (upper - lower <= 1) {
32135+ if (value < range->values[lower]) {
32136+ range->values =
32137+ realloc(range->values,
32138+ (range->nbValues + 1) * sizeof(int));
32139+ memmove(&range->values[lower + 1], &range->values[lower],
32140+ (range->nbValues - lower) * sizeof(int));
32141+ range->values[lower] = value;
32142+ range->nbValues++;
32143+ } else if (value == range->values[lower]) {
32144+ } else if (value < range->values[upper]) {
32145+ range->values =
32146+ realloc(range->values,
32147+ (range->nbValues + 1) * sizeof(int));
32148+ memmove(&range->values[upper + 1], &range->values[upper],
32149+ (range->nbValues - upper) * sizeof(int));
32150+ range->values[upper] = value;
32151+ range->nbValues++;
32152+ } else if (value == range->values[upper]) {
32153+ } else {
32154+ upper++;
32155+
32156+ range->values =
32157+ realloc(range->values,
32158+ (range->nbValues + 1) * sizeof(int));
32159+ memmove(&range->values[upper + 1], &range->values[upper],
32160+ (range->nbValues - upper) * sizeof(int));
32161+ range->values[upper] = value;
32162+ range->nbValues++;
32163+ }
32164+ break;
32165+ }
32166+ }
32167+ } else {
32168+ range->values = malloc(sizeof(int));
32169+ range->values[0] = value;
32170+ range->nbValues = 1;
32171+ }
32172+}
32173+
32174+/* return first value */
32175+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32176+ unsigned int *values)
32177+{
32178+ int i, j;
32179+
32180+ if (range->nbValues == 0) {
32181+ range->nbValues = n;
32182+ range->values = malloc(n * sizeof(int));
32183+ for (i = 0; i < n; i++) {
32184+ range->values[i] = i + 1;
32185+ if (values)
32186+ values[i] = range->values[i];
32187+ }
32188+ return 1;
32189+ } else {
32190+ int lastValue = 1;
32191+
32192+ for (i = 0; i < range->nbValues; i++) {
32193+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32194+ range->values =
32195+ realloc(range->values,
32196+ (range->nbValues + n) * sizeof(int));
32197+ memmove(&range->values[i + n], &range->values[i],
32198+ (range->nbValues - i) * sizeof(int));
32199+ for (j = 0; j < n; j++) {
32200+ range->values[i + j] = lastValue + 1 + j;
32201+ if (values)
32202+ values[j] = range->values[i + j];
32203+ }
32204+ range->nbValues += n;
32205+ break;
32206+ } else
32207+ lastValue = range->values[i];
32208+ }
32209+ if (i == range->nbValues) {
32210+ range->values =
32211+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32212+ for (j = 0; j < n; j++) {
32213+ range->values[i + j] = lastValue + 1 + j;
32214+ if (values)
32215+ values[j] = range->values[i + j];
32216+ }
32217+ range->nbValues += n;
32218+ }
32219+ return lastValue + 1;
32220+ }
32221+}
32222+
32223+static inline void delete_value(RangeAllocator *range, unsigned int value)
32224+{
32225+ if (value == 0)
32226+ return;
32227+ if (range->nbValues >= 1) {
32228+ int lower = 0;
32229+ int upper = range->nbValues - 1;
32230+
32231+ while (1) {
32232+ int mid = (lower + upper) / 2;
32233+
32234+ if (range->values[mid] > value)
32235+ upper = mid;
32236+ else if (range->values[mid] < value)
32237+ lower = mid;
32238+ else {
32239+ lower = upper = mid;
32240+ }
32241+ if (upper - lower <= 1) {
32242+ if (value == range->values[lower]) {
32243+ memmove(&range->values[lower], &range->values[lower + 1],
32244+ (range->nbValues - lower - 1) * sizeof(int));
32245+ range->nbValues--;
32246+ } else if (value == range->values[upper]) {
32247+ memmove(&range->values[upper], &range->values[upper + 1],
32248+ (range->nbValues - upper - 1) * sizeof(int));
32249+ range->nbValues--;
32250+ }
32251+ break;
32252+ }
32253+ }
32254+ }
32255+}
32256+
32257+static inline void delete_range(RangeAllocator *range, int n,
32258+ const unsigned int *values)
32259+{
32260+ int i;
32261+
32262+ for (i = 0; i < n; i++) {
32263+ delete_value(range, values[i]);
32264+ }
32265+}
32266+
32267+static inline void delete_consecutive_values(RangeAllocator *range,
32268+ unsigned int first, int n)
32269+{
32270+ int i;
32271+
32272+ for (i = 0; i < n; i++) {
32273+ delete_value(range, first + i);
32274+ }
32275+}
32276+
32277+
32278+/*****************************************************************/
32279+/* */
32280+/* CRC LOOKUP TABLE */
32281+/* ================ */
32282+/* The following CRC lookup table was generated automagically */
32283+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32284+/* Program V1.0 using the following model parameters: */
32285+/* */
32286+/* Width : 4 bytes. */
32287+/* Poly : 0x04C11DB7L */
32288+/* Reverse : TRUE. */
32289+/* */
32290+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32291+/* see the document titled "A Painless Guide to CRC Error */
32292+/* Detection Algorithms" by Ross Williams */
32293+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32294+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32295+/* */
32296+/*****************************************************************/
32297+
32298+static const unsigned int crctable[256] = {
32299+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32300+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32301+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32302+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32303+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32304+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32305+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32306+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32307+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32308+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32309+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32310+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32311+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32312+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32313+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32314+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32315+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32316+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32317+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32318+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32319+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32320+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32321+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32322+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32323+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32324+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32325+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32326+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32327+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32328+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32329+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32330+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32331+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32332+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32333+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32334+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32335+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32336+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32337+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32338+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32339+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32340+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32341+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32342+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32343+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32344+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32345+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32346+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32347+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32348+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32349+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32350+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32351+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32352+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32353+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32354+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32355+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32356+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32357+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32358+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32359+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32360+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32361+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32362+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32363+};
32364+
32365+static unsigned int calc_checksum(const void *_ptr, int length,
32366+ unsigned int seed)
32367+{
32368+ int i;
32369+ unsigned int crc = seed;
32370+ unsigned char *ptr = (unsigned char *) _ptr;
32371+
32372+ if (ptr == NULL)
32373+ return -1;
32374+ for (i = 0; i < length; i++) {
32375+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32376+ }
32377+ return crc;
32378+}
32379+
32380+
32381+static inline void display_gl_call(FILE *f,
32382+ int func_number, arg_t *args, int *args_size)
32383+{
32384+ int i;
32385+
32386+ if (func_number < 0) {
32387+ fprintf(f, "unknown call : %d\n", func_number);
32388+ return;
32389+ }
32390+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32391+ int nb_args = signature->nb_args;
32392+ int *args_type = signature->args_type;
32393+
32394+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32395+
32396+ for (i = 0; i < nb_args; i++) {
32397+ switch (args_type[i]) {
32398+ case TYPE_UNSIGNED_CHAR:
32399+ case TYPE_CHAR:
32400+ {
32401+ fprintf(f, "%d", (char) args[i]);
32402+ break;
32403+ }
32404+
32405+ case TYPE_UNSIGNED_SHORT:
32406+ case TYPE_SHORT:
32407+ {
32408+ fprintf(f, "%d", (short) args[i]);
32409+ break;
32410+ }
32411+
32412+ case TYPE_UNSIGNED_INT:
32413+ case TYPE_INT:
32414+ {
32415+ fprintf(f, "%d", (int) args[i]);
32416+ break;
32417+ }
32418+
32419+ case TYPE_FLOAT:
32420+ fprintf(f, "%f", *(float *) &args[i]);
32421+ break;
32422+
32423+ case TYPE_DOUBLE:
32424+ CASE_IN_KNOWN_SIZE_POINTERS:
32425+ case TYPE_NULL_TERMINATED_STRING:
32426+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32427+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32428+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32429+ fprintf(f, "\"%s\"", (char *) args[i]);
32430+ } else if (args_type[i] == TYPE_DOUBLE)
32431+ fprintf(f, "%f", *(double *) args[i]);
32432+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32433+ args_size[i] <= 4 * sizeof(char)) {
32434+ int j;
32435+ int n = args_size[i] / sizeof(char);
32436+
32437+ fprintf(f, "(");
32438+ for (j = 0; j < n; j++) {
32439+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32440+ if (j != n - 1)
32441+ fprintf(f, ", ");
32442+ }
32443+ fprintf(f, ")");
32444+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32445+ args_size[i] <= 4 * sizeof(short)) {
32446+ int j;
32447+ int n = args_size[i] / sizeof(short);
32448+
32449+ fprintf(f, "(");
32450+ for (j = 0; j < n; j++) {
32451+ fprintf(f, "%d", ((short *) args[i])[j]);
32452+ if (j != n - 1)
32453+ fprintf(f, ", ");
32454+ }
32455+ fprintf(f, ")");
32456+ } else if (IS_ARRAY_INT(args_type[i]) &&
32457+ args_size[i] <= 4 * sizeof(int)) {
32458+ int j;
32459+ int n = args_size[i] / sizeof(int);
32460+
32461+ fprintf(f, "(");
32462+ for (j = 0; j < n; j++) {
32463+ fprintf(f, "%d", ((int *) args[i])[j]);
32464+ if (j != n - 1)
32465+ fprintf(f, ", ");
32466+ }
32467+ fprintf(f, ")");
32468+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32469+ args_size[i] <= 4 * sizeof(float)) {
32470+ int j;
32471+ int n = args_size[i] / sizeof(float);
32472+
32473+ fprintf(f, "(");
32474+ for (j = 0; j < n; j++) {
32475+ fprintf(f, "%f", ((float *) args[i])[j]);
32476+ if (j != n - 1)
32477+ fprintf(f, ", ");
32478+ }
32479+ fprintf(f, ")");
32480+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32481+ args_size[i] <= 4 * sizeof(double)) {
32482+ int j;
32483+ int n = args_size[i] / sizeof(double);
32484+
32485+ fprintf(f, "(");
32486+ for (j = 0; j < n; j++) {
32487+ fprintf(f, "%f", ((double *) args[i])[j]);
32488+ if (j != n - 1)
32489+ fprintf(f, ", ");
32490+ }
32491+ fprintf(f, ")");
32492+ } else {
32493+ fprintf(f, "%d bytes", args_size[i]);
32494+ fprintf(f, "(crc = 0x%x)",
32495+ calc_checksum((void *) args[i], args_size[i],
32496+ 0xFFFFFFFF));
32497+ }
32498+ break;
32499+
32500+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32501+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32502+ CASE_OUT_KNOWN_SIZE_POINTERS:
32503+ {
32504+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32505+ break;
32506+ }
32507+
32508+ case TYPE_IN_IGNORED_POINTER:
32509+ break;
32510+
32511+ default:
32512+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32513+ tab_opengl_calls_name[func_number], i);
32514+ return;
32515+ break;
32516+ }
32517+ if (i < nb_args - 1)
32518+ fprintf(f, ", ");
32519+ }
32520+ fprintf(f, ")\n");
32521+}
32522+
32523+#endif
32524Index: qemu-0.12.4/target-i386/parse_gl_h.c
32525===================================================================
32526--- /dev/null
32527+++ qemu-0.12.4/target-i386/parse_gl_h.c
32528@@ -0,0 +1,1496 @@
32529+/*
32530+ * Parse gl.h et glx.h to auto-generate source code
32531+ *
32532+ * Copyright (c) 2006,2007 Even Rouault
32533+ *
32534+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32535+ * of this software and associated documentation files (the "Software"), to deal
32536+ * in the Software without restriction, including without limitation the rights
32537+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32538+ * copies of the Software, and to permit persons to whom the Software is
32539+ * furnished to do so, subject to the following conditions:
32540+ *
32541+ * The above copyright notice and this permission notice shall be included in
32542+ * all copies or substantial portions of the Software.
32543+ *
32544+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32545+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32546+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32547+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32548+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32549+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32550+ * THE SOFTWARE.
32551+ */
32552+
32553+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32554+#include <stdio.h>
32555+#include <stdlib.h>
32556+#include <string.h>
32557+#include <assert.h>
32558+
32559+int isExtByName(const char* name)
32560+{
32561+ return (strstr(name, "ARB") != NULL) ||
32562+ (strstr(name, "IBM") != NULL) ||
32563+ (strstr(name, "EXT") != NULL) ||
32564+ (strstr(name, "ATI") != NULL) ||
32565+ (strstr(name, "NV") != NULL) ||
32566+ (strstr(name, "MESA") != NULL) ||
32567+ (strstr(name, "APPLE") != NULL) ||
32568+ (strstr(name, "SUN") != NULL) ||
32569+ (strstr(name, "SGI") != NULL);
32570+}
32571+
32572+char* get_arg_type(char* s)
32573+{
32574+ while(*s == ' ' || *s == '\t') s++;
32575+ char* n = s;
32576+ char* c = strstr(n, "const");
32577+ if (c)
32578+ n += 6;
32579+
32580+ char* t = strstr(n, " ");
32581+ if (t)
32582+ {
32583+ if (t[1] == '*')
32584+ t += 2;
32585+ t[0] = 0;
32586+ char* ori = t;
32587+ t = strstr(t+1, "[");
32588+ if (t)
32589+ {
32590+ memmove(ori, t, strlen(t));
32591+ strstr(ori, "]")[1] = 0;
32592+ }
32593+ }
32594+ return strdup(s);
32595+}
32596+
32597+typedef struct
32598+{
32599+ char* type;
32600+ char* name;
32601+ int nargs;
32602+ char** args;
32603+ int ok;
32604+ int just_for_server_side;
32605+ int has_out_parameters;
32606+ int isExt;
32607+} FuncDesc;
32608+
32609+int isExt(FuncDesc* func)
32610+{
32611+ return func->isExt;
32612+}
32613+
32614+char* get_type_string(char* type)
32615+{
32616+ if (strstr(type, "[16]"))
32617+ {
32618+ if (strstr(type, "float"))
32619+ return ("TYPE_16FLOAT");
32620+ else if (strstr(type, "double"))
32621+ return ("TYPE_16DOUBLE");
32622+ else
32623+ {
32624+ printf("inconnu %s\n", type);
32625+ exit(-1);
32626+ }
32627+ }
32628+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32629+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32630+ else if (strstr(type, "const GLvoid *"))
32631+ return "TYPE_ARRAY_VOID";
32632+ else if (strstr(type, "const GLchar *") ||
32633+ strstr(type, "const GLcharARB *"))
32634+ return "TYPE_NULL_TERMINATED_STRING";
32635+ else if (strstr(type, "const GLbyte *"))
32636+ return "TYPE_ARRAY_SIGNED_CHAR";
32637+ else if (strstr(type, "const GLubyte *"))
32638+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32639+ else if (strstr(type, "const GLshort *"))
32640+ return "TYPE_ARRAY_SHORT";
32641+ else if (strstr(type, "const GLushort *") ||
32642+ strstr(type, "const GLhalfNV *"))
32643+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32644+ else if (strstr(type, "const GLint *"))
32645+ return "TYPE_ARRAY_INT";
32646+ else if (strstr(type, "const GLuint *") ||
32647+ strstr(type, "const GLenum *"))
32648+ return "TYPE_ARRAY_UNSIGNED_INT";
32649+ else if (strstr(type, "const GLfloat *") ||
32650+ strstr(type, "const GLclampf *"))
32651+ return "TYPE_ARRAY_FLOAT";
32652+ else if (strstr(type, "const GLdouble *"))
32653+ return "TYPE_ARRAY_DOUBLE";
32654+ else if (strstr(type, "GLvoid *"))
32655+ return "TYPE_OUT_ARRAY_VOID";
32656+ else if (strstr(type, "GLboolean *") ||
32657+ strstr(type, "GLubyte *"))
32658+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32659+ else if (strstr(type, "GLcharARB *") ||
32660+ strstr(type, "GLchar *"))
32661+ return "TYPE_OUT_ARRAY_CHAR";
32662+ else if (strstr(type, "GLshort *"))
32663+ return "TYPE_OUT_ARRAY_SHORT";
32664+ else if (strstr(type, "GLushort *"))
32665+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32666+ else if (strstr(type, "GLint *")||
32667+ strstr(type, "GLsizei *"))
32668+ return "TYPE_OUT_ARRAY_INT";
32669+ else if (strstr(type, "GLuint *") ||
32670+ strstr(type, "GLenum *") ||
32671+ strstr(type, "GLhandleARB *"))
32672+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32673+ else if (strstr(type, "GLfloat *"))
32674+ return "TYPE_OUT_ARRAY_FLOAT";
32675+ else if (strstr(type, "GLdouble *"))
32676+ return "TYPE_OUT_ARRAY_DOUBLE";
32677+ else if (strcmp(type, "void") == 0)
32678+ return("TYPE_NONE");
32679+ else if (strcmp(type, "GLbyte") == 0)
32680+ return("TYPE_CHAR");
32681+ else if (strcmp(type, "GLubyte") == 0 ||
32682+ strcmp(type, "GLboolean") == 0)
32683+ return("TYPE_UNSIGNED_CHAR");
32684+ else if (strcmp(type, "GLshort") == 0)
32685+ return("TYPE_SHORT");
32686+ else if (strcmp(type, "GLushort") == 0 ||
32687+ strcmp(type, "GLhalfNV") == 0)
32688+ return("TYPE_UNSIGNED_SHORT");
32689+ else if (strcmp(type, "GLint") == 0 ||
32690+ strcmp(type, "GLsizei") == 0 ||
32691+ strcmp(type, "GLintptr") == 0 ||
32692+ strcmp(type, "GLsizeiptr") == 0 ||
32693+ strcmp(type, "GLintptrARB") == 0 ||
32694+ strcmp(type, "GLsizeiptrARB") == 0)
32695+ return("TYPE_INT");
32696+ else if (strcmp(type, "GLenum") == 0 ||
32697+ strcmp(type, "GLuint") == 0 ||
32698+ strcmp(type, "GLhandleARB") == 0 ||
32699+ strcmp(type, "GLbitfield") == 0)
32700+ return("TYPE_UNSIGNED_INT");
32701+ else if (strcmp(type, "GLfloat") == 0 ||
32702+ strcmp(type, "GLclampf") == 0)
32703+ return("TYPE_FLOAT");
32704+ else if (strcmp(type, "GLdouble") == 0 ||
32705+ strcmp(type, "GLclampd") == 0)
32706+ return("TYPE_DOUBLE");
32707+ else
32708+ {
32709+ printf("inconnu %s\n", type);
32710+ exit(-1);
32711+ }
32712+}
32713+
32714+typedef struct
32715+{
32716+ char* letter;
32717+ char* signature_type_name;
32718+ char* gl_c_type_name;
32719+ char* c_type_name;
32720+} ForIsKnownArgVector;
32721+
32722+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32723+#define N_FIELDS_IN_ARG_VECTOR 4
32724+
32725+
32726+typedef struct
32727+{
32728+ char* func_name;
32729+ char* signature_type_name;
32730+} KnownLastArgFunc;
32731+
32732+static KnownLastArgFunc knownLastArgFuncs[] =
32733+{
32734+{"glFogCoordfv", "TYPE_1FLOAT"},
32735+{"glFogCoorddv", "TYPE_1DOUBLE"},
32736+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32737+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32738+{"glFogCoordhvNV", "TYPE_1USHORT"},
32739+
32740+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32741+
32742+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32743+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32744+
32745+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32746+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32747+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32748+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32749+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32750+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32751+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32752+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32753+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32754+{"glGetQueryiv", "TYPE_OUT_1INT"},
32755+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32756+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32757+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32758+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32759+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32760+{"glGetProgramiv", "TYPE_OUT_1INT"},
32761+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32762+{"glGetShaderiv", "TYPE_OUT_1INT"},
32763+
32764+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32765+{"glCombinerParameterivNV", "TYPE_1INT"},
32766+
32767+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32768+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32769+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32770+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32771+
32772+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32773+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32774+
32775+{"glTexBumpParameterivATI", "TYPE_1INT"},
32776+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32777+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32778+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32779+
32780+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32781+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32782+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32783+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32784+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32785+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32786+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32787+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32788+
32789+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32790+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32791+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32792+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32793+
32794+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32795+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32796+
32797+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32798+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32799+
32800+{"glEdgeFlagv", "TYPE_1UCHAR"},
32801+
32802+{"glClipPlane", "TYPE_4DOUBLE"},
32803+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32804+
32805+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32806+
32807+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32808+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32809+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32810+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32811+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32812+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32813+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32814+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32815+
32816+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32817+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32818+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32819+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32820+
32821+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32822+{"glColorTableParameteriv", "TYPE_4INT"},
32823+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32824+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32825+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32826+{"glColorTableParameterivEXT", "TYPE_4INT"},
32827+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32828+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32829+
32830+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32831+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32832+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32833+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32834+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32835+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32836+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32837+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32838+
32839+/* Not sure at all for the 2 followingo ones ! */
32840+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32841+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32842+
32843+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32844+
32845+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32846+
32847+};
32848+
32849+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32850+{
32851+ static ForIsKnownArgVector my_tab[] =
32852+ {
32853+ { "b", "CHAR", "GLbyte", "signed char" },
32854+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32855+ { "s", "SHORT", "GLshort", "short" },
32856+ { "i", "INT", "GLint", "int" },
32857+ { "Integer", "INT", "GLint", "int" },
32858+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32859+ { "h", "SHORT", "GLhalf", "unsigned short" },
32860+ { "us", "SHORT", "GLushort", "unsigned short" },
32861+ { "ui", "INT", "GLuint", "unsigned int" },
32862+ { "Nb", "CHAR", "GLbyte", "signed char" },
32863+ { "Ns", "SHORT", "GLshort", "short" },
32864+ { "Ni", "INT", "GLint", "int" },
32865+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32866+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32867+ { "Nui", "INT", "GLuint", "unsigned int" },
32868+
32869+ { "f", "FLOAT", "GLfloat", "float" },
32870+ { "Float", "FLOAT", "GLfloat", "float" },
32871+ { "d", "DOUBLE", "GLdouble", "double" },
32872+ };
32873+
32874+ if (desc->nargs == 0)
32875+ return 0;
32876+
32877+ int i , j;
32878+
32879+ if (strstr(desc->name, "glVertexAttribs") ||
32880+ strstr(desc->name, "glProgramParameters") ||
32881+ strstr(desc->name, "glProgramEnvParameters") ||
32882+ strstr(desc->name, "glProgramLocalParameters") ||
32883+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32884+ return 0;
32885+
32886+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32887+ char signature[10];
32888+
32889+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32890+ {
32891+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32892+ {
32893+ if (p_signature_type_name)
32894+ {
32895+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32896+ }
32897+ if (p_c_type_name)
32898+ {
32899+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32900+ *p_c_type_name = "float";
32901+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32902+ *p_c_type_name = "double";
32903+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32904+ *p_c_type_name = "unsigned int";
32905+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32906+ *p_c_type_name = "int";
32907+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32908+ *p_c_type_name = "unsigned short";
32909+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32910+ *p_c_type_name = "short";
32911+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32912+ *p_c_type_name = "unsigned char";
32913+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32914+ *p_c_type_name = "char";
32915+ else
32916+ assert(0);
32917+ }
32918+ return 1;
32919+ }
32920+ }
32921+
32922+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32923+ {
32924+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32925+ {
32926+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32927+ sprintf(signature, "%sv", my_tab[i].letter);
32928+ else
32929+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32930+ if (strstr(desc->name, signature) &&
32931+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32932+ strstr(desc->args[desc->nargs - 1], "*"))
32933+ {
32934+ if (p_signature_type_name)
32935+ {
32936+ if (signatures[i][j-1][0] == 0)
32937+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32938+ *p_signature_type_name = signatures[i][j-1];
32939+ }
32940+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32941+ return 1;
32942+ }
32943+ }
32944+ }
32945+ return 0;
32946+}
32947+
32948+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32949+{
32950+ const char* symbolic_type = get_type_string(glType);
32951+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32952+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32953+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32954+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32955+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32956+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32957+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32958+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32959+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32960+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32961+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32962+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32963+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32964+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32965+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32966+ fprintf(server_stub, "(const float*)(args[%d])", j);
32967+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32968+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32969+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32970+ fprintf(server_stub, "(const double*)(args[%d])", j);
32971+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32972+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32973+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32974+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32975+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32976+ fprintf(server_stub, "(const char*)(args[%d])", j);
32977+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32978+ fprintf(server_stub, "(const short*)(args[%d])", j);
32979+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32980+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32981+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32982+ fprintf(server_stub, "(const int*)(args[%d])", j);
32983+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32984+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32985+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32986+ fprintf(server_stub, "(const float*)(args[%d])", j);
32987+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32988+ fprintf(server_stub, "(const double*)(args[%d])", j);
32989+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32990+ fprintf(server_stub, "(const char*)(args[%d])", j);
32991+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32992+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32993+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32994+ fprintf(server_stub, "(const void*)(args[%d])", j);
32995+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32996+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32997+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32998+ fprintf(server_stub, "(short*)(args[%d])", j);
32999+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
33000+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
33001+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
33002+ fprintf(server_stub, "(int*)(args[%d])", j);
33003+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
33004+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
33005+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
33006+ fprintf(server_stub, "(float*)(args[%d])", j);
33007+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
33008+ fprintf(server_stub, "(double*)(args[%d])", j);
33009+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
33010+ fprintf(server_stub, "(void*)(args[%d])", j);
33011+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
33012+ fprintf(server_stub, "(char*)(args[%d])", j);
33013+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
33014+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
33015+
33016+ else
33017+ {
33018+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33019+ assert(0);
33020+ }
33021+}
33022+
33023+static const char* func_dealt_by_hand[500] = { NULL };
33024+
33025+
33026+static const char* ignore_func[] =
33027+{
33028+ "glGetPointerv",
33029+ "glRectdv",
33030+ "glRectfv",
33031+ "glRectiv",
33032+ "glRectsv",
33033+ "glMultiDrawArrays",
33034+ "glMultiDrawArraysEXT",
33035+ "glMultiDrawElements",
33036+ "glMultiDrawElementsEXT",
33037+ "glUnmapBuffer",
33038+ "glUnmapBufferARB",
33039+ "glLoadTransposeMatrixf",
33040+ "glLoadTransposeMatrixd",
33041+ "glMultTransposeMatrixf",
33042+ "glMultTransposeMatrixd",
33043+ "glLoadTransposeMatrixfARB",
33044+ "glLoadTransposeMatrixdARB",
33045+ "glMultTransposeMatrixfARB",
33046+ "glMultTransposeMatrixdARB",
33047+
33048+ "glPixelDataRangeNV",
33049+ "glFlushPixelDataRangeNV",
33050+ "glVertexArrayRangeNV",
33051+ "glFlushVertexArrayRangeNV",
33052+ "glVertexWeightfEXT",
33053+
33054+ "glGetBufferPointerv",
33055+ "glGetBufferPointervARB",
33056+ "glGetVertexAttribPointerv",
33057+ "glGetVertexAttribPointervARB",
33058+ "glVertexAttribPointer",
33059+ "glVertexAttribPointerARB",
33060+ "glGetVariantPointervEXT",
33061+ NULL,
33062+};
33063+
33064+void get_func_dealt_by_hand()
33065+{
33066+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
33067+ char buffer[256];
33068+ int i = 0;
33069+ char* c;
33070+ while(fgets(buffer, 256, f))
33071+ {
33072+ if (strstr(buffer, "MAGIC_MACRO("))
33073+ {
33074+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
33075+ * strstr(func_dealt_by_hand[i], ")") = 0;
33076+ c = strstr(func_dealt_by_hand[i], "_");
33077+ if (c && c != func_dealt_by_hand[i]) *c = 0;
33078+ i ++;
33079+ }
33080+ }
33081+ fclose(f);
33082+
33083+ int j = 0;
33084+ while(ignore_func[j])
33085+ {
33086+ func_dealt_by_hand[i] = ignore_func[j];
33087+ i++;
33088+ j++;
33089+ }
33090+}
33091+
33092+static const char* just_for_server_side_list[] =
33093+{
33094+ "glEnableClientState",
33095+ "glDisableClientState",
33096+ "glPushClientAttrib",
33097+ "glPopClientAttrib",
33098+ "glPixelStorei",
33099+ "glPixelStoref",
33100+ "glClientActiveTexture",
33101+ "glClientActiveTextureARB",
33102+ "glEnableVertexAttribArray",
33103+ "glEnableVertexAttribArrayARB",
33104+ "glDisableVertexAttribArray",
33105+ "glDisableVertexAttribArrayARB",
33106+ "glDrawElementArrayATI",
33107+ "glDrawRangeElementArrayATI",
33108+ "glGenSymbolsEXT",
33109+ "glFreeObjectBufferATI",
33110+ "glUnmapObjectBufferATI",
33111+ "glLockArraysEXT",
33112+ "glUnlockArraysEXT",
33113+ "glDepthFunc",
33114+ "glFogf",
33115+ "glFogi",
33116+ "glClipPlane",
33117+ "glGetClipPlane",
33118+
33119+/* begin of openquartz optimization */
33120+#if 1
33121+ "glMatrixMode",
33122+ "glOrtho",
33123+ "glFrustum",
33124+ "glPushMatrix",
33125+ "glPopMatrix",
33126+ "glLoadIdentity",
33127+ "glLoadMatrixd",
33128+ "glLoadMatrixf",
33129+ "glMultMatrixd",
33130+ "glMultMatrixf",
33131+ "glRotated",
33132+ "glRotatef",
33133+ "glScaled",
33134+ "glScalef",
33135+ "glTranslated",
33136+ "glTranslatef",
33137+#endif
33138+/* end of openquartz optimization */
33139+
33140+ "glGetError",
33141+ "glActiveTextureARB",
33142+
33143+ "glViewport",
33144+ "glScissor",
33145+
33146+ "glBindBufferARB",
33147+ "glDeleteBuffersARB",
33148+ "glGenBuffersARB",
33149+ "glBufferDataARB",
33150+ "glBufferSubDataARB",
33151+ "glGetBufferSubDataARB",
33152+ "glGetBufferParameterivARB",
33153+ "glBindBuffer",
33154+ "glDeleteBuffers",
33155+ "glGenBuffers",
33156+ "glBufferData",
33157+ "glBufferSubData",
33158+ "glGetBufferSubData",
33159+ "glGetBufferParameteriv",
33160+
33161+ "glPushAttrib",
33162+ "glPopAttrib",
33163+ "glEnable",
33164+ "glDisable",
33165+ "glIsEnabled",
33166+ "glBindTexture",
33167+ "glBindTextureEXT",
33168+ "glFogfv",
33169+ "glFogiv",
33170+ "glBitmap",
33171+ "glGetTexImage",
33172+ "glReadPixels",
33173+ "glDrawPixels",
33174+ "glSelectBuffer",
33175+ "glFeedbackBuffer",
33176+
33177+ "glTexImage1D",
33178+ "glTexImage2D",
33179+ "glTexImage3D",
33180+ "glTexSubImage1D",
33181+ "glTexSubImage2D",
33182+ "glTexSubImage3D",
33183+
33184+ "glTexImage3DEXT",
33185+ "glTexSubImage1DEXT",
33186+ "glTexSubImage2DEXT",
33187+ "glTexSubImage3DEXT",
33188+
33189+ "glGetCompressedTexImage",
33190+ "glCompressedTexImage1D",
33191+ "glCompressedTexImage2D",
33192+ "glCompressedTexImage3D",
33193+ "glCompressedTexSubImage1D",
33194+ "glCompressedTexSubImage2D",
33195+ "glCompressedTexSubImage3D",
33196+
33197+ "glGetCompressedTexImageARB",
33198+ "glCompressedTexImage1DARB",
33199+ "glCompressedTexImage2DARB",
33200+ "glCompressedTexImage3DARB",
33201+ "glCompressedTexSubImage1DARB",
33202+ "glCompressedTexSubImage2DARB",
33203+ "glCompressedTexSubImage3DARB",
33204+
33205+ "glCallLists",
33206+ "glNewList",
33207+ "glDeleteLists",
33208+ "glGenLists",
33209+
33210+ "glGenTextures",
33211+ "glDeleteTextures",
33212+ "glDeleteTexturesEXT",
33213+ "glMap1f",
33214+ "glMap1d",
33215+ "glMap2f",
33216+ "glMap2d",
33217+ "glGetMapdv",
33218+ "glGetMapfv",
33219+ "glGetMapiv",
33220+ "glGetBooleanv",
33221+ "glGetIntegerv",
33222+ "glGetFloatv",
33223+ "glGetDoublev",
33224+
33225+ "glGetPixelMapfv",
33226+ "glGetPixelMapuiv",
33227+ "glGetPixelMapusv",
33228+ "glGetProgramStringARB",
33229+ "glGetProgramStringNV",
33230+ "glArrayElement",
33231+ "glDrawArrays",
33232+ "glDrawElements",
33233+ "glDrawRangeElements",
33234+ "glDrawRangeElementsEXT",
33235+ "glGetProgramInfoLog",
33236+ "glGetTexLevelParameteriv",
33237+ "glGetInfoLogARB",
33238+ "glGetShaderInfoLog",
33239+ "glGetAttachedObjectsARB",
33240+ "glGetAttachedShaders",
33241+ "glGetActiveUniformARB",
33242+ "glGetActiveUniform",
33243+ "glGetUniformLocationARB",
33244+ "glGetUniformLocation",
33245+ "glGetUniformfvARB",
33246+ "glGetUniformfv",
33247+ "glGetUniformivARB",
33248+ "glGetUniformiv",
33249+ "glGetUniformuivEXT",
33250+ "glGetShaderSourceARB",
33251+ "glGetShaderSource",
33252+ "glGetActiveAttribARB",
33253+ "glGetActiveAttrib",
33254+ "glGetAttribLocationARB",
33255+ "glGetAttribLocation",
33256+
33257+ "glNewObjectBufferATI",
33258+ "glUpdateObjectBufferATI",
33259+
33260+ "glSetLocalConstantEXT",
33261+ "glSetInvariantEXT",
33262+ "glVariantbvEXT",
33263+ "glVariantsvEXT",
33264+ "glVariantivEXT",
33265+ "glVariantfvEXT",
33266+ "glVariantdvEXT",
33267+ "glVariantubvEXT",
33268+ "glVariantusvEXT",
33269+ "glVariantuivEXT",
33270+ "glGetVariantBooleanvEXT",
33271+ "glGetVariantIntegervEXT",
33272+ "glGetVariantFloatvEXT",
33273+ "glGetInvariantBooleanvEXT",
33274+ "glGetInvariantIntegervEXT",
33275+ "glGetInvariantFloatvEXT",
33276+ "glGetLocalConstantBooleanvEXT",
33277+ "glGetLocalConstantIntegervEXT",
33278+ "glGetLocalConstantFloatvEXT",
33279+
33280+ "glMatrixIndexubvARB",
33281+ "glMatrixIndexusvARB",
33282+ "glMatrixIndexuivARB",
33283+
33284+ "glColorTable",
33285+ "glColorSubTable",
33286+ "glGetColorTable",
33287+ "glConvolutionFilter1D",
33288+ "glConvolutionFilter2D",
33289+ "glGetConvolutionFilter",
33290+ "glSeparableFilter2D",
33291+ "glGetSeparableFilter",
33292+ "glGetHistogram",
33293+ "glGetMinmax",
33294+ "glColorTableEXT",
33295+ "glColorSubTableEXT",
33296+ "glGetColorTableEXT",
33297+ "glConvolutionFilter1DEXT",
33298+ "glConvolutionFilter2DEXT",
33299+ "glGetConvolutionFilterEXT",
33300+ "glSeparableFilter2DEXT",
33301+ "glGetSeparableFilterEXT",
33302+ "glGetHistogramEXT",
33303+ "glGetMinmaxEXT",
33304+
33305+ "glGetTexParameterfv",
33306+
33307+ "glGetVertexAttribivARB",
33308+ "glGetVertexAttribfvARB",
33309+ "glGetVertexAttribdvARB",
33310+ "glGetVertexAttribiv",
33311+ "glGetVertexAttribfv",
33312+ "glGetVertexAttribdv",
33313+
33314+ "glGetDetailTexFuncSGIS",
33315+ "glGetSharpenTexFuncSGIS",
33316+
33317+ "fake_gluBuild2DMipmaps",
33318+
33319+ "glRenderMode",
33320+
33321+ "glEnableVariantClientStateEXT",
33322+ "glDisableVariantClientStateEXT",
33323+
33324+ "glGetActiveVaryingNV",
33325+
33326+ NULL,
33327+};
33328+
33329+static int just_for_server_side_func(char* funcname)
33330+{
33331+ int i;
33332+ for(i=0;just_for_server_side_list[i];i++)
33333+ {
33334+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33335+ return 1;
33336+ }
33337+ return 0;
33338+}
33339+
33340+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33341+{
33342+ char buffer[256];
33343+ while(fgets(buffer, 256, f))
33344+ {
33345+
33346+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33347+ {
33348+ int i = 0;
33349+ int skip = 0;
33350+ if (func_dealt_by_hand[0] == 0)
33351+ {
33352+ get_func_dealt_by_hand();
33353+ }
33354+ while (func_dealt_by_hand[i])
33355+ {
33356+ if (strstr(buffer, func_dealt_by_hand[i]))
33357+ {
33358+ skip = 1;
33359+ break;
33360+ }
33361+ i++;
33362+ }
33363+ if (skip)
33364+ continue;
33365+
33366+ char** args = malloc(15 * sizeof(char*));
33367+ int narg = 0;
33368+ char* type = buffer + 6;
33369+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33370+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33371+ n[-1] = 0;
33372+ type = strdup(type);
33373+ n += skip_length;
33374+ char* fonc = n;
33375+ n = strstr(n, "(");
33376+ if (n[-1] == ' ') n[-1] = 0;
33377+ n[0] = 0;
33378+ fonc = strdup(fonc);
33379+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33380+ {
33381+ }
33382+ else*/
33383+
33384+
33385+ if (ignoreEXT == 1 && isExtByName(fonc))
33386+ {
33387+ free(type);
33388+ free(fonc);
33389+ continue;
33390+ }
33391+ n++;
33392+ while(1)
33393+ {
33394+ char* virg = strstr(n, ",");
33395+ if (virg)
33396+ {
33397+ args[narg] = n;
33398+ virg[0] = 0;
33399+ args[narg] = get_arg_type(args[narg]);
33400+ narg++;
33401+ n = virg+1;
33402+ }
33403+ else
33404+ break;
33405+ }
33406+ while (strstr(n, ")") == 0)
33407+ {
33408+ fgets(buffer, 256, f);
33409+ n = buffer;
33410+ while(1)
33411+ {
33412+ char* virg = strstr(n, ",");
33413+ if (virg)
33414+ {
33415+ args[narg] = n;
33416+ virg[0] = 0;
33417+ args[narg] = get_arg_type(args[narg]);
33418+ narg++;
33419+ n = virg+1;
33420+ }
33421+ else
33422+ break;
33423+ }
33424+ }
33425+ char* par = strstr(n, ")");
33426+ args[narg] = n;
33427+ par[0] = 0;
33428+ args[narg] = get_arg_type(args[narg]);
33429+ narg++;
33430+
33431+
33432+ /*printf("%s %s (", type, fonc);
33433+ for(i=0;i<narg;i++)
33434+ {
33435+ printf("%s,", args[i]);
33436+ }
33437+ printf(")\n");*/
33438+
33439+ for(i=0;i<funcDescCount;i++)
33440+ {
33441+ if (strcmp(funcDesc[i].name, fonc) == 0)
33442+ {
33443+ if (ignoreEXT == 0)
33444+ funcDesc[i].isExt = 1;
33445+ break;
33446+ }
33447+ }
33448+ if (i == funcDescCount)
33449+ {
33450+ funcDesc[funcDescCount].type = type;
33451+ funcDesc[funcDescCount].name = fonc;
33452+ funcDesc[funcDescCount].nargs = narg;
33453+ funcDesc[funcDescCount].args = args;
33454+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33455+ funcDescCount++;
33456+ }
33457+ else
33458+ {
33459+ free(fonc);
33460+ free(args);
33461+ free(type);
33462+ }
33463+ /*
33464+ for(i=0;i<narg;i++)
33465+ {
33466+ free(args[i]);
33467+ }
33468+ free(fonc);
33469+ free(type);*/
33470+ }
33471+ }
33472+ return funcDescCount;
33473+}
33474+
33475+typedef struct
33476+{
33477+ char* str;
33478+ int i;
33479+} StringIntStruct;
33480+
33481+StringIntStruct argDependingOnPreviousArgTab[] =
33482+{
33483+ { "glLoadProgramNV", 3},
33484+ { "ProgramNamedParameter", 2},
33485+ { "glDeleteBuffers", 1},
33486+ { "glDrawBuffers", 1},
33487+ { "glGenPrograms", 1},
33488+ { "glDeletePrograms", 1},
33489+ { "glGenQueries", 1},
33490+ { "glDeleteQueries", 1},
33491+ { "glGenFencesNV", 1},
33492+ { "glDeleteFencesNV", 1},
33493+ { "glGenOcclusionQueriesNV", 1},
33494+ { "glDeleteOcclusionQueriesNV", 1},
33495+ { "glRequestResidentProgramsNV", 1},
33496+ { "glDeleteTextures", 1},
33497+ { "glGenFramebuffersEXT", 1},
33498+ { "glDeleteFramebuffersEXT", 1},
33499+ { "glGenRenderbuffersEXT", 1},
33500+ { "glDeleteRenderbuffersEXT", 1},
33501+ { "glUniform1fv", 2},
33502+ { "glUniform2fv", 2},
33503+ { "glUniform3fv", 2},
33504+ { "glUniform4fv", 2},
33505+ { "glUniform1iv", 2},
33506+ { "glUniform2iv", 2},
33507+ { "glUniform3iv", 2},
33508+ { "glUniform4iv", 2},
33509+ { "glUniform1uivEXT", 2},
33510+ { "glUniform2uivEXT", 2},
33511+ { "glUniform3uivEXT", 2},
33512+ { "glUniform4uivEXT", 2},
33513+ { "glProgramParameters4fvNV", 3},
33514+ { "glProgramParameters4dvNV", 3},
33515+ { "glProgramLocalParameters4fvEXT", 3},
33516+ { "glProgramLocalParametersI4ivNV", 3},
33517+ { "glProgramLocalParametersI4uivNV", 3},
33518+ { "glProgramEnvParameters4fvEXT", 3},
33519+ { "glProgramEnvParametersI4ivNV", 3},
33520+ { "glProgramEnvParametersI4uivNV", 3},
33521+ { "glAreProgramsResidentNV", 1} ,
33522+ { "glAreProgramsResidentNV", 2} ,
33523+ { "glAreTexturesResident", 1} ,
33524+ { "glAreTexturesResident", 2} ,
33525+ { "glPrioritizeTextures", 1} ,
33526+ { "glPrioritizeTextures", 2} ,
33527+ { "glProgramStringARB", 3} ,
33528+
33529+ { "glVertexAttribs", 2},
33530+
33531+ { "glUniformMatrix", 3 },
33532+
33533+ { "glGetVertexAttribfv", 2},
33534+ { "glGetVertexAttribiv", 2},
33535+ { "glGetVertexAttribdv", 2},
33536+ { "glGetVertexAttribIivEXT", 2},
33537+ { "glGetVertexAttribIuivEXT", 2},
33538+
33539+ { "glPointParameterfv", 1},
33540+ { "glPointParameteriv", 1},
33541+
33542+ { "glWeightbvARB", 1},
33543+ { "glWeightsvARB", 1},
33544+ { "glWeightivARB", 1},
33545+ { "glWeightfvARB", 1},
33546+ { "glWeightdvARB", 1},
33547+ { "glWeightubvARB", 1},
33548+ { "glWeightusvARB", 1},
33549+ { "glWeightuivARB", 1},
33550+
33551+ { "glTexEnvfv", 2},
33552+ { "glTexEnviv", 2},
33553+ { "glGetTexEnvfv", 2},
33554+ { "glGetTexEnviv", 2},
33555+ { "glTexGendv", 2},
33556+ { "glTexGenfv", 2},
33557+ { "glTexGeniv", 2},
33558+ { "glGetTexGendv", 2},
33559+ { "glGetTexGenfv", 2},
33560+ { "glGetTexGeniv", 2},
33561+
33562+ { "glLightfv", 2},
33563+ { "glLightiv", 2},
33564+ { "glGetLightfv", 2},
33565+ { "glGetLightiv", 2},
33566+ { "glFragmentLightfvSGIX", 2},
33567+ { "glFragmentLightivSGIX", 2},
33568+ { "glGetFragmentLightfvSGIX", 2},
33569+ { "glGetFragmentLightivSGIX", 2},
33570+
33571+
33572+ { "glLightModelfv", 1},
33573+ { "glLightModeliv", 1},
33574+ { "glFragmentLightModelfvSGIX", 1},
33575+ { "glFragmentLightModelivSGIX", 1},
33576+
33577+ { "glMaterialfv", 2},
33578+ { "glMaterialiv", 2},
33579+ { "glGetMaterialfv", 2},
33580+ { "glGetMaterialiv", 2},
33581+ { "glFragmentMaterialfvSGIX", 2},
33582+ { "glFragmentMaterialivSGIX", 2},
33583+ { "glGetFragmentMaterialfvSGIX", 2},
33584+ { "glGetFragmentMaterialivSGIX", 2},
33585+
33586+ { "glFogiv", 1},
33587+ { "glFogfv", 1},
33588+
33589+ { "glTexParameterfv", 2},
33590+ { "glTexParameteriv", 2},
33591+ { "glGetTexParameterfv", 2},
33592+ { "glGetTexParameteriv", 2},
33593+
33594+ { "glTexParameterIivEXT", 2},
33595+ { "glTexParameterIuivEXT", 2},
33596+ { "glGetTexParameterIivEXT", 2},
33597+ { "glGetTexParameterIuivEXT", 2},
33598+
33599+ { "glPixelMapfv", 2},
33600+ { "glPixelMapuiv", 2},
33601+ { "glPixelMapusv", 2},
33602+
33603+ { "glDetailTexFuncSGIS", 2 },
33604+ { "glSharpenTexFuncSGIS", 2 },
33605+
33606+ { "glSpriteParameterfvSGIX", 1 },
33607+ { "glSpriteParameterivSGIX", 1 },
33608+
33609+ { "ConvolutionParameter", 2},
33610+
33611+ { "glProgramBufferParametersfvNV", 4},
33612+ { "glProgramBufferParametersIivNV", 4},
33613+ { "glProgramBufferParametersIuivNV", 4},
33614+
33615+ { "glTransformFeedbackAttribsNV", 1},
33616+ { "glTransformFeedbackVaryingsNV", 2},
33617+};
33618+
33619+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33620+{
33621+ int i;
33622+ if (strstr(funcDesc->args[j], "*") == NULL)
33623+ return 0;
33624+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33625+ {
33626+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33627+ return 1;
33628+ }
33629+ return 0;
33630+}
33631+
33632+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33633+{
33634+ int j;
33635+ for(j=0;j<funcDesc->nargs;j++)
33636+ {
33637+ if (j != 0) fprintf(f,", ");
33638+ if (strstr(funcDesc->args[j], "[16]"))
33639+ {
33640+ if (strstr(funcDesc->args[j], "float"))
33641+ {
33642+ fprintf(f, "const GLfloat arg_%d[16]", j);
33643+ }
33644+ else if (strstr(funcDesc->args[j], "double"))
33645+ {
33646+ fprintf(f, "const GLdouble arg_%d[16]", j);
33647+ }
33648+ else
33649+ {
33650+ exit(-1);
33651+ }
33652+ }
33653+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33654+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33655+ else
33656+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33657+ }
33658+}
33659+
33660+int main(int argc, char* argv[])
33661+{
33662+ FuncDesc funcDesc[3000];
33663+ int funcDescCount = 0;
33664+ FILE* f;
33665+
33666+ f = fopen("../target-i386/mesa_gl.h", "r");
33667+ assert(f);
33668+ /*if (!f)
33669+ f = fopen("/usr/include/GL/gl.h", "r");*/
33670+ funcDescCount = parse(f, funcDesc, 0, 1);
33671+ fclose(f);
33672+
33673+ f = fopen("../target-i386/mesa_glext.h", "r");
33674+ assert(f);
33675+ /*if (!f)
33676+ f = fopen("/usr/include/GL/glext.h", "r");*/
33677+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33678+ fclose(f);
33679+
33680+ FILE* header = fopen("gl_func.h", "w");
33681+ FILE* client_stub = fopen("client_stub.c", "w");
33682+ FILE* server_stub = fopen("server_stub.c", "w");
33683+
33684+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33685+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33686+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33687+ fprintf(header, "enum {\n"
33688+ "#include \"gl_func_perso.h\"\n");
33689+
33690+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33691+
33692+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33693+
33694+ int i;
33695+ for(i=0;i<funcDescCount;i++)
33696+ {
33697+ funcDesc[i].ok = 0;
33698+ char* name = funcDesc[i].name;
33699+ char* type = funcDesc[i].type;
33700+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33701+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33702+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33703+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33704+ {
33705+ int pointer_of_unknown_size = 0;
33706+ int j;
33707+
33708+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33709+ {
33710+ funcDesc[i].nargs = 0;
33711+ }
33712+ for(j=0;j<funcDesc[i].nargs-1;j++)
33713+ {
33714+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33715+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33716+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33717+ {
33718+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33719+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33720+ }
33721+ }
33722+
33723+ if (pointer_of_unknown_size == 0)
33724+ {
33725+ char* signature_type_name;
33726+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33727+ {
33728+ if (strstr(signature_type_name, "TYPE_OUT"))
33729+ funcDesc[i].has_out_parameters = 1;
33730+ }
33731+ else
33732+ {
33733+ if (funcDesc[i].nargs-1 >= 0)
33734+ {
33735+ j = funcDesc[i].nargs-1;
33736+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33737+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33738+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33739+ {
33740+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33741+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33742+ }
33743+ }
33744+ }
33745+ }
33746+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33747+ {
33748+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33749+ {
33750+ free(funcDesc[i].args[0]);
33751+ if (strstr(funcDesc[i].name, "Matrixf"))
33752+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33753+ else
33754+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33755+ pointer_of_unknown_size = 0;
33756+ }
33757+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33758+ {
33759+ free(funcDesc[i].args[0]);
33760+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33761+ pointer_of_unknown_size = 0;
33762+ }
33763+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33764+ {
33765+ free(funcDesc[i].args[0]);
33766+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33767+ funcDesc[i].has_out_parameters = 1;
33768+ pointer_of_unknown_size = 0;
33769+ }
33770+ }
33771+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33772+ {
33773+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33774+ funcDesc[i].ok = 1;
33775+ if (just_for_server_side_func(name))
33776+ funcDesc[i].just_for_server_side = 1;
33777+ for(j=0;j<funcDesc[i].nargs;j++)
33778+ {
33779+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33780+ funcDesc[i].has_out_parameters = 1;
33781+ }
33782+ }
33783+ else
33784+ {
33785+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33786+ }
33787+ }
33788+ }
33789+
33790+ fprintf(header, " GL_N_CALLS\n};\n");
33791+
33792+
33793+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33794+ fprintf(server_stub, "{\n");
33795+ fprintf(server_stub, " switch(func_number)\n");
33796+ fprintf(server_stub, " {\n");
33797+
33798+
33799+ for(i=0;i<funcDescCount;i++)
33800+ {
33801+ if (funcDesc[i].ok)
33802+ {
33803+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33804+ funcDesc[i].name,
33805+ get_type_string(funcDesc[i].type),
33806+ funcDesc[i].has_out_parameters);
33807+ fprintf(header, "%d", funcDesc[i].nargs);
33808+ int j;
33809+ char* signature_type_name;
33810+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33811+
33812+ for(j=0;j<n_args_to_check;j++)
33813+ {
33814+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33815+ {
33816+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33817+ }
33818+ else
33819+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33820+ }
33821+
33822+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33823+ {
33824+ fprintf(header, ", %s", signature_type_name);
33825+ }
33826+ fprintf(header, "};\n");
33827+
33828+
33829+ if (funcDesc[i].just_for_server_side == 0)
33830+ {
33831+ if (isExt(&funcDesc[i]))
33832+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33833+ else
33834+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33835+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33836+ fprintf(client_stub, ")\n");
33837+ fprintf(client_stub, "{\n");
33838+ if (strcmp(funcDesc[i].type, "void") != 0)
33839+ {
33840+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33841+ if (isExt(&funcDesc[i]))
33842+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33843+ }
33844+ else
33845+ {
33846+ if (isExt(&funcDesc[i]))
33847+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33848+ }
33849+
33850+ /*
33851+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33852+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33853+ for(j=0;j<funcDesc[i].nargs;j++)
33854+ {
33855+ fprintf(client_stub, ", arg_%d", j);
33856+ }
33857+ fprintf(client_stub, ");\n");
33858+ */
33859+
33860+ if (funcDesc[i].nargs)
33861+ {
33862+ fprintf(client_stub, " long args[] = { ");
33863+ for(j=0;j<funcDesc[i].nargs;j++)
33864+ {
33865+ if (j > 0) fprintf(client_stub, ", ");
33866+ if (strstr(funcDesc[i].args[j], "*"))
33867+ {
33868+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33869+ }
33870+ else
33871+ {
33872+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33873+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33874+ fprintf(client_stub, "CHAR_TO_ARG");
33875+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33876+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33877+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33878+ fprintf(client_stub, "SHORT_TO_ARG");
33879+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33880+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33881+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33882+ fprintf(client_stub, "INT_TO_ARG");
33883+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33884+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33885+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33886+ fprintf(client_stub, "FLOAT_TO_ARG");
33887+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33888+ fprintf(client_stub, "POINTER_TO_ARG");
33889+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33890+ fprintf(client_stub, "DOUBLE_TO_ARG");
33891+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33892+ fprintf(client_stub, "POINTER_TO_ARG");
33893+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33894+ fprintf(client_stub, "POINTER_TO_ARG");
33895+ else
33896+ {
33897+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33898+ assert(0);
33899+ }
33900+ fprintf(client_stub, "(arg_%d)", j);
33901+ }
33902+ }
33903+ fprintf(client_stub, "};\n");
33904+ }
33905+
33906+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33907+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33908+ (funcDesc[i].nargs) ? "args" : "NULL");
33909+
33910+ if (strcmp(funcDesc[i].type, "void") != 0)
33911+ {
33912+ fprintf(client_stub, " return ret;\n");
33913+ }
33914+ fprintf(client_stub, "}\n\n");
33915+ }
33916+
33917+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33918+ fprintf(server_stub, " {\n");
33919+
33920+ if (isExt(&funcDesc[i]))
33921+ {
33922+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33923+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33924+ fprintf(server_stub, "));\n");
33925+ }
33926+
33927+ fprintf(server_stub, " ");
33928+
33929+ if (strcmp(funcDesc[i].type, "void") == 0)
33930+ ;
33931+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33932+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33933+ fprintf(server_stub, "*pret_int = ");
33934+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33935+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33936+ fprintf(server_stub, "*pret_char = ");
33937+ else
33938+ {
33939+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33940+ exit(-1);
33941+ }
33942+ /*if (strstr(funcDesc[i].name, "EXT"))
33943+ {
33944+ char* dup = strdup(funcDesc[i].name);
33945+ *strstr(dup, "EXT") = 0;
33946+ fprintf(server_stub, "%s(", dup);
33947+ free(dup);
33948+ }
33949+ else*/
33950+ {
33951+ if (isExt(&funcDesc[i]))
33952+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33953+ else
33954+ fprintf(server_stub, "%s(", funcDesc[i].name);
33955+ }
33956+ char* c_type_name;
33957+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33958+ {
33959+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33960+ {
33961+ if (j != 0) fprintf(server_stub,", ");
33962+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33963+ }
33964+ if (j != 0) fprintf(server_stub,", ");
33965+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33966+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33967+ else
33968+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33969+ }
33970+ else
33971+ {
33972+ for(j=0;j<funcDesc[i].nargs;j++)
33973+ {
33974+ if (j != 0) fprintf(server_stub,", ");
33975+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33976+ }
33977+ }
33978+ fprintf(server_stub, ");\n");
33979+
33980+ fprintf(server_stub, " break;\n");
33981+ fprintf(server_stub, " }\n");
33982+ }
33983+ }
33984+
33985+ fprintf(server_stub, " default:\n");
33986+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33987+ fprintf(server_stub, " break;\n");
33988+ fprintf(server_stub, " }\n");
33989+ fprintf(server_stub, "}\n");
33990+
33991+ fprintf(header, "#undef MAGIC_MACRO\n");
33992+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33993+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33994+ fprintf(header, "{\n");
33995+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33996+ for(i=0;i<funcDescCount;i++)
33997+ {
33998+ if (funcDesc[i].ok)
33999+ {
34000+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
34001+ }
34002+ }
34003+ fprintf(header, "};\n\n");
34004+
34005+ fprintf(header, "#undef MAGIC_MACRO\n");
34006+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
34007+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
34008+ fprintf(header, "{\n");
34009+ fprintf(header, "#include \"gl_func_perso.h\"\n");
34010+ for(i=0;i<funcDescCount;i++)
34011+ {
34012+ if (funcDesc[i].ok)
34013+ {
34014+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
34015+ }
34016+ }
34017+ fprintf(header, "};\n\n");
34018+
34019+ fclose(header);
34020+ fclose(server_stub);
34021+ fclose(client_stub);
34022+
34023+ return 0;
34024+}
34025Index: qemu-0.12.4/target-i386/parse_mesa_get_c.c
34026===================================================================
34027--- /dev/null
34028+++ qemu-0.12.4/target-i386/parse_mesa_get_c.c
34029@@ -0,0 +1,225 @@
34030+/*
34031+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
34032+ *
34033+ * Copyright (c) 2007 Even Rouault
34034+ *
34035+ * Permission is hereby granted, free of charge, to any person obtaining a copy
34036+ * of this software and associated documentation files (the "Software"), to deal
34037+ * in the Software without restriction, including without limitation the rights
34038+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34039+ * copies of the Software, and to permit persons to whom the Software is
34040+ * furnished to do so, subject to the following conditions:
34041+ *
34042+ * The above copyright notice and this permission notice shall be included in
34043+ * all copies or substantial portions of the Software.
34044+ *
34045+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34046+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34047+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
34048+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34049+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34050+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34051+ * THE SOFTWARE.
34052+ */
34053+
34054+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
34055+
34056+#include <stdlib.h>
34057+#include <stdio.h>
34058+#include <string.h>
34059+#include <assert.h>
34060+
34061+#include "mesa_gl.h"
34062+#include "mesa_glext.h"
34063+
34064+/* #include "mesa_enums.c" */
34065+
34066+int gl_lookup_enum_by_name(const char* name)
34067+{
34068+ FILE* f;
34069+ char buffer[256];
34070+ char template1[256];
34071+ char template2[256];
34072+ int i;
34073+ sprintf(template1, "#define %s\t", name);
34074+ sprintf(template2, "#define %s ", name);
34075+ for(i=0;i<2;i++)
34076+ {
34077+ if (i == 0)
34078+ f = fopen("mesa_gl.h", "r");
34079+ else
34080+ f = fopen("mesa_glext.h", "r");
34081+ while(fgets(buffer, 256, f))
34082+ {
34083+ if (strstr(buffer, template1) || strstr(buffer, template2))
34084+ {
34085+ char* c = strstr(buffer, "0x");
34086+ assert(c);
34087+ int ret;
34088+ ret = strtol(c, NULL, 16);
34089+ return ret;
34090+ }
34091+ }
34092+ fclose(f);
34093+ }
34094+
34095+ return -1;
34096+}
34097+
34098+typedef struct
34099+{
34100+ int value;
34101+ char* name;
34102+ int nb_elts;
34103+} Token;
34104+
34105+int compare_func(Token* a, Token* b)
34106+{
34107+ return a->value - b->value;
34108+}
34109+
34110+typedef struct
34111+{
34112+ int i;
34113+ char* str;
34114+} Cpl;
34115+#define CPL(x) {x, #x}
34116+
34117+Cpl constantsOneVal[] =
34118+{
34119+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34120+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34121+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34122+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34123+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34124+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34125+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34126+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34127+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34128+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34129+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34130+};
34131+#define NB_CONSTANTS_ONE_VAL 11
34132+
34133+int main(int argc, char* argv[])
34134+{
34135+ FILE* f = fopen("mesa_get.c", "r");
34136+ char buffer[256];
34137+ int state = 0;
34138+ char name[256];
34139+ int count = 0;
34140+ char template[256];
34141+ Token tokens[1000];
34142+ int ntoken = 0;
34143+ int i;
34144+ FILE* outf = fopen("glgetv_cst.h", "w");
34145+
34146+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34147+ fprintf(outf, "typedef struct {\n");
34148+ fprintf(outf, " GLuint count;\n");
34149+ fprintf(outf, " GLenum token;\n");
34150+ fprintf(outf, " const char *name;\n");
34151+ fprintf(outf, "} GlGetConstant ;\n");
34152+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34153+
34154+ while(fgets(buffer, 256, f))
34155+ {
34156+ if (strstr(buffer, "_mesa_GetBooleanv"))
34157+ {
34158+ state = 1;
34159+ }
34160+ else if (state == 1)
34161+ {
34162+ if (strstr(buffer, "_mesa_GetFloatv"))
34163+ {
34164+ break;
34165+ }
34166+ else if (strstr(buffer, "case GL_"))
34167+ {
34168+ strcpy(name, strstr(buffer, "case GL_") + 5);
34169+ *strstr(name, ":") = 0;
34170+ count = 0;
34171+ strcpy(template, "params[0]");
34172+ }
34173+ else if (strstr(buffer, template))
34174+ {
34175+ count ++;
34176+ sprintf(template, "params[%d]", count);
34177+ }
34178+ else if (strstr(buffer, "break"))
34179+ {
34180+ if (count > 0)
34181+ {
34182+ int gl_lookup = gl_lookup_enum_by_name(name);
34183+ /*
34184+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34185+ if (mesa_lookup != -1)
34186+ {
34187+ if(mesa_lookup != gl_lookup)
34188+ {
34189+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34190+ exit(-1);
34191+ }
34192+ }*/
34193+ if (gl_lookup == -1)
34194+ {
34195+ fprintf(stderr, "not found in includes : %s\n", name);
34196+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34197+ }
34198+ else
34199+ {
34200+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34201+ tokens[ntoken].value = gl_lookup;
34202+ tokens[ntoken].nb_elts = count;
34203+ tokens[ntoken].name = strdup(name);
34204+ ntoken++;
34205+ }
34206+ /*fprintf(outf, "#ifdef %s\n", name);
34207+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34208+ fprintf(outf, "#endif\n");*/
34209+ }
34210+ else
34211+ fprintf(stderr, "not recognized : %s\n", name);
34212+ }
34213+ }
34214+ }
34215+
34216+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34217+ {
34218+ tokens[ntoken].value = constantsOneVal[i].i;
34219+ tokens[ntoken].nb_elts = 1;
34220+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34221+ ntoken++;
34222+ }
34223+
34224+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34225+ tokens[ntoken].nb_elts = 1;
34226+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34227+ ntoken++;
34228+
34229+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34230+ tokens[ntoken].nb_elts = 3;
34231+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34232+ ntoken++;
34233+
34234+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34235+ tokens[ntoken].nb_elts = 3;
34236+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34237+ ntoken++;
34238+
34239+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34240+ tokens[ntoken].nb_elts = 4;
34241+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34242+ ntoken++;
34243+
34244+
34245+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34246+ for(i=0;i<ntoken;i++)
34247+ {
34248+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34249+ }
34250+ fprintf(outf, "};\n");
34251+ fclose(f);
34252+ fclose(outf);
34253+ return 0;
34254+}
34255Index: qemu-0.12.4/target-i386/translate.c
34256===================================================================
34257--- qemu-0.12.4.orig/target-i386/translate.c
34258+++ qemu-0.12.4/target-i386/translate.c
34259@@ -743,6 +743,8 @@ static void gen_check_io(DisasContext *s
34260 int state_saved;
34261 target_ulong next_eip;
34262
34263+ return;
34264+
34265 state_saved = 0;
34266 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34267 if (s->cc_op != CC_OP_DYNAMIC)
34268@@ -2676,11 +2678,18 @@ static void gen_exception(DisasContext *
34269 s->is_jmp = 3;
34270 }
34271
34272+int enable_gl = 0;
34273+
34274 /* an interrupt is different from an exception because of the
34275 privilege checks */
34276 static void gen_interrupt(DisasContext *s, int intno,
34277 target_ulong cur_eip, target_ulong next_eip)
34278 {
34279+ if (enable_gl && intno == 0x99) {
34280+ gen_helper_opengl();
34281+ return;
34282+ }
34283+
34284 if (s->cc_op != CC_OP_DYNAMIC)
34285 gen_op_set_cc_op(s->cc_op);
34286 gen_jmp_im(cur_eip);
34287Index: qemu-0.12.4/vl.c
34288===================================================================
34289--- qemu-0.12.4.orig/vl.c
34290+++ qemu-0.12.4/vl.c
34291@@ -238,6 +238,7 @@ int semihosting_enabled = 0;
34292 #ifdef TARGET_ARM
34293 int old_param = 0;
34294 #endif
34295+int force_pointer = 0;
34296 const char *qemu_name;
34297 int alt_grab = 0;
34298 int ctrl_grab = 0;
34299@@ -246,6 +247,7 @@ unsigned int nb_prom_envs = 0;
34300 const char *prom_envs[MAX_PROM_ENVS];
34301 #endif
34302 int boot_menu;
34303+extern int enable_gl;
34304
34305 int nb_numa_nodes;
34306 uint64_t node_mem[MAX_NODES];
34307@@ -4432,6 +4434,8 @@ static void select_vgahw (const char *p)
34308 } else if (strstart(p, "xenfb", &opts)) {
34309 vga_interface_type = VGA_XENFB;
34310 } else if (!strstart(p, "none", &opts)) {
34311+ }
34312+ else {
34313 invalid_vga:
34314 fprintf(stderr, "Unknown vga type: %s\n", p);
34315 exit(1);
34316@@ -5563,6 +5567,9 @@ int main(int argc, char **argv, char **e
34317 old_param = 1;
34318 break;
34319 #endif
34320+ case QEMU_OPTION_force_pointer:
34321+ force_pointer = 1;
34322+ break;
34323 case QEMU_OPTION_clock:
34324 configure_alarms(optarg);
34325 break;
34326@@ -5577,6 +5584,12 @@ int main(int argc, char **argv, char **e
34327 }
34328 configure_rtc(opts);
34329 break;
34330+#ifdef TARGET_OPENGL_OK
34331+ case QEMU_OPTION_enable_gl:
34332+ fprintf(stderr, "Enabling opengl\n");
34333+ enable_gl = 1;
34334+ break;
34335+#endif
34336 case QEMU_OPTION_tb_size:
34337 tb_size = strtol(optarg, NULL, 0);
34338 if (tb_size < 0)
34339@@ -5933,6 +5946,14 @@ int main(int argc, char **argv, char **e
34340 }
34341 }
34342 }
34343+#ifdef TARGET_OPENGL_OK
34344+ if (enable_gl) {
34345+ /* Use second serial port */
34346+ int opengl_serial = 1;
34347+
34348+ add_device_config(DEV_SERIAL, "opengl");
34349+ }
34350+#endif
34351
34352 if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
34353 exit(1);
34354Index: qemu-0.12.4/qemu-options.hx
34355===================================================================
34356--- qemu-0.12.4.orig/qemu-options.hx
34357+++ qemu-0.12.4/qemu-options.hx
34358@@ -1789,6 +1789,18 @@ many timer interrupts were not processed
34359 re-inject them.
34360 ETEXI
34361
34362+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34363+ "-enable-gl\n")
34364+STEXI
34365+@item -enable-gl
34366+ETEXI
34367+
34368+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34369+ "-force-pointer\n")
34370+STEXI
34371+@item -force-pointer
34372+ETEXI
34373+
34374 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34375 "-icount [N|auto]\n" \
34376 " enable virtual instruction counter with 2^N clock ticks per\n" \
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch
new file mode 100644
index 0000000000..3ed227ec35
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch
@@ -0,0 +1,136 @@
1Quick fixes to get the ppc system model to boot a 603e based
2kernel.
3
4diff --git a/hw/m48t59.c b/hw/m48t59.c
5index ce38f8b..d99054f 100644
6--- a/hw/m48t59.c
7+++ b/hw/m48t59.c
8@@ -50,6 +50,7 @@
9 */
10
11 struct m48t59_t {
12+ SysBusDevice busdev;
13 /* Model parameters */
14 uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59
15 /* Hardware parameters */
16@@ -74,11 +75,6 @@ typedef struct M48t59ISAState {
17 m48t59_t state;
18 } M48t59ISAState;
19
20-typedef struct M48t59SysBusState {
21- SysBusDevice busdev;
22- m48t59_t state;
23-} M48t59SysBusState;
24-
25 /* Fake timer functions */
26
27 /* Alarm management */
28@@ -629,8 +625,7 @@ static void m48t59_reset_isa(DeviceState *d)
29
30 static void m48t59_reset_sysbus(DeviceState *d)
31 {
32- M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev);
33- m48t59_t *NVRAM = &sys->state;
34+ m48t59_t *NVRAM = container_of(d, m48t59_t, busdev.qdev);
35
36 m48t59_reset_common(NVRAM);
37 }
38@@ -642,7 +637,7 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
39 {
40 DeviceState *dev;
41 SysBusDevice *s;
42- M48t59SysBusState *d;
43+ m48t59_t *d;
44
45 dev = qdev_create(NULL, "m48t59");
46 qdev_prop_set_uint32(dev, "type", type);
47@@ -659,9 +654,9 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
48 sysbus_mmio_map(s, 0, mem_base);
49 }
50
51- d = FROM_SYSBUS(M48t59SysBusState, s);
52+ d = FROM_SYSBUS(m48t59_t, s);
53
54- return &d->state;
55+ return d;
56 }
57
58 m48t59_t *m48t59_init_isa(uint32_t io_base, uint16_t size, int type)
59@@ -711,8 +706,7 @@ static int m48t59_init_isa1(ISADevice *dev)
60
61 static int m48t59_init1(SysBusDevice *dev)
62 {
63- M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev);
64- m48t59_t *s = &d->state;
65+ m48t59_t *s = FROM_SYSBUS(m48t59_t, dev);
66 int mem_index;
67
68 sysbus_init_irq(dev, &s->IRQ);
69@@ -741,12 +735,12 @@ static ISADeviceInfo m48t59_isa_info = {
70 static SysBusDeviceInfo m48t59_info = {
71 .init = m48t59_init1,
72 .qdev.name = "m48t59",
73- .qdev.size = sizeof(M48t59SysBusState),
74+ .qdev.size = sizeof(m48t59_t),
75 .qdev.reset = m48t59_reset_sysbus,
76 .qdev.props = (Property[]) {
77- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
78- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
79- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
80+ DEFINE_PROP_UINT32("size", m48t59_t, size, -1),
81+ DEFINE_PROP_UINT32("type", m48t59_t, type, -1),
82+ DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base, 0),
83 DEFINE_PROP_END_OF_LIST(),
84 }
85 };
86diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
87index eb758f2..08db51b 100644
88--- a/hw/ppc_prep.c
89+++ b/hw/ppc_prep.c
90@@ -73,7 +73,7 @@ qemu_log_mask(CPU_LOG_IOPORT, fmt, ## __VA_ARGS__)
91 /* Constants for devices init */
92 static const int ide_iobase[2] = { 0x1f0, 0x170 };
93 static const int ide_iobase2[2] = { 0x3f6, 0x376 };
94-static const int ide_irq[2] = { 13, 13 };
95+static const int ide_irq[2] = { 13, 14 };
96
97 #define NE2000_NB_MAX 6
98
99@@ -620,9 +620,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
100 if (filename) {
101 qemu_free(filename);
102 }
103- if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
104- hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
105- }
106
107 if (linux_boot) {
108 kernel_base = KERNEL_LOAD_ADDR;
109diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
110index e3bd29c..1cb2e07 100644
111--- a/target-ppc/op_helper.c
112+++ b/target-ppc/op_helper.c
113@@ -1646,20 +1646,20 @@ static inline void do_rfi(target_ulong nip, target_ulong msr,
114 void helper_rfi (void)
115 {
116 do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
117- ~((target_ulong)0x0), 1);
118+ ~((target_ulong)0xFFFF0000), 1);
119 }
120
121 #if defined(TARGET_PPC64)
122 void helper_rfid (void)
123 {
124 do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
125- ~((target_ulong)0x0), 0);
126+ ~((target_ulong)0xFFFF0000), 0);
127 }
128
129 void helper_hrfid (void)
130 {
131 do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
132- ~((target_ulong)0x0), 0);
133+ ~((target_ulong)0xFFFF0000), 0);
134 }
135 #endif
136 #endif
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..43071868f3
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch
@@ -0,0 +1,115 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4diff --git a/console.h b/console.h
5index dfc8ae4..05fbf17 100644
6--- a/console.h
7+++ b/console.h
8@@ -122,6 +122,12 @@ struct DisplayAllocator {
9 void (*free_displaysurface)(DisplaySurface *surface);
10 };
11
12+struct DisplayPostCallback {
13+ void (*postcall) (void *);
14+ void *parm;
15+ struct DisplayPostCallback *next;
16+};
17+
18 struct DisplayState {
19 struct DisplaySurface *surface;
20 void *opaque;
21@@ -129,6 +135,7 @@ struct DisplayState {
22
23 struct DisplayAllocator* allocator;
24 struct DisplayChangeListener* listeners;
25+ struct DisplayPostCallback* postcalls;
26
27 void (*mouse_set)(int x, int y, int on);
28 void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y,
29@@ -185,6 +192,12 @@ static inline void register_displaychangelistener(DisplayState *ds, DisplayChang
30 ds->listeners = dcl;
31 }
32
33+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
34+{
35+ dpc->next = ds->postcalls;
36+ ds->postcalls = dpc;
37+}
38+
39 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
40 {
41 struct DisplayChangeListener *dcl = s->listeners;
42diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
43index 01bb85b..d73cca6 100644
44--- a/hw/vmware_vga.c
45+++ b/hw/vmware_vga.c
46@@ -927,8 +927,9 @@ static void vmsvga_update_display(void *opaque)
47 }
48 }
49
50-static void vmsvga_reset(struct vmsvga_state_s *s)
51+static void vmsvga_reset(void *parm)
52 {
53+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
54 s->index = 0;
55 s->enable = 0;
56 s->config = 0;
57@@ -1133,6 +1134,8 @@ static const VMStateDescription vmstate_vmware_vga = {
58
59 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
60 {
61+ DisplayPostCallback *dpc;
62+
63 s->scratch_size = SVGA_SCRATCH_SIZE;
64 s->scratch = qemu_malloc(s->scratch_size * 4);
65
66@@ -1160,7 +1163,10 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
67
68 rom_add_vga(VGABIOS_FILENAME);
69
70- vmsvga_reset(s);
71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
72+ dpc->postcall = vmsvga_reset;
73+ dpc->parm = s;
74+ register_displaypostcallback(s->vga.ds, dpc);
75 }
76
77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
78diff --git a/qemu-common.h b/qemu-common.h
79index a23afbc..19f107a 100644
80--- a/qemu-common.h
81+++ b/qemu-common.h
82@@ -198,6 +198,7 @@ typedef struct DisplayState DisplayState;
83 typedef struct DisplayChangeListener DisplayChangeListener;
84 typedef struct DisplaySurface DisplaySurface;
85 typedef struct DisplayAllocator DisplayAllocator;
86+typedef struct DisplayPostCallback DisplayPostCallback;
87 typedef struct PixelFormat PixelFormat;
88 typedef struct TextConsole TextConsole;
89 typedef TextConsole QEMUConsole;
90diff --git a/vl.c b/vl.c
91index 39182ea..9a3e9fd 100644
92--- a/vl.c
93+++ b/vl.c
94@@ -4863,6 +4863,7 @@ int main(int argc, char **argv, char **envp)
95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
96 DisplayState *ds;
97 DisplayChangeListener *dcl;
98+ DisplayPostCallback *dpc;
99 int cyls, heads, secs, translation;
100 QemuOpts *hda_opts = NULL, *opts;
101 int optind;
102@@ -6053,6 +6053,13 @@ int main(int argc, char **argv, char **envp)
103 }
104 dpy_resize(ds);
105
106+ dpc = ds->postcalls;
107+ while (dpc != NULL) {
108+ if (dpc->postcall != NULL)
109+ dpc->postcall(dpc->parm);
110+ dpc = dpc->next;
111+ }
112+
113 dcl = ds->listeners;
114 while (dcl != NULL) {
115 if (dcl->dpy_refresh != NULL) {
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch
new file mode 100644
index 0000000000..43acc361a0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch
@@ -0,0 +1,63 @@
1Allow releasing the GLXContext/Drawable with glXMakeCurrent.
2
3---
4commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
5tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
6parent 93619e6be184f8de08759d347825ee0d678a6f9c
7author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
8committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
9
10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-)
12
13Index: qemu/target-i386/opengl_exec.c
14===================================================================
15--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
16+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt);
20
21- if (client_drawable == 0 && fake_ctxt == 0) {
22+ if (client_drawable == 0 && fake_ctxt == 0)
23 ret_int = glXMakeCurrent(dpy, 0, NULL);
24- process->current_state = &process->default_state;
25- } else if ((drawable = (GLXDrawable)
26+ else if ((drawable = (GLXDrawable)
27 get_association_fakepbuffer_pbuffer(
28 process, client_drawable))) {
29 GLXContext ctxt = get_association_fakecontext_glxcontext(
30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
31 }
32
33 if (ret_int) {
34- for (i = 0; i < process->nb_states; i ++) {
35- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
36- /* HACK !!! REMOVE */
37- process->current_state = process->glstates[i];
38- process->current_state->drawable = drawable;
39- break;
40- }
41- }
42+ if (fake_ctxt) {
43+ for (i = 0; i < process->nb_states; i ++)
44+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
45+ /* HACK !!! REMOVE */
46+ process->current_state = process->glstates[i];
47+ process->current_state->drawable = drawable;
48+ break;
49+ }
50
51- if (i == process->nb_states) {
52- fprintf(stderr, "error remembering the new context\n");
53- exit(-1);
54- }
55+ if (i == process->nb_states) {
56+ fprintf(stderr, "error remembering the new context\n");
57+ exit(-1);
58+ }
59+ } else
60+ process->current_state = &process->default_state;
61 }
62 break;
63 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch
new file mode 100644
index 0000000000..7727a39f37
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch
@@ -0,0 +1,24 @@
1---
2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-)
4
5Index: qemu/linux-user/syscall.c
6===================================================================
7--- qemu.orig/linux-user/syscall.c 2010-05-11 16:52:16.929785275 -0400
8+++ qemu/linux-user/syscall.c 2010-05-11 16:52:25.174783517 -0400
9@@ -94,6 +94,15 @@
10 #define CLONE_NPTL_FLAGS2 0
11 #endif
12
13+#define FUTEX_WAIT 0
14+#define FUTEX_WAKE 1
15+#define FUTEX_FD 2
16+#define FUTEX_REQUEUE 3
17+#define FUTEX_CMP_REQUEUE 4
18+#define FUTEX_WAKE_OP 5
19+#define FUTEX_LOCK_PI 6
20+#define FUTEX_UNLOCK_PI 7
21+
22 //#define DEBUG
23
24 //#include <linux/msdos_fs.h>
diff --git a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
new file mode 100644
index 0000000000..19fb6f4ff7
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Qemu helper utilities from Poky"
2LICENSE = "GPLv2"
3RDEPENDS = "qemu-native"
4PR = "r0"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-helper"
7
8SRC_URI = "file://tunctl.c"
9
10S = "${WORKDIR}"
11
12inherit native
13
14do_compile() {
15 ${CC} tunctl.c -o tunctl
16}
17
18do_install() {
19 install -d ${D}${bindir}
20 install tunctl ${D}${bindir}/
21}
diff --git a/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb
new file mode 100644
index 0000000000..473411db92
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb
@@ -0,0 +1,44 @@
1DESCRIPTION = "Qemu helper scripts from Poky"
2LICENSE = "GPL"
3RDEPENDS = "qemu-nativesdk"
4PR = "r7"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-helper"
7
8SRC_URI = "file://${POKYBASE}/scripts/poky-qemu \
9 file://${POKYBASE}/scripts/poky-qemu-internal \
10 file://${POKYBASE}/scripts/poky-addptable2image \
11 file://${POKYBASE}/scripts/poky-qemu-ifup \
12 file://${POKYBASE}/scripts/poky-qemu-ifdown \
13 file://${POKYBASE}/scripts/poky-find-native-sysroot \
14 file://${POKYBASE}/scripts/poky-extract-sdk \
15 file://${POKYBASE}/scripts/poky-export-rootfs \
16 file://${POKYBASE}/scripts/runqemu-nfs \
17 file://tunctl.c \
18 file://raw2flash.c \
19 "
20
21S = "${WORKDIR}"
22
23inherit nativesdk
24
25do_compile() {
26 ${CC} tunctl.c -o tunctl
27 ${CC} raw2flash.c -o raw2flash.spitz
28 ${CC} raw2flash.c -o flash2raw.spitz -Dflash2raw
29}
30
31do_install() {
32 install -d ${D}${bindir}
33 install -m 0755 ${WORKDIR}${POKYBASE}/scripts/poky-* ${D}${bindir}/
34 install -m 0755 ${WORKDIR}${POKYBASE}/scripts/runqemu-nfs ${D}${bindir}/
35 install tunctl ${D}${bindir}/
36 install raw2flash.spitz ${D}${bindir}/
37 install flash2raw.spitz ${D}${bindir}/
38 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
39 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.borzoi
40 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.terrier
41 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.akita
42 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.borzoi
43 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.terrier
44}
diff --git a/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c b/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
new file mode 100644
index 0000000000..19faf629b9
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
@@ -0,0 +1,370 @@
1/*
2 * Copyright (c) 2006 OpenedHand Ltd.
3 *
4 * This file is licensed under GNU GPL v2.
5 */
6#include <string.h>
7#include <unistd.h>
8#include <stdint.h>
9#include <stdio.h>
10#include <sys/types.h>
11#include <stdlib.h>
12
13#define TFR(_) _
14#define VERBOSE
15#define PBAR_LEN 40
16
17#define PARTITION_START 0x00700000
18
19static const int ecc_pos8[] = {
20 0x0, 0x1, 0x2,
21};
22
23static const int ecc_pos16[] = {
24 0x0, 0x1, 0x2, 0x3, 0x6, 0x7,
25};
26
27static const int ecc_pos64[] = {
28 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
29 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
30 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
31};
32
33static const int ecc_akita[] = {
34 0x05, 0x01, 0x02, 0x03, 0x06, 0x07, 0x15, 0x11,
35 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
36 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37,
37};
38
39struct jffs_marker_s {
40 int pos;
41 uint8_t value;
42};
43
44static const struct jffs_marker_s free_pos8[] = {
45 { 0x03, 0xff }, { 0x04, 0xff }, { 0x06, 0x85 }, { 0x07, 0x19 },
46 { -1 },
47};
48
49static const struct jffs_marker_s free_pos16[] = {
50 { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
51 { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
52 { -1 },
53};
54
55static const struct jffs_marker_s free_pos64[] = {
56 { 0x02, 0xff }, { 0x03, 0xff }, { 0x04, 0xff }, { 0x05, 0xff },
57 { 0x06, 0xff }, { 0x07, 0xff }, { 0x08, 0xff }, { 0x09, 0xff },
58 { 0x0a, 0xff }, { 0x0b, 0xff }, { 0x0c, 0xff }, { 0x0d, 0xff },
59 { 0x0e, 0xff }, { 0x0f, 0xff }, { 0x10, 0x85 }, { 0x11, 0x19 },
60 { 0x12, 0x03 }, { 0x13, 0x20 }, { 0x14, 0x08 }, { 0x15, 0x00 },
61 { 0x16, 0x00 }, { 0x17, 0x00 }, { 0x18, 0xff }, { 0x19, 0xff },
62 { 0x1a, 0xff }, { 0x1b, 0xff }, { 0x1c, 0xff }, { 0x1d, 0xff },
63 { 0x1e, 0xff }, { 0x1f, 0xff }, { 0x20, 0xff }, { 0x21, 0xff },
64 { 0x22, 0xff }, { 0x23, 0xff }, { 0x24, 0xff }, { 0x25, 0xff },
65 { 0x26, 0xff }, { 0x27, 0xff },
66 { -1 },
67};
68
69static const struct jffs_marker_s free_akita[] = {
70 { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
71 { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
72 { 0x10, 0xff },
73 { -1 },
74};
75
76#define LEN(array) (sizeof(array) / sizeof(*array))
77
78static const struct ecc_style_s {
79 int page_size;
80 int oob_size;
81 int eccbytes;
82 int eccsize;
83 const int *eccpos;
84 int romsize;
85 const struct jffs_marker_s *freepos;
86} spitz = {
87 0x200, 0x10, 0x100, LEN(ecc_pos16), ecc_pos16, 0x01000000, free_pos16
88}, akita = {
89 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
90}, borzoi = {
91 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
92}, terrier = {
93 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
94};
95
96struct ecc_state_s {
97 int count;
98 uint8_t cp;
99 uint8_t lp[2];
100 const struct ecc_style_s *style;
101};
102
103#ifndef flash2raw
104/*
105 * Pre-calculated 256-way 1 byte column parity. Table borrowed from Linux.
106 */
107static const uint8_t ecc_precalc_table[] = {
108 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
109 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
110 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
111 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
112 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
113 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
114 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
115 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
116 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
117 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
118 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
119 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
120 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
121 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
122 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
123 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
124 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
125 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
126 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
127 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
128 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
129 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
130 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
131 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
132 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
133 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
134 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
135 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
136 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
137 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
138 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
139 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
140};
141
142/* Update ECC parity count */
143static inline uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample) {
144 uint8_t idx = ecc_precalc_table[sample];
145
146 s->cp ^= idx & 0x3f;
147 if (idx & 0x40) {
148 s->lp[0] ^= ~(s->count & 0xff);
149 s->lp[1] ^= s->count & 0xff;
150 }
151 s->count ++;
152
153 return sample;
154}
155
156static void buffer_digest(struct ecc_state_s *ecc,
157 const uint8_t *buf, uint8_t *out) {
158 int i, lp_a[2];
159
160 ecc->lp[0] = 0x00;
161 ecc->lp[1] = 0x00;
162 ecc->cp = 0x00;
163 ecc->count = 0;
164 for (i = 0; i < ecc->style->eccbytes; i ++)
165 ecc_digest(ecc, buf[i]);
166
167# define BSHR(byte, from, to) ((ecc->lp[byte] >> (from - to)) & (1 << to))
168 lp_a[0] =
169 BSHR(0, 4, 0) | BSHR(0, 5, 2) |
170 BSHR(0, 6, 4) | BSHR(0, 7, 6) |
171 BSHR(1, 4, 1) | BSHR(1, 5, 3) |
172 BSHR(1, 6, 5) | BSHR(1, 7, 7);
173
174# define BSHL(byte, from, to) ((ecc->lp[byte] << (to - from)) & (1 << to))
175 lp_a[1] =
176 BSHL(0, 0, 0) | BSHL(0, 1, 2) |
177 BSHL(0, 2, 4) | BSHL(0, 3, 6) |
178 BSHL(1, 0, 1) | BSHL(1, 1, 3) |
179 BSHL(1, 2, 5) | BSHL(1, 3, 7);
180
181 out[0] = ~lp_a[1];
182 out[1] = ~lp_a[0];
183 out[2] = (~ecc->cp << 2) | 0x03;
184}
185
186static void jffs2_format(const struct ecc_state_s *ecc, uint8_t oob[]) {
187 const struct jffs_marker_s *byte;
188 for (byte = ecc->style->freepos; byte->pos >= 0; byte ++)
189 oob[byte->pos] = byte->value;
190}
191
192static void buffer_fill(const struct ecc_state_s *ecc, uint8_t buffer[],
193 int *len, int *partition, int count, uint8_t jffs_buffer[]) {
194 int ret;
195
196 switch (*partition) {
197 case 0:
198 if (count < PARTITION_START) {
199 memcpy(buffer, jffs_buffer + count,
200 ecc->style->eccbytes);
201 *len = ecc->style->eccbytes;
202 break;
203 }
204 *partition = 1;
205 case 1:
206 if (count - PARTITION_START < PARTITION_START) {
207 memcpy(buffer, jffs_buffer + count - PARTITION_START,
208 ecc->style->eccbytes);
209 *len = ecc->style->eccbytes;
210 break;
211 }
212
213 while (*len < ecc->style->eccbytes) {
214 ret = TFR(read(0, buffer + *len, 0x800 - *len));
215 if (ret <= 0)
216 break;
217 *len += ret;
218 }
219
220 if (*len == 0)
221 *partition = 2;
222 else if (*len < ecc->style->eccbytes) {
223 fprintf(stderr, "\nWarning: %i stray bytes\n", *len);
224 memset(buffer + *len, 0xff,
225 ecc->style->eccbytes - *len);
226 *len = ecc->style->eccbytes;
227 break;
228 } else
229 break;
230 case 2:
231 memset(buffer, 0xff, ecc->style->eccbytes);
232 *len = ecc->style->eccbytes;
233 break;
234 }
235}
236
237int main(int argc, char *argv[], char *envp[]) {
238 struct ecc_state_s ecc;
239 uint8_t buffer[0x1000], ecc_payload[0x40], regs[3], *jffs;
240 int ret, len, eccbyte, count, partition;
241
242 /* Check if we're called by "raw2flash.spitz" or similar */
243 len = strlen(argv[0]);
244 if (!strcasecmp(argv[0] + len - 5, "akita"))
245 ecc.style = &akita;
246 else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
247 ecc.style = &borzoi;
248 else if (!strcasecmp(argv[0] + len - 7, "terrier"))
249 ecc.style = &terrier;
250 else
251 ecc.style = &spitz;
252
253# ifdef VERBOSE
254 fprintf(stderr, "[");
255# endif
256
257 /* Skip first 10 bytes */
258 TFR(read(0, buffer, 0x10));
259
260 len = 0;
261 jffs = (uint8_t *) malloc(PARTITION_START);
262 while (len < PARTITION_START) {
263 ret = TFR(read(0, jffs + len, PARTITION_START - len));
264 if (ret <= 0)
265 break;
266 len += ret;
267 }
268
269 /* Convert data from stdin */
270 partition = len = eccbyte = count = 0;
271 memset(ecc_payload, 0xff, ecc.style->oob_size);
272 jffs2_format(&ecc, ecc_payload);
273 while (count < ecc.style->romsize) {
274 buffer_fill(&ecc, buffer, &len, &partition, count, jffs);
275 buffer_digest(&ecc, buffer, regs);
276
277 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[0];
278 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[1];
279 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[2];
280
281 TFR(write(1, buffer, ecc.style->eccbytes));
282 count += ecc.style->eccbytes;
283 len -= ecc.style->eccbytes;
284 memmove(buffer, buffer + ecc.style->eccbytes, len);
285
286 if (eccbyte >= ecc.style->eccsize) {
287 TFR(write(1, ecc_payload, ecc.style->oob_size));
288 eccbyte = 0;
289 memset(ecc_payload, 0xff, ecc.style->oob_size);
290 if (partition < 2)
291 jffs2_format(&ecc, ecc_payload);
292 }
293
294# ifdef VERBOSE
295 if (count * PBAR_LEN / ecc.style->romsize >
296 (count - ecc.style->eccbytes) *
297 PBAR_LEN / ecc.style->romsize)
298 fprintf(stderr, "#");
299# endif
300 }
301
302# ifdef VERBOSE
303 fprintf(stderr, "]\n");
304# endif
305 free(jffs);
306 return 0;
307}
308#else
309int main(int argc, char *argv[], char *envp[]) {
310 struct ecc_state_s ecc;
311 uint8_t buffer[0x1000];
312 int ret, len, count;
313
314 /* Check if we're called by "flash2raw.spitz" or similar */
315 len = strlen(argv[0]);
316 if (!strcasecmp(argv[0] + len - 5, "akita"))
317 ecc.style = &akita;
318 else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
319 ecc.style = &borzoi;
320 else if (!strcasecmp(argv[0] + len - 7, "terrier"))
321 ecc.style = &terrier;
322 else
323 ecc.style = &spitz;
324
325# ifdef VERBOSE
326 fprintf(stderr, "[");
327# endif
328
329 /* Convert data from stdin */
330 count = 0;
331 while (count < ecc.style->romsize) {
332 len = 0;
333 while (len < ecc.style->page_size) {
334 ret = TFR(read(0, buffer + len,
335 ecc.style->page_size - len));
336 if (ret <= 0)
337 break;
338 len += ret;
339 }
340 if (len == 0)
341 break;
342 if (len < ecc.style->page_size) {
343 fprintf(stderr, "\nWarning: %i stray bytes\n", len);
344 }
345
346 TFR(write(1, buffer, ecc.style->page_size));
347
348 count += len;
349 len = 0;
350 while (len < ecc.style->oob_size) {
351 ret = TFR(read(0, buffer, ecc.style->oob_size - len));
352 if (ret <= 0)
353 break;
354 len += ret;
355 }
356
357# ifdef VERBOSE
358 if (count * PBAR_LEN / ecc.style->romsize >
359 (count - ecc.style->page_size) *
360 PBAR_LEN / ecc.style->romsize)
361 fprintf(stderr, "#");
362# endif
363 }
364
365# ifdef VERBOSE
366 fprintf(stderr, "]\n");
367# endif
368 return 0;
369}
370#endif
diff --git a/meta/recipes-devtools/qemu/qemu-helper/tunctl.c b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
new file mode 100644
index 0000000000..16e24a2add
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
@@ -0,0 +1,156 @@
1/* Copyright 2002 Jeff Dike
2 * Licensed under the GPL
3 */
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include <errno.h>
9#include <fcntl.h>
10#include <unistd.h>
11#include <pwd.h>
12#include <grp.h>
13#include <net/if.h>
14#include <sys/ioctl.h>
15#include <linux/if_tun.h>
16
17/* TUNSETGROUP appeared in 2.6.23 */
18#ifndef TUNSETGROUP
19#define TUNSETGROUP _IOW('T', 206, int)
20#endif
21
22static void Usage(char *name)
23{
24 fprintf(stderr, "Create: %s [-b] [-u owner] [-g group] [-t device-name] "
25 "[-f tun-clone-device]\n", name);
26 fprintf(stderr, "Delete: %s -d device-name [-f tun-clone-device]\n\n",
27 name);
28 fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems"
29 " use\n/dev/misc/net/tun instead\n\n");
30 fprintf(stderr, "-b will result in brief output (just the device name)\n");
31 exit(1);
32}
33
34int main(int argc, char **argv)
35{
36 struct ifreq ifr;
37 struct passwd *pw;
38 struct group *gr;
39 uid_t owner = -1;
40 gid_t group = -1;
41 int tap_fd, opt, delete = 0, brief = 0;
42 char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end;
43
44 while((opt = getopt(argc, argv, "bd:f:t:u:g:")) > 0){
45 switch(opt) {
46 case 'b':
47 brief = 1;
48 break;
49 case 'd':
50 delete = 1;
51 tun = optarg;
52 break;
53 case 'f':
54 file = optarg;
55 break;
56 case 'u':
57 pw = getpwnam(optarg);
58 if(pw != NULL){
59 owner = pw->pw_uid;
60 break;
61 }
62 owner = strtol(optarg, &end, 0);
63 if(*end != '\0'){
64 fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n",
65 optarg);
66 Usage(name);
67 }
68 break;
69 case 'g':
70 gr = getgrnam(optarg);
71 if(gr != NULL){
72 group = gr->gr_gid;
73 break;
74 }
75 group = strtol(optarg, &end, 0);
76 if(*end != '\0'){
77 fprintf(stderr, "'%s' is neither a groupname nor a numeric group.\n",
78 optarg);
79 Usage(name);
80 }
81 break;
82
83 case 't':
84 tun = optarg;
85 break;
86 case 'h':
87 default:
88 Usage(name);
89 }
90 }
91
92 argv += optind;
93 argc -= optind;
94
95 if(argc > 0)
96 Usage(name);
97
98 if((tap_fd = open(file, O_RDWR)) < 0){
99 fprintf(stderr, "Failed to open '%s' : ", file);
100 perror("");
101 exit(1);
102 }
103
104 memset(&ifr, 0, sizeof(ifr));
105
106 ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
107 strncpy(ifr.ifr_name, tun, sizeof(ifr.ifr_name) - 1);
108 if(ioctl(tap_fd, TUNSETIFF, (void *) &ifr) < 0){
109 perror("TUNSETIFF");
110 exit(1);
111 }
112
113 if(delete){
114 if(ioctl(tap_fd, TUNSETPERSIST, 0) < 0){
115 perror("disabling TUNSETPERSIST");
116 exit(1);
117 }
118 printf("Set '%s' nonpersistent\n", ifr.ifr_name);
119 }
120 else {
121 /* emulate behaviour prior to TUNSETGROUP */
122 if(owner == -1 && group == -1) {
123 owner = geteuid();
124 }
125
126 if(owner != -1) {
127 if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){
128 perror("TUNSETOWNER");
129 exit(1);
130 }
131 }
132 if(group != -1) {
133 if(ioctl(tap_fd, TUNSETGROUP, group) < 0){
134 perror("TUNSETGROUP");
135 exit(1);
136 }
137 }
138
139 if(ioctl(tap_fd, TUNSETPERSIST, 1) < 0){
140 perror("enabling TUNSETPERSIST");
141 exit(1);
142 }
143
144 if(brief)
145 printf("%s\n", ifr.ifr_name);
146 else {
147 printf("Set '%s' persistent and owned by", ifr.ifr_name);
148 if(owner != -1)
149 printf(" uid %d", owner);
150 if(group != -1)
151 printf(" gid %d", group);
152 printf("\n");
153 }
154 }
155 return(0);
156}
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
new file mode 100644
index 0000000000..5425aaf4a5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -0,0 +1,39 @@
1DESCRIPTION = "open source processor emulator"
2HOMEPAGE = "http://qemu.org"
3LICENSE = "GPL"
4DEPENDS = "zlib"
5
6EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-softmmu --disable-werror --disable-vnc-tls"
7#EXTRA_OECONF += "--disable-sdl"
8
9inherit autotools
10
11# For our gl powered QEMU you need libGL and SDL headers
12do_configure_prepend_virtclass-native() {
13 libgl='no'
14 libsdl='no'
15
16 test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
17 test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
18
19 test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc -o -e /usr/include/SDL/SDL.h && libsdl='yes'
20
21
22 if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
23 echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native.
24 Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
25 exit 1;
26 fi
27}
28
29do_configure() {
30 ${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
31 chmod a+x ${S}/target-i386/beginend_funcs.sh
32}
33
34SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
35DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
36RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
37EXTRA_OECONF_virtclass-nativesdk = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-softmmu --disable-vnc-tls --cross-prefix=${TARGET_PREFIX}"
38
39BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/qemu/qemu_0.12.4.bb b/meta/recipes-devtools/qemu/qemu_0.12.4.bb
new file mode 100644
index 0000000000..c253b03a2f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_0.12.4.bb
@@ -0,0 +1,27 @@
1require qemu.inc
2
3PR = "r16"
4
5FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
6FILESDIR = "${WORKDIR}"
7
8SRC_URI = "\
9 http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
10 file://workaround_bad_futex_headers.patch \
11 file://qemu-git-qemugl-host.patch \
12 file://no-strip.patch \
13 file://fix-dirent.patch \
14 file://fix-nogl.patch \
15 file://qemugl-allow-glxcontext-release.patch \
16 file://linker-flags.patch \
17 file://init-info.patch \
18 file://qemu-vmware-vga-depth.patch \
19 file://qemu-ppc-hack.patch \
20 file://powerpc_rom.bin"
21
22do_install_append () {
23 install -d ${D}${datadir}/qemu
24 install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
25}
26
27S = "${WORKDIR}/qemu-${PV}"
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
new file mode 100644
index 0000000000..00b361063a
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -0,0 +1,21 @@
1require qemu.inc
2
3PV = "0.12.4"
4PR = "r9"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
7FILESDIR = "${WORKDIR}"
8
9SRC_URI = "\
10 git://git.sv.gnu.org/qemu.git;protocol=git \
11 file://workaround_bad_futex_headers.patch \
12 file://qemu-git-qemugl-host.patch \
13 file://no-strip.patch \
14 file://fix-dirent.patch \
15 file://fix-nogl.patch \
16 file://qemugl-allow-glxcontext-release.patch \
17 file://linker-flags.patch \
18 file://qemu-vmware-vga-depth.patch"
19
20S = "${WORKDIR}/git"
21
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
new file mode 100644
index 0000000000..7efea0213d
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -0,0 +1,13 @@
1SRC_URI_append_build-darwin = "? file://non-gnu.patch "
2RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
3
4INHIBIT_AUTOTOOLS_DEPS = "1"
5
6inherit native
7
8PATCHTOOL = "patch"
9EXTRA_OECONF = "--disable-nls"
10
11do_configure () {
12 oe_runconf
13}
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.48.bb b/meta/recipes-devtools/quilt/quilt-native_0.48.bb
new file mode 100644
index 0000000000..d1dd57619a
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt-native_0.48.bb
@@ -0,0 +1,4 @@
1require quilt.inc
2require quilt-native.inc
3
4PR = "r0"
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
new file mode 100644
index 0000000000..e5e0a4feca
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -0,0 +1,27 @@
1DESCRIPTION = "Tool to work with series of patches."
2HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/"
3SECTION = "devel"
4LICENSE = "GPLv2"
5LIC_CHKSUM_FILES = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
6
7SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz \
8 file://install.patch"
9
10inherit autotools
11
12PACKAGES += "guards guards-doc"
13FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
14 ${bindir}/quilt ${libdir}/quilt"
15FILES_guards = "${bindir}/guards"
16FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${P}"
17FILES_guards-doc = "${mandir}/man1/guards.1"
18
19# quilt ignores DESTDIR
20do_install () {
21 oe_runmake 'BUILD_ROOT=${D}' install
22 if [ "${BUILD_ARCH}" == "${HOST_ARCH}" ]; then
23 # Dummy quiltrc file for patch.bbclass
24 install -d ${D}${bindir}/
25 touch ${D}${bindir}/quiltrc
26 fi
27}
diff --git a/meta/recipes-devtools/quilt/quilt/aclocal.patch b/meta/recipes-devtools/quilt/quilt/aclocal.patch
new file mode 100644
index 0000000000..15b174c6d8
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/aclocal.patch
@@ -0,0 +1,126 @@
1Add the aclocal.m4 as acinclude.m4
2
3Index: quilt-0.47/acinclude.m4
4===================================================================
5--- /dev/null 1970-01-01 00:00:00.000000000 +0000
6+++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100
7@@ -0,0 +1,119 @@
8+dnl Allow configure to specify a specific binary
9+dnl 1: Environment variable
10+dnl 2: binary name
11+dnl 3: optional list of alternative binary names
12+dnl 4: optional list of additional search directories
13+AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
14+ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
15+
16+ AC_ARG_WITH($2, AC_HELP_STRING(
17+ [--with-$2], [name of the $2 executable to use]
18+ m4_if(internal_$2_cmd,[],[],[ (use --without-$2
19+ to use an internal mechanism)])),
20+ [
21+ if test x"$withval" = xnone; then
22+ AC_MSG_ERROR([Invalid configure argument. use --without-$2])
23+ fi
24+ if test x"$withval" != xno; then
25+ AC_MSG_CHECKING(for $2)
26+ $1="$withval"
27+ if test -e "$$1"; then
28+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
29+ AC_MSG_ERROR([$$1 is not an executable file])
30+ fi
31+ fi
32+ AC_MSG_RESULT([$$1])
33+ if test ! -e "$$1"; then
34+ AC_MSG_WARN([$$1 does not exist])
35+ fi
36+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
37+ fi
38+ ],[
39+ m4_if([$3],[],[
40+ AC_PATH_PROG($1,$2,,$PATH:$4)
41+ ],[
42+ AC_PATH_PROGS($1,$3,,$PATH:$4)
43+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
44+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
45+ fi
46+ ])
47+ m4_if([$4],[],[],[
48+ if test -n "$$1"; then
49+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50+ for dir in "$4"; do
51+ if test "`dirname $$1`" = "$dir"; then
52+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
53+ break
54+ fi
55+ done
56+ IFS="$as_save_IFS"
57+ fi
58+ ])
59+ ])
60+ if test -z "$$1"; then
61+ m4_if(internal_$2_cmd,[],[
62+ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
63+ ],[
64+ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override])
65+ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
66+ $1=$2
67+ INTERNAL_$1=1
68+ ])
69+ fi
70+ AC_SUBST($1)
71+])
72+
73+dnl Allow configure to specify a specific binary
74+dnl This variant is for optional binaries.
75+dnl 1: Environment variable
76+dnl 2: binary name
77+dnl 3: optional list of alternative binary names
78+dnl 4: optional list of additional search directories
79+AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
80+ AC_ARG_WITH($2, AC_HELP_STRING(
81+ [--with-$2], [name of the $2 executable to use]),
82+ [
83+ if test x"$withval" != xno; then
84+ AC_MSG_CHECKING(for $2)
85+ $1="$withval"
86+ if test -e "$$1"; then
87+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
88+ AC_MSG_ERROR([$$1 is not an executable file])
89+ fi
90+ fi
91+ AC_MSG_RESULT([$$1])
92+ if test ! -e "$$1"; then
93+ AC_MSG_WARN([$$1 does not exist])
94+ fi
95+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
96+ fi
97+ ],[
98+ m4_if([$3],[],[
99+ AC_PATH_PROG($1,$2,,$PATH:$4)
100+ ],[
101+ AC_PATH_PROGS($1,$3,,$PATH:$4)
102+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
103+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
104+ fi
105+ ])
106+ m4_if([$4],[],[],[
107+ if test -n "$$1"; then
108+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
109+ for dir in "$4"; do
110+ if test "`dirname $$1`" = "$dir"; then
111+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
112+ break
113+ fi
114+ done
115+ IFS="$as_save_IFS"
116+ fi
117+ ])
118+ if test -z "$$1"; then
119+ AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
120+ fi
121+ ])
122+ if test -z "$$1"; then
123+ $1=$2
124+ fi
125+ AC_SUBST($1)
126+])
diff --git a/meta/recipes-devtools/quilt/quilt/install.patch b/meta/recipes-devtools/quilt/quilt/install.patch
new file mode 100644
index 0000000000..0b1e58d021
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/install.patch
@@ -0,0 +1,11 @@
1--- quilt-0.47/Makefile.in 2008-12-31 19:09:13.000000000 +0000
2+++ quilt-0.47/Makefile.in.orig 2008-08-21 13:21:32.000000000 +0100
3@@ -13,7 +13,7 @@
4 mandir := @mandir@
5 localedir := $(datadir)/locale
6 emacsdir := $(datadir)/emacs/site-lisp
7-etcdir := $(subst /usr/etc,/etc,$(prefix)/etc)
8+etcdir := @sysconfdir@
9
10 INSTALL := @INSTALL@
11 POD2MAN := @POD2MAN@
diff --git a/meta/recipes-devtools/quilt/quilt/non-gnu.patch b/meta/recipes-devtools/quilt/quilt/non-gnu.patch
new file mode 100644
index 0000000000..c1cbfb3983
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/non-gnu.patch
@@ -0,0 +1,223 @@
1Patch is from the Fink projetc (http://fink.sf.net)
2
3diff -r 7b51c215fc54 Makefile.in
4--- a/Makefile.in Sat Mar 4 17:16:21 2006 -0800
5+++ b/Makefile.in Sat Mar 4 17:59:09 2006 -0800
6@@ -256,7 +256,7 @@ bin/guards.1 : bin/guards
7 -e 's:@VERSION''@:$(VERSION):g' \
8 -e 's:@RELEASE''@:$(RELEASE):g' \
9 -e 's:@LOCALEDIR''@:$(localedir):g' \
10- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
11+ -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g' \
12 $< > $@
13 @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
14
15@@ -320,11 +320,11 @@ endif
16 $(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
17 $(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
18
19- $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
20+ $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
21 $(INSTALL) -m 644 doc/README \
22- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
23+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
24 $(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL \
25- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
26+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
27
28 $(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
29 $(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
30@@ -367,7 +367,7 @@ uninstall ::
31 $(notdir $(MAN1))) \
32 $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
33 $(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
34- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
35+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
36
37 check: $(TESTS:test/%.test=test/.%.ok)
38 check-all: $(TESTS:test/%.test=check-%)
39diff -r 7b51c215fc54 configure
40--- a/configure Sat Mar 4 17:16:21 2006 -0800
41+++ b/configure Sat Mar 4 17:59:09 2006 -0800
42@@ -3882,29 +3882,6 @@ echo "$as_me: error: Please specify the
43 fi
44
45
46-echo "$as_me:$LINENO: checking whether $CP -l works" >&5
47-echo $ECHO_N "checking whether $CP -l works... $ECHO_C" >&6
48-touch conftest.1
49-if $CP -l conftest.1 conftest.2 2>/dev/null; then
50- echo "$as_me:$LINENO: result: yes" >&5
51-echo "${ECHO_T}yes" >&6
52-else
53- { { echo "$as_me:$LINENO: error: no
54-
55-You appear to have a \`cp' that does not support hard links.
56-You can download GNU fileutils from ftp.gnu.org
57-" >&5
58-echo "$as_me: error: no
59-
60-You appear to have a \`cp' that does not support hard links.
61-You can download GNU fileutils from ftp.gnu.org
62-" >&2;}
63- { (exit 1); exit 1; }; }
64-fi
65-
66-
67-
68-
69
70 # Check whether --with-date or --without-date was given.
71 if test "${with_date+set}" = set; then
72@@ -3999,32 +3976,6 @@ echo "$as_me: WARNING: Using internal da
73 INTERNAL_DATE=1
74
75 fi
76-
77-
78-
79-if test -z "$INTERNAL_DATE"; then
80- echo "$as_me:$LINENO: checking whether $DATE --rfc-822 works" >&5
81-echo $ECHO_N "checking whether $DATE --rfc-822 works... $ECHO_C" >&6
82- if $DATE --rfc-822 >/dev/null 2>/dev/null; then
83- echo "$as_me:$LINENO: result: yes" >&5
84-echo "${ECHO_T}yes" >&6
85- else
86- { { echo "$as_me:$LINENO: error: no
87-
88-If you don't have a version of \`date' that supports --rfc-822, you
89-can specify '--without-date' and $PACKAGE_NAME will use its own
90-internal date.
91-" >&5
92-echo "$as_me: error: no
93-
94-If you don't have a version of \`date' that supports --rfc-822, you
95-can specify '--without-date' and $PACKAGE_NAME will use its own
96-internal date.
97-" >&2;}
98- { (exit 1); exit 1; }; }
99- fi
100-fi
101-
102
103
104
105diff -r 7b51c215fc54 quilt/diff.in
106--- a/quilt/diff.in Sat Mar 4 17:16:21 2006 -0800
107+++ b/quilt/diff.in Sat Mar 4 17:59:09 2006 -0800
108@@ -303,7 +303,7 @@ then
109
110 if [ ${#files[@]} -gt 0 ] \
111 && ! ( cd $QUILT_PC/$last_patch &&
112- cp -l --parents "${files[@]}" $workdir/ )
113+ mycpl $workdir/ "${files[@]}" )
114 then
115 printf $"Failed to copy files to temporary directory\n" >&2
116 die 1
117diff -r 7b51c215fc54 quilt/mail.in
118--- a/quilt/mail.in Sat Mar 4 17:16:21 2006 -0800
119+++ b/quilt/mail.in Sat Mar 4 17:59:09 2006 -0800
120@@ -64,7 +64,7 @@ with a template for the introduction. Pl
121
122 msgid()
123 {
124- local timestamp=$(date --utc "+%Y%m%d%H%M%S.%N")
125+ local timestamp=$(date -u "+%Y%m%d%H%M%S.000000000")
126 echo "$timestamp@${opt_sender#*@}"
127 }
128
129@@ -334,7 +334,7 @@ introduction="$(gen_tempfile)"
130 cat <<-EOF
131 Message-Id: <$(msgid)>
132 User-Agent: quilt/@VERSION@-@RELEASE@
133- Date: $(date --rfc-822)
134+ Date: $(date '+%a, %d %b %Y %H:%M:%S %z')
135 From: ${opt_from:-$opt_sender}
136 To: $(IFS=,; echo "${opt_to[*]}")
137 Cc: $(IFS=,; echo "${opt_cc[*]}")
138@@ -401,7 +401,11 @@ fi
139 # increment the timestamp by one second and wait with sending until
140 # that time has arrived. This allows MUAs to show the messages in the
141 # correct order.
142-last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
143+#last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
144+# fink has no date available that does -d, so we fudge with the time now.
145+# If the user edits the date field in the message patch 0 could end up
146+# out of order wrt the actual patches. just a minor cosmetic nit.
147+last_ts=$(date '+%s')
148
149 num=1
150 for patch in "${patches[@]}"; do
151@@ -412,7 +416,7 @@ for patch in "${patches[@]}"; do
152 # sleep 1
153 #done
154 ((last_ts++))
155- new_date="$(date --rfc-822 -d "1970/01/01 UTC $last_ts seconds")"
156+ new_date="$(date -r $last_ts '+%a, %d %b %Y %H:%M:%S %z')"
157
158 modify="$(awk '
159 sub(/^Recipient-/, "") { r = $0
160diff -r 7b51c215fc54 quilt/pop.in
161--- a/quilt/pop.in Sat Mar 4 17:16:21 2006 -0800
162+++ b/quilt/pop.in Sat Mar 4 17:59:09 2006 -0800
163@@ -93,7 +93,7 @@ check_for_pending_changes()
164 if [ -d $QUILT_PC/$patch ]
165 then
166 if ! rmdir $workdir || # note that this is racey...
167- ! cp -rl $QUILT_PC/$patch $workdir
168+ ! (for i in "$(find "$QUILT_PC/$patch" -type f)"; do mycpl $workdir $i; done)
169 then
170 printf $"Failed to copy files to temporary directory\n" >&2
171 rm -rf $workdir
172diff -r 7b51c215fc54 quilt/scripts/patchfns.in
173--- a/quilt/scripts/patchfns.in Sat Mar 4 17:16:21 2006 -0800
174+++ b/quilt/scripts/patchfns.in Sat Mar 4 17:59:09 2006 -0800
175@@ -45,6 +45,28 @@ fi
176 fi
177
178 # ========================================================
179+
180+dater()
181+{
182+ ts=$(perl -e '@st = stat($ARGV[0]); print $st[9];' "$1")
183+ fmt=$(date -r $ts "$2")
184+
185+ echo $fmt
186+}
187+
188+mycpl ()
189+{
190+ target=$1
191+ shift;
192+
193+ for src in "$@"
194+ do
195+ srcdir="${src%/*}"
196+ test -n "$srcdir" && mkdir -p "$target/$srcdir"
197+ ln $src "$target/$src"
198+ done
199+}
200+
201
202 #declare -a exit_handlers
203 #
204@@ -669,8 +691,7 @@ diff_file()
205 || old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
206 else
207 [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
208- || old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
209- -r "$old_file")
210+ || old_date=$'\t'$(dater "$old_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
211 fi
212 if ! [ -s "$new_file" ]
213 then
214@@ -682,8 +703,7 @@ diff_file()
215 || new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
216 else
217 [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
218- || new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
219- -r "$new_file")
220+ || new_date=$'\t'$(dater "$new_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
221 fi
222
223 diff $QUILT_DIFF_OPTS $old_file $new_file \
diff --git a/meta/recipes-devtools/quilt/quilt_0.48.bb b/meta/recipes-devtools/quilt/quilt_0.48.bb
new file mode 100644
index 0000000000..5db67b24a1
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt_0.48.bb
@@ -0,0 +1,7 @@
1require quilt.inc
2
3RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
4PR = "r0"
5SRC_URI += "file://aclocal.patch"
6
7inherit gettext
diff --git a/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
new file mode 100755
index 0000000000..b72c9f0265
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
@@ -0,0 +1,50 @@
1#!/bin/bash
2
3: ${RPMDEPS:=rpmdeps}
4
5process() {
6 while read file_name ; do
7 printf "%s\t" ${file_name}
8 if [ ! -d $file_name ]; then
9 printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g')
10 fi
11 printf "\n"
12 done
13}
14
15usage() {
16 echo "$0 {-P|--provides} {-R|--requires} FILE ..."
17}
18
19while [ $# -gt 0 ]; do
20 case "$1" in
21 --rpmdeps)
22 RPMDEPS=$2
23 shift
24 shift
25 ;;
26 -R|--requires)
27 process_type=--requires
28 shift
29 ;;
30 -P|--provides)
31 process_type=--provides
32 shift
33 ;;
34 *)
35 break;
36 ;;
37 esac
38done
39
40if [ -z "$process_type" ]; then
41 usage
42 exit 1
43fi
44
45if [ $# -gt 0 ]; then
46 find "$@" | process $process_type
47 exit $?
48fi
49
50process $process_type
diff --git a/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch b/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch
new file mode 100644
index 0000000000..69b7130b9b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch
@@ -0,0 +1,440 @@
1Index: rpm-5.1.9/configure.ac
2===================================================================
3--- rpm-5.1.9.orig/configure.ac 2009-04-18 17:47:02.000000000 +0100
4+++ rpm-5.1.9/configure.ac 2010-07-06 14:47:28.985462456 +0100
5@@ -643,38 +643,22 @@
6 dnl look for libc features
7 PROVIDES_ERRNO=no
8 AC_MSG_CHECKING(if <netdb.h> defines h_errno)
9-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
10-AC_MSG_RESULT($PROVIDES_ERRNO)
11-if test $PROVIDES_ERRNO = yes; then
12- AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
13-fi
14+AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
15
16 dnl If a system doesn't have S_IFSOCK, define it as 0 which will
17 dnl make S_ISSOCK always return false (nice, eh?)
18 AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
19-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
20-AC_MSG_RESULT($HAS_S_IFSOCK)
21-if test $HAS_S_IFSOCK = yes; then
22- AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
23-fi
24+AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
25
26 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
27 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
28-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
29-AC_MSG_RESULT($HAS_S_ISLNK)
30-if test $HAS_S_ISLNK = yes; then
31- AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
32-fi
33+AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
34
35 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
36-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
37-AC_MSG_RESULT($HAS_S_ISSOCK)
38-if test $HAS_S_ISSOCK = yes; then
39- AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
40-fi
41+AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
42
43 AC_MSG_CHECKING(if timezone is defined)
44-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
45+$HAS_TIMEZONE=yes
46 AC_MSG_RESULT($HAS_TIMEZONE)
47
48 dnl check for missing typedefs
49@@ -726,53 +710,12 @@
50 AC_MSG_RESULT(yes)
51 AC_CHECK_HEADERS([libelf.h gelf.h])
52 if test ".$ac_cv_header_libelf_h" = .no; then
53- dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't
54- dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is
55- dnl # set for non-LFS. Same applies for <gelf.h>, since it probably
56- dnl # includes <libelf.h>
57- AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE])
58- AC_COMPILE_IFELSE([
59- AC_LANG_PROGRAM([[
60-#undef _LARGEFILE64_SOURCE
61-#undef _LARGEFILE_SOURCE
62-#if !defined(_LP64)
63-# undef _FILE_OFFSET_BITS
64-# define _FILE_OFFSET_BITS 32
65-#endif
66-#include <libelf.h>
67- ]], [[
68- Elf_Data foo;
69- ]])
70- ], [
71- AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
72- ac_cv_header_libelf_h=yes
73- AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API])
74- AC_MSG_RESULT(yes)
75- ], [
76- AC_MSG_RESULT(no)
77- ])
78+ AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
79+ ac_cv_header_libelf_h=yes
80 fi
81 if test ".$ac_cv_header_gelf_h" = .no; then
82- AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE])
83- AC_COMPILE_IFELSE([
84- AC_LANG_PROGRAM([[
85-#undef _LARGEFILE64_SOURCE
86-#undef _LARGEFILE_SOURCE
87-#if !defined(_LP64)
88-# undef _FILE_OFFSET_BITS
89-# define _FILE_OFFSET_BITS 32
90-#endif
91-#include <gelf.h>
92- ]], [[
93- Elf32_Verdef foo;
94- ]])
95- ], [
96- AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
97- ac_cv_header_gelf_h=yes
98- AC_MSG_RESULT(yes)
99- ], [
100- AC_MSG_RESULT(no)
101- ])
102+ AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
103+ ac_cv_header_gelf_h=yes
104 fi
105 if test ".$ac_cv_header_gelf_h" = .yes; then
106 AC_CHECK_LIB([elf], [elf_version], [
107@@ -854,78 +797,9 @@
108 python_version=""
109 ;;
110 esac
111- for python_ver in $python_version ; do
112- if test "$python_ver" != "2.x" ; then
113- AC_MSG_CHECKING([for Python ${python_ver} API])
114- save_CFLAGS="${CFLAGS}"
115- for i in "$prefix" "/usr/local" "/usr"; do
116- CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}"
117- AC_RUN_IFELSE([AC_LANG_SOURCE(
118- [[#include "Python.h"
119- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
120- ], [
121- PYTHON_VERSION="${python_ver}"
122- AC_MSG_RESULT(yes)
123- PYTHON_PREFIX="${i}"
124- break
125- ], [
126- ], [
127- dnl if we're cross compiling, assume the user has a clue
128- if test "$withval" = "$python_ver"; then
129- PYTHON_VERSION="${python_ver}"
130- AC_MSG_RESULT(yes)
131- break
132- fi
133- ])
134- done
135- CFLAGS="${save_CFLAGS}"
136- if test ".$PYTHON_VERSION" == "."; then
137- dnl check Mac OS X framework
138- save_CFLAGS="${CFLAGS}"
139- for f in "~" "" "/System" "/Network"; do
140- CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}"
141- AC_RUN_IFELSE([AC_LANG_SOURCE(
142- [[#include "Python.h"
143- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
144- ], [
145- PYTHON_VERSION="${python_ver}"
146- AC_MSG_RESULT([yes (using Python.framework)])
147- PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}"
148- break
149- ], [
150- ])
151- done
152- CFLAGS="${save_CFLAGS}"
153- fi
154- if test ".$PYTHON_VERSION" == "."; then
155- AC_MSG_RESULT(no)
156- fi
157- else
158- AC_MSG_CHECKING([for Python 2.x API])
159- AC_RUN_IFELSE([AC_LANG_SOURCE(
160- [[#include <python/Python.h>
161- main() { exit(strncmp("2.", PY_VERSION, 2)); } ]])
162- ], [
163- PYTHON_VERSION=""
164- AC_MSG_RESULT(yes)
165- ], [
166- AC_MSG_RESULT(no)
167- ], [
168- dnl if we're cross compiling, assume the user has a clue
169- if test "$withval" = "$python_ver"; then
170- PYTHON_VERSION="${python_ver}"
171- AC_MSG_RESULT(yes)
172- else
173- AC_MSG_RESULT(no)
174- fi
175- ])
176- fi
177- if test ".$PYTHON_VERSION" != "."; then
178- WITH_PYTHON_SUBDIR=python
179- WITH_PYTHON_SUBPACKAGE=1
180- break
181- fi
182- done
183+ PYTHON_VERSION="${python_ver}"
184+ WITH_PYTHON_SUBDIR=python
185+ WITH_PYTHON_SUBPACKAGE=1
186 fi
187 AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
188 [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"])
189@@ -1157,15 +1031,8 @@
190 AC_SUBST(WITH_PCRE_LIBS)
191 else
192 dnl # make sure PCRE POSIX API can be really _USED_ by RPM
193- LIBS_SAVED="$LIBS"
194 LIBS="-lpcreposix $LIBS"
195- AC_LINK_IFELSE([
196- AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)])
197- ], [
198- AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
199- ], [
200- LIBS="$LIBS_SAVED"
201- ])
202+ AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
203 fi
204 dnl # enable PCRE native API support for embedded Lua
205 if test ".$WITH_LUA" = .yes; then
206@@ -1234,30 +1101,7 @@
207
208 dnl # figure out what root's primary group is
209 AC_MSG_CHECKING([root's primary group])
210-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
211-#include <sys/types.h>
212-#include <pwd.h>
213-#include <grp.h>
214-int main()
215-{
216- struct passwd *root = NULL;
217- struct group *roots_group = NULL;
218- FILE * tempfile = NULL;
219- root = getpwuid( (uid_t) 0 );
220- if (root != NULL) {
221- roots_group = getgrgid(root->pw_gid);
222- if (roots_group != NULL) {
223- tempfile = fopen("conftest_rootg", "w");
224- if (tempfile != NULL) {
225- fprintf(tempfile, "%s\n", roots_group->gr_name);
226- fclose(tempfile);
227- exit(0);
228- }
229- }
230- }
231- exit(1);
232-}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root"
233-])
234+$ROOT_GROUP="root"
235 AC_MSG_RESULT([$ROOT_GROUP])
236 AC_SUBST(ROOT_GROUP)
237
238Index: rpm-5.1.9/pcre/configure.ac
239===================================================================
240--- rpm-5.1.9.orig/pcre/configure.ac 2009-01-14 20:19:31.000000000 +0000
241+++ rpm-5.1.9/pcre/configure.ac 2010-07-06 14:51:50.769586089 +0100
242@@ -278,34 +278,6 @@
243 # The files below are C++ header files.
244 pcre_have_type_traits="0"
245 pcre_have_bits_type_traits="0"
246-if test "x$enable_cpp" = "xyes" -a -n "$CXX"
247-then
248-AC_LANG_PUSH(C++)
249-
250-# Older versions of pcre defined pcrecpp::no_arg, but in new versions
251-# it's called pcrecpp::RE::no_arg. For backwards ABI compatibility,
252-# we want to make one an alias for the other. Different systems do
253-# this in different ways. Some systems, for instance, can do it via
254-# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4).
255-OLD_LDFLAGS="$LDFLAGS"
256-for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \
257- "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do
258- AC_MSG_CHECKING([for alias support in the linker])
259- LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
260- # We try to run the linker with this new ld flag. If the link fails,
261- # we give up and remove the new flag from LDFLAGS.
262- AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp {
263- class RE { static int no_arg; };
264- int RE::no_arg;
265- }],
266- []),
267- [AC_MSG_RESULT([yes]);
268- EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
269- break;],
270- AC_MSG_RESULT([no]))
271-done
272-LDFLAGS="$OLD_LDFLAGS"
273-
274 # We could be more clever here, given we're doing AC_SUBST with this
275 # (eg set a var to be the name of the include file we want). But we're not
276 # so it's easy to change back to 'regular' autoconf vars if we needed to.
277@@ -316,7 +288,6 @@
278 AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"],
279 [pcre_have_type_traits="0"])
280
281-AC_LANG_POP
282 fi
283 # Using AC_SUBST eliminates the need to include config.h in a public .h file
284 AC_SUBST(pcre_have_type_traits)
285Index: rpm-5.1.9/db/dist/configure.ac
286===================================================================
287--- rpm-5.1.9.orig/db/dist/configure.ac 2008-06-15 08:16:21.000000000 +0100
288+++ rpm-5.1.9/db/dist/configure.ac 2010-07-06 15:36:39.262461127 +0100
289@@ -602,24 +602,6 @@
290 aux*) AC_LIBOBJ([getopt]);;
291 esac
292
293-# Linux has a broken O_DIRECT flag, but you can't detect it at configure time.
294-# Linux and SGI require buffer alignment we may not match, otherwise writes
295-# will fail. Default to not using the O_DIRECT flag.
296-if test "$db_cv_o_direct" = "yes"; then
297- AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
298- AC_TRY_LINK([
299- #include <sys/types.h>
300- #include <fcntl.h>], [
301- open("a", O_RDONLY | O_DIRECT, 0);
302- ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])])
303- if test \
304- "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then
305- AC_DEFINE(HAVE_O_DIRECT)
306- AH_TEMPLATE(HAVE_O_DIRECT,
307- [Define to 1 if you have the O_DIRECT flag.])
308- fi
309-fi
310-
311 # Check for largefile support.
312 AC_SYS_LARGEFILE
313
314Index: rpm-5.1.9/xz/configure.ac
315===================================================================
316--- rpm-5.1.9.orig/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000
317+++ rpm-5.1.9/xz/configure.ac 2010-07-06 15:41:22.632467951 +0100
318@@ -457,26 +457,9 @@
319 #endif
320 ])
321
322-# Even if we have byteswap.h, we may lack the specific macros/functions.
323-if test x$ac_cv_header_byteswap_h = xyes ; then
324- m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
325- AC_MSG_CHECKING([if FUNC is available])
326- AC_LINK_IFELSE([AC_LANG_SOURCE([
327-#include <byteswap.h>
328-int
329-main(void)
330-{
331- FUNC[](42);
332- return 0;
333-}
334- ])], [
335- AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
336- [Define to 1 if] FUNC [is available.])
337- AC_MSG_RESULT([yes])
338- ], [AC_MSG_RESULT([no])])
339-
340- ])dnl
341-fi
342+AC_DEFINE(HAVE_BSWAP_16, 1)
343+AC_DEFINE(HAVE_BSWAP_32, 1)
344+AC_DEFINE(HAVE_BSWAP_64, 1)
345
346
347 ###############################################################################
348@@ -527,90 +510,16 @@
349 # xz command line tool uses this to automatically limit its memory usage.
350 # - sysconf() gives all the needed info on GNU+Linux and Solaris.
351 # - BSDs use sysctl().
352-AC_MSG_CHECKING([how to detect the amount of physical memory])
353-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
354-#include <unistd.h>
355-int
356-main()
357-{
358- long i;
359- i = sysconf(_SC_PAGESIZE);
360- i = sysconf(_SC_PHYS_PAGES);
361- return 0;
362-}
363-]])], [
364- AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
365+AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
366 [Define to 1 if the amount of physical memory can be detected
367 with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
368- AC_MSG_RESULT([sysconf])
369-], [
370-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
371-#include <sys/types.h>
372-#ifdef HAVE_SYS_PARAM_H
373-# include <sys/param.h>
374-#endif
375-#include <sys/sysctl.h>
376-int
377-main()
378-{
379- int name[2] = { CTL_HW, HW_PHYSMEM };
380- unsigned long mem;
381- size_t mem_ptr_size = sizeof(mem);
382- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
383- return 0;
384-}
385-]])], [
386- AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1],
387- [Define to 1 if the amount of physical memory can be detected
388- with sysctl().])
389- AC_MSG_RESULT([sysctl])
390-], [
391- AC_MSG_RESULT([unknown])
392-])])
393
394 # Check how to find out the number of available CPU cores in the system.
395 # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
396 # use sysctl().
397-AC_MSG_CHECKING([how to detect the number of available CPU cores])
398-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
399-#include <unistd.h>
400-int
401-main()
402-{
403- long i;
404- i = sysconf(_SC_NPROCESSORS_ONLN);
405- return 0;
406-}
407-]])], [
408- AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
409+AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
410 [Define to 1 if the number of available CPU cores can be
411 detected with sysconf(_SC_NPROCESSORS_ONLN).])
412- AC_MSG_RESULT([sysconf])
413-], [
414-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
415-#include <sys/types.h>
416-#ifdef HAVE_SYS_PARAM_H
417-# include <sys/param.h>
418-#endif
419-#include <sys/sysctl.h>
420-int
421-main()
422-{
423- int name[2] = { CTL_HW, HW_NCPU };
424- int cpus;
425- size_t cpus_size = sizeof(cpus);
426- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
427- return 0;
428-}
429-]])], [
430- AC_DEFINE([HAVE_NCPU_SYSCTL], [1],
431- [Define to 1 if the number of available CPU cores can be
432- detected with sysctl().])
433- AC_MSG_RESULT([sysctl])
434-], [
435- AC_MSG_RESULT([unknown])
436-])])
437-
438
439 ###############################################################################
440 # If using GCC, set some additional CFLAGS:
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
new file mode 100644
index 0000000000..a7097f760c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
@@ -0,0 +1,137 @@
1DESCRIPTION = "The RPM Package Manager - relaunched"
2DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
3HOMEPAGE = "http://rpm5.org/"
4LICENSE = "LGPL 2.1"
5DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
6PR = "r2"
7
8SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
9 file://remove-compiled-tests.patch;apply=no \
10 file://perfile_rpmdeps.sh \
11 "
12inherit autotools gettext
13
14acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
15
16# Specify the default rpm macros in terms of adjustable variables
17rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
18
19EXTRA_OECONF = "--with-python=$PYTHONVER \
20 --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \
21 --with-python-lib-dir=${libdir}/python$PYTHONVER \
22 --with-db=internal \
23 --with-db-tools-integrated \
24 --with-libelf \
25 --with-file=internal \
26 --without-apidocs \
27 --without-selinux \
28 --without-lua \
29 --without-dmalloc \
30 --without-efence \
31 --without-neon \
32 --with-pcre=${libdir} \
33 --with-path-macros=${rpm_macros} \
34 --with-bugreport=http://bugzilla.pokylinux.org"
35
36CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
37
38PACKAGES =+ "rpm-build python-rpm python-rpm-dbg"
39
40SOLIBS = "5.0.so"
41
42FILES_rpm-build = "${bindir}/*-rpmbuild \
43 ${bindir}/*-gendiff \
44 ${bindir}/*-rpmspecdump \
45 ${libdir}/rpm/helpers/* \
46 ${libdir}/rpm/*brp* \
47 ${libdir}/rpm/*check-files \
48 ${libdir}/rpm/*cross-build \
49 ${libdir}/rpm/*debugedit \
50 ${libdir}/rpm/*dep* \
51 ${libdir}/rpm/*prov* \
52 ${libdir}/rpm/*req* \
53 ${libdir}/rpm/*find* \
54 ${libdir}/rpm/qf/* \
55 "
56
57FILES_python-rpm = "${libdir}/python*/rpm/_*"
58FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
59
60# The mutex needs to be POSIX/pthreads/library or we can't
61# share a database between host and target environments
62# (there is a minor performance penalty, but not one great enough
63# to justify the pain of a more optimized approach!)
64EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
65
66do_configure() {
67 rm ${S}/db/dist/configure.in -f
68 for i in `find ${S} -name *.ac`; do
69 j=`echo $i | sed 's/.ac/.m4/g'`
70 mv $i $j
71 done
72 export ac_cv_va_copy=C99
73 autotools_do_configure
74 cd ${S}/db3
75 ${S}/db3/configure \
76 --build=${BUILD_SYS} \
77 --host=${HOST_SYS} \
78 --target=${TARGET_SYS} \
79 --prefix=${prefix} \
80 --exec_prefix=${exec_prefix} \
81 --bindir=${bindir} \
82 --sbindir=${sbindir} \
83 --libexecdir=${libexecdir} \
84 --datadir=${datadir} \
85 --sysconfdir=${sysconfdir} \
86 --sharedstatedir=${sharedstatedir} \
87 --localstatedir=${localstatedir} \
88 --libdir=${libdir} \
89 --includedir=${includedir} \
90 --oldincludedir=${oldincludedir} \
91 --infodir=${infodir} \
92 --mandir=${mandir} \
93 ${EXTRA_OECONF}
94}
95
96INSTALL_ACTIONS=""
97
98# When installing the native version, the rpm components are renamed with a
99# naming transform. We need to adjust the rpmpopt file with the same transform
100INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
101
102do_install_append() {
103 ${INSTALL_ACTIONS}
104 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
105 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
106 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
107 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
108 sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros
109 sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros
110 sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros
111 sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros
112 sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros
113 sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros
114 sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros
115 sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros
116
117 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
118
119 mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \
120 ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py
121
122}
123
124def rpm_python_version(d):
125 import os, bb
126 staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
127 if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
128 if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
129 if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
130 if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
131 raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
132
133# Use a shell variable here since otherwise gettext trys to expand this at
134# parse time when it manipulates EXTRA_OECONF which fails
135export PYTHONVER = "${@rpm_python_version(d)}"
136
137BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rsync/files/acinclude.m4 b/meta/recipes-devtools/rsync/files/acinclude.m4
new file mode 100644
index 0000000000..735b41dec8
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/acinclude.m4
@@ -0,0 +1,95 @@
1dnl verbatim renamed from aclocal.m4 in rsync_3.0.7
2dnl 07/06/2010 - qhe
3
4dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
5dnl if the cache file is inconsistent with the current host,
6dnl target and build system types, execute CMD or print a default
7dnl error message.
8AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
9 AC_REQUIRE([AC_CANONICAL_SYSTEM])
10 AC_MSG_CHECKING([config.cache system type])
11 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
12 test x"$ac_cv_host_system_type" != x"$host"; } ||
13 { test x"${ac_cv_build_system_type+set}" = x"set" &&
14 test x"$ac_cv_build_system_type" != x"$build"; } ||
15 { test x"${ac_cv_target_system_type+set}" = x"set" &&
16 test x"$ac_cv_target_system_type" != x"$target"; }; then
17 AC_MSG_RESULT([different])
18 ifelse($#, 1, [$1],
19 [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
20 else
21 AC_MSG_RESULT([same])
22 fi
23 ac_cv_host_system_type="$host"
24 ac_cv_build_system_type="$build"
25 ac_cv_target_system_type="$target"
26])
27
28dnl Check for socklen_t: historically on BSD it is an int, and in
29dnl POSIX 1g it is a type of its own, but some platforms use different
30dnl types for the argument to getsockopt, getpeername, etc. So we
31dnl have to test to find something that will work.
32
33dnl This is no good, because passing the wrong pointer on C compilers is
34dnl likely to only generate a warning, not an error. We don't call this at
35dnl the moment.
36
37AC_DEFUN([TYPE_SOCKLEN_T],
38[
39 AC_CHECK_TYPE([socklen_t], ,[
40 AC_MSG_CHECKING([for socklen_t equivalent])
41 AC_CACHE_VAL([rsync_cv_socklen_t_equiv],
42 [
43 # Systems have either "struct sockaddr *" or
44 # "void *" as the second argument to getpeername
45 rsync_cv_socklen_t_equiv=
46 for arg2 in "struct sockaddr" void; do
47 for t in int size_t unsigned long "unsigned long"; do
48 AC_TRY_COMPILE([
49#include <sys/types.h>
50#include <sys/socket.h>
51
52 int getpeername (int, $arg2 *, $t *);
53 ],[
54 $t len;
55 getpeername(0,0,&len);
56 ],[
57 rsync_cv_socklen_t_equiv="$t"
58 break
59 ])
60 done
61 done
62
63 if test "x$rsync_cv_socklen_t_equiv" = x; then
64 AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
65 fi
66 ])
67 AC_MSG_RESULT($rsync_cv_socklen_t_equiv)
68 AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv,
69 [type to use in place of socklen_t if not defined])],
70 [#include <sys/types.h>
71#include <sys/socket.h>])
72])
73
74dnl AC_HAVE_TYPE(TYPE,INCLUDES)
75AC_DEFUN([AC_HAVE_TYPE], [
76AC_REQUIRE([AC_HEADER_STDC])
77cv=`echo "$1" | sed 'y%./+- %__p__%'`
78AC_MSG_CHECKING(for $1)
79AC_CACHE_VAL([ac_cv_type_$cv],
80AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
81AC_INCLUDES_DEFAULT
82$2]],
83[[$1 foo;]])],
84[eval "ac_cv_type_$cv=yes"],
85[eval "ac_cv_type_$cv=no"]))dnl
86ac_foo=`eval echo \\$ac_cv_type_$cv`
87AC_MSG_RESULT($ac_foo)
88if test "$ac_foo" = yes; then
89 ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
90if false; then
91 AC_CHECK_TYPES($1)
92fi
93 AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
94fi
95])
diff --git a/meta/recipes-devtools/rsync/files/rsyncd.conf b/meta/recipes-devtools/rsync/files/rsyncd.conf
new file mode 100644
index 0000000000..845f5b33f5
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/rsyncd.conf
@@ -0,0 +1,15 @@
1# /etc/rsyncd.conf
2
3# Minimal configuration file for rsync daemon
4# See rsync(1) and rsyncd.conf(5) man pages for help
5
6# This file is required by rsync --daemon
7pid file = /var/run/rsyncd.pid
8use chroot = yes
9read only = yes
10
11# Simple example for enabling your own local rsync server
12#[everything]
13# path = /
14# comment = Everything except /etc exposed
15# exclude = /etc
diff --git a/meta/recipes-devtools/rsync/rsync.inc b/meta/recipes-devtools/rsync/rsync.inc
new file mode 100644
index 0000000000..fdc7e37cf6
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync.inc
@@ -0,0 +1,24 @@
1DESCRIPTION = "A file-synchronization tool"
2HOMEPAGE = "http://rsync.samba.org/"
3BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
4SECTION = "console/network"
5PRIORITY = "optional"
6
7# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
8LICENSE = "GPLv3+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
10
11# needs to add acl and attr
12DEPENDS = "popt"
13
14SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
15 file://rsyncd.conf"
16
17inherit autotools
18
19do_install_append() {
20 install -d ${D}/etc
21 install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
22}
23
24EXTRA_OEMAKE='STRIP=""'
diff --git a/meta/recipes-devtools/rsync/rsync_2.6.9.bb b/meta/recipes-devtools/rsync/rsync_2.6.9.bb
new file mode 100644
index 0000000000..43379829ea
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_2.6.9.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "A file-synchronization tool"
2HOMEPAGE = "http://rsync.samba.org/"
3BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
4SECTION = "console/network"
5PRIORITY = "optional"
6
7# needs to add acl and attr
8DEPENDS = "popt"
9
10SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
11 file://rsyncd.conf"
12
13inherit autotools
14
15do_install_append() {
16 install -d ${D}/etc
17 install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
18}
19
20EXTRA_OEMAKE='STRIP=""'
21
22LICENSE = "GPLv2+"
23LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c"
24
25PR = "r2"
diff --git a/meta/recipes-devtools/rsync/rsync_3.0.7.bb b/meta/recipes-devtools/rsync/rsync_3.0.7.bb
new file mode 100644
index 0000000000..3a1e48a61d
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_3.0.7.bb
@@ -0,0 +1,18 @@
1require rsync.inc
2
3PR = "r1"
4
5SRC_URI += "file://acinclude.m4"
6
7EXTRA_OECONF += "--disable-xattr-support --disable-acl-support"
8
9# rsync 3.0 uses configure.sh instead of configure, and
10# makefile checks the existence of configure.sh
11do_configure_prepend () {
12 rm -f configure configure.sh
13 cp -f ${WORKDIR}/acinclude.m4 ${S}/
14}
15
16do_configure_append () {
17 cp -f configure configure.sh
18}
diff --git a/meta/recipes-devtools/shasum/files/main.c b/meta/recipes-devtools/shasum/files/main.c
new file mode 100644
index 0000000000..0748a94f3a
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/main.c
@@ -0,0 +1,60 @@
1#include <stdio.h>
2#include <stdlib.h>
3
4#include "mhash_sha256.h"
5
6/*
7 * from driver.c of mhash
8 */
9static const char hexconvtab[] = "0123456789abcdef";
10
11static char *
12bin2hex(const unsigned char *old, const size_t oldlen, size_t * newlen)
13{
14 unsigned char *new = NULL;
15 int i, j;
16
17 new = (char *) malloc(oldlen * 2 * sizeof(char) + 1);
18 if (!new)
19 return (new);
20
21 for (i = j = 0; i < oldlen; i++) {
22 new[j++] = hexconvtab[old[i] >> 4];
23 new[j++] = hexconvtab[old[i] & 15];
24 }
25 new[j] = '\0';
26
27 if (newlen)
28 *newlen = oldlen * 2 * sizeof(char);
29
30 return (new);
31}
32
33
34int main(int argc, char** argv)
35{
36 FILE *file;
37 size_t n;
38 SHA256_CTX ctx;
39 unsigned char buf[1024];
40 byte output[33];
41
42 if ( argc <= 1 ) {
43 return EXIT_FAILURE;
44 }
45
46 if ( (file=fopen(argv[1], "rb")) == NULL ) {
47 return EXIT_FAILURE;
48 }
49
50 sha256_init(&ctx);
51
52 while ( (n=fread( buf, 1, sizeof(buf), file)) > 0 )
53 sha256_update(&ctx, buf, n );
54
55 sha256_final(&ctx);
56 sha256_digest(&ctx, output);
57
58 printf("%s ?%s\n", bin2hex(output, 32, &n), argv[1]);
59 return EXIT_SUCCESS;
60}
diff --git a/meta/recipes-devtools/shasum/files/mhash_sha256.h b/meta/recipes-devtools/shasum/files/mhash_sha256.h
new file mode 100644
index 0000000000..46090c5f3e
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/mhash_sha256.h
@@ -0,0 +1,64 @@
1/* sha.h
2 *
3 * The sha1 and sha256 hash functions.
4 */
5
6/* nettle, low-level cryptographics library
7 *
8 * Copyright (C) 2001 Niels Möller
9 *
10 * The nettle library is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or (at your
13 * option) any later version.
14 *
15 * The nettle library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with the nettle library; see the file COPYING.LIB. If not, write to
22 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 * MA 02111-1307, USA.
24 */
25
26#ifndef NETTLE_SHA_H_INCLUDED
27#define NETTLE_SHA_H_INCLUDED
28
29#include <inttypes.h>
30
31typedef uint32_t word32;
32typedef unsigned char byte;
33
34
35/* SHA256 */
36
37#define SHA256_DIGEST_SIZE 32
38#define SHA256_DATA_SIZE 64
39
40/* Digest is kept internally as 8 32-bit words. */
41#define _SHA256_DIGEST_LENGTH 8
42
43typedef struct sha256_ctx
44{
45 word32 state[_SHA256_DIGEST_LENGTH]; /* State variables */
46 word32 count_low, count_high; /* 64-bit block count */
47 byte block[SHA256_DATA_SIZE]; /* SHA256 data buffer */
48 unsigned int index; /* index into buffer */
49} SHA256_CTX;
50
51void
52sha256_init(struct sha256_ctx *ctx);
53
54void
55sha256_update(struct sha256_ctx *ctx, const byte *data, unsigned length);
56
57void
58sha256_final(struct sha256_ctx *ctx);
59
60void
61sha256_digest(const struct sha256_ctx *ctx, byte *digest);
62
63
64#endif /* NETTLE_SHA_H_INCLUDED */
diff --git a/meta/recipes-devtools/shasum/files/sha256.c b/meta/recipes-devtools/shasum/files/sha256.c
new file mode 100644
index 0000000000..e2ee2c6b4e
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/sha256.c
@@ -0,0 +1,322 @@
1/* sha256.h
2 *
3 * The sha256 hash function.
4 */
5
6/* nettle, low-level cryptographics library
7 *
8 * Copyright (C) 2001 Niels Möller
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * The nettle library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with the nettle library; see the file COPYING.LIB. If not, write to
22 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 * MA 02111-1307, USA.
24 */
25
26/* Modelled after the sha1.c code by Peter Gutmann. */
27
28#include "mhash_sha256.h"
29#include <stdlib.h>
30#include <string.h>
31
32
33#ifndef EXTRACT_UCHAR
34#define EXTRACT_UCHAR(p) (*(unsigned char *)(p))
35#endif
36
37#define STRING2INT(s) ((((((EXTRACT_UCHAR(s) << 8) \
38 | EXTRACT_UCHAR(s+1)) << 8) \
39 | EXTRACT_UCHAR(s+2)) << 8) \
40 | EXTRACT_UCHAR(s+3))
41
42/* This has been modified in order to fit in mhash.
43 * --nmav.
44 */
45
46/* A block, treated as a sequence of 32-bit words. */
47#define SHA256_DATA_LENGTH 16
48
49#define ROTR(n,x) ((x)>>(n) | ((x)<<(32-(n))))
50#define SHR(n,x) ((x)>>(n))
51
52/* The SHA256 functions. The Choice function is the same as the SHA1
53 function f1, and the majority function is the same as the SHA1 f3
54 function. They can be optimized to save one boolean operation each
55 - thanks to Rich Schroeppel, rcs@cs.arizona.edu for discovering
56 this */
57
58/* #define Choice(x,y,z) ( ( (x) & (y) ) | ( ~(x) & (z) ) ) */
59#define Choice(x,y,z) ( (z) ^ ( (x) & ( (y) ^ (z) ) ) )
60/* #define Majority(x,y,z) ( ((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)) ) */
61#define Majority(x,y,z) ( ((x) & (y)) ^ ((z) & ((x) ^ (y))) )
62
63#define S0(x) (ROTR(2,(x)) ^ ROTR(13,(x)) ^ ROTR(22,(x)))
64#define S1(x) (ROTR(6,(x)) ^ ROTR(11,(x)) ^ ROTR(25,(x)))
65
66#define s0(x) (ROTR(7,(x)) ^ ROTR(18,(x)) ^ SHR(3,(x)))
67#define s1(x) (ROTR(17,(x)) ^ ROTR(19,(x)) ^ SHR(10,(x)))
68
69/* Generated by the shadata program. */
70static const word32 K[64] = {
71 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
72 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
73 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
74 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
75 0xe49b69c1UL, 0xefbe4786UL, 0xfc19dc6UL, 0x240ca1ccUL,
76 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
77 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
78 0xc6e00bf3UL, 0xd5a79147UL, 0x6ca6351UL, 0x14292967UL,
79 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
80 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
81 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
82 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
83 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
84 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
85 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
86 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL,
87};
88
89/* The initial expanding function. The hash function is defined over an
90 64-word expanded input array W, where the first 16 are copies of the input
91 data, and the remaining 64 are defined by
92
93 W[ t ] = s1(W[t-2] + W[t-7] + s0(W[i-15] + W[i-16]
94
95 This implementation generates these values on the fly in a circular
96 buffer - thanks to Colin Plumb, colin@nyx10.cs.du.edu for this
97 optimization.
98*/
99
100#define EXPAND(W,i) \
101( W[(i) & 15 ] += (s1(W[((i)-2) & 15]) + W[((i)-7) & 15] + s0(W[((i)-15) & 15])) )
102
103/* The prototype SHA sub-round. The fundamental sub-round is:
104
105 T1 = h + S1(e) + Choice(e,f,g) + K[t] + W[t]
106 T2 = S0(a) + Majority(a,b,c)
107 a' = T1+T2
108 b' = a
109 c' = b
110 d' = c
111 e' = d + T1
112 f' = e
113 g' = f
114 h' = g
115
116 but this is implemented by unrolling the loop 8 times and renaming
117 the variables
118 ( h, a, b, c, d, e, f, g ) = ( a, b, c, d, e, f, g, h ) each
119 iteration. This code is then replicated 8, using the next 8 values
120 from the W[] array each time */
121
122/* FIXME: We can probably reorder this to optimize away at least one
123 * of T1 and T2. It's crucial that DATA is only used once, as that
124 * argument will have side effects. */
125#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
126 word32 T1 = h + S1(e) + Choice(e,f,g) + k + data; \
127 word32 T2 = S0(a) + Majority(a,b,c); \
128 d += T1; \
129 h = T1 + T2; \
130} while (0)
131
132/* Initialize the SHA values */
133
134void sha256_init(struct sha256_ctx *ctx)
135{
136 /* Initial values, also generated by the shadata program. */
137 static const word32 H0[_SHA256_DIGEST_LENGTH] = {
138 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL,
139 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL,
140 };
141
142 memcpy(ctx->state, H0, sizeof(H0));
143
144 /* Initialize bit count */
145 ctx->count_low = ctx->count_high = 0;
146
147 /* Initialize buffer */
148 ctx->index = 0;
149}
150
151/* Perform the SHA transformation. Note that this code, like MD5, seems to
152 break some optimizing compilers due to the complexity of the expressions
153 and the size of the basic block. It may be necessary to split it into
154 sections, e.g. based on the four subrounds
155
156 Note that this function destroys the data area */
157
158static void sha256_transform(word32 * state, word32 * data)
159{
160 word32 A, B, C, D, E, F, G, H; /* Local vars */
161 unsigned i;
162 const word32 *k;
163 word32 *d;
164
165 /* Set up first buffer and local data buffer */
166 A = state[0];
167 B = state[1];
168 C = state[2];
169 D = state[3];
170 E = state[4];
171 F = state[5];
172 G = state[6];
173 H = state[7];
174
175 /* Heavy mangling */
176 /* First 16 subrounds that act on the original data */
177
178 for (i = 0, k = K, d = data; i < 16; i += 8, k += 8, d += 8) {
179 ROUND(A, B, C, D, E, F, G, H, k[0], d[0]);
180 ROUND(H, A, B, C, D, E, F, G, k[1], d[1]);
181 ROUND(G, H, A, B, C, D, E, F, k[2], d[2]);
182 ROUND(F, G, H, A, B, C, D, E, k[3], d[3]);
183 ROUND(E, F, G, H, A, B, C, D, k[4], d[4]);
184 ROUND(D, E, F, G, H, A, B, C, k[5], d[5]);
185 ROUND(C, D, E, F, G, H, A, B, k[6], d[6]);
186 ROUND(B, C, D, E, F, G, H, A, k[7], d[7]);
187 }
188
189 for (; i < 64; i += 16, k += 16) {
190 ROUND(A, B, C, D, E, F, G, H, k[0], EXPAND(data, 0));
191 ROUND(H, A, B, C, D, E, F, G, k[1], EXPAND(data, 1));
192 ROUND(G, H, A, B, C, D, E, F, k[2], EXPAND(data, 2));
193 ROUND(F, G, H, A, B, C, D, E, k[3], EXPAND(data, 3));
194 ROUND(E, F, G, H, A, B, C, D, k[4], EXPAND(data, 4));
195 ROUND(D, E, F, G, H, A, B, C, k[5], EXPAND(data, 5));
196 ROUND(C, D, E, F, G, H, A, B, k[6], EXPAND(data, 6));
197 ROUND(B, C, D, E, F, G, H, A, k[7], EXPAND(data, 7));
198 ROUND(A, B, C, D, E, F, G, H, k[8], EXPAND(data, 8));
199 ROUND(H, A, B, C, D, E, F, G, k[9], EXPAND(data, 9));
200 ROUND(G, H, A, B, C, D, E, F, k[10], EXPAND(data, 10));
201 ROUND(F, G, H, A, B, C, D, E, k[11], EXPAND(data, 11));
202 ROUND(E, F, G, H, A, B, C, D, k[12], EXPAND(data, 12));
203 ROUND(D, E, F, G, H, A, B, C, k[13], EXPAND(data, 13));
204 ROUND(C, D, E, F, G, H, A, B, k[14], EXPAND(data, 14));
205 ROUND(B, C, D, E, F, G, H, A, k[15], EXPAND(data, 15));
206 }
207
208 /* Update state */
209 state[0] += A;
210 state[1] += B;
211 state[2] += C;
212 state[3] += D;
213 state[4] += E;
214 state[5] += F;
215 state[6] += G;
216 state[7] += H;
217}
218
219static void sha256_block(struct sha256_ctx *ctx, const byte * block)
220{
221 word32 data[SHA256_DATA_LENGTH];
222 int i;
223
224 /* Update block count */
225 if (!++ctx->count_low)
226 ++ctx->count_high;
227
228 /* Endian independent conversion */
229 for (i = 0; i < SHA256_DATA_LENGTH; i++, block += 4)
230 data[i] = STRING2INT(block);
231
232 sha256_transform(ctx->state, data);
233}
234
235void
236sha256_update(struct sha256_ctx *ctx, const byte * buffer, unsigned length)
237{
238 if (ctx->index) { /* Try to fill partial block */
239 unsigned left = SHA256_DATA_SIZE - ctx->index;
240 if (length < left) {
241 memcpy(ctx->block + ctx->index, buffer, length);
242 ctx->index += length;
243 return; /* Finished */
244 } else {
245 memcpy(ctx->block + ctx->index, buffer, left);
246 sha256_block(ctx, ctx->block);
247 buffer += left;
248 length -= left;
249 }
250 }
251 while (length >= SHA256_DATA_SIZE) {
252 sha256_block(ctx, buffer);
253 buffer += SHA256_DATA_SIZE;
254 length -= SHA256_DATA_SIZE;
255 }
256 /* Buffer leftovers */
257 /* NOTE: The corresponding sha1 code checks for the special case length == 0.
258 * That seems supoptimal, as I suspect it increases the number of branches. */
259
260 memcpy(ctx->block, buffer, length);
261 ctx->index = length;
262}
263
264/* Final wrapup - pad to SHA1_DATA_SIZE-byte boundary with the bit pattern
265 1 0* (64-bit count of bits processed, MSB-first) */
266
267void sha256_final(struct sha256_ctx *ctx)
268{
269 word32 data[SHA256_DATA_LENGTH];
270 int i;
271 int words;
272
273 i = ctx->index;
274
275 /* Set the first char of padding to 0x80. This is safe since there is
276 always at least one byte free */
277
278/* assert(i < SHA256_DATA_SIZE);
279 */
280 ctx->block[i++] = 0x80;
281
282 /* Fill rest of word */
283 for (; i & 3; i++)
284 ctx->block[i] = 0;
285
286 /* i is now a multiple of the word size 4 */
287 words = i >> 2;
288 for (i = 0; i < words; i++)
289 data[i] = STRING2INT(ctx->block + 4 * i);
290
291 if (words > (SHA256_DATA_LENGTH - 2)) { /* No room for length in this block. Process it and
292 * pad with another one */
293 for (i = words; i < SHA256_DATA_LENGTH; i++)
294 data[i] = 0;
295 sha256_transform(ctx->state, data);
296 for (i = 0; i < (SHA256_DATA_LENGTH - 2); i++)
297 data[i] = 0;
298 } else
299 for (i = words; i < SHA256_DATA_LENGTH - 2; i++)
300 data[i] = 0;
301
302 /* There are 512 = 2^9 bits in one block */
303 data[SHA256_DATA_LENGTH - 2] =
304 (ctx->count_high << 9) | (ctx->count_low >> 23);
305 data[SHA256_DATA_LENGTH - 1] =
306 (ctx->count_low << 9) | (ctx->index << 3);
307 sha256_transform(ctx->state, data);
308}
309
310void sha256_digest(const struct sha256_ctx *ctx, byte * s)
311{
312 int i;
313
314 if (s!=NULL)
315 for (i = 0; i < _SHA256_DIGEST_LENGTH; i++) {
316 *s++ = ctx->state[i] >> 24;
317 *s++ = 0xff & (ctx->state[i] >> 16);
318 *s++ = 0xff & (ctx->state[i] >> 8);
319 *s++ = 0xff & ctx->state[i];
320 }
321}
322
diff --git a/meta/recipes-devtools/shasum/shasum-native.bb b/meta/recipes-devtools/shasum/shasum-native.bb
new file mode 100644
index 0000000000..d39a6c3865
--- /dev/null
+++ b/meta/recipes-devtools/shasum/shasum-native.bb
@@ -0,0 +1,8 @@
1require shasum.inc
2
3inherit native
4
5INHIBIT_DEFAULT_DEPS = "1"
6PATCHTOOL = "patch"
7
8do_fetch[depends] = ""
diff --git a/meta/recipes-devtools/shasum/shasum.inc b/meta/recipes-devtools/shasum/shasum.inc
new file mode 100644
index 0000000000..d5f1e8b928
--- /dev/null
+++ b/meta/recipes-devtools/shasum/shasum.inc
@@ -0,0 +1,23 @@
1SUMMARY = "A simple tool to create sha256 hashes from a file"
2LICENSE = "LGPL"
3
4PR = "r1"
5
6S = "${WORKDIR}"
7
8SRC_URI = "file://main.c \
9 file://mhash_sha256.h \
10 file://sha256.c "
11
12do_configure() {
13 :
14}
15
16do_compile() {
17 $CC $CFLAGS $CPPFLAGS -o oe_sha256sum main.c sha256.c
18}
19
20do_install() {
21 install -d ${D}${bindir}/
22 install ${S}/oe_sha256sum ${D}${bindir}/
23}
diff --git a/meta/recipes-devtools/subversion/subversion-1.5.5/disable-revision-install.patch b/meta/recipes-devtools/subversion/subversion-1.5.5/disable-revision-install.patch
new file mode 100644
index 0000000000..a1c60654cb
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/disable-revision-install.patch
@@ -0,0 +1,22 @@
1--- subversion-1.2.0-r0/Makefile.in.old 2005-07-17 22:28:21.898728312 +0200
2+++ subversion-1.2.0-r0/Makefile.in 2005-07-17 22:30:05.361999504 +0200
3@@ -260,7 +260,7 @@
4 clean: external-clean local-clean
5 distclean: external-distclean local-distclean
6 extraclean: external-extraclean local-extraclean
7-install: external-install local-install revision-install
8+install: external-install local-install #revision-install
9
10 @INCLUDE_OUTPUTS@
11
12@@ -320,8 +320,8 @@
13 local-install: @INSTALL_RULES@
14
15 ### HACK!! Find a better way to do this
16-revision-install:
17- subversion/svnversion/svnversion $(top_srcdir) /repos/svn/trunk > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
18+#revision-install:
19+# subversion/svnversion/svnversion $(top_srcdir) /repos/svn/trunk > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
20
21 install-static: @INSTALL_STATIC_RULES@
22
diff --git a/meta/recipes-devtools/subversion/subversion-1.5.5/libtool2.patch b/meta/recipes-devtools/subversion/subversion-1.5.5/libtool2.patch
new file mode 100644
index 0000000000..08343b09ec
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/libtool2.patch
@@ -0,0 +1,15 @@
1Index: subversion-1.5.5/configure.ac
2===================================================================
3--- subversion-1.5.5.orig/configure.ac 2008-08-26 18:27:56.000000000 +0100
4+++ subversion-1.5.5/configure.ac 2009-01-07 18:00:47.000000000 +0000
5@@ -153,8 +153,8 @@
6 LIBTOOL="$sh_libtool"
7 SVN_LIBTOOL="$sh_libtool"
8 else
9- sh_libtool="$abs_builddir/libtool"
10- SVN_LIBTOOL="\$(SHELL) $sh_libtool"
11+ sh_libtool="$abs_builddir/$host_alias-libtool"
12+ SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
13 dnl libtoolize requires that the following line not be indented
14 ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
15 fi
diff --git a/meta/recipes-devtools/subversion/subversion-1.5.5/neon-detection.patch b/meta/recipes-devtools/subversion/subversion-1.5.5/neon-detection.patch
new file mode 100644
index 0000000000..b567d5c050
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/neon-detection.patch
@@ -0,0 +1,36 @@
1diff --git a/build/ac-macros/neon.m4 b/build/ac-macros/neon.m4
2index 9fcf859..8d964f3 100644
3--- a/build/ac-macros/neon.m4
4+++ b/build/ac-macros/neon.m4
5@@ -38,7 +38,7 @@ AC_DEFUN(SVN_LIB_NEON,
6 if test "$withval" = "yes" ; then
7 AC_MSG_ERROR([--with-neon requires an argument.])
8 else
9- neon_config="$withval/bin/neon-config"
10+ neon_config="env env PKG_CONFIG_PATH=${withval}:${PKG_CONFIG_PATH} pkg-config neon"
11 fi
12
13 SVN_NEON_CONFIG()
14@@ -117,10 +117,10 @@ dnl SVN_NEON_CONFIG()
15 dnl neon-config found, gather relevant information from it
16 AC_DEFUN(SVN_NEON_CONFIG,
17 [
18- if test -f "$neon_config"; then
19- if test "$neon_config" != ""; then
20+ if true; then
21+ if true; then
22 AC_MSG_CHECKING([neon library version])
23- NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
24+ NEON_VERSION=`$neon_config --modversion | sed -e 's/^neon //'`
25 AC_MSG_RESULT([$NEON_VERSION])
26
27 if test -n "`echo \"$NEON_VERSION\" | grep '^0\.25\.'`" ; then
28@@ -133,7 +133,7 @@ AC_DEFUN(SVN_NEON_CONFIG,
29 test "$svn_allowed_neon" = "any"; then
30 svn_allowed_neon_on_system="yes"
31 SVN_NEON_INCLUDES=[`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`]
32- NEON_LIBS=`$neon_config --la-file`
33+ NEON_LIBS=`$neon_config --libs`
34 CFLAGS=["$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"]
35 svn_lib_neon="yes"
36 break
diff --git a/meta/recipes-devtools/subversion/subversion_1.5.5.bb b/meta/recipes-devtools/subversion/subversion_1.5.5.bb
new file mode 100644
index 0000000000..8adac8a6fa
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion_1.5.5.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "The Subversion (svn) client"
2SECTION = "console/network"
3DEPENDS = "apr-util neon"
4RDEPENDS = "neon"
5LICENSE = "Apache BSD"
6HOMEPAGE = "http://subversion.tigris.org"
7
8PR = "r6"
9
10SRC_URI = "http://subversion.tigris.org/downloads/${P}.tar.bz2 \
11 file://disable-revision-install.patch;patch=1 \
12 file://neon-detection.patch;patch=1 \
13 file://libtool2.patch;patch=1"
14
15EXTRA_OECONF = "--with-neon=${STAGING_EXECPREFIXDIR} \
16 --without-berkeley-db --without-apxs --without-apache \
17 --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
18 --with-apr-util=${STAGING_BINDIR_CROSS}"
19
20inherit autotools
21
22export LDFLAGS += " -L${STAGING_LIBDIR} "
23
24acpaths = "-I build/ -I build/ac-macros/"
25
26do_configure_prepend () {
27 rm -f ${S}/libtool
28 rm -f ${S}/build/libtool.m4
29}
diff --git a/meta/recipes-devtools/syslinux/files/cross-build.patch b/meta/recipes-devtools/syslinux/files/cross-build.patch
new file mode 100644
index 0000000000..c90c7afbaf
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/files/cross-build.patch
@@ -0,0 +1,64 @@
1Use ?= for Makefile variables to use poky environment variables.
2Original method to sed s/CC =/CC ?=/ is not applicable anymore
3because of the Makefile changes.
4
5against 3.86
6
706/28/2010 - qhe
8
9also AUXDIR stays in $(LIBDIR)/syslinux rather than $(DATADIR)/syslinux
10
1107/08/2010 - qhe
12
13---
14diff --git a/MCONFIG b/MCONFIG
15index e9c16d3..4d49f33 100644
16--- a/MCONFIG
17+++ b/MCONFIG
18@@ -18,13 +18,13 @@
19 MAKEFLAGS += -r
20 MAKE += -r
21
22-BINDIR = /usr/bin
23-SBINDIR = /sbin
24-LIBDIR = /usr/lib
25-DATADIR = /usr/share
26-AUXDIR = $(DATADIR)/syslinux
27-MANDIR = /usr/man
28-INCDIR = /usr/include
29+BINDIR ?= /usr/bin
30+SBINDIR ?= /sbin
31+LIBDIR ?= /usr/lib
32+DATADIR ?= /usr/share
33+AUXDIR = $(LIBDIR)/syslinux
34+MANDIR ?= /usr/man
35+INCDIR ?= /usr/include
36 TFTPBOOT = /tftpboot
37 COM32DIR = $(AUXDIR)/com32
38
39@@ -38,18 +38,18 @@ PERL = perl
40
41 CHMOD = chmod
42
43-CC = gcc
44+CC ?= gcc
45 gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \
46 if $(CC) $(1) -c $(topdir)/dummy.c -o $$tmpf 2>/dev/null ; \
47 then echo '$(1)'; else echo '$(2)'; fi; \
48 rm -f $$tmpf)
49
50-LD = ld
51-OBJDUMP = objdump
52-OBJCOPY = objcopy
53-AR = ar
54-NM = nm
55-RANLIB = ranlib
56+LD ?= ld
57+OBJDUMP ?= objdump
58+OBJCOPY ?= objcopy
59+AR ?= ar
60+NM ?= nm
61+RANLIB ?= ranlib
62 GZIPPROG = gzip
63 PNGTOPNM = pngtopnm
64 MCOPY = mcopy
diff --git a/meta/recipes-devtools/syslinux/syslinux_3.86.bb b/meta/recipes-devtools/syslinux/syslinux_3.86.bb
new file mode 100644
index 0000000000..5edbd24086
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux_3.86.bb
@@ -0,0 +1,46 @@
1DESCRIPTION = "A multi-purpose linux bootloader"
2HOMEPAGE = "http://syslinux.zytor.com/"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
5 file://README;beginline=28;endline=34;md5=a4607efd4a6392017186d08099e7d546"
6
7# If you really want to run syslinux, you need mtools. We just want the
8# ldlinux.* stuff for now, so skip mtools-native
9DEPENDS = "nasm-native"
10PR = "r1"
11
12SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/boot/syslinux/syslinux-${PV}.tar.bz2 \
13 file://cross-build.patch"
14
15COMPATIBLE_HOST = '(x86_64|i.86.*)-(linux|freebsd.*)'
16
17EXTRA_OEMAKE = " \
18 BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
19 DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
20"
21# syslinux uses $LD for linking, strip `-Wl,' so it can work
22export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`"
23
24do_configure() {
25 # drop win32 targets or build fails
26 sed -e 's,win32/\S*,,g' -i Makefile
27
28 # clean installer executables included in source tarball
29 oe_runmake clean
30}
31
32do_compile() {
33 # Rebuild only the installer; keep precompiled bootloaders
34 # as per author's request (doc/distrib.txt)
35 oe_runmake CC="${CC}" installer
36}
37
38do_install() {
39 oe_runmake install INSTALLROOT="${D}"
40
41 install -d ${D}${libdir}/syslinux/
42 install -m 644 ${S}/core/ldlinux.sys ${D}${libdir}/syslinux/
43 install -m 644 ${S}/core/ldlinux.bss ${D}${libdir}/syslinux/
44}
45
46BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/tcltk/tcl/fix-configure.patch b/meta/recipes-devtools/tcltk/tcl/fix-configure.patch
new file mode 100644
index 0000000000..8b2654bae0
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/fix-configure.patch
@@ -0,0 +1,44 @@
1Index: unix/tcl.m4
2===================================================================
3--- tcl8.4.11/unix.orig/tcl.m4
4+++ tcl8.4.11/unix/tcl.m4
5@@ -845,7 +845,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
6 # results, and the version is kept in special file).
7
8 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
9- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
10+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
11 fi
12 if test "`uname -s`" = "AIX" ; then
13 system=AIX-`uname -v`.`uname -r`
14@@ -2250,7 +2250,7 @@ AC_DEFUN(SC_BLOCKING_STYLE, [
15 # results, and the version is kept in special file).
16
17 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
19+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
20 fi
21 if test "`uname -s`" = "AIX" ; then
22 system=AIX-`uname -v`.`uname -r`
23Index: unix/configure
24===================================================================
25--- tcl8.4.11/unix.orig/configure
26+++ tcl8.4.11/unix/configure
27@@ -2130,7 +2130,7 @@ echo "configure:2121: checking system ve
28 # results, and the version is kept in special file).
29
30 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
31- system=MP-RAS-`awk '{print }' /etc/.relid'`
32+ system=MP-RAS-`awk '{print }' /etc/.relid`
33 fi
34 if test "`uname -s`" = "AIX" ; then
35 system=AIX-`uname -v`.`uname -r`
36@@ -7608,7 +7608,7 @@ echo "configure:7600: checking FIONBIO v
37 # results, and the version is kept in special file).
38
39 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
40- system=MP-RAS-`awk '{print }' /etc/.relid'`
41+ system=MP-RAS-`awk '{print }' /etc/.relid`
42 fi
43 if test "`uname -s`" = "AIX" ; then
44 system=AIX-`uname -v`.`uname -r`
diff --git a/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch b/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch
new file mode 100644
index 0000000000..b2d98c131c
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch
@@ -0,0 +1,63 @@
1Index: unix/Makefile.in
2===================================================================
3--- unix.orig/Makefile.in
4+++ unix/Makefile.in
5@@ -622,20 +622,20 @@ ro-test: tcltest
6 shell: tclsh
7 @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
8 TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
9- ./tclsh $(SCRIPT)
10+ tclsh $(SCRIPT)
11
12 # This target can be used to run tclsh inside either gdb or insight
13 gdb: tclsh
14 @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
15 @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
16- $(GDB) ./tclsh --command=gdb.run
17+ $(GDB) tclsh --command=gdb.run
18 rm gdb.run
19
20 # This target can be used to run tclsh inside ddd
21 ddd: tclsh
22 @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
23 @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
24- $(DDD) -command=gdb.run ./tclsh
25+ $(DDD) -command=gdb.run tclsh
26 rm gdb.run
27
28 VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v
29@@ -648,7 +648,7 @@ valgrind: tclsh tcltest
30 valgrindshell: tclsh
31 @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
32 TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
33- valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT)
34+ valgrind $(VALGRINDARGS) tclsh $(SCRIPT)
35
36 # The following target outputs the name of the top-level source directory for
37 # Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL
38@@ -817,14 +817,14 @@ install-tzdata: tclsh
39 @echo "Installing time zone data"
40 @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
41 TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
42- ./tclsh $(TOOL_DIR)/installData.tcl \
43+ tclsh $(TOOL_DIR)/installData.tcl \
44 $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
45
46 install-msgs: tclsh
47 @echo "Installing message catalogs"
48 @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
49 TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
50- ./tclsh $(TOOL_DIR)/installData.tcl \
51+ tclsh $(TOOL_DIR)/installData.tcl \
52 $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
53
54 install-doc: doc
55@@ -1764,7 +1764,7 @@ html-tk: tclsh
56 BUILD_HTML = \
57 @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
58 TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
59- ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
60+ tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
61 --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
62
63 #
diff --git a/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
new file mode 100644
index 0000000000..9cb816da51
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -0,0 +1,50 @@
1Index: unix/configure
2===================================================================
3--- unix.orig/configure
4+++ unix/configure
5@@ -6726,6 +6726,7 @@ fi
6 # symbols when dynamically loaded into tclsh.
7 SHLIB_LD_LIBS='${LIBS}'
8 SHLIB_SUFFIX=".so"
9+ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.so.0'
10
11 DL_OBJS="tclLoadDl.o"
12 LD_LIBRARY_PATH_VAR="LIBPATH"
13Index: unix/tcl.m4
14===================================================================
15--- unix.orig/tcl.m4
16+++ unix/tcl.m4
17@@ -1424,6 +1424,7 @@ dnl AC_CHECK_TOOL(AR, ar)
18 SHLIB_CFLAGS="-fPIC"
19 SHLIB_LD_LIBS='${LIBS}'
20 SHLIB_SUFFIX=".so"
21+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.0'
22
23 CFLAGS_OPTIMIZE="-O2"
24 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
25@@ -1431,12 +1432,15 @@ dnl AC_CHECK_TOOL(AR, ar)
26 # get rid of the warnings.
27 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
28
29+ # following line added by CW for Debian GNU/Linux
30+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
31+
32 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
33 DL_OBJS="tclLoadDl.o"
34 DL_LIBS="-ldl"
35 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
36 AS_IF([test $doRpath = yes], [
37- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
38+ CC_SEARCH_FLAGS=''])
39 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
40 AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
41 AS_IF([test $do64bit = yes], [
42@@ -2079,7 +2083,7 @@ dnl # preprocessing tests use only CPPFL
43
44 AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
45 LIB_SUFFIX=${SHARED_LIB_SUFFIX}
46- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
47+ MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
48 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
49 ], [
50 LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
diff --git a/meta/recipes-devtools/tcltk/tcl_8.5.8.bb b/meta/recipes-devtools/tcltk/tcl_8.5.8.bb
new file mode 100644
index 0000000000..880340067c
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl_8.5.8.bb
@@ -0,0 +1,62 @@
1DESCRIPTION = "Tool Command Language"
2LICENSE = "tcl"
3SECTION = "devel/tcltk"
4HOMEPAGE = "http://tcl.sourceforge.net"
5DEPENDS = "tcl-native"
6LIC_CHKSUM_FILES = "file://../license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
7 file://../compat/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
8 file://../library/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
9 file://../macosx/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
10 file://../tests/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
11 file://../win/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
12 "
13
14PR = "r2"
15
16BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \
17 file://tcl-add-soname.patch"
18
19SRC_URI = "${BASE_SRC_URI} \
20 file://fix_non_native_build_issue.patch"
21
22SRC_URI_virtclass-native = "${BASE_SRC_URI}"
23
24S = "${WORKDIR}/tcl${PV}/unix"
25
26inherit autotools
27
28DEPENDS_virtclass-native = ""
29
30EXTRA_OECONF = "--enable-threads"
31
32do_configure() {
33 gnu-configize
34 oe_runconf
35}
36
37do_compile_prepend() {
38 echo > ../compat/fixstrtod.c
39}
40
41do_install() {
42 autotools_do_install
43 oe_libinstall -so libtcl8.5 ${STAGING_LIBDIR}
44 ln -sf ./tclsh8.5 ${D}${bindir}/tclsh
45 sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
46 sed -i "s,-L${libdir},," tclConfig.sh
47 install -d ${STAGING_BINDIR_CROSS}/
48 install -m 0755 tclConfig.sh ${STAGING_BINDIR_CROSS}
49 cd ..
50 for dir in compat generic unix
51 do
52 install -d ${STAGING_INCDIR}/tcl${PV}/$dir
53 install -m 0644 $dir/*.h ${STAGING_INCDIR}/tcl${PV}/$dir/
54 done
55}
56
57PACKAGES =+ "${PN}-lib"
58FILES_${PN}-lib = "${libdir}/libtcl8.5.so.*"
59FILES_${PN} += "${libdir}/tcl8.5"
60FILES_${PN}-dev += "${libdir}/tclConfig.sh"
61
62BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/001-2.2b47-2.2b51.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/001-2.2b47-2.2b51.patch
new file mode 100644
index 0000000000..886ce92b34
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/001-2.2b47-2.2b51.patch
@@ -0,0 +1,2344 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3diff -urN nfs-server-2.2beta47/.version nfs-server-2.2beta51/.version
4--- nfs-server-2.2beta47/.version Tue Sep 7 09:47:27 1999
5+++ nfs-server-2.2beta51/.version Fri Nov 8 14:45:36 2002
6@@ -1 +1 @@
7-2.2beta46
8+2.2beta51
9diff -urN nfs-server-2.2beta47/ChangeLog nfs-server-2.2beta51/ChangeLog
10--- nfs-server-2.2beta47/ChangeLog Wed Nov 10 10:17:51 1999
11+++ nfs-server-2.2beta51/ChangeLog Fri Nov 8 14:45:36 2002
12@@ -1,8 +1,59 @@
13+Thu Nov 9 17:03:05 2000
14+
15+ * No longer use OPEN_MAX
16+
17+ * Reworked configure.in, BUILD script no longer needed
18+ (nor functioning)
19+
20+ * Be more anal about matching cached fh's and real files.
21+ In addition to the psi, we also store dev/ino/type now
22+ and match that in fh_find.
23+
24+ * Write pidfiles
25+
26+ * Support nosetuid
27+
28+Wed Feb 9 14:52:34 2000
29+
30+ * auth_init.c didn't properly parse options--rot_squash
31+ which is obviously a typo was parsed as ro.
32+ Thanks to Jan Steffan for complaining about this :-)
33+
34+Mon Jan 31 11:48:34 2000
35+
36+ * Fixed Y2K bug in logging.c.
37+ Thanks to Jonathan Hankins <jhankins@homewood.k12.al.us>.
38+
39+Thu Dec 9 11:14:21 1999
40+
41+ * Fix handling of NFS-mounted and /proc directories.
42+ They weren't properly hidden.
43+ Thanks to Dick Streefland <dick_streefland@tasking.com>
44+ for the report and a first patch.
45+
46 Wed Nov 10 10:17:16 1999
47
48 * Security fix for buffer overflow in fh_buildpath
49 No thanks to Mariusz who reported it to bugtraq
50 rather than me.
51+
52+Wed Nov 09 17:10:00 1999
53+
54+ * Workaround for broken Solaris clients that can't handle
55+ atime/mtime/ctime of 0.
56+ Thanks to Frank Wuebbelin for his problem report and
57+ testing the fix.
58+
59+ * Fixed typo in exports.man
60+
61+Tue Nov 2 10:31:14 1999
62+
63+ * Patch for mode 0100 and 0100 executables by
64+ Michael Deutschmann <michael@talamasca.wkpowerlink.com>
65+
66+ * Common startup stuff for all daemons.
67+ Inspired by code sent to me by someone (sorry, I forgot
68+ your name, and the mail's gone!)
69
70 Wed Sep 8 09:07:38 1999
71
72diff -urN nfs-server-2.2beta47/Makefile.in nfs-server-2.2beta51/Makefile.in
73--- nfs-server-2.2beta47/Makefile.in Tue Jun 22 14:53:10 1999
74+++ nfs-server-2.2beta51/Makefile.in Fri Nov 8 14:45:36 2002
75@@ -17,23 +17,30 @@
76
77 #### Start of system configuration section. ####
78
79-srcdir = @srcdir@
80-VPATH = @srcdir@
81+srcdir = @srcdir@
82+VPATH = @srcdir@
83
84-CC = @CC@
85-AR = ar
86-RANLIB = @RANLIB@
87-
88-INSTALL = @INSTALL@
89-INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
90-INSTALL_DATA = @INSTALL_DATA@
91-MAKEINFO = makeinfo
92-TEXI2DVI = texi2dvi
93-RPCGEN = @RPCGEN@ @RPCGEN_C@
94+CC = @CC@
95+AR = ar
96+RANLIB = @RANLIB@
97+
98+INSTALL = @INSTALL@
99+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
100+INSTALL_DATA = @INSTALL_DATA@
101+MAKEINFO = makeinfo
102+TEXI2DVI = texi2dvi
103+RPCGEN = @RPCGEN@ @RPCGEN_C@
104
105 # General compile options and libs:
106-DEFS = @DEFS@ $(NFSD_DEFS)
107-LIBS = libnfs.a @LIBS@
108+DEFS = @DEFS@ $(NFSD_DEFS)
109+LIBS = libnfs.a @LIBS@
110+
111+# Ugidd support
112+UGIDD_PROG = @UGIDD_PROG@
113+UGIDD_MAN = @UGIDD_MAN@
114+
115+# New inode mapping scheme
116+DEVTAB_FILE = $(install_prefix)@PATH_DEVTAB@
117
118 # Compile options for nfsd:
119 # CALL_PROFILING
120@@ -80,9 +87,6 @@
121
122 #### End of system configuration section. ####
123
124-# include site-specific defintions generated by BUILD.
125-include site.mk
126-
127 SHELL = /bin/sh
128
129 SRCS = version.c logging.c fh.c devtab.c \
130@@ -96,19 +100,19 @@
131 utimes.c mkdir.c rename.c getopt.c getopt_long.c \
132 alloca.c mountlist.c xmalloc.c \
133 xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
134- haccess.c failsafe.c signals.c
135+ haccess.c daemon.c signals.c
136 XDRFILES = mount.x nfs_prot.x
137 GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
138 ugid.h ugid_xdr.c ugid_clnt.c
139 HDRS = system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \
140 rpcmisc.h faccess.h rquotad.h rquota.h haccess.h
141-LIBHDRS = fsusage.h getopt.h mountlist.h failsafe.h signals.h
142+LIBHDRS = fsusage.h getopt.h mountlist.h daemon.h signals.h
143 MANPAGES5 = exports
144 MANPAGES8p = mountd nfsd $(UGIDD_MAN)
145 MANPAGES8 = showmount
146 MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8)
147 LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \
148- nfsmounted.o faccess.o haccess.o failsafe.o \
149+ nfsmounted.o faccess.o haccess.o daemon.o \
150 signals.o @LIBOBJS@ @ALLOCA@
151 OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o
152 NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
153@@ -174,15 +178,13 @@
154 ${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)
155
156 $(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
157- $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS) \
158- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
159+ $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS)
160
161 $(rpcprefix)nfsd: $(NFSD_OBJS) libnfs.a
162 $(CC) $(LDFLAGS) -o $@ $(NFSD_OBJS) $(LIBS)
163
164 $(rpcprefix)ugidd: $(UGIDD_OBJS) libnfs.a
165- $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS) \
166- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
167+ $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS)
168
169 showmount: $(SHOWMOUNT_OBJS) libnfs.a
170 $(CC) $(LDFLAGS) -o $@ $(SHOWMOUNT_OBJS) $(LIBS)
171diff -urN nfs-server-2.2beta47/aclocal.m4 nfs-server-2.2beta51/aclocal.m4
172--- nfs-server-2.2beta47/aclocal.m4 Fri Jun 11 12:04:22 1999
173+++ nfs-server-2.2beta51/aclocal.m4 Fri Nov 8 14:45:36 2002
174@@ -221,20 +221,14 @@
175 ])dnl
176 dnl *********** libwrap bug **************
177 define(AC_LIBWRAP_BUG,
178- [if test -f site.mk; then
179- . ./site.mk
180- fi
181- if test ! -z "$LIBWRAP_DIR"; then
182+ [if test "$ac_cv_lib_wrap_main" = yes; then
183 AC_MSG_CHECKING(for link problem with libwrap.a)
184 AC_CACHE_VAL(nfsd_cv_lib_wrap_bug,
185- [ac_save_LIBS=$LIBS
186- LIBS="$LIBS $LIBWRAP_DIR $LIBWRAP_LIB"
187- AC_TRY_LINK([
188+ [AC_TRY_LINK([
189 extern int deny_severity;
190 ],[
191 deny_severity=1;
192 ], nfsd_cv_lib_wrap_bug=no, nfsd_cv_lib_wrap_bug=yes)
193- LIBS=$ac_save_LIBS
194 ]) dnl
195 AC_MSG_RESULT($nfsd_cv_lib_wrap_bug)
196 test $nfsd_cv_lib_wrap_bug = yes && AC_DEFINE(HAVE_LIBWRAP_BUG)
197diff -urN nfs-server-2.2beta47/auth.c nfs-server-2.2beta51/auth.c
198--- nfs-server-2.2beta47/auth.c Mon Sep 13 16:56:03 1999
199+++ nfs-server-2.2beta51/auth.c Fri Nov 8 14:45:36 2002
200@@ -84,8 +84,9 @@
201 0, /* relative links */
202 0, /* noaccess */
203 1, /* cross_mounts */
204- (uid_t)-2, /* default uid */
205- (gid_t)-2, /* default gid */
206+ 1, /* allow setuid */
207+ 65534, /* default uid */
208+ 65534, /* default gid */
209 0, /* no NIS domain */
210 };
211
212@@ -99,8 +100,9 @@
213 0, /* relative links */
214 0, /* noaccess */
215 1, /* cross_mounts */
216- (uid_t)-2, /* default uid */
217- (gid_t)-2, /* default gid */
218+ 0, /* allow setuid */
219+ 65534, /* default uid */
220+ 65534, /* default gid */
221 0, /* no NIS domain */
222 };
223
224@@ -673,6 +675,7 @@
225 cpp = &unknown_clients;
226 } else {
227 cpp = &known_clients;
228+ cp->clnt_addr = *(struct in_addr *) hp->h_addr;
229 auth_hash_host(cp, hp);
230 }
231 cp->next = *cpp;
232diff -urN nfs-server-2.2beta47/auth.h nfs-server-2.2beta51/auth.h
233--- nfs-server-2.2beta47/auth.h Thu Apr 8 14:47:56 1999
234+++ nfs-server-2.2beta51/auth.h Fri Nov 8 14:45:36 2002
235@@ -23,14 +23,6 @@
236 extern char * public_root_path;
237 extern struct nfs_fh public_root;
238
239-#if defined(linux) && defined(i386) && !defined(HAVE_SETFSUID)
240-# define MAYBE_HAVE_SETFSUID
241-#endif
242-
243-#ifdef MAYBE_HAVE_SETFSUID
244-extern int have_setfsuid;
245-#endif
246-
247 /*
248 * These externs are set in the dispatcher (dispatch.c) and auth_fh
249 * (nfsd.c) so that we can determine access rights, export options,
250@@ -59,6 +51,7 @@
251 int link_relative;
252 int noaccess;
253 int cross_mounts;
254+ int allow_setuid;
255 uid_t nobody_uid;
256 gid_t nobody_gid;
257 char * clnt_nisdomain;
258@@ -112,7 +105,7 @@
259 extern void auth_free_lists(void);
260 extern nfs_client *auth_clnt(struct svc_req *rqstp);
261 extern nfs_mount *auth_path(nfs_client *, struct svc_req *, char *);
262-extern void auth_user(nfs_mount *, struct svc_req *);
263+extern int auth_user(nfs_mount *, struct svc_req *);
264
265 extern nfs_client *auth_get_client(char *);
266 extern nfs_mount *auth_match_mount(nfs_client *, char *);
267diff -urN nfs-server-2.2beta47/auth_clnt.c nfs-server-2.2beta51/auth_clnt.c
268--- nfs-server-2.2beta47/auth_clnt.c Wed Nov 10 10:18:06 1999
269+++ nfs-server-2.2beta51/auth_clnt.c Fri Nov 8 14:45:36 2002
270@@ -12,20 +12,17 @@
271 */
272
273
274+#include <sys/fsuid.h>
275 #include "system.h"
276 #include "nfsd.h"
277-#include "fakefsuid.h"
278-
279-#ifndef svc_getcaller
280-#define svc_getcaller(x) ((struct sockaddr_in *) &(x)->xp_rtaddr.buf)
281-#endif
282+#include "rpcmisc.h"
283
284
285-#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
286-static void setfsids(uid_t, gid_t, gid_t *, int);
287+#if defined(HAVE_SETFSUID)
288+static int setfsids(uid_t, gid_t, gid_t *, int);
289 #endif
290 #ifndef HAVE_SETFSUID
291-static void seteids(uid_t, gid_t, gid_t *, int);
292+static int seteids(uid_t, gid_t, gid_t *, int);
293 #endif
294
295 uid_t auth_uid = 0; /* Current effective user ids */
296@@ -43,6 +40,17 @@
297 short *gid, short *nrgids, int *groups);
298 #endif
299
300+/*
301+ * The following crap is required for glibc 2.1 which has 32bit uids
302+ * in user land mapped to 16bit uids in the Linux kernel
303+ */
304+#if defined(HAVE_BROKEN_SETFSUID)
305+# define native_uid(u) ((unsigned short)(u))
306+# define native_gid(g) ((unsigned short)(g))
307+#else
308+# define native_uid(u) (u)
309+# define native_gid(g) (g)
310+#endif
311
312 /*
313 * For an RPC request, look up the NFS client info along with the
314@@ -92,8 +100,9 @@
315 }
316
317 if (logging_enabled(D_AUTH)) {
318- Dprintf(D_AUTH, "auth_path(%s): mount point %s, (%s%s%s%s%s)\n",
319- path, mp->path,
320+ Dprintf(D_AUTH, "auth_path(%s, %s): "
321+ "mount point %s, (%s%s%s%s%s)\n",
322+ inet_ntoa(cp->clnt_addr), path, mp->path,
323 mp->o.all_squash? "all_squash " : (
324 mp->o.root_squash? "root_squash " : ""),
325 (mp->o.uidmap == map_daemon)? "uidmap " : "",
326@@ -105,7 +114,8 @@
327 return mp;
328 }
329
330-void auth_user(nfs_mount *mp, struct svc_req *rqstp)
331+int
332+auth_user(nfs_mount *mp, struct svc_req *rqstp)
333 {
334 uid_t cuid;
335 gid_t cgid;
336@@ -160,23 +170,18 @@
337 else if (cred_len > NGRPS)
338 cred_len = NGRPS;
339
340- cuid = luid(cred_uid, mp, rqstp);
341- cgid = lgid(cred_gid, mp, rqstp);
342+ cuid = luid(native_uid(cred_uid), mp, rqstp);
343+ cgid = lgid(native_gid(cred_gid), mp, rqstp);
344 clen = cred_len;
345 for (i = 0; i < cred_len; i++)
346- cgids[i] = lgid(cred_gids[i], mp, rqstp);
347+ cgids[i] = lgid(native_gid(cred_gids[i]), mp, rqstp);
348 } else {
349 /* On systems that have 32bit uid_t in user space but
350 * 16bit in the kernel, we need to truncate the
351 * nobody ID (default -2).
352 */
353-#if !defined(HAVE_BROKEN_SETFSUID)
354- cuid = mp->o.nobody_uid;
355- cgid = mp->o.nobody_gid;
356-#else
357- cuid = (unsigned short) mp->o.nobody_uid;
358- cgid = (unsigned short) mp->o.nobody_gid;
359-#endif
360+ cuid = native_uid(mp->o.nobody_uid);
361+ cgid = native_gid(mp->o.nobody_gid);
362 /* Construct a list of one gid. */
363 cgids[0] = cgid;
364 clen = 1;
365@@ -193,14 +198,9 @@
366 * upper 16 bits set (including our default nobody uid -2).
367 */
368 #if defined(HAVE_SETFSUID)
369- setfsids(cuid, cgid, cgids, clen);
370+ return setfsids(cuid, cgid, cgids, clen);
371 #else
372-#if defined(MAYBE_HAVE_SETFSUID)
373- if (have_setfsuid)
374- setfsids(cuid, cgid, cgids, clen);
375- else
376-#endif
377- seteids(cuid, cgid, cgids, clen);
378+ return seteids(cuid, cgid, cgids, clen);
379 #endif
380 }
381
382@@ -210,6 +210,8 @@
383 void
384 auth_override_uid(uid_t uid)
385 {
386+ int res;
387+
388 /* extension hooks: */
389 efs_setfsuid(uid);
390
391@@ -217,19 +219,18 @@
392 uid = (unsigned short) uid;
393 #endif
394 #if defined(HAVE_SETFSUID)
395- setfsuid(uid);
396+ res = setfsuid(uid);
397 #else
398-#if defined(MAYBE_HAVE_SETFSUID)
399- if (have_setfsuid)
400- setfsuid(uid);
401- else
402-#endif
403- seteuid(uid);
404+ res = seteuid(uid);
405 #endif
406+ /* should never happen */
407+ if (res < 0)
408+ Dprintf(L_FATAL, "auth_override_uid(%d) failed: %s",
409+ uid, strerror(errno));
410 }
411
412-#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
413-static void
414+#if defined(HAVE_SETFSUID)
415+static int
416 setfsids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
417 {
418 /* extension hooks: */
419@@ -238,43 +239,47 @@
420
421 /* First, set the user ID. */
422 if (auth_uid != cred_uid) {
423- if (setfsuid(cred_uid) < 0)
424+ if (setfsuid(cred_uid) < 0) {
425 Dprintf(L_ERROR, "Unable to setfsuid %d: %s\n",
426 cred_uid, strerror(errno));
427- else
428- auth_uid = cred_uid;
429+ return 0;
430+ }
431+ auth_uid = cred_uid;
432 }
433
434 /* Next, the group ID. */
435 if (auth_gid != cred_gid) {
436- if (setfsgid(cred_gid) < 0)
437+ if (setfsgid(cred_gid) < 0) {
438 Dprintf(L_ERROR, "Unable to setfsgid %d: %s\n",
439 cred_gid, strerror(errno));
440- else
441- auth_gid = cred_gid;
442+ return 0;
443+ }
444+ auth_gid = cred_gid;
445 }
446
447 #ifdef HAVE_SETGROUPS
448 /* Finally, set the supplementary group IDs if possible. */
449- if (cred_len < 0 || cred_len > NGRPS)
450+ if (cred_len < 0 || cred_len > NGRPS) {
451 Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
452- else if (cred_len != auth_gidlen
453- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
454- if (setgroups(cred_len, cred_gids) < 0)
455+ return 0;
456+ }
457+ if (cred_len != auth_gidlen
458+ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
459+ if (setgroups(cred_len, cred_gids) < 0) {
460 Dprintf(L_ERROR, "Unable to setgroups: %s\n",
461 strerror(errno));
462- else {
463- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
464- auth_gidlen = cred_len;
465+ return 0;
466 }
467+ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
468+ auth_gidlen = cred_len;
469 }
470 #endif /* HAVE_SETGROUPS */
471-
472+ return 1;
473 }
474 #endif
475
476 #if !defined(HAVE_SETFSUID)
477-static void
478+static int
479 seteids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
480 {
481 /* extension hooks: */
482@@ -286,52 +291,62 @@
483 /* First set the group ID. */
484 if (auth_gid != cred_gid) {
485 if (auth_uid != ROOT_UID) {
486- if (seteuid(ROOT_UID) < 0)
487+ if (seteuid(ROOT_UID) < 0) {
488 Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
489 ROOT_UID, strerror(errno));
490- else
491- auth_uid = ROOT_UID;
492+ return 0;
493+ }
494+ auth_uid = ROOT_UID;
495 }
496- if (setegid(cred_gid) < 0)
497+ if (setegid(cred_gid) < 0) {
498 Dprintf(L_ERROR, "Unable to setegid(%d): %s\n",
499 cred_gid, strerror(errno));
500- else
501- auth_gid = cred_gid;
502+ return 0;
503+ }
504+ auth_gid = cred_gid;
505 }
506
507 #ifdef HAVE_SETGROUPS
508 /* Next set the supplementary group IDs if possible. */
509- if (cred_len < 0 || cred_len > NGRPS)
510+ if (cred_len < 0 || cred_len > NGRPS) {
511 Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
512- else if (cred_len != auth_gidlen
513- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
514+ return 0;
515+ }
516+ if (cred_len != auth_gidlen
517+ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
518 if (auth_uid != ROOT_UID) {
519- if (seteuid(ROOT_UID) < 0)
520+ if (seteuid(ROOT_UID) < 0) {
521 Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
522 ROOT_UID, strerror(errno));
523- else
524- auth_uid = ROOT_UID;
525+ return 0;
526+ }
527+ auth_uid = ROOT_UID;
528 }
529- if (setgroups(cred_len, cred_gids) < 0)
530+ if (setgroups(cred_len, cred_gids) < 0) {
531 Dprintf(L_ERROR, "Unable to setgroups: %s\n",
532 strerror(errno));
533- else {
534- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
535- auth_gidlen = cred_len;
536+ return 0;
537 }
538+ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
539+ auth_gidlen = cred_len;
540 }
541 #endif /* HAVE_SETGROUPS */
542
543 /* Finally, set the user ID. */
544 if (auth_uid != cred_uid) {
545- if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0)
546+ if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0) {
547 Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
548 ROOT_UID, strerror(errno));
549- if (seteuid(cred_uid) < 0)
550+ return 0;
551+ }
552+ if (seteuid(cred_uid) < 0) {
553 Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
554 cred_uid, strerror(errno));
555- else
556- auth_uid = cred_uid;
557+ return 0;
558+ }
559+ auth_uid = cred_uid;
560 }
561+
562+ return 1;
563 }
564 #endif
565diff -urN nfs-server-2.2beta47/auth_init.c nfs-server-2.2beta51/auth_init.c
566--- nfs-server-2.2beta47/auth_init.c Mon Apr 19 14:01:21 1999
567+++ nfs-server-2.2beta51/auth_init.c Fri Nov 8 14:45:36 2002
568@@ -13,7 +13,6 @@
569 */
570
571 #include "nfsd.h"
572-#include "fakefsuid.h"
573 #include <pwd.h>
574
575 #define LINE_SIZE 1024
576@@ -263,55 +262,63 @@
577 cp++;
578 while (*cp != terminator) {
579 kwd = cp;
580- while (isalpha(*cp) || *cp == '_' || *cp == '=') {
581- /* break out of loop after = sign */
582- if (*cp++ == '=')
583- break;
584- }
585+ /* Gobble up keyword and "=" if there is one */
586+ while (isalpha(*cp) || *cp == '_')
587+ ++cp;
588+ if (*cp == '=')
589+ ++cp;
590+
591 klen = cp - kwd;
592
593 /* process keyword */
594- if (strncmp(kwd, "secure", 6) == 0)
595+#define ifkwd(n, string) \
596+ if (klen == (n) && !strncmp(kwd, string, (n)))
597+
598+ ifkwd(2, "ro")
599+ mp->o.read_only = 1;
600+ else ifkwd(2, "rw")
601+ mp->o.read_only = 0;
602+ else ifkwd(6, "secure")
603 mp->o.secure_port = 1;
604- else if (strncmp(kwd, "insecure", 8) == 0)
605+ else ifkwd(8, "insecure")
606 mp->o.secure_port = 0;
607- else if (strncmp(kwd, "root_squash", 11) == 0)
608+ else ifkwd(11, "root_squash")
609 mp->o.root_squash = 1;
610- else if (strncmp(kwd, "no_root_squash", 14) == 0)
611+ else ifkwd(14, "no_root_squash")
612 mp->o.root_squash = 0;
613- else if (strncmp(kwd, "ro", 2) == 0)
614- mp->o.read_only = 1;
615- else if (strncmp(kwd, "rw", 2) == 0)
616- mp->o.read_only = 0;
617- else if (strncmp(kwd, "link_relative", 13) == 0)
618+ else ifkwd(13, "link_relative")
619 mp->o.link_relative = 1;
620- else if (strncmp(kwd, "link_absolute", 13) == 0)
621+ else ifkwd(13, "link_absolute")
622 mp->o.link_relative = 0;
623- else if (strncmp(kwd, "map_daemon", 10) == 0)
624+ else ifkwd(10, "map_daemon")
625 mp->o.uidmap = map_daemon;
626- else if (strncmp(kwd, "map_nis=", 8) == 0)
627+ else ifkwd(8, "map_nis=")
628 parse_nis_uidmap(mp, &cp);
629- else if (strncmp(kwd, "map_static=", 11) == 0)
630+ else ifkwd(11, "map_static=")
631 parse_static_uidmap(mp, &cp);
632- else if (strncmp(kwd, "map_identity", 12) == 0)
633+ else ifkwd(12, "map_identity")
634 mp->o.uidmap = identity;
635- else if (strncmp(kwd, "all_squash", 10) == 0)
636+ else ifkwd(10, "all_squash")
637 mp->o.all_squash = 1;
638- else if (strncmp(kwd, "no_all_squash", 13) == 0)
639+ else ifkwd(13, "no_all_squash")
640 mp->o.all_squash = 0;
641- else if (strncmp(kwd, "noaccess", 8) == 0)
642+ else ifkwd(8, "noaccess")
643 mp->o.noaccess = 1;
644- else if (strncmp(kwd, "squash_uids=", 12) == 0)
645+ else ifkwd(12, "squash_uids=")
646 parse_squash(mp, 1, &cp);
647- else if (strncmp(kwd, "squash_gids=", 12) == 0)
648+ else ifkwd(12, "squash_gids=")
649 parse_squash(mp, 0, &cp);
650- else if (strncmp(kwd, "anonuid=", 8) == 0)
651+ else ifkwd(8, "anonuid=")
652 mp->o.nobody_uid = parse_num(&cp);
653- else if (strncmp(kwd, "anongid=", 8) == 0)
654+ else ifkwd(8, "anongid=")
655 mp->o.nobody_gid = parse_num(&cp);
656- else if (strncmp(kwd, "async", 5) == 0)
657+ else ifkwd(6, "setuid")
658+ mp->o.allow_setuid = 1;
659+ else ifkwd(8, "nosetuid")
660+ mp->o.allow_setuid = 0;
661+ else ifkwd(5, "async")
662 /* knfsd compatibility, ignore */;
663- else if (strncmp(kwd, "sync", 4) == 0)
664+ else ifkwd(4, "sync")
665 /* knfsd compatibility, ignore */;
666 else {
667 Dprintf(L_ERROR,
668@@ -566,11 +573,6 @@
669 auth_check_all_wildcards();
670 auth_sort_all_mountlists();
671 auth_log_all();
672-
673-#if defined(MAYBE_HAVE_SETFSUID) && !defined(HAVE_SETFSUID)
674- /* check if the a.out setfsuid syscall works on this machine */
675- have_setfsuid = (setfsuid(0) >= 0);
676-#endif
677
678 auth_initialized = 1;
679 }
680diff -urN nfs-server-2.2beta47/config.h.in nfs-server-2.2beta51/config.h.in
681--- nfs-server-2.2beta47/config.h.in Fri Jun 11 12:01:22 1999
682+++ nfs-server-2.2beta51/config.h.in Fri Nov 8 14:45:36 2002
683@@ -3,7 +3,7 @@
684 /* Define if on AIX 3.
685 System headers sometimes define this.
686 We just want to avoid a redefinition error message. */
687-#ifndef _ALL_SOURCE
688+#ifdef _ALL_SOURCE
689 #undef _ALL_SOURCE
690 #endif
691
692diff -urN nfs-server-2.2beta47/configure.in nfs-server-2.2beta51/configure.in
693--- nfs-server-2.2beta47/configure.in Fri Jun 11 11:58:10 1999
694+++ nfs-server-2.2beta51/configure.in Fri Nov 8 14:45:36 2002
695@@ -2,7 +2,36 @@
696 dnl Updated for autoconf 2.
697 dnl
698 AC_INIT(nfsd.c)
699-AC_CONFIG_HEADER(config.h)
700+AC_CONFIG_HEADER(config.h site.h)
701+
702+dnl **************************************************************
703+dnl * handle --enable options
704+dnl **************************************************************
705+AC_ARG_ENABLE(new-inodes,
706+ [ --enable-new-inodes Enable new-style inode inodes])
707+AC_ARG_WITH(devtab,
708+ [ --with-devtab=file Specify location for devtab [/var/lib/nfs/devtab]],
709+ PATH_DEVTAB=$withval,
710+ PATH_DEVTAB=/var/lib/nfs/devtab)
711+AC_ARG_ENABLE(ugid-dynamic,
712+ [ --enable-ugid-dynamic Enable uid mapping using rpc.ugidd (not recommended)])
713+AC_ARG_ENABLE(ugid-nis,
714+ [ --enable-ugid-nis Enable NIS-based uid mapping])
715+AC_ARG_ENABLE(host-access,
716+ [ --enable-host-access Enable host access checking])
717+AC_ARG_ENABLE(mount-logging,
718+ [ --disable-mount-logging Do not log mount operations to syslog],,
719+ enable_mount_logging=yes)
720+AC_ARG_WITH(exports-uid,
721+ [ --with-exports-uid=N Make sure that /etc/exports is owned by uid N],,
722+ with_exports_uid=0)
723+AC_ARG_WITH(exports-gid,
724+ [ --with-exports-gid=N Make sure that /etc/exports is owned by gid N],,
725+ with_exports_gid=0)
726+
727+dnl **************************************************************
728+dnl * Check for all kinds of stuff
729+dnl **************************************************************
730 AC_PROG_CC
731 # If we're using gcc, we want warning flags
732 test -n "$GCC" &&
733@@ -19,7 +48,7 @@
734 AC_MINIX
735 AC_ISC_POSIX
736 AC_PROG_INSTALL
737-AC_CROSS_CHECK
738+dnl AC_CROSS_CHECK
739 AC_STDC_HEADERS
740 AC_GNULIBC
741 AC_CONST
742@@ -52,14 +81,45 @@
743 AC_CHECK_LIB(rpc, main)
744 AC_CHECK_LIB(crypt, main)
745 AC_CHECK_LIB(nys, main)
746-AC_REPLACE_FUNCS(strerror realpath mkdir rename utimes strdup strstr getopt getopt_long)
747 AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred)
748 AC_AUTHDES_GETUCRED
749 AC_BROKEN_SETFSUID
750 AC_MOUNTLIST
751 AC_FSUSAGE
752+AC_CHECK_LIB(wrap, main)
753 AC_LIBWRAP_BUG
754 AC_BSD_SIGNALS
755+
756+dnl **************************************************************
757+dnl * Munge user specified options
758+dnl **************************************************************
759+if test "$enable_new_inodes" = yes; then
760+ AC_DEFINE(ENABLE_DEVTAB)
761+fi
762+if test "$enable_ugid_dynamic" = yes; then
763+ AC_DEFINE(ENABLE_UGID_DAEMON)
764+ UGIDD_PROG=\${rpcprefix}.ugidd
765+ UGIDD_MAN=ugidd
766+fi
767+if test "$enable_ugid_nis" = yes; then
768+ AC_DEFINE(ENABLE_UGID_NIS)
769+fi
770+if test "$enable_host_access" = yes; then
771+ AC_DEFINE(HOSTS_ACCESS)
772+fi
773+if test "$enable_mount_logging" = yes; then
774+ AC_DEFINE(WANT_LOG_MOUNTS)
775+fi
776+AC_DEFINE_UNQUOTED(EXPORTSOWNERUID, $with_exports_uid)
777+AC_DEFINE_UNQUOTED(EXPORTSOWNERGID, $with_exports_gid)
778+AC_SUBST(PATH_DEVTAB)
779+AC_SUBST(UGIDD_PROG)
780+AC_SUBST(UGIDD_MAN)
781+
782+dnl **************************************************************
783+dnl * Output CFLAGS and LDFLAGS
784+dnl **************************************************************
785 AC_SUBST(LDFLAGS)
786 AC_SUBST(CFLAGS)
787+
788 AC_OUTPUT(Makefile)
789diff -urN nfs-server-2.2beta47/daemon.c nfs-server-2.2beta51/daemon.c
790--- nfs-server-2.2beta47/daemon.c Thu Jan 1 01:00:00 1970
791+++ nfs-server-2.2beta51/daemon.c Fri Nov 8 14:45:52 2002
792@@ -0,0 +1,270 @@
793+/*
794+ * daemon.c
795+ *
796+ * Copyright (C) 1998, <okir@monad.swb.de>
797+ *
798+ * Implements common daemon stuff and
799+ * fail-safe mode for nfsd/mountd.
800+ */
801+
802+#include "system.h"
803+#include "logging.h"
804+#include "signals.h"
805+#include <sys/wait.h>
806+
807+static const char * pidfilename = 0;
808+static const char * get_signame(int signo);
809+
810+/*
811+ * Do the Crawley Thing
812+ */
813+void
814+daemonize(void)
815+{
816+ int c;
817+
818+ /* Ignore SIGHUP so the parent can exit while we're still
819+ * in limbo */
820+ ignore_signal(SIGHUP);
821+
822+ /* Now fork */
823+ c = fork();
824+ if (c < 0)
825+ Dprintf(L_FATAL, "unable to fork: %s", strerror(errno));
826+
827+ /* Parent process: exit */
828+ if (c > 0)
829+ exit(0);
830+
831+ /* Do the session stuff */
832+ close(0);
833+ close(1);
834+ close(2);
835+#ifdef HAVE_SETSID
836+ setsid();
837+#else
838+ if ((c = open("/dev/tty", O_RDWR)) >= 0) {
839+ ioctl(c, TIOCNOTTY, (char *) NULL);
840+ close(c);
841+ }
842+#endif
843+
844+ /* Stop stderr logging */
845+ background_logging();
846+}
847+
848+void
849+setpidpath(const char *filename)
850+{
851+ pidfilename = filename;
852+}
853+
854+void
855+writepid(pid_t pid, int clear)
856+{
857+ FILE *fp;
858+
859+ fp = fopen(pidfilename, clear? "w" : "a");
860+ if (fp == NULL)
861+ Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
862+ fprintf(fp, "%d\n", pid);
863+ fclose(fp);
864+ return;
865+}
866+
867+void
868+failsafe(int level, int ncopies)
869+{
870+ int *servers, running, child, i;
871+ int pid, signo, status;
872+ time_t last_restart = 0, now;
873+ int restarts = 0, backoff = 60;
874+
875+ servers = (int *) xmalloc(ncopies * sizeof(int));
876+ memset(servers, 0, ncopies * sizeof(int));
877+
878+ /* Loop forever, until we get SIGTERM */
879+ running = 0;
880+ while (1) {
881+ /* Rewrite the pidfile */
882+ writepid(getpid(), 1);
883+ for (i = 0; i < ncopies; i++) {
884+ if (servers[i] != 0)
885+ writepid(servers[i], 0);
886+ }
887+
888+ while (running < ncopies) {
889+ if ((now = time(NULL)) == last_restart) {
890+ if (++restarts > 2 * ncopies) {
891+ Dprintf(L_ERROR,
892+ "Servers restarting too "
893+ "quickly, backing off.");
894+ if (backoff < 60 * 60)
895+ backoff <<= 1;
896+ sleep(backoff);
897+ }
898+ } else {
899+ last_restart = now;
900+ restarts = 0;
901+ backoff = 60;
902+ }
903+
904+ /* Locate a free pid slot */
905+ for (i = 0, child = -1; i < ncopies; i++) {
906+ if (servers[i] == 0) {
907+ child = i;
908+ break;
909+ }
910+ }
911+
912+ if (child < 0)
913+ Dprintf(L_FATAL, "failsafe: no pid slot?!");
914+
915+ Dprintf(D_GENERAL,
916+ "starting server thread %d...\n", child + 1);
917+
918+ pid = fork();
919+ if (pid < 0)
920+ Dprintf(L_FATAL,
921+ "Unable to fork for failsafe: %s",
922+ strerror(errno));
923+
924+ if (pid == 0) {
925+ /* Child process: continue with execution. */
926+ return;
927+ }
928+
929+ writepid(pid, 0);
930+ servers[child] = pid;
931+ running++;
932+ }
933+
934+ /* Ignore some signals */
935+ ignore_signal(SIGTERM);
936+ ignore_signal(SIGHUP);
937+ ignore_signal(SIGINT);
938+ ignore_signal(SIGCHLD);
939+
940+ if ((pid = wait(&status)) < 0) {
941+ Dprintf((errno == ECHILD)? L_FATAL : L_WARNING,
942+ "failsafe: wait(): %s", strerror(errno));
943+ continue;
944+ }
945+
946+ /* Locate the child */
947+ for (i = 0, child = -1; i < ncopies; i++) {
948+ if (servers[i] == pid) {
949+ child = i;
950+ break;
951+ }
952+ }
953+
954+ if (child < 0) {
955+ Dprintf(L_WARNING,
956+ "failsafe: unknown child (pid %d) terminated",
957+ pid);
958+ continue;
959+ }
960+
961+ /* Book-keeping */
962+ servers[child] = 0;
963+ running--;
964+
965+ if (WIFSIGNALED(status)) {
966+ signo = WTERMSIG(status);
967+ if (signo == SIGTERM) {
968+ Dprintf(L_NOTICE, "failsafe: "
969+ "child %d terminated by SIGTERM. %s.",
970+ pid, running? "Continue" : "Exit");
971+ } else {
972+ Dprintf(L_WARNING, "failsafe: "
973+ "child %d terminated by %s. "
974+ "Restarting.",
975+ pid, get_signame(signo));
976+ child = -1; /* Restart */
977+ }
978+ } else if (WIFEXITED(status)) {
979+ Dprintf(L_NOTICE, "failsafe: "
980+ "child %d exited, status %d.",
981+ pid, WEXITSTATUS(status));
982+ } else {
983+ Dprintf(L_ERROR, "failsafe: "
984+ "abnormal child termination, "
985+ "pid=%d status=%d. Restarting.",
986+ pid, status);
987+ child = -1; /* Restart */
988+ }
989+
990+ /* If child >= 0, we should not restart */
991+ if (child >= 0) {
992+ if (!running) {
993+ Dprintf(D_GENERAL,
994+ "No more children, exiting.");
995+ exit(0);
996+ }
997+ for (i = child; i < ncopies-1; i++)
998+ servers[i] = servers[i+1];
999+ ncopies--; /* Make sure we start no new servers */
1000+ }
1001+ }
1002+}
1003+
1004+/*
1005+ * Failsafe session, catch core file.
1006+ *
1007+ * Not yet implemented.
1008+ * General outline: we need to fork first, because nfsd changes
1009+ * uids frequently, and the kernel won't write out a core file after
1010+ * that. The forked proc starts out with a clean dumpable flag though.
1011+ *
1012+ * After the fork, we might want to make sure we end up in some common
1013+ * directory that the failsafe loop knows about.
1014+ */
1015+void
1016+failsafe_loop(int level, void (*function)(void))
1017+{
1018+ /* NOP */
1019+}
1020+
1021+static const char *
1022+get_signame(int signo)
1023+{
1024+ static char namebuf[30];
1025+
1026+ switch (signo) {
1027+ case SIGHUP: return "SIGHUP";
1028+ case SIGINT: return "SIGINT";
1029+ case SIGQUIT: return "SIGQUIT";
1030+ case SIGILL: return "SIGILL";
1031+ case SIGTRAP: return "SIGTRAP";
1032+ case SIGIOT: return "SIGIOT";
1033+ case SIGBUS: return "SIGBUS";
1034+ case SIGFPE: return "SIGFPE";
1035+ case SIGKILL: return "SIGKILL";
1036+ case SIGUSR1: return "SIGUSR1";
1037+ case SIGSEGV: return "SIGSEGV";
1038+ case SIGUSR2: return "SIGUSR2";
1039+ case SIGPIPE: return "SIGPIPE";
1040+ case SIGALRM: return "SIGALRM";
1041+ case SIGTERM: return "SIGTERM";
1042+ case SIGCHLD: return "SIGCHLD";
1043+ case SIGCONT: return "SIGCONT";
1044+ case SIGSTOP: return "SIGSTOP";
1045+ case SIGTSTP: return "SIGTSTP";
1046+ case SIGTTIN: return "SIGTTIN";
1047+ case SIGTTOU: return "SIGTTOU";
1048+ case SIGURG: return "SIGURG";
1049+ case SIGXCPU: return "SIGXCPU";
1050+ case SIGXFSZ: return "SIGXFSZ";
1051+ case SIGVTALRM: return "SIGVTALRM";
1052+ case SIGPROF: return "SIGPROF";
1053+ case SIGWINCH: return "SIGWINCH";
1054+ case SIGIO: return "SIGIO";
1055+#ifdef SIGPWR
1056+ case SIGPWR: return "SIGPWR";
1057+#endif
1058+ }
1059+
1060+ sprintf(namebuf, "signal #%d", signo);
1061+ return namebuf;
1062+}
1063diff -urN nfs-server-2.2beta47/daemon.h nfs-server-2.2beta51/daemon.h
1064--- nfs-server-2.2beta47/daemon.h Thu Jan 1 01:00:00 1970
1065+++ nfs-server-2.2beta51/daemon.h Fri Nov 8 14:45:52 2002
1066@@ -0,0 +1,18 @@
1067+/*
1068+ * daemon.h
1069+ *
1070+ * Daemon support
1071+ */
1072+
1073+#ifndef CRAWLEY_H
1074+#define CRAWLEY_H
1075+
1076+#define _PATH_NFSD_PIDFILE "/var/run/nfsd.pid"
1077+#define _PATH_MOUNTD_PIDFILE "/var/run/mountd.pid"
1078+
1079+extern void daemonize(void);
1080+extern void setpidpath(const char *);
1081+extern void writepid(pid_t, int);
1082+extern void failsafe(int level, int ncopies);
1083+
1084+#endif /* CRAWLEY_H */
1085diff -urN nfs-server-2.2beta47/exports.man nfs-server-2.2beta51/exports.man
1086--- nfs-server-2.2beta47/exports.man Wed Nov 10 10:18:49 1999
1087+++ nfs-server-2.2beta51/exports.man Fri Nov 8 14:45:36 2002
1088@@ -45,6 +45,12 @@
1089 simultaneously. This is done by specifying an IP address and netmask pair
1090 as
1091 .IR address/netmask .
1092+.IP "world
1093+You can export a directory to the world (i.e. to all computers that
1094+are able to reach your NFS server network-wise) by using the empty
1095+hostname. When exporting to the world, the
1096+.BR root_squash ", " all_squash ", " ro " and " nosetuid
1097+options are turned on by default.
1098 .TP
1099 .B =public
1100 This is a special ``hostname'' that identifies the given directory name
1101@@ -81,6 +87,12 @@
1102 by using the
1103 .IR ro " option.
1104 .TP
1105+.I setuid
1106+This allows clients to assert the setuid and setgid bits on regular
1107+files. For non-anonymous exports, this option is on by default.
1108+For anonymous exports, the default is
1109+.IR nosetuid .
1110+.TP
1111 .I noaccess
1112 This makes everything below the directory inaccessible for the named
1113 client. This is useful when you want to export a directory hierarchy to
1114@@ -296,6 +308,22 @@
1115 .I /usr/X11R6
1116 entry apply. This is also true when the latter is a wildcard or netgroup
1117 entry.
1118+.PP
1119+You should also be careful about where you place spaces in the
1120+exports file. For instance, the following may appear as if you've
1121+exported
1122+.BR /pub " readonly to host " foozle ,
1123+but what this does in fact is export the directory to
1124+.B foozle
1125+with the default options,
1126+.I and
1127+export it to the world with the readonly option:
1128+.PP
1129+.nf
1130+.ta +3i
1131+# bad: export to the world
1132+/pub foozle (ro)
1133+.fi
1134 .SH FILES
1135 /etc/exports
1136 .SH DIAGNOSTICS
1137diff -urN nfs-server-2.2beta47/fh.c nfs-server-2.2beta51/fh.c
1138--- nfs-server-2.2beta47/fh.c Wed Nov 10 10:41:14 1999
1139+++ nfs-server-2.2beta51/fh.c Fri Nov 8 14:45:36 2002
1140@@ -95,17 +95,14 @@
1141 static int fh_list_size;
1142 static time_t curtime;
1143
1144-#ifndef FOPEN_MAX
1145-#define FOPEN_MAX 256
1146-#endif
1147-
1148 #ifndef FHTRACE
1149 #undef D_FHTRACE
1150 #define D_FHTRACE D_FHCACHE
1151 #endif
1152
1153-static fhcache * fd_cache[FOPEN_MAX] = { NULL };
1154+static fhcache ** fd_cache = NULL;
1155 static int fd_cache_size = 0;
1156+static int fd_cache_max = 0;
1157
1158 #ifndef NFSERR_INVAL /* that Sun forgot */
1159 #define NFSERR_INVAL 22
1160@@ -141,10 +138,13 @@
1161
1162 /* Forward declared local functions */
1163 static psi_t path_psi(char *, nfsstat *, struct stat *, int);
1164+static psi_t path_psi_m(char *, nfsstat *, struct stat *,
1165+ struct stat *, int);
1166 static int fh_flush_fds(void);
1167 static char * fh_dump(svc_fh *);
1168 static void fh_insert_fdcache(fhcache *fhc);
1169 static void fh_unlink_fdcache(fhcache *fhc);
1170+static void fh_complain(const char *msg, fhcache *fhc);
1171
1172 static void
1173 fh_move_to_front(fhcache *fhc)
1174@@ -192,6 +192,13 @@
1175 static void
1176 fh_insert_fdcache(fhcache *fhc)
1177 {
1178+#ifdef FHTRACE
1179+ Dprintf(D_FHTRACE, "insert fh %x into fdcache @%d\n", fhc->h.psi, fhc->fd);
1180+ if (fhc->fd < 0) {
1181+ fh_complain("fd cache bug: bad fd", fhc);
1182+ return;
1183+ }
1184+#endif
1185 if (fhc == fd_lru_head)
1186 return;
1187 if (fhc->fd_next || fhc->fd_prev)
1188@@ -203,9 +210,20 @@
1189 fhc->fd_next = fd_lru_head;
1190 fd_lru_head = fhc;
1191
1192+ if (fhc->fd >= fd_cache_max) {
1193+ int oldmax = fd_cache_max, newmax;
1194+
1195+ newmax = (fhc->fd + 8) & ~7;
1196+ fd_cache = (fhcache **) xrealloc(fd_cache, newmax * sizeof(fhcache *));
1197+ memset(fd_cache + oldmax, 0, (newmax - oldmax) * sizeof(fhcache *));
1198+ fd_cache_max = newmax;
1199+ }
1200+
1201 #ifdef FHTRACE
1202 if (fd_cache[fhc->fd] != NULL) {
1203- Dprintf(L_ERROR, "fd cache inconsistency!\n");
1204+ Dprintf(L_ERROR, "fd cache inconsistency (two fh's for same fd)");
1205+ fh_complain("new fh", fhc);
1206+ fh_complain("old fh", fd_cache[fhc->fd]);
1207 return;
1208 }
1209 #endif
1210@@ -225,7 +243,7 @@
1211 } else if (fd_lru_tail == fhc) {
1212 fd_lru_tail = prev;
1213 } else {
1214- Dprintf(L_ERROR, "fd cache inconsistency\n");
1215+ fh_complain("fd cache inconsistency (no next and not at tail)", fhc);
1216 return;
1217 }
1218 if (prev) {
1219@@ -233,13 +251,13 @@
1220 } else if (fd_lru_head == fhc) {
1221 fd_lru_head = next;
1222 } else {
1223- Dprintf(L_ERROR, "fd cache inconsistency\n");
1224+ fh_complain("fd cache inconsistency (no prev and not at head)", fhc);
1225 return;
1226 }
1227
1228 #ifdef FHTRACE
1229 if (fd_cache[fhc->fd] != fhc) {
1230- Dprintf(L_ERROR, "fd cache inconsistency!\n");
1231+ fh_complain("fd cache inconsistency (fd cache ptr mismatch)", fhc);
1232 return;
1233 }
1234 #endif
1235@@ -285,7 +303,7 @@
1236 hash_slot = &((*hash_slot)->hash_next);
1237 if (*hash_slot == NULL)
1238 Dprintf(L_ERROR,
1239- "internal inconsistency -- fhc(%x) not in hash table\n",
1240+ "internal inconsistency -- fhc(%x) not in hash table!\n",
1241 fhc);
1242 else
1243 *hash_slot = fhc->hash_next;
1244@@ -572,7 +590,7 @@
1245 efs_seekdir(dir, cookie_stack[i]);
1246 while ((dp = efs_readdir(dir))) {
1247 char *name = dp->d_name;
1248- int n = strlen(name);
1249+ int n = strlen(name); /* or: dp->d_reclen */
1250
1251 if (pathlen + n + 1 >= NFS_MAXPATHLEN
1252 || (name[0] == '.'
1253@@ -738,7 +756,16 @@
1254 static psi_t
1255 path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid)
1256 {
1257- struct stat sbuf;
1258+ struct stat smounted;
1259+
1260+ return path_psi_m(path, status, sbp, &smounted, svalid);
1261+}
1262+
1263+static psi_t
1264+path_psi_m(char *path, nfsstat *status,
1265+ struct stat *sbp, struct stat *mbp, int svalid)
1266+{
1267+ struct stat sbuf, ddbuf;
1268
1269 if (sbp == NULL)
1270 sbp = &sbuf;
1271@@ -746,10 +773,10 @@
1272 *status = nfs_errno();
1273 return (0);
1274 }
1275+ *mbp = *sbp;
1276 if (S_ISDIR(sbp->st_mode) && strcmp(path, "/") != 0) {
1277 /* Special case for directories--test for mount point. */
1278- struct stat ddbuf;
1279- char *fname;
1280+ char *fname;
1281
1282 /* Find start of last component of path. */
1283 #if 1
1284@@ -819,6 +846,19 @@
1285 return (pseudo_inode(sbp->st_ino, sbp->st_dev));
1286 }
1287
1288+/*
1289+ * Match attributes to make sure we're still referring to the original file
1290+ */
1291+static inline int
1292+fh_attrmatch(struct fhcache *fhc, struct stat *attr)
1293+{
1294+ if (fhc->dev == attr->st_dev
1295+ && fhc->ino == attr->st_ino
1296+ && fhc->type == (attr->st_mode & S_IFMT))
1297+ return 1;
1298+ return 0;
1299+}
1300+
1301 fhcache *
1302 fh_find(svc_fh *h, int mode)
1303 {
1304@@ -838,6 +878,9 @@
1305 ex_state = active;
1306 time(&curtime);
1307 while ((fhc = fh_lookup(h->psi)) != NULL) {
1308+ struct stat sbuf, *s = NULL;
1309+ nfsstat dummy;
1310+
1311 Dprintf(D_FHCACHE, "fh_find: psi=%lx... found '%s', fd=%d\n",
1312 (unsigned long) h->psi,
1313 fhc->path ? fhc->path : "<unnamed>",
1314@@ -857,33 +900,27 @@
1315 * If it doesn't try to rebuild the path.
1316 */
1317 if (check) {
1318- struct stat *s = &fhc->attrs;
1319- psi_t psi;
1320- nfsstat dummy;
1321-
1322+ s = &sbuf;
1323 if (efs_lstat(fhc->path, s) < 0) {
1324 Dprintf(D_FHTRACE,
1325 "fh_find: stale fh: lstat: %m\n");
1326 } else {
1327- fhc->flags |= FHC_ATTRVALID;
1328- /* If pseudo-inos don't match, we fhc->path
1329- * may be a mount point (hence lstat() returns
1330+ /* If device/ino don't match, fhc->path may
1331+ * be a mount point (hence lstat() returns
1332 * a different inode number than the readdir()
1333 * stuff used in path_psi)
1334 */
1335- psi = pseudo_inode(s->st_ino, s->st_dev);
1336- if (h->psi == psi)
1337+ if (fh_attrmatch(fhc, s))
1338 goto fh_return;
1339
1340- /* Try again by computing the path psi */
1341- psi = path_psi(fhc->path, &dummy, s, 1);
1342- if (h->psi == psi)
1343+ /* Get the dev/ino of the underlying
1344+ * mount point. */
1345+ path_psi(fhc->path, &dummy, s, 1);
1346+ if (fh_attrmatch(fhc, s))
1347 goto fh_return;
1348
1349- Dprintf(D_FHTRACE, "fh_find: stale fh: "
1350- "dev/ino %x/%lx psi %lx",
1351- s->st_dev, s->st_ino,
1352- (unsigned long) psi);
1353+ Dprintf(D_FHTRACE, "fh_find: stale fh: %lx",
1354+ (unsigned long) h->psi);
1355 }
1356
1357 fh_discard:
1358@@ -896,6 +933,12 @@
1359 }
1360
1361 fh_return:
1362+ /* Valid attributes; cache them */
1363+ if (s != NULL) {
1364+ memcpy(&fhc->attrs, s, sizeof(*s));
1365+ fhc->flags |= FHC_ATTRVALID;
1366+ }
1367+
1368 /* The cached fh seems valid */
1369 if (fhc != fh_head.next)
1370 fh_move_to_front(fhc);
1371@@ -905,7 +948,8 @@
1372 }
1373
1374 Dprintf(D_FHCACHE, "fh_find: psi=%lx... not found\n",
1375- (unsigned long) h->psi);
1376+ (unsigned long) h->psi);
1377+
1378 if (mode == FHFIND_FCACHED) {
1379 ex_state = inactive;
1380 return NULL;
1381@@ -918,6 +962,7 @@
1382 fhc = flush->prev;
1383 fh_delete(flush);
1384 }
1385+
1386 fhc = (fhcache *) xmalloc(sizeof *fhc);
1387 if (mode == FHFIND_FCREATE) {
1388 /* File will be created */
1389@@ -937,11 +982,31 @@
1390 }
1391 fhc->path = path;
1392 }
1393+
1394 fhc->flags = 0;
1395 if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
1396- if (re_export && nfsmounted(fhc->path, &fhc->attrs))
1397+ if (nfsmounted(fhc->path, &fhc->attrs)) {
1398 fhc->flags |= FHC_NFSMOUNTED;
1399+#if 0
1400+ /* We must allow the client to send us the
1401+ * file handle for the NFS mount point itself,
1402+ * but not for entries within an NFS mount.
1403+ * XXX: needs fixing.
1404+ */
1405+ if (!re_export) {
1406+ Dprintf(D_FHTRACE,
1407+ "Attempt to use %s (non-exportable)\n",
1408+ fhc->path);
1409+ free(fhc);
1410+ ex_state = inactive;
1411+ return NULL;
1412+ }
1413+#endif
1414+ }
1415 fhc->flags |= FHC_ATTRVALID;
1416+ fhc->dev = fhc->attrs.st_dev;
1417+ fhc->ino = fhc->attrs.st_ino;
1418+ fhc->type = fhc->attrs.st_mode & S_IFMT;
1419 }
1420 fhc->fd = -1;
1421 fhc->last_used = curtime;
1422@@ -993,6 +1058,14 @@
1423 return buf;
1424 }
1425
1426+static void
1427+fh_complain(const char *msg, fhcache *fhc)
1428+{
1429+ Dprintf(L_ERROR, "%s: ptr=%p fd=%d path=%s\n", msg,
1430+ fhc, fhc->fd,
1431+ fhc->path? fhc->path : "<unnamed>");
1432+}
1433+
1434 /*
1435 * This routine is only used by the mount daemon.
1436 * It creates the initial file handle.
1437@@ -1000,23 +1073,25 @@
1438 int
1439 fh_create(nfs_fh *fh, char *path)
1440 {
1441- svc_fh key;
1442- fhcache *h;
1443- psi_t psi;
1444- nfsstat status;
1445- char *s;
1446+ struct stat stb;
1447+ svc_fh key;
1448+ fhcache *h;
1449+ psi_t psi;
1450+ nfsstat status;
1451+ char *s;
1452
1453 memset(&key, 0, sizeof(key));
1454 status = NFS_OK;
1455- if ((psi = path_psi("/", &status, NULL, 0)) == 0)
1456+ if ((psi = path_psi("/", &status, &stb, 0)) == 0)
1457 return ((int) status);
1458+
1459 s = path;
1460 while ((s = strchr(s + 1, '/')) != NULL) {
1461 if (++(key.hash_path[0]) >= HP_LEN)
1462 return ((int) NFSERR_NAMETOOLONG);
1463 key.hash_path[key.hash_path[0]] = hash_psi(psi);
1464 *s = '\0';
1465- if ((psi = path_psi(path, &status, NULL, 0)) == 0)
1466+ if ((psi = path_psi(path, &status, &stb, 0)) == 0)
1467 return ((int) status);
1468 *s = '/';
1469 }
1470@@ -1024,7 +1099,7 @@
1471 if (++(key.hash_path[0]) >= HP_LEN)
1472 return ((int) NFSERR_NAMETOOLONG);
1473 key.hash_path[key.hash_path[0]] = hash_psi(psi);
1474- if ((psi = path_psi(path, &status, NULL, 0)) == 0)
1475+ if ((psi = path_psi(path, &status, &stb, 0)) == 0)
1476 return ((int) status);
1477 }
1478 key.psi = psi;
1479@@ -1037,9 +1112,12 @@
1480
1481 /* assert(h != NULL); */
1482 if (h->path == NULL) {
1483- h->fd = -1;
1484- h->path = xstrdup(path);
1485+ h->fd = -1;
1486+ h->path = xstrdup(path);
1487 h->flags = 0;
1488+ h->dev = stb.st_dev;
1489+ h->ino = stb.st_ino;
1490+ h->type = stb.st_mode & S_IFMT;
1491 }
1492 memcpy(fh, &key, sizeof(key));
1493 return ((int) status);
1494@@ -1064,6 +1142,44 @@
1495 return ((nfs_fh*)&(h->h));
1496 }
1497
1498+
1499+static inline int
1500+access_override(int omode, int perm, struct stat *buf)
1501+{
1502+ /* Be suspicous of flags, particularly O_CREAT/O_TRUNC. A previous
1503+ * comment said:
1504+ *
1505+ * "[Not checking this] would truncate read-only files on creat()
1506+ * calls. Of course, ftruncate(fd, 0) should still be legal for
1507+ * the user when the file was chmoded *after* opening it, but we
1508+ * have no way to tell, and a semi-succeding `cp foo readonly-file'
1509+ * is much more unintuitive and destructive than a failing
1510+ * ftruncate()."
1511+ */
1512+ if (omode & ~O_ACCMODE)
1513+ return 0;
1514+
1515+ /* Users can do anything to their own files. Harmless (since they
1516+ * could chown anyway), and helps to mask NFSes statelessness.
1517+ *
1518+ * (in passing, this also handles mode 0100 execution)
1519+ */
1520+ if (buf->st_uid == auth_uid)
1521+ return 1;
1522+
1523+ /* Henceforth, we are considering granting read access to facilitate
1524+ * exec access. This is read only */
1525+ if (omode != O_RDONLY)
1526+ return 0;
1527+
1528+ /* Mode 0110 execution */
1529+ if (buf->st_gid == auth_gid)
1530+ return (buf->st_mode & S_IXGRP) != 0;
1531+
1532+ /* Mode 0111 execution */
1533+ return (buf->st_mode & S_IXOTH) != 0;
1534+}
1535+
1536 int
1537 path_open(char *path, int omode, int perm)
1538 {
1539@@ -1113,30 +1229,15 @@
1540 * lishes two things: first, it gives the file owner r/w access to
1541 * the file whatever the permissions are, so that files are still
1542 * accessible after an fchown(fd, 0). The second part of the
1543- * condition allows read access to mode 0111 executables.
1544- *
1545- * The old conditon read like this:
1546- * if (fd < 0 && oerrno == EACCES) {
1547- * if (oerrno == EACCES && (buf.st_uid == auth_uid
1548- * || (omode == O_RDONLY && (buf.st_mode & S_IXOTH)))) {
1549- * override uid; etc...
1550- * }
1551- * }
1552- * This would truncate read-only files on creat() calls. Now
1553- * ftruncate(fd, 0) should still be legal for the user when the
1554- * file was chmoded *after* opening it, but we have no way to tell,
1555- * and a semi-succeding `cp foo readonly-file' is much more
1556- * unintuitive and destructive than a failing ftruncate().
1557+ * condition allows read access to `execute-only' files.
1558 */
1559- if (fd < 0 && oerrno == EACCES && !(omode & (O_CREAT|O_TRUNC))) {
1560- if ((buf.st_uid == auth_uid && (omode & O_ACCMODE) == omode)
1561- || ((buf.st_mode & S_IXOTH) && omode == O_RDONLY)) {
1562- auth_override_uid(ROOT_UID);
1563- fd = efs_open(path, omode, perm);
1564- oerrno = errno;
1565- auth_override_uid(auth_uid);
1566- }
1567+ if (fd < 0 && oerrno == EACCES && access_override(omode, perm, &buf)) {
1568+ auth_override_uid(ROOT_UID);
1569+ fd = efs_open(path, omode, perm);
1570+ oerrno = errno;
1571+ auth_override_uid(auth_uid);
1572 }
1573+
1574
1575 if (fd < 0) {
1576 Dprintf(D_FHCACHE,
1577@@ -1241,7 +1342,7 @@
1578 char *sindx;
1579 int is_dd;
1580 nfsstat ret;
1581- struct stat sbuf;
1582+ struct stat sbuf, smount;
1583 char pathbuf[PATH_MAX + NAME_MAX + 1], *fname;
1584
1585 /* should not happen */
1586@@ -1318,7 +1419,7 @@
1587
1588 *new_fh = dopa->dir;
1589 key = (svc_fh *) new_fh;
1590- if ((key->psi = path_psi(pathbuf, &ret, sbp, 0)) == 0)
1591+ if ((key->psi = path_psi_m(pathbuf, &ret, sbp, &smount, 0)) == 0)
1592 return (ret);
1593
1594 if (is_dd) {
1595@@ -1344,6 +1445,10 @@
1596 h->h.hash_path[0]);
1597 return NFSERR_STALE;
1598 }
1599+ if (sbp->st_dev != smount.st_dev) {
1600+ Dprintf(D_FHTRACE, "fh_compose: %s hit%s mount point\n",
1601+ pathbuf, nfsmounted(pathbuf, &smount)? " NFS" : "");
1602+ }
1603 #endif
1604
1605 /* New code added by Don Becker */
1606@@ -1356,7 +1461,8 @@
1607 if (!h) return NFSERR_STALE;
1608 #endif
1609 if (h->path)
1610- Dprintf(L_ERROR, "Internal inconsistency: double entry (path '%s', now '%s').\n",
1611+ Dprintf(L_ERROR,
1612+ "internal inconsistency: double entry (path '%s', now '%s').\n",
1613 h->path, pathbuf);
1614 }
1615 Dprintf(D_FHCACHE, "fh_compose: using handle %x ('%s', fd=%d)\n",
1616@@ -1365,9 +1471,18 @@
1617
1618 /* assert(h != NULL); */
1619 if (h->path == 0) {
1620- h->path = xstrdup(pathbuf);
1621+ h->path = xstrdup(pathbuf);
1622 h->flags = 0;
1623- if (!re_export && nfsmounted(pathbuf, sbp))
1624+ h->dev = sbp->st_dev;
1625+ h->ino = sbp->st_ino;
1626+ h->type = sbp->st_mode & S_IFMT;
1627+
1628+ /* Note: in the case of a mount point,
1629+ * sbp contains the stats of the mount point, while
1630+ * ddbuf has the dev/ino of the underlying directory
1631+ */
1632+ if (sbp->st_dev != smount.st_dev
1633+ && nfsmounted(pathbuf, &smount))
1634 h->flags |= FHC_NFSMOUNTED;
1635 #ifdef FHTRACE
1636 Dprintf(D_FHTRACE, "fh_compose: created handle %s\n", h->path);
1637diff -urN nfs-server-2.2beta47/fh.h nfs-server-2.2beta51/fh.h
1638--- nfs-server-2.2beta47/fh.h Mon Nov 23 12:15:43 1998
1639+++ nfs-server-2.2beta51/fh.h Fri Nov 8 14:45:36 2002
1640@@ -97,7 +97,13 @@
1641 struct fhcache * hash_next;
1642 struct fhcache * fd_next;
1643 struct fhcache * fd_prev;
1644+
1645+ /* These are fixed during the lifetime of this object */
1646 svc_fh h;
1647+ dev_t dev;
1648+ ino_t ino;
1649+ mode_t type; /* st_mode & S_IFMT */
1650+
1651 int fd;
1652 int omode;
1653 char * path;
1654diff -urN nfs-server-2.2beta47/getattr.c nfs-server-2.2beta51/getattr.c
1655--- nfs-server-2.2beta47/getattr.c Fri Oct 30 18:10:11 1998
1656+++ nfs-server-2.2beta51/getattr.c Fri Nov 8 14:45:36 2002
1657@@ -115,6 +115,16 @@
1658 attr->fsid = 1;
1659 attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
1660 #endif
1661+
1662+ /* This may be needed by some Suns... testing */
1663+#define MINTIME (24 * 2600)
1664+ if (s->st_atime < MINTIME)
1665+ s->st_atime = MINTIME;
1666+ if (s->st_mtime < MINTIME)
1667+ s->st_mtime = MINTIME;
1668+ if (s->st_ctime < MINTIME)
1669+ s->st_ctime = MINTIME;
1670+
1671 attr->atime.seconds = s->st_atime;
1672 attr->atime.useconds = 0;
1673 attr->mtime.seconds = s->st_mtime;
1674diff -urN nfs-server-2.2beta47/logging.c nfs-server-2.2beta51/logging.c
1675--- nfs-server-2.2beta47/logging.c Fri Oct 30 17:11:22 1998
1676+++ nfs-server-2.2beta51/logging.c Fri Nov 8 14:45:36 2002
1677@@ -147,8 +147,9 @@
1678 (void) time(&now);
1679 tm = localtime(&now);
1680 fprintf(log_fp, "%s %02d/%02d/%02d %02d:%02d %s",
1681- log_name, tm->tm_mon + 1, tm->tm_mday, tm->tm_year,
1682- tm->tm_hour, tm->tm_min, buff);
1683+ log_name, tm->tm_mon + 1, tm->tm_mday,
1684+ tm->tm_year % 100,
1685+ tm->tm_hour, tm->tm_min, buff);
1686 if (strchr(buff, '\n') == NULL)
1687 fputc('\n', log_fp);
1688 }
1689@@ -182,7 +183,8 @@
1690 tm = localtime(&unix_cred->aup_time);
1691 snprintf(buffer + len, total - len,
1692 "%d/%d/%d %02d:%02d:%02d %s %d.%d",
1693- tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
1694+ tm->tm_year %100,
1695+ tm->tm_mon + 1, tm->tm_mday,
1696 tm->tm_hour, tm->tm_min, tm->tm_sec,
1697 unix_cred->aup_machname,
1698 unix_cred->aup_uid,
1699diff -urN nfs-server-2.2beta47/mountd.c nfs-server-2.2beta51/mountd.c
1700--- nfs-server-2.2beta47/mountd.c Wed Jun 2 14:10:33 1999
1701+++ nfs-server-2.2beta51/mountd.c Fri Nov 8 14:45:36 2002
1702@@ -32,7 +32,7 @@
1703 #include "rpcmisc.h"
1704 #include "rmtab.h"
1705 #include "haccess.h"
1706-#include "failsafe.h"
1707+#include "daemon.h"
1708 #include "signals.h"
1709 #include <rpc/pmap_clnt.h>
1710
1711@@ -44,6 +44,8 @@
1712 /*
1713 * Option table for mountd
1714 */
1715+#define OPT_NOTCP 300
1716+#define OPT_LOOPBACK 301
1717 static struct option longopts[] =
1718 {
1719 { "debug", required_argument, 0, 'd' },
1720@@ -56,6 +58,8 @@
1721 { "no-spoof-trace", 0, 0, 't' },
1722 { "version", 0, 0, 'v' },
1723 { "fail-safe", optional_argument, 0, 'z' },
1724+ { "no-tcp", 0, 0, OPT_NOTCP },
1725+ { "loopback-only", 0, 0, OPT_LOOPBACK },
1726
1727 { NULL, 0, 0, 0 }
1728 };
1729@@ -358,6 +362,12 @@
1730 break;
1731 case 0:
1732 break;
1733+ case OPT_NOTCP:
1734+ udp_only = 1;
1735+ break;
1736+ case OPT_LOOPBACK:
1737+ loopback_only = 1;
1738+ break;
1739 case '?':
1740 default:
1741 usage(stderr, 1);
1742@@ -384,38 +394,27 @@
1743 /* Create services and register with portmapper */
1744 rpc_init("mountd", MOUNTPROG, mountd_versions, mount_dispatch, port, 0);
1745
1746- if (!foreground && !_rpcpmstart) {
1747-#ifndef RPC_SVC_FG
1748- /* We first fork off a child. */
1749- if ((c = fork()) > 0)
1750- exit(0);
1751- if (c < 0) {
1752- Dprintf(L_FATAL, "mountd: cannot fork: %s\n",
1753- strerror(errno));
1754- }
1755- /* No more logging to stderr */
1756- background_logging();
1757+ if (_rpcpmstart) {
1758+ /* Always foreground mode */
1759+ foreground = 1;
1760
1761- /* Now we remove ourselves from the foreground. */
1762- (void) close(0);
1763- (void) close(1);
1764- (void) close(2);
1765-#ifdef TIOCNOTTY
1766- if ((c = open("/dev/tty", O_RDWR)) >= 0) {
1767- (void) ioctl(c, TIOCNOTTY, (char *) NULL);
1768- (void) close(c);
1769- }
1770-#else
1771- setsid();
1772-#endif
1773-#endif /* not RPC_SVC_FG */
1774+ /* ... but no logging */
1775+ background_logging();
1776 }
1777
1778+ /* Become a daemon */
1779+ if (!foreground)
1780+ daemonize();
1781+
1782 /* Initialize the FH module. */
1783 fh_init();
1784
1785 /* Initialize the AUTH module. */
1786 auth_init(auth_file);
1787+
1788+ /* Write pidfile */
1789+ setpidpath(_PATH_MOUNTD_PIDFILE);
1790+ writepid(getpid(), 1);
1791
1792 /* Failsafe mode */
1793 if (failsafe_level)
1794diff -urN nfs-server-2.2beta47/mountd.man nfs-server-2.2beta51/mountd.man
1795--- nfs-server-2.2beta47/mountd.man Wed Jun 2 14:12:21 1999
1796+++ nfs-server-2.2beta51/mountd.man Fri Nov 8 14:45:36 2002
1797@@ -14,6 +14,8 @@
1798 .B "[\ \-\-allow\-non\-root\ ]"
1799 .B "[\ \-\-re\-export\ ]"
1800 .B "[\ \-\-no\-spoof\-trace\ ]"
1801+.B "[\ \-\-no\-tcp ]"
1802+.B "[\ \-\-loopback\-only ]"
1803 .B "[\ \-\-version\ ]"
1804 .ad b
1805 .SH DESCRIPTION
1806@@ -123,6 +125,18 @@
1807 .TP
1808 .BR \-v " or " \-\-version
1809 Report the current version number of the program.
1810+.TP
1811+.BR \-\-no\-tcp
1812+Force
1813+.I mountd
1814+to register only the UDP transport, but no TCP.
1815+This is an experimental option.
1816+.TP
1817+.BR \-\-loopback\-only
1818+Force
1819+.I mountd
1820+to bind to the loopback interface.
1821+This is an experimental option.
1822 .SS Access Control
1823 For enhanced security, access to
1824 .I mountd
1825diff -urN nfs-server-2.2beta47/nfsd.c nfs-server-2.2beta51/nfsd.c
1826--- nfs-server-2.2beta47/nfsd.c Wed Nov 10 10:33:28 1999
1827+++ nfs-server-2.2beta51/nfsd.c Fri Nov 8 14:45:36 2002
1828@@ -21,7 +21,7 @@
1829 #include "getopt.h"
1830 #include "fsusage.h"
1831 #include "rpcmisc.h"
1832-#include "failsafe.h"
1833+#include "daemon.h"
1834 #include "signals.h"
1835 #ifdef __linux__ /* XXX - MvS: for UNIX sockets. */
1836 # include <sys/un.h>
1837@@ -30,7 +30,6 @@
1838 # include <syslog.h>
1839 #endif
1840
1841-#define MULTIPLE_SERVERS
1842
1843 /* Flags for auth_fh */
1844 #define CHK_READ 0
1845@@ -51,6 +50,8 @@
1846 /*
1847 * Option table
1848 */
1849+#define OPT_NOTCP 300
1850+#define OPT_LOOPBACK 301
1851 static struct option longopts[] = {
1852 { "auth-deamon", required_argument, 0, 'a' },
1853 { "debug", required_argument, 0, 'd' },
1854@@ -68,6 +69,9 @@
1855 { "version", 0, 0, 'v' },
1856 { "no-cross-mounts", 0, 0, 'x' },
1857 { "fail-safe", optional_argument, 0, 'z' },
1858+ { "no-tcp", 0, 0, OPT_NOTCP },
1859+ { "udp-only", 0, 0, OPT_NOTCP },
1860+ { "loopback-only", 0, 0, OPT_LOOPBACK },
1861
1862 { NULL, 0, 0, 0 }
1863 };
1864@@ -173,7 +177,10 @@
1865 return NULL;
1866 }
1867
1868- auth_user(nfsmount, rqstp);
1869+ if (!auth_user(nfsmount, rqstp)) {
1870+ *statp = NFSERR_ACCES;
1871+ return NULL;
1872+ }
1873
1874 *statp = NFS_OK;
1875 return fhc;
1876@@ -211,7 +218,11 @@
1877
1878 if ((nfsmount = auth_path(nfsclient, rqstp, path)) == NULL)
1879 return NFSERR_ACCES;
1880- auth_user(nfsmount, rqstp);
1881+
1882+ /* XXX: really need to call it again here?
1883+ * Already invoked in auth_fh */
1884+ if (!auth_user(nfsmount, rqstp))
1885+ return NFSERR_ACCES;
1886
1887 return (NFS_OK);
1888 }
1889@@ -575,7 +586,8 @@
1890 #endif
1891
1892 /* MvS: Some clients use chardev 0xFFFF for a FIFO. */
1893- if (S_ISCHR(argp->attributes.mode) && dev == 0xFFFF) {
1894+ if (S_ISCHR(argp->attributes.mode)
1895+ && (dev == 0xFFFF || dev == (dev_t) -1)) {
1896 is_borc = 0;
1897 dev = 0;
1898 argp->attributes.mode &= ~S_IFMT;
1899@@ -623,7 +635,7 @@
1900 flags = (argp->attributes.size == 0 ?
1901 CREATE_OMODE | O_TRUNC : CREATE_OMODE);
1902 if (!exists)
1903- flags |= O_CREAT;
1904+ flags |= O_CREAT|O_EXCL;
1905 tmpfd = path_open(pathbuf, flags,
1906 argp->attributes.mode & ~S_IFMT);
1907 if (tmpfd < 0)
1908@@ -965,9 +977,7 @@
1909 int nfsport = 0;
1910 int failsafe_level = 0;
1911 int c;
1912-#ifdef MULTIPLE_SERVERS
1913 int i, ncopies = 1;
1914-#endif
1915
1916 program_name = argv[0];
1917 chdir("/");
1918@@ -1031,12 +1041,17 @@
1919 break;
1920 case 0:
1921 break;
1922+ case OPT_NOTCP:
1923+ udp_only = 1;
1924+ break;
1925+ case OPT_LOOPBACK:
1926+ loopback_only = 1;
1927+ break;
1928 case '?':
1929 default:
1930 usage(stderr, 1);
1931 }
1932
1933-#ifdef MULTIPLE_SERVERS
1934 if (optind == argc-1 && isdigit(argv[optind][0])) {
1935 ncopies = atoi(argv[optind++]);
1936 if (ncopies <= 0) {
1937@@ -1051,7 +1066,6 @@
1938 ncopies = 1;
1939 }
1940 }
1941-#endif
1942
1943 /* No more arguments allowed. */
1944 if (optind != argc)
1945@@ -1075,72 +1089,54 @@
1946 rpc_init("nfsd", NFS_PROGRAM, nfsd_versions, nfs_dispatch,
1947 nfsport, NFS_MAXDATA);
1948
1949- /* No more than 1 copy when run from inetd */
1950- if (_rpcpmstart && ncopies > 1) {
1951- Dprintf(L_WARNING,
1952- "nfsd: warning: can run only "
1953- "one server in inetd mode\n");
1954- ncopies = 1;
1955+ if (_rpcpmstart) {
1956+ /* Always do foreground mode */
1957+ foreground = 1;
1958+
1959+ /* ... but don't log to stderr */
1960+ background_logging();
1961+
1962+ /* No more than 1 copy when run from inetd */
1963+ if (ncopies > 1) {
1964+ Dprintf(L_WARNING,
1965+ "nfsd: warning: can run only "
1966+ "one server in inetd mode\n");
1967+ ncopies = 1;
1968+ }
1969 }
1970
1971-#ifndef MULTIPLE_SERVERS_READWRITE
1972 if (ncopies > 1)
1973 read_only = 1;
1974-#endif
1975
1976- /* We first fork off a child. */
1977- if (!foreground) {
1978- if ((c = fork()) > 0)
1979- exit(0);
1980- if (c < 0) {
1981- Dprintf(L_FATAL, "nfsd: cannot fork: %s\n",
1982- strerror(errno));
1983- }
1984- }
1985+ /*
1986+ * We first fork off a child and detach from tty
1987+ */
1988+ if (!foreground)
1989+ daemonize();
1990
1991 /* Initialize the AUTH module. */
1992 auth_init(auth_file);
1993
1994+ setpidpath(_PATH_NFSD_PIDFILE);
1995 if (failsafe_level == 0) {
1996 /* Start multiple copies of the server */
1997+ writepid(getpid(), 1);
1998 for (i = 1; i < ncopies; i++) {
1999+ pid_t pid;
2000+
2001 Dprintf(D_GENERAL, "Forking server thread...\n");
2002- if ((c = fork()) < 0) {
2003+ if ((pid = fork()) < 0) {
2004 Dprintf(L_ERROR, "Unable to fork: %s",
2005 strerror(errno));
2006- } else if (c == 0) {
2007- /* Child process */
2008- break;
2009+ } else if (pid != 0) {
2010+ writepid(pid, 0);
2011+ } else {
2012+ break; /* Child process */
2013 }
2014 }
2015 } else {
2016 /* Init for failsafe mode */
2017 failsafe(failsafe_level, ncopies);
2018- }
2019-
2020- /* Now that we've done all the required forks, we make do all the
2021- * session magic.
2022- */
2023- if (!foreground) {
2024- /* No more logging to stderr */
2025- background_logging();
2026-
2027- /* Now we remove ourselves from the foreground. */
2028- close(0);
2029- close(1);
2030- close(2);
2031-#ifdef HAVE_SETSID
2032- setsid();
2033-#else
2034- {
2035- int fd;
2036-
2037- if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
2038- ioctl(fd, TIOCNOTTY, (char *) NULL);
2039- close(fd);
2040- }
2041- }
2042-#endif
2043 }
2044
2045 /*
2046diff -urN nfs-server-2.2beta47/nfsd.man nfs-server-2.2beta51/nfsd.man
2047--- nfs-server-2.2beta47/nfsd.man Wed Jun 2 14:13:37 1999
2048+++ nfs-server-2.2beta51/nfsd.man Fri Nov 8 14:45:36 2002
2049@@ -8,7 +8,7 @@
2050 .B "[\ \-d\ facility\ ]"
2051 .B "[\ \-P\ port\ ]"
2052 .B "[\ \-R\ dirname\ ]"
2053-.B "[\ \-Fhlnprstv\ ]"
2054+.B "[\ \-Fhlnprstuv\ ]"
2055 .B "[\ \-\-debug\ facility\ ]"
2056 .B "[\ \-\-exports\-file=file\ ]"
2057 .B "[\ \-\-foreground\ ]"
2058@@ -18,6 +18,8 @@
2059 .B "[\ \-\-public\-root\ dirname\ ]"
2060 .\".B "[\ \-\-synchronous\-writes\ ]"
2061 .B "[\ \-\-no\-spoof\-trace\ ]"
2062+.B "[\ \-\-no\-tcp ]"
2063+.B "[\ \-\-loopback-only ]"
2064 .B "[\ \-\-port\ port\ ]"
2065 .B "[\ \-\-log-transfers\ ]"
2066 .B "[\ \-\-version\ ]"
2067@@ -56,7 +58,7 @@
2068 .PP
2069 When run from
2070 .IR inetd ,
2071-.i nfsd
2072+.I nfsd
2073 will terminate after a certain period of inactivity.
2074 .SH OPTIONS
2075 .TP
2076@@ -167,6 +169,14 @@
2077 .BR \-v " or " \-\-version
2078 Report the current version number of the program.
2079 .TP
2080+.BR \-\-no\-tcp
2081+Force nfsd to only register a UDP transport, but not TCP.
2082+This is an experimental option.
2083+.TP
2084+.BR \-\-loopback\-only
2085+Force nfsd to bind to the loopback interface.
2086+This is an experimental option.
2087+.TP
2088 .BR numcopies
2089 This is an experimental feature that lets you run several instances of
2090 .I nfsd
2091@@ -174,15 +184,8 @@
2092 .B numcopies
2093 greater than one,
2094 .I nfsd
2095-will fork as many times as specified by this value.
2096-However, the servers do not share a common file handle
2097-cache, which makes certain file operations impossible.
2098-.IP
2099-For this reason,
2100-.I nfsd
2101-will disallow all write operations when invoked with this option. Although
2102-this is very limiting, this feature may still prove useful for exporting
2103-public FTP areas or Usenet News spools.
2104+will fork as many times as specified by this value so it is able to
2105+handle that many NFS requests in parallel.
2106 .SS WebNFS Support
2107 WebNFS is an extension to the normal NFS protocol developed by Sun
2108 that is particularly well-suited for file retrieval over the
2109@@ -268,6 +271,19 @@
2110 .I nfsd
2111 writes out a transfer record whenever it encounters a READ or WRITE
2112 request at offset zero.
2113+.SS Generating a debug trace
2114+When suspecting a bug in nfsd, it is helpful to look at a debug trace
2115+of what's going on. You can create such a trace by first killing nfsd,
2116+and then restarting it as
2117+.PP
2118+.nf
2119+.ta +3i
2120+/usr/sbin/rpc.nfsd -F -d all
2121+.fi
2122+.PP
2123+Instead of
2124+.BR all ,
2125+you can use less verbose debug facilities as described above.
2126 .SH "SEE ALSO"
2127 exports(5), mountd(8), ugidd(8C)
2128 .SH AUTHORS
2129diff -urN nfs-server-2.2beta47/rmtab.c nfs-server-2.2beta51/rmtab.c
2130--- nfs-server-2.2beta47/rmtab.c Fri Feb 6 09:43:25 1998
2131+++ nfs-server-2.2beta51/rmtab.c Fri Nov 8 14:45:36 2002
2132@@ -8,6 +8,7 @@
2133
2134 #include "nfsd.h"
2135 #include "rmtab.h"
2136+#include "rpcmisc.h"
2137
2138 static char * rmtab_gethost(struct svc_req *);
2139 static int rmtab_insert(char *, char *);
2140diff -urN nfs-server-2.2beta47/rpcmisc.c nfs-server-2.2beta51/rpcmisc.c
2141--- nfs-server-2.2beta47/rpcmisc.c Tue Sep 7 10:42:58 1999
2142+++ nfs-server-2.2beta51/rpcmisc.c Fri Nov 8 14:45:36 2002
2143@@ -39,6 +39,8 @@
2144 int _rpcfdtype = 0;
2145 int _rpcsvcdirty = 0;
2146 const char * auth_daemon = 0;
2147+int udp_only = 0;
2148+int loopback_only = 0;
2149
2150 #ifdef AUTH_DAEMON
2151 static bool_t (*tcp_rendevouser)(SVCXPRT *, struct rpc_msg *);
2152@@ -96,7 +98,7 @@
2153 }
2154 }
2155
2156- if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_STREAM)) {
2157+ if ((_rpcfdtype == 0 && !udp_only) || (_rpcfdtype == SOCK_STREAM)) {
2158 if (_rpcfdtype == 0 && defport != 0)
2159 sock = makesock(defport, IPPROTO_TCP, bufsiz);
2160 transp = svctcp_create(sock, 0, 0);
2161@@ -199,6 +201,9 @@
2162 sin.sin_family = AF_INET;
2163 sin.sin_addr.s_addr = INADDR_ANY;
2164 sin.sin_port = htons(port);
2165+
2166+ if (loopback_only)
2167+ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
2168
2169 #ifdef DEBUG
2170 {
2171diff -urN nfs-server-2.2beta47/rpcmisc.h nfs-server-2.2beta51/rpcmisc.h
2172--- nfs-server-2.2beta47/rpcmisc.h Tue Sep 7 10:37:38 1999
2173+++ nfs-server-2.2beta51/rpcmisc.h Fri Nov 8 14:45:36 2002
2174@@ -9,6 +9,8 @@
2175 extern int _rpcpmstart;
2176 extern int _rpcfdtype;
2177 extern int _rpcsvcdirty;
2178+extern int udp_only;
2179+extern int loopback_only;
2180 extern const char * auth_daemon;
2181
2182 extern void rpc_init(const char *name, int prog, int *verstbl,
2183@@ -16,5 +18,13 @@
2184 int defport, int bufsize);
2185 extern void rpc_exit(int prog, int *verstbl);
2186 extern void rpc_closedown(void);
2187+
2188+/*
2189+ * Some older systems don't have svc_getcaller.
2190+ * Some, like glibc 2.2, have it but it returns some type that's
2191+ * not a sockaddr_in anymore.
2192+ */
2193+#undef svc_getcaller
2194+#define svc_getcaller(xprt) ((struct sockaddr_in *) (&(xprt)->xp_raddr))
2195
2196 #endif /* RPCMISC_H */
2197diff -urN nfs-server-2.2beta47/setattr.c nfs-server-2.2beta51/setattr.c
2198--- nfs-server-2.2beta47/setattr.c Fri Oct 30 18:29:42 1998
2199+++ nfs-server-2.2beta51/setattr.c Fri Nov 8 14:45:36 2002
2200@@ -103,6 +103,10 @@
2201 if (flags & SATTR_CHMOD) {
2202 unsigned int mode = attr->mode;
2203
2204+ /* If setuid is not allowed, silently squash them */
2205+ if (!nfsmount->o.allow_setuid && S_ISREG(s->st_mode))
2206+ mode &= ~(S_ISUID|S_ISGID) | s->st_mode;
2207+
2208 if (mode != -1 && mode != 0xFFFF /* ultrix bug */
2209 && (mode & 07777) != (s->st_mode & 07777)) {
2210 if (efs_chmod(path, mode) < 0)
2211diff -urN nfs-server-2.2beta47/showmount.c nfs-server-2.2beta51/showmount.c
2212--- nfs-server-2.2beta47/showmount.c Wed Jun 12 22:31:04 1996
2213+++ nfs-server-2.2beta51/showmount.c Fri Nov 8 14:45:36 2002
2214@@ -162,17 +162,13 @@
2215 break;
2216 }
2217
2218- if (hostname[0] >= '0' && hostname[0] <= '9') {
2219- server_addr.sin_family = AF_INET;
2220- server_addr.sin_addr.s_addr = inet_addr(hostname);
2221- }
2222- else {
2223+ server_addr.sin_family = AF_INET;
2224+ if (!inet_aton(hostname, &server_addr.sin_addr)) {
2225 if ((hp = gethostbyname(hostname)) == NULL) {
2226 fprintf(stderr, "%s: can't get address for %s\n",
2227 program_name, hostname);
2228 exit(1);
2229 }
2230- server_addr.sin_family = AF_INET;
2231 memcpy(&server_addr.sin_addr, hp->h_addr, hp->h_length);
2232 }
2233
2234diff -urN nfs-server-2.2beta47/site.h.in nfs-server-2.2beta51/site.h.in
2235--- nfs-server-2.2beta47/site.h.in Thu Jan 1 01:00:00 1970
2236+++ nfs-server-2.2beta51/site.h.in Fri Nov 8 14:45:57 2002
2237@@ -0,0 +1,50 @@
2238+/*
2239+ * Site-specific configuration options generated by BUILD.
2240+ * Please do not edit.
2241+ */
2242+
2243+/*
2244+ * If ENABLE_DEVTAB is defined, nfsd will use the new inode
2245+ * number generation scheme for avoiding inode number clashes
2246+ * on big hard disks.
2247+ */
2248+#undef ENABLE_DEVTAB
2249+
2250+/*
2251+ * If MULTIPLE_SERVER_READWRITE is defined, you will be able
2252+ * to run several nfsd process in parallel servicing all NFS
2253+ * requests.
2254+ */
2255+#define MULTIPLE_SERVERS_READWRITE
2256+
2257+/*
2258+ * If ENABLE_UGID_DAEMON is defined, the real rpc.ugidd is built,
2259+ * nfsd is built to support ugidd queries.
2260+ * Otherwise, a dummy program is created
2261+ */
2262+#undef ENABLE_UGID_DAEMON
2263+
2264+/*
2265+ * If ENABLE_UGID_NIS is defined, nfsd will support user mapping
2266+ * vie the client's NIS server.
2267+ */
2268+#undef ENABLE_UGID_NIS
2269+
2270+/*
2271+ * if HOSTS_ACCESS is defined, ugidd uses host access control
2272+ * provided by libwrap.a from tcp_wrappers
2273+ */
2274+#define HOSTS_ACCESS
2275+
2276+/*
2277+ * Define correct ownership of export control file
2278+ */
2279+#define EXPORTSOWNERUID 0
2280+#define EXPORTSOWNERGID 0
2281+
2282+/*
2283+ * If WANT_LOG_MOUNTS is defined, every mount request will be logged
2284+ * to syslogd with the name of source site and a path that was
2285+ * it requested
2286+ */
2287+#define WANT_LOG_MOUNTS
2288diff -urN nfs-server-2.2beta47/ugidd.c nfs-server-2.2beta51/ugidd.c
2289--- nfs-server-2.2beta47/ugidd.c Wed Dec 10 12:34:16 1997
2290+++ nfs-server-2.2beta51/ugidd.c Fri Nov 8 14:45:36 2002
2291@@ -43,9 +43,7 @@
2292 };
2293
2294 int
2295-main(argc, argv)
2296-int argc;
2297-char **argv;
2298+main(int argc, char **argv)
2299 {
2300 SVCXPRT *transp;
2301 int c, longind;
2302@@ -92,32 +90,11 @@
2303 exit(1);
2304 }
2305
2306- if (!foreground) {
2307- if ((c = fork()) > 0)
2308- exit(0);
2309- if (c < 0) {
2310- fprintf(stderr, "ugidd: cannot fork: %s\n",
2311- strerror(errno));
2312- exit(-1);
2313- }
2314- close(0);
2315- close(1);
2316- close(2);
2317-#ifdef HAVE_SETSID
2318- setsid();
2319-#else
2320- {
2321- int fd;
2322-
2323- if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
2324- ioctl(fd, TIOCNOTTY, (char *) NULL);
2325- close(fd);
2326- }
2327- }
2328-#endif
2329- }
2330-
2331 log_open("ugidd", foreground);
2332+
2333+ /* Become a daemon */
2334+ if (!foreground)
2335+ daemonize();
2336
2337 svc_run();
2338 Dprintf(L_ERROR, "svc_run returned\n");
2339diff -urN nfs-server-2.2beta47/version.c nfs-server-2.2beta51/version.c
2340--- nfs-server-2.2beta47/version.c Wed Nov 10 10:33:33 1999
2341+++ nfs-server-2.2beta51/version.c Fri Nov 8 14:45:36 2002
2342@@ -1 +1 @@
2343-char version[] = "Universal NFS Server 2.2beta47";
2344+char version[] = "Universal NFS Server 2.2beta51";
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/002-destdir.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/002-destdir.patch
new file mode 100644
index 0000000000..9388332675
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/002-destdir.patch
@@ -0,0 +1,68 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/Makefile.in 2002/11/07 16:56:07 1.1
4+++ nfs-server/Makefile.in 2002/11/07 17:08:41
5@@ -74,10 +74,10 @@
6
7 bindir = $(exec_prefix)/sbin
8 #vardir = $(install_prefix)/var/lib/nfs
9-infodir = $(prefix)/info
10-man5dir = $(prefix)/man/man5
11+infodir = $(prefix)/share/info
12+man5dir = $(prefix)/share/man/man5
13 man5ext = .5
14-man8dir = $(prefix)/man/man8
15+man8dir = $(prefix)/share/man/man8
16 man8ext = .8
17
18 # Prefix to be prepended to each installed RPC program, normally `rpc.'.
19@@ -145,37 +145,37 @@
20 .PHONY: install installdirs
21 install: $(DAEMONS) $(CLIENTS) installdirs
22 @for prog in $(DAEMONS) $(CLIENTS); do \
23- echo "installing $$prog in $(bindir)"; \
24- $(INSTALL_PROGRAM) $$prog $(bindir)/$$prog; \
25+ echo "installing $$prog in $(DESTDIR)$(bindir)"; \
26+ $(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/$$prog; \
27 done
28 @for manp in $(MANPAGES5); do \
29- echo "installing $$manp$(man5ext) in $(man5dir)"; \
30+ echo "installing $$manp$(man5ext) in $(DESTDIR)$(man5dir)"; \
31 $(INSTALL_DATA) $(srcdir)/$$manp.man \
32- $(man5dir)/$$manp$(man5ext); \
33+ $(DESTDIR)$(man5dir)/$$manp$(man5ext); \
34 done
35 @for manp in $(MANPAGES8p); do \
36- echo "installing $$manp$(man8ext) in $(man8dir)"; \
37+ echo "installing $$manp$(man8ext) in $(DESTDIR)$(man8dir)"; \
38 $(INSTALL_DATA) $(srcdir)/$$manp.man \
39- $(man8dir)/$$manp$(man8ext); \
40+ $(DESTDIR)$(man8dir)/$$manp$(man8ext); \
41 if [ 'x$(rpcprefix)' != 'x' ]; then \
42 rm -f $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
43 ln -s $$manp$(man8ext) \
44- $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
45+ $(DESTDIR)$(man8dir)/$(rpcprefix)$$manp$(man8ext); \
46 fi; \
47 done
48 @for manp in $(MANPAGES8); do \
49- echo "installing $$manp$(man8ext) in $(man8dir)"; \
50+ echo "installing $$manp$(man8ext) in $(DESTDIR)$(man8dir)"; \
51 $(INSTALL_DATA) $(srcdir)/$$manp.man \
52- $(man8dir)/$$manp$(man8ext); \
53+ $(DESTDIR)$(man8dir)/$$manp$(man8ext); \
54 done
55 @if [ -n "$(DEVTAB_FILE)" -a ! -f "$(DEVTAB_FILE)" ]; then \
56 echo "Initializing $(DEVTAB_FILE)"; \
57- $(INSTALL) -m 755 -d `dirname $(DEVTAB_FILE)`; \
58- echo "# Device mapping for unfsd" > "$(DEVTAB_FILE)"; \
59+ $(INSTALL) -m 755 -d `dirname $(DESTDIR)$(DEVTAB_FILE)`; \
60+ echo "# Device mapping for unfsd" > $(DESTDIR)"$(DEVTAB_FILE)"; \
61 fi
62
63 installdirs:
64- ${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)
65+ ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
66
67 $(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
68 $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS)
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/003-manpages.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/003-manpages.patch
new file mode 100644
index 0000000000..a17a8dcf55
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/003-manpages.patch
@@ -0,0 +1,28 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/exports.man 2002/11/07 17:15:59 1.1
4+++ nfs-server/exports.man 2002/11/07 17:17:19
5@@ -110,6 +110,14 @@
6 .TP
7 .IR link_absolute
8 Leave all symbolic link as they are. This is the default operation.
9+.SS Anonymous Entries
10+.PP
11+Entries where hosts are not specified are known as anonymous entries. They
12+have different default settings compared to normal entries. The differences
13+include
14+.IR all_squash ,
15+.IR no_secure ", and"
16+.IR ro .
17 .SS User ID Mapping
18 .PP
19 .I nfsd
20@@ -231,7 +239,7 @@
21 # Mapping for client foobar:
22 # remote local
23 uid 0-99 - # squash these
24-uid 100-500 1000 # map 100-500 to 1000-1500
25+uid 100-500 1000 # map 100-500 to 1000-1400
26 gid 0-49 - # squash these
27 gid 50-100 700 # map 50-100 to 700-750
28 .fi
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
new file mode 100644
index 0000000000..3ac4ed740c
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
@@ -0,0 +1,48 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/failsafe.c 2002/11/07 17:12:46 1.1
4+++ nfs-server/failsafe.c 2002/11/07 17:15:16
5@@ -10,8 +10,12 @@
6 #include "logging.h"
7 #include "signals.h"
8 #include <sys/wait.h>
9+#ifdef HAVE_STRSIGNAL
10+#include <string.h>
11+#else
12
13 static const char * get_signame(int signo);
14+#endif
15
16 void
17 failsafe(int level, int ncopies)
18@@ -111,9 +115,17 @@
19 pid, running? "Continue" : "Exit");
20 } else {
21 Dprintf(L_WARNING, "failsafe: "
22+#ifdef HAVE_STRSIGNAL
23+ "child %d terminated by: %s. "
24+#else
25 "child %d terminated by %s. "
26+#endif
27 "Restarting.",
28+#ifdef HAVE_STRSIGNAL
29+ pid, strsignal(signo));
30+#else
31 pid, get_signame(signo));
32+#endif
33 child = -1; /* Restart */
34 }
35 } else if (WIFEXITED(status)) {
36@@ -159,6 +171,7 @@
37 /* NOP */
38 }
39
40+#ifndef HAVE_STRSIGNAL
41 static const char *
42 get_signame(int signo)
43 {
44@@ -199,3 +212,4 @@
45 sprintf(namebuf, "signal #%d", signo);
46 return namebuf;
47 }
48+#endif
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/005-sys-time.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/005-sys-time.patch
new file mode 100644
index 0000000000..c21fb05e8d
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/005-sys-time.patch
@@ -0,0 +1,29 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/system.h 2002/11/07 17:10:47 1.1
4+++ nfs-server/system.h 2002/11/07 17:11:53
5@@ -66,20 +66,16 @@
6 # include <grp.h> /* for setgroups */
7 #endif
8
9-#ifdef TIME_WITH_SYS_TIME
10+#ifdef HAVE_SYS_TIME_H
11 # include <sys/time.h>
12 # include <time.h>
13-#else /* not TIME_WITH_SYS_TIME */
14-# ifdef HAVE_SYS_TIME_H
15-# include <sys/time.h>
16-# else /* not HAVE_SYS_TIME_H */
17-# include <time.h>
18+#else /* not HAVE_SYS_TIME_H */
19+# include <time.h>
20 struct timeval {
21 long tv_sec;
22 long tv_usec;
23 };
24-# endif /* not HAVE_SYS_TIME_H */
25-#endif /* not TIME_WITH_SYS_TIME */
26+#endif /* not HAVE_SYS_TIME_H */
27 #ifdef HAVE_SYS_FILE_H
28 # include <sys/file.h>
29 #endif
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/006-reiserfs.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/006-reiserfs.patch
new file mode 100644
index 0000000000..abdc67476e
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/006-reiserfs.patch
@@ -0,0 +1,1272 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/Makefile.in
4+++ nfs-server/Makefile.in 2002/11/08 13:59:16
5@@ -100,7 +100,7 @@
6 utimes.c mkdir.c rename.c getopt.c getopt_long.c \
7 alloca.c mountlist.c xmalloc.c \
8 xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
9- haccess.c daemon.c signals.c
10+ haccess.c daemon.c signals.c teahash3.c
11 XDRFILES = mount.x nfs_prot.x
12 GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
13 ugid.h ugid_xdr.c ugid_clnt.c
14@@ -112,7 +112,7 @@
15 MANPAGES8 = showmount
16 MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8)
17 LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \
18- nfsmounted.o faccess.o haccess.o daemon.o \
19+ nfsmounted.o faccess.o haccess.o daemon.o teahash3.o \
20 signals.o @LIBOBJS@ @ALLOCA@
21 OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o
22 NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
23--- nfs-server/auth.c
24+++ nfs-server/auth.c 2002/11/08 13:59:16
25@@ -83,6 +83,7 @@
26 0, /* read-only */
27 0, /* relative links */
28 0, /* noaccess */
29+ 0, /* hashed inodes */
30 1, /* cross_mounts */
31 1, /* allow setuid */
32 65534, /* default uid */
33@@ -100,6 +101,7 @@
34 0, /* relative links */
35 0, /* noaccess */
36 1, /* cross_mounts */
37+ 0, /* hashed inodes */
38 0, /* allow setuid */
39 65534, /* default uid */
40 65534, /* default gid */
41@@ -991,6 +993,7 @@
42 if (mp == 0) {
43 mp = (nfs_mount*) xmalloc(sizeof(nfs_mount));
44 memset(mp, 0, sizeof(*mp));
45+ mp->mount_dev = 0;
46 mp->origin = cp;
47 mp->client = cp;
48 mp->path = xstrdup(path);
49@@ -1169,6 +1172,8 @@
50 default_options.nobody_gid = anon_gid;
51 anonymous_options.nobody_uid = anon_uid;
52 anonymous_options.nobody_gid = anon_gid;
53+ default_options.cross_mounts = cross_mounts;
54+ default_options.hashed_inodes = hashed_inodes;
55
56 memset(cached_clients, 0, sizeof(cached_clients));
57 cached_next = 0;
58--- nfs-server/auth.h
59+++ nfs-server/auth.h 2002/11/08 13:59:16
60@@ -43,15 +43,16 @@
61
62 typedef struct nfs_options {
63 ugid_mapping_t uidmap; /* uid/gid mapping behavior */
64- int root_squash;
65- int all_squash;
66- int some_squash; /* speed up luid() etc. */
67- int secure_port;
68- int read_only;
69- int link_relative;
70- int noaccess;
71- int cross_mounts;
72- int allow_setuid;
73+ unsigned root_squash : 1;
74+ unsigned all_squash : 1;
75+ unsigned some_squash : 1; /* speed up luid() etc. */
76+ unsigned secure_port : 1;
77+ unsigned read_only : 1;
78+ unsigned link_relative : 1;
79+ unsigned noaccess : 1;
80+ unsigned cross_mounts : 1;
81+ unsigned hashed_inodes : 1;
82+ unsigned allow_setuid : 1;
83 uid_t nobody_uid;
84 gid_t nobody_gid;
85 char * clnt_nisdomain;
86@@ -64,6 +65,7 @@
87 int length;
88 char * path;
89 nfs_options o;
90+ dev_t mount_dev;
91 /* Original NFS client */
92 struct nfs_client * origin;
93 } nfs_mount;
94@@ -121,6 +123,8 @@
95 extern void auth_check_all_netmasks(void);
96 extern void auth_sort_all_mountlists(void);
97 extern void auth_log_all(void);
98+extern int auth_checkdev(nfs_mount *, dev_t dev);
99+extern int auth_checkpathdev(char *, dev_t dev);
100
101 /* This function lets us set our euid/fsuid temporarily */
102 extern void auth_override_uid(uid_t);
103--- nfs-server/auth_clnt.c
104+++ nfs-server/auth_clnt.c 2002/11/08 13:59:16
105@@ -89,6 +89,13 @@
106 return NULL;
107 }
108
109+ if (!mp->o.cross_mounts && !mp->mount_dev) {
110+ struct stat st;
111+ if (!lstat(mp->path, &st) < 0)
112+ return NULL;
113+ mp->mount_dev = st.st_dev;
114+ }
115+
116 /* Check request originated on a privileged port. */
117 if (!allow_non_root && mp->o.secure_port
118 && !SECURE_PORT(svc_getcaller(rqstp->rq_xprt)->sin_port)) {
119@@ -350,3 +357,28 @@
120 return 1;
121 }
122 #endif
123+
124+int auth_checkpathdev(char *path, dev_t dev)
125+{
126+ nfs_mount *mp = auth_match_mount(nfsclient, path);
127+ if (!mp)
128+ return 0;
129+ return auth_checkdev(mp, dev);
130+}
131+
132+int auth_checkdev(nfs_mount *mp, dev_t dev)
133+{
134+ if (!mp->mount_dev)
135+ return 1;
136+ if (mp->mount_dev != dev) {
137+ struct stat st;
138+ /* Restat in case the cd switched */
139+ if (efs_lstat(mp->path, &st) < 0) {
140+ Dprintf(L_ERROR, "Unable to stat mount point %s\n", mp->path);
141+ return 0;
142+ }
143+ mp->mount_dev = st.st_dev;
144+ }
145+ return mp->mount_dev == dev;
146+}
147+
148--- nfs-server/auth_init.c
149+++ nfs-server/auth_init.c 2002/11/08 13:59:16
150@@ -320,6 +320,14 @@
151 /* knfsd compatibility, ignore */;
152 else ifkwd(4, "sync")
153 /* knfsd compatibility, ignore */;
154+ else ifkwd(13, "hashed_inodes")
155+ mp->o.hashed_inodes = 1;
156+ else ifkwd(16, "no_hashed_inodes")
157+ mp->o.hashed_inodes = 0;
158+ else ifkwd(12, "cross_mounts")
159+ mp->o.cross_mounts = 1;
160+ else ifkwd(15, "no_cross_mounts")
161+ mp->o.cross_mounts = 0;
162 else {
163 Dprintf(L_ERROR,
164 "Unknown keyword \"%.*s\" in export file\n",
165--- nfs-server/exports.man
166+++ nfs-server/exports.man 2002/11/08 13:59:16
167@@ -208,6 +208,17 @@
168 .IR no_all_squash ,
169 which is the default setting.
170 .TP
171+.IR hashed_inodes
172+Use a special scheme to generate inode numbers that may work better with
173+reiserfs filesystems.
174+.IR no_hashed_inodes
175+which uses a direct mapping is the default.
176+.TP
177+.IR cross_mounts
178+Do not cross mount points in exports. Turning this off with
179+.IR no_cross_mounts
180+avoids inode number space conflicts when there are too many files.
181+.TP
182 .IR map_daemon
183 This option turns on dynamic uid/gid mapping. Each uid in an NFS request
184 will be translated to the equivalent server uid, and each uid in an
185--- nfs-server/fh.c
186+++ nfs-server/fh.c 2002/11/08 14:11:31
187@@ -4,8 +4,9 @@
188 *
189 * Interfaces:
190 * pseudo_inode
191- * mostly used internally, but also called from unfsd.c
192- * when reporting directory contents.
193+ * mostly used internally, for hash tables
194+ * visible_inode
195+ * generate visible inode shown to the client in the fattr.
196 * fh_init
197 * Initializes the queues and 'flush' timer
198 * fh_pr
199@@ -47,6 +48,8 @@
200 * Note: the original code mistakenly assumes that the overall path
201 * length remains within the value given by PATH_MAX... that leads
202 * to interesting buffer overflows all over the place.
203+ *
204+ * Depends that dev_t only uses 16bits.
205 */
206
207 #include <assert.h>
208@@ -137,9 +140,9 @@
209 };
210
211 /* Forward declared local functions */
212-static psi_t path_psi(char *, nfsstat *, struct stat *, int);
213+static psi_t path_psi(char *, nfsstat *, struct stat *, int, int *);
214 static psi_t path_psi_m(char *, nfsstat *, struct stat *,
215- struct stat *, int);
216+ struct stat *, int, int *);
217 static int fh_flush_fds(void);
218 static char * fh_dump(svc_fh *);
219 static void fh_insert_fdcache(fhcache *fhc);
220@@ -173,19 +176,22 @@
221 fh_list_size++;
222
223 /* Insert into hash tab. */
224- hash_slot = &(fh_hashed[fhc->h.psi % HASH_TAB_SIZE]);
225+ hash_slot = &(fh_hashed[pseudo_inode(fhc->h.ino,fhc->h.dev) % HASH_TAB_SIZE]);
226 fhc->hash_next = *hash_slot;
227 *hash_slot = fhc;
228 }
229
230 static fhcache *
231-fh_lookup(psi_t psi)
232+fh_lookup(ino_t ino, dev_t dev)
233 {
234 register fhcache *fhc;
235
236- fhc = fh_hashed[psi % HASH_TAB_SIZE];
237- while (fhc != NULL && fhc->h.psi != psi)
238+ fhc = fh_hashed[pseudo_inode(ino,dev) % HASH_TAB_SIZE];
239+ while (fhc != NULL) {
240+ if (fhc->h.ino == ino && fhc->h.dev == dev)
241+ break;
242 fhc = fhc->hash_next;
243+ }
244 return (fhc);
245 }
246
247@@ -193,7 +199,8 @@
248 fh_insert_fdcache(fhcache *fhc)
249 {
250 #ifdef FHTRACE
251- Dprintf(D_FHTRACE, "insert fh %x into fdcache @%d\n", fhc->h.psi, fhc->fd);
252+ Dprintf(D_FHTRACE, "insert fh %x,%x into fdcache @%d\n",
253+ fhc->h.ino, fhc->h.dev, fhc->fd);
254 if (fhc->fd < 0) {
255 fh_complain("fd cache bug: bad fd", fhc);
256 return;
257@@ -289,8 +296,9 @@
258 #endif
259
260 Dprintf(D_FHTRACE|D_FHCACHE,
261- "fh_delete: deleting handle %x ('%s', fd=%d)\n",
262- fhc, fhc->path ? fhc->path : "<unnamed>", fhc->fd);
263+ "fh_delete: deleting handle %x [%x,%x] ('%s', fd=%d)\n",
264+ fhc, fhc->h.dev, fhc->h.ino, fhc->path ? fhc->path : "<unnamed>",
265+ fhc->fd);
266
267 /* Remove from current posn */
268 fhc->prev->next = fhc->next;
269@@ -298,7 +306,7 @@
270 fh_list_size--;
271
272 /* Remove from hash tab */
273- hash_slot = &(fh_hashed[fhc->h.psi % HASH_TAB_SIZE]);
274+ hash_slot = &(fh_hashed[pseudo_inode(fhc->h.ino,fhc->h.dev) % HASH_TAB_SIZE]);
275 while (*hash_slot != NULL && *hash_slot != fhc)
276 hash_slot = &((*hash_slot)->hash_next);
277 if (*hash_slot == NULL)
278@@ -528,6 +536,7 @@
279 index -= 8;
280 }
281
282+#if 0
283 /* If we have an XXL inode number, spew out warning (but at most
284 * once a second) */
285 if (inode & ~mask) {
286@@ -541,14 +550,34 @@
287 }
288 inode &= mask;
289 }
290-
291+#endif
292 return (psi_t) (prefix | inode);
293 #endif
294 }
295
296+/* Inode as handed out by attr calls. */
297+psi_t
298+visible_inode(ino_t ino, dev_t dev, nfs_mount *mount)
299+{
300+ if (!mount->o.cross_mounts)
301+ return ino;
302+
303+ if (mount->o.hashed_inodes) {
304+ extern __u32 teahash3(/*u32 k[2], *//*u8*/const char *msg, int len);
305+
306+ struct {
307+ ino_t ino;
308+ dev_t dev;
309+ } tup = { ino,dev };
310+ return teahash3((char *) &tup, sizeof tup);
311+ }
312+
313+ return pseudo_inode(ino, dev);
314+}
315+
316 #if 1
317 static char *
318-fh_buildpath(svc_fh *h)
319+fh_buildpath(svc_fh *h, dev_t basedev)
320 {
321 char pathbuf[PATH_MAX + NAME_MAX + 1], *path;
322 long cookie_stack[HP_LEN + 1];
323@@ -565,13 +594,17 @@
324
325 if (efs_stat("/", &sbuf) < 0)
326 return (NULL);
327- psi = pseudo_inode(sbuf.st_ino, sbuf.st_dev);
328 if (h->hash_path[0] == 0) {
329- if (psi != h->psi)
330- return (NULL);
331- return xstrdup("/");
332+ if (sbuf.st_ino == h->ino && sbuf.st_dev == h->dev)
333+ ;
334+ else
335+ return NULL;
336+ strcpy(pathbuf,"/");
337+ path = xstrdup(pathbuf);
338+ return (path);
339 }
340
341+ psi = pseudo_inode(sbuf.st_ino, sbuf.st_dev);
342 if (hash_psi(psi) != h->hash_path[1])
343 return (NULL);
344
345@@ -599,11 +632,18 @@
346
347 psi = pseudo_inode(dp->d_ino, sbuf.st_dev);
348 if (i == h->hash_path[0] + 1) {
349- if (psi != h->psi)
350+ if (sbuf.st_dev != h->dev || dp->d_ino != h->ino)
351 continue;
352 /* GOT IT */
353 strcpy(pathbuf + pathlen, dp->d_name);
354- path = xstrdup(pathbuf);
355+ if (!basedev || sbuf.st_dev == basedev ||
356+ auth_checkpathdev(pathbuf, sbuf.st_dev)) {
357+ path = xstrdup(pathbuf);
358+ } else {
359+ dprintf(L_ERROR, "fh_buildpath: basedev %x != dev %x for %s\n",
360+ (unsigned)basedev,(unsigned)sbuf.st_dev,pathbuf);
361+ path = NULL;
362+ }
363 efs_closedir(dir);
364 auth_override_uid(auth_uid);
365 return (path);
366@@ -754,16 +794,16 @@
367 #endif
368
369 static psi_t
370-path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid)
371+path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid, int *mp)
372 {
373 struct stat smounted;
374
375- return path_psi_m(path, status, sbp, &smounted, svalid);
376+ return path_psi_m(path, status, sbp, &smounted, svalid, mp);
377 }
378
379 static psi_t
380 path_psi_m(char *path, nfsstat *status,
381- struct stat *sbp, struct stat *mbp, int svalid)
382+ struct stat *sbp, struct stat *mbp, int svalid, int *mp)
383 {
384 struct stat sbuf, ddbuf;
385
386@@ -815,6 +855,8 @@
387 DIR *dirp;
388 struct dirent *dp;
389
390+ if (mp) *mp = 1;
391+
392 errno = 0;
393 dirp = efs_opendir(dname);
394 fname[-1] = '/'; /* Restore path */
395@@ -860,9 +902,70 @@
396 }
397
398 fhcache *
399-fh_find(svc_fh *h, int mode)
400+fh_newfh(svc_fh *h, int mode, dev_t basedev)
401+{
402+ fhcache *fhc, *flush;
403+
404+ ex_state = active;
405+ for (flush = fh_tail.prev; fh_list_size > FH_CACHE_LIMIT; flush = fhc) {
406+ /* Don't flush current head. */
407+ if (flush == &fh_head)
408+ break;
409+ fhc = flush->prev;
410+ fh_delete(flush);
411+ }
412+ fhc = (fhcache *) xmalloc(sizeof *fhc);
413+ if (mode == FHFIND_FCREATE) {
414+ /* File will be created */
415+ fhc->path = NULL;
416+ } else {
417+ /* File must exist. Attempt to construct from hash_path */
418+ char *path;
419+
420+ if ((path = fh_buildpath(h, basedev)) == NULL) {
421+#ifdef FHTRACE
422+ Dprintf(D_FHTRACE, "fh_find: stale fh (hash path)\n");
423+ Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
424+#endif
425+ free(fhc);
426+ ex_state = inactive;
427+ return NULL;
428+ }
429+ fhc->path = path;
430+ }
431+ fhc->flags = 0;
432+ if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
433+ if (re_export && nfsmounted(fhc->path, &fhc->attrs))
434+ fhc->flags |= FHC_NFSMOUNTED;
435+ fhc->flags |= FHC_ATTRVALID;
436+ }
437+ fhc->fd = -1;
438+ fhc->last_used = curtime;
439+ fhc->h = *h;
440+ fhc->last_clnt = NULL;
441+ fhc->last_mount = NULL;
442+ fhc->last_uid = (uid_t)-1;
443+ fhc->fd_next = fhc->fd_prev = NULL;
444+ fh_inserthead(fhc);
445+ Dprintf(D_FHCACHE,
446+ "fh_find: created new handle %x (path `%s' ino:%x dev:%x)\n",
447+ fhc, fhc->path ? fhc->path : "<unnamed>", fhc->h.ino, fhc->h.dev);
448+ ex_state = inactive;
449+ if (fh_list_size > FH_CACHE_LIMIT)
450+ flush_cache(0);
451+#ifdef FHTRACE
452+ if (fhc->h.hash_path[0] == 0xFF) {
453+ Dprintf(L_ERROR, "newly created fh instantly flushed?!");
454+ return NULL;
455+ }
456+#endif
457+ return (fhc);
458+}
459+
460+fhcache *
461+fh_find(svc_fh *h, int mode, dev_t basedev)
462 {
463- register fhcache *fhc, *flush;
464+ register fhcache *fhc;
465 int check;
466
467 check = (mode & FHFIND_CHECK);
468@@ -877,12 +980,12 @@
469
470 ex_state = active;
471 time(&curtime);
472- while ((fhc = fh_lookup(h->psi)) != NULL) {
473+ while ((fhc = fh_lookup(h->ino,h->dev)) != NULL) {
474 struct stat sbuf, *s = NULL;
475 nfsstat dummy;
476
477- Dprintf(D_FHCACHE, "fh_find: psi=%lx... found '%s', fd=%d\n",
478- (unsigned long) h->psi,
479+ Dprintf(D_FHCACHE, "fh_find: (%u,%u)... found '%s', fd=%d\n",
480+ h->ino, h->dev,
481 fhc->path ? fhc->path : "<unnamed>",
482 fhc->fd);
483
484@@ -905,6 +1008,7 @@
485 Dprintf(D_FHTRACE,
486 "fh_find: stale fh: lstat: %m\n");
487 } else {
488+ int mp = 0;
489 /* If device/ino don't match, fhc->path may
490 * be a mount point (hence lstat() returns
491 * a different inode number than the readdir()
492@@ -915,19 +1019,26 @@
493
494 /* Get the dev/ino of the underlying
495 * mount point. */
496- path_psi(fhc->path, &dummy, s, 1);
497- if (fh_attrmatch(fhc, s))
498- goto fh_return;
499+ if (path_psi(fhc->path, &dummy, s, 1, &mp) &&
500+ fh_attrmatch(fhc, s)) {
501+ if (!mp)
502+ Dprintf(D_FHTRACE,"fh_find: should be mount point %x,%x\n",
503+ h->dev,h->ino);
504+
505+ }
506
507- Dprintf(D_FHTRACE, "fh_find: stale fh: %lx",
508- (unsigned long) h->psi);
509+ Dprintf(D_FHTRACE, "fh_find: stale fh: "
510+ "dev/ino %x/%lx ino:%x dev:%x",
511+ s->st_dev, s->st_ino,
512+ (unsigned)h->ino, (unsigned)h->dev);
513 }
514
515 fh_discard:
516 #ifdef FHTRACE
517 Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
518 #endif
519- Dprintf(D_FHCACHE, "fh_find: delete cached handle\n");
520+ Dprintf(D_FHCACHE, "fh_find: delete cached handle %x,%x <%x>\n",
521+ fhc->h.dev,fhc->h.ino,fhc->path ? fhc->path : "no path");
522 fh_delete(fhc);
523 break;
524 }
525@@ -947,88 +1058,13 @@
526 return (fhc);
527 }
528
529- Dprintf(D_FHCACHE, "fh_find: psi=%lx... not found\n",
530- (unsigned long) h->psi);
531-
532- if (mode == FHFIND_FCACHED) {
533- ex_state = inactive;
534- return NULL;
535- }
536-
537- for (flush = fh_tail.prev; fh_list_size > FH_CACHE_LIMIT; flush = fhc) {
538- /* Don't flush current head. */
539- if (flush == &fh_head)
540- break;
541- fhc = flush->prev;
542- fh_delete(flush);
543- }
544-
545- fhc = (fhcache *) xmalloc(sizeof *fhc);
546- if (mode == FHFIND_FCREATE) {
547- /* File will be created */
548- fhc->path = NULL;
549- } else {
550- /* File must exist. Attempt to construct from hash_path */
551- char *path;
552-
553- if ((path = fh_buildpath(h)) == NULL) {
554-#ifdef FHTRACE
555- Dprintf(D_FHTRACE, "fh_find: stale fh (hash path)\n");
556- Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
557-#endif
558- free(fhc);
559- ex_state = inactive;
560- return NULL;
561- }
562- fhc->path = path;
563- }
564-
565- fhc->flags = 0;
566- if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
567- if (nfsmounted(fhc->path, &fhc->attrs)) {
568- fhc->flags |= FHC_NFSMOUNTED;
569-#if 0
570- /* We must allow the client to send us the
571- * file handle for the NFS mount point itself,
572- * but not for entries within an NFS mount.
573- * XXX: needs fixing.
574- */
575- if (!re_export) {
576- Dprintf(D_FHTRACE,
577- "Attempt to use %s (non-exportable)\n",
578- fhc->path);
579- free(fhc);
580- ex_state = inactive;
581- return NULL;
582- }
583-#endif
584- }
585- fhc->flags |= FHC_ATTRVALID;
586- fhc->dev = fhc->attrs.st_dev;
587- fhc->ino = fhc->attrs.st_ino;
588- fhc->type = fhc->attrs.st_mode & S_IFMT;
589- }
590- fhc->fd = -1;
591- fhc->last_used = curtime;
592- fhc->h = *h;
593- fhc->last_clnt = NULL;
594- fhc->last_mount = NULL;
595- fhc->last_uid = (uid_t)-1;
596- fhc->fd_next = fhc->fd_prev = NULL;
597- fh_inserthead(fhc);
598- Dprintf(D_FHCACHE,
599- "fh_find: created new handle %x (path `%s' psi %08x)\n",
600- fhc, fhc->path ? fhc->path : "<unnamed>", fhc->h.psi);
601 ex_state = inactive;
602- if (fh_list_size > FH_CACHE_LIMIT)
603- flush_cache(0);
604-#ifdef FHTRACE
605- if (fhc->h.hash_path[0] == 0xFF) {
606- Dprintf(L_ERROR, "newly created fh instantly flushed?!");
607+
608+ Dprintf(D_FHCACHE, "fh_find: (%u,%u) ... not found\n",
609+ h->ino, h->dev);
610+ if (mode == FHFIND_FCACHED)
611 return NULL;
612- }
613-#endif
614- return (fhc);
615+ return fh_newfh(h, mode, basedev);
616 }
617
618 /*
619@@ -1040,7 +1076,7 @@
620 {
621 fhcache *h;
622
623- if ((h = fh_find((svc_fh *) fh, FHFIND_FCACHED)) == NULL)
624+ if ((h = fh_find((svc_fh *) fh, FHFIND_FCACHED, 0)) == NULL)
625 return fh_dump((svc_fh *) fh);
626 return (h->path);
627 }
628@@ -1050,10 +1086,10 @@
629 {
630 static char buf[65];
631 char *sp;
632- int i, n = fh->hash_path[0];
633+ int i, n = fh->hash_path[0], l;
634
635- sprintf(buf, "%08x %02x ", fh->psi, fh->hash_path[0]);
636- for (i = 1, sp = buf + 12; i <= n && i < HP_LEN; i++, sp += 2)
637+ l = sprintf(buf, "%08x %04x %02x ", fh->ino, fh->dev, fh->hash_path[0]);
638+ for (i = 1, sp = buf + l; i <= n && i < HP_LEN; i++, sp += 2)
639 sprintf(sp, "%02x", fh->hash_path[i]);
640 return buf;
641 }
642@@ -1082,7 +1118,7 @@
643
644 memset(&key, 0, sizeof(key));
645 status = NFS_OK;
646- if ((psi = path_psi("/", &status, &stb, 0)) == 0)
647+ if ((psi = path_psi("/", &status, &stb, 0, NULL)) == 0)
648 return ((int) status);
649
650 s = path;
651@@ -1091,7 +1127,7 @@
652 return ((int) NFSERR_NAMETOOLONG);
653 key.hash_path[key.hash_path[0]] = hash_psi(psi);
654 *s = '\0';
655- if ((psi = path_psi(path, &status, &stb, 0)) == 0)
656+ if ((psi = path_psi(path, &status, &stb, 0, NULL)) == 0)
657 return ((int) status);
658 *s = '/';
659 }
660@@ -1099,11 +1135,12 @@
661 if (++(key.hash_path[0]) >= HP_LEN)
662 return ((int) NFSERR_NAMETOOLONG);
663 key.hash_path[key.hash_path[0]] = hash_psi(psi);
664- if ((psi = path_psi(path, &status, &stb, 0)) == 0)
665+ if ((psi = path_psi(path, &status, &stb, 0, NULL)) == 0)
666 return ((int) status);
667 }
668- key.psi = psi;
669- h = fh_find(&key, FHFIND_FCREATE);
670+ key.dev = stb.st_dev;
671+ key.ino = stb.st_ino;
672+ h = fh_find(&key, FHFIND_FCREATE, 0);
673
674 #ifdef FHTRACE
675 if (!h)
676@@ -1123,6 +1160,7 @@
677 return ((int) status);
678 }
679
680+#if 0
681 char *
682 fh_path(nfs_fh *fh, nfsstat *status)
683 {
684@@ -1135,6 +1173,7 @@
685 *status = NFS_OK;
686 return (h->path);
687 }
688+#endif
689
690 nfs_fh *
691 fh_handle(fhcache *h)
692@@ -1349,7 +1388,7 @@
693 if (sbp == NULL)
694 sbp = &sbuf;
695
696- if ((dirh = fh_find((svc_fh *) &dopa->dir, FHFIND_FEXISTS)) == NULL)
697+ if ((dirh = fh_find((svc_fh *) &dopa->dir, FHFIND_FEXISTS, 0)) == NULL)
698 return NFSERR_STALE;
699
700 /*
701@@ -1419,8 +1458,22 @@
702
703 *new_fh = dopa->dir;
704 key = (svc_fh *) new_fh;
705- if ((key->psi = path_psi_m(pathbuf, &ret, sbp, &smount, 0)) == 0)
706+
707+ if (path_psi_m(pathbuf, &ret, sbp, &smount, 0, NULL) == 0)
708 return (ret);
709+ key->ino = sbp->st_ino;
710+ key->dev = sbp->st_dev;
711+
712+ if (sbp->st_dev != dirh->h.dev) {
713+ nfs_mount *mp = dirh->last_mount;
714+ if (!mp)
715+ Dprintf(L_ERROR, "no last mount in fh_compose for %s\n", pathbuf);
716+ else if (auth_checkdev(mp, sbp->st_dev) == 0) {
717+ Dprintf(L_ERROR, "access to no cross path below mountpoint (<%s>, %x<->%x)\n",
718+ pathbuf, mp->mount_dev, sbp->st_dev);
719+ return NFSERR_STALE;
720+ }
721+ }
722
723 if (is_dd) {
724 /* Don't cd .. from root, or mysterious ailments will
725@@ -1430,11 +1483,12 @@
726 } else {
727 if (++(key->hash_path[0]) >= HP_LEN)
728 return NFSERR_NAMETOOLONG;
729- key->hash_path[key->hash_path[0]] = hash_psi(dirh->h.psi);
730+ key->hash_path[key->hash_path[0]] = hash_psi(pseudo_inode(dirh->h.ino,
731+ dirh->h.dev));
732 }
733 /* FIXME: when crossing a mount point, we'll find the real
734 * dev/ino in sbp and can store it in h... */
735- h = fh_find(key, FHFIND_FCREATE);
736+ h = fh_find(key, FHFIND_FCREATE, 0);
737
738 #ifdef FHTRACE
739 if (h == NULL)
740@@ -1456,7 +1510,7 @@
741 /* We must have cached an old file under the same inode # */
742 Dprintf(D_FHTRACE, "Disposing of fh with bad path.\n");
743 fh_delete(h);
744- h = fh_find(key, FHFIND_FCREATE);
745+ h = fh_find(key, FHFIND_FCREATE, dirh->last_mount ? dirh->last_mount->mount_dev : 0);
746 #ifdef FHTRACE
747 if (!h) return NFSERR_STALE;
748 #endif
749@@ -1511,12 +1565,14 @@
750 return (NFS_OK);
751 }
752
753+#if 0
754 psi_t
755 fh_psi(nfs_fh *fh)
756 {
757 svc_fh *h = (svc_fh *) fh;
758 return (h->psi);
759 }
760+#endif
761
762 void
763 fh_remove(char *path)
764@@ -1524,12 +1580,13 @@
765 psi_t psi;
766 nfsstat status;
767 fhcache *fhc;
768+ struct stat st;
769
770- psi = path_psi(path, &status, NULL, 0);
771+ psi = path_psi(path, &status, &st, 0, NULL);
772 if (psi == 0)
773 return;
774 ex_state = active;
775- fhc = fh_lookup(psi);
776+ fhc = fh_lookup(st.st_ino,st.st_dev);
777 if (fhc != NULL)
778 fh_delete(fhc);
779
780@@ -1634,6 +1691,11 @@
781 fh_init(void)
782 {
783 static int initialized = 0;
784+
785+ if (sizeof(svc_fh) > 32) {
786+ fprintf(stderr, "filehandle wrong size %d\n", sizeof(svc_fh));
787+ exit(10);
788+ }
789
790 if (initialized)
791 return;
792--- nfs-server/fh.h
793+++ nfs-server/fh.h 2002/11/08 13:59:16
794@@ -20,6 +20,7 @@
795 #define FHC_XONLY_PATH 001 /* NOT USED ANYMORE */
796 #define FHC_ATTRVALID 002
797 #define FHC_NFSMOUNTED 004
798+#define FHC_CROSS 010
799
800 /* Modes for fh_find */
801 #define FHFIND_FEXISTS 0 /* file must exist */
802@@ -65,11 +66,12 @@
803 *
804 * hash_path[hash_path[0]+1] ... hash_path[HP_LEN-1] == 0
805 */
806-#define HP_LEN (NFS_FHSIZE - sizeof(psi_t))
807+#define HP_LEN (NFS_FHSIZE-sizeof(u_int32_t)-sizeof(u_int16_t))
808 typedef struct {
809- psi_t psi;
810+ u_int32_t ino;
811+ u_int16_t dev;
812 __u8 hash_path[HP_LEN];
813-} svc_fh;
814+} svc_fh __attribute__((packed));
815
816 typedef enum { inactive, active } mutex;
817
818@@ -100,6 +102,7 @@
819
820 /* These are fixed during the lifetime of this object */
821 svc_fh h;
822+ psi_t psi;
823 dev_t dev;
824 ino_t ino;
825 mode_t type; /* st_mode & S_IFMT */
826@@ -122,10 +125,11 @@
827 /* Global function prototypes. */
828 extern nfsstat nfs_errno(void);
829 extern psi_t pseudo_inode(ino_t inode, dev_t dev);
830+extern psi_t visible_inode(ino_t inode, dev_t dev, nfs_mount *);
831 extern void fh_init(void);
832 extern char *fh_pr(nfs_fh *fh);
833 extern int fh_create(nfs_fh *fh, char *path);
834-extern fhcache *fh_find(svc_fh *h, int create);
835+extern fhcache *fh_find(svc_fh *h, int create, dev_t basedev);
836 extern char *fh_path(nfs_fh *fh, nfsstat *status);
837 extern int path_open(char *path, int omode, int perm);
838 extern int fh_fd(fhcache *fhc, nfsstat *status, int omode);
839@@ -139,6 +143,7 @@
840 extern void fh_flush(int force);
841 extern RETSIGTYPE flush_cache(int sig);
842 extern int nfsmounted(const char *path, struct stat *sbp);
843+extern fhcache *fh_newfh(svc_fh *fh, int mode, dev_t basedev);
844
845 #ifdef ENABLE_DEVTAB
846 extern unsigned int devtab_index(dev_t);
847--- nfs-server/getattr.c
848+++ nfs-server/getattr.c 2002/11/08 13:59:16
849@@ -43,7 +43,7 @@
850 {
851 fhcache *fhc;
852
853- if ((fhc = fh_find((svc_fh*)fh, FHFIND_FEXISTS)) == NULL) {
854+ if ((fhc = fh_find((svc_fh*)fh, FHFIND_FEXISTS, 0)) == NULL) {
855 Dprintf(D_CALL, "getattr: failed! No such file.\n");
856 return (NFSERR_STALE);
857 }
858@@ -103,18 +103,8 @@
859 #else
860 attr->blocks = st_blocks(s);
861 #endif
862-#if 0
863- if (nfsmount->o.cross_mounts) {
864- attr->fsid = 1;
865- attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
866- } else {
867- attr->fsid = s->st_dev;
868- attr->fileid = covered_ino(fhc->path);
869- }
870-#else
871- attr->fsid = 1;
872- attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
873-#endif
874+ attr->fsid = 1; // XXX
875+ attr->fileid = visible_inode(fhc->h.ino, fhc->h.dev, nfsmount);
876
877 /* This may be needed by some Suns... testing */
878 #define MINTIME (24 * 2600)
879--- nfs-server/mountd.c
880+++ nfs-server/mountd.c 2002/11/08 13:59:16
881@@ -36,6 +36,8 @@
882 #include "signals.h"
883 #include <rpc/pmap_clnt.h>
884
885+int cross_mounts = 1;
886+int hashed_inodes; /* dummy */
887
888 static void usage(FILE *, int);
889 static void terminate(void);
890@@ -58,9 +60,9 @@
891 { "no-spoof-trace", 0, 0, 't' },
892 { "version", 0, 0, 'v' },
893 { "fail-safe", optional_argument, 0, 'z' },
894+ { "no-cross-mounts", 0, 0, 'x' },
895 { "no-tcp", 0, 0, OPT_NOTCP },
896 { "loopback-only", 0, 0, OPT_LOOPBACK },
897-
898 { NULL, 0, 0, 0 }
899 };
900 static const char * shortopts = "Fd:f:hnpP:rtvz::";
901@@ -80,6 +82,7 @@
902 int need_reinit = 0;
903 int need_flush = 0;
904 extern char version[];
905+nfs_client *nfsclient; /* dummy */
906
907 /*
908 * NULL
909@@ -319,6 +322,9 @@
910 opterr = 0;
911 while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != EOF)
912 switch (c) {
913+ case 'x':
914+ cross_mounts = 0;
915+ break;
916 case 'F':
917 foreground = 1;
918 break;
919@@ -444,7 +450,7 @@
920 program_name);
921 fprintf(fp, " [--debug kind] [--help] [--allow-non-root]\n");
922 fprintf(fp, " [--promiscuous] [--version] [--port portnum]\n");
923- fprintf(fp, " [--exports-file=file]\n");
924+ fprintf(fp, " [--exports-file=file] [--no-cross-mounts]\n");
925 exit(n);
926 }
927
928--- nfs-server/nfsd.c
929+++ nfs-server/nfsd.c 2002/11/08 14:20:57
930@@ -72,7 +72,7 @@
931 { "no-tcp", 0, 0, OPT_NOTCP },
932 { "udp-only", 0, 0, OPT_NOTCP },
933 { "loopback-only", 0, 0, OPT_LOOPBACK },
934-
935+ { "hashed-inodes", 0, 0, 'I' },
936 { NULL, 0, 0, 0 }
937 };
938 static const char * shortopts = "a:d:Ff:hlnP:prR:tvz::";
939@@ -91,6 +91,7 @@
940 int need_flush = 0; /* flush fh cache */
941 int read_only = 0; /* Global ro forced */
942 int cross_mounts = 1; /* Transparently cross mnts */
943+int hashed_inodes = 0;
944 int log_transfers = 0; /* Log transfers */
945 static svc_fh public_fh; /* Public NFSv2 FH */
946
947@@ -122,12 +123,17 @@
948 {
949 static int total = 0, cached = 0;
950 fhcache *fhc;
951+ int newfh = 0;
952
953- /* Try to map FH. If not cached, reconstruct path with root priv */
954- fhc = fh_find((svc_fh *)fh, FHFIND_FEXISTS|FHFIND_CHECK);
955- if (fhc == NULL) {
956- *statp = NFSERR_STALE;
957- return NULL;
958+ /* Try to map FH. */
959+ fhc = fh_find((svc_fh *)fh, FHFIND_FCACHED|FHFIND_CHECK, 0);
960+ if (!fhc) {
961+ fhc = fh_newfh((svc_fh*)fh, FHFIND_FEXISTS|FHFIND_CHECK, 0);
962+ if (!fhc) {
963+ *statp = NFSERR_STALE;
964+ return NULL;
965+ }
966+ newfh = 1;
967 }
968
969 /* Try to retrieve last client who accessed this fh */
970@@ -163,6 +169,16 @@
971 100 * (double) cached / total);
972 */
973
974+ /* Trust the crossmount check of the parent directory for creates */
975+ if (newfh &&
976+ (fhc->flags & FHC_ATTRVALID) &&
977+ auth_checkdev(nfsmount, fhc->attrs.st_dev) == 0) {
978+ Dprintf(L_ERROR, "auth_fh: fh crossed mount %s: %x<->%x\n",
979+ fhc->path ? fhc->path : "???", nfsmount->mount_dev, fhc->attrs.st_dev);
980+ *statp = NFSERR_STALE; /* or ACCES? */
981+ return NULL;
982+ }
983+
984 if (nfsmount->o.noaccess &&
985 ((flags & CHK_NOACCESS) || strcmp(nfsmount->path, fhc->path))) {
986 struct in_addr addr = svc_getcaller(rqstp->rq_xprt)->sin_addr;
987@@ -195,6 +211,7 @@
988 fhcache *fhc;
989 nfsstat status;
990 char *path = buf, *sp;
991+ struct stat st;
992
993 /* Authenticate directory file handle */
994 if ((fhc = auth_fh(rqstp, &dopa->dir, &status, flags)) == NULL)
995@@ -219,6 +236,9 @@
996 if ((nfsmount = auth_path(nfsclient, rqstp, path)) == NULL)
997 return NFSERR_ACCES;
998
999+ if (efs_lstat(path, &st) >= 0 && !auth_checkdev(nfsmount, st.st_dev))
1000+ return NFSERR_ACCES;
1001+
1002 /* XXX: really need to call it again here?
1003 * Already invoked in auth_fh */
1004 if (!auth_user(nfsmount, rqstp))
1005@@ -318,7 +338,8 @@
1006 int ispublic = 0;
1007
1008 /* First check whether this is the public FH */
1009- if (((svc_fh *) fh)->psi == 0 && !memcmp(fh, &public_fh, FHSIZE)) {
1010+ if (((svc_fh *) fh)->dev == 0 && ((svc_fh*)fh)->ino == 0 &&
1011+ !memcmp(fh, &public_fh, FHSIZE)) {
1012 if (public_root_path == NULL)
1013 return NFSERR_ACCES;
1014 memcpy(&argp->dir, &public_root, NFS_FHSIZE);
1015@@ -333,6 +354,7 @@
1016 if (!(fhc = auth_fh(rqstp, fh, &status, CHK_READ)))
1017 return status;
1018
1019+ /* FIXME: does too many stats */
1020 status = fh_compose(argp, &dp->file, &sbuf, -1, -1, ispublic);
1021 if (status != NFS_OK)
1022 return status;
1023@@ -896,6 +918,9 @@
1024 errno = 0;
1025 if (efs_lstat(h->path, &sbuf) < 0 || !(S_ISDIR(sbuf.st_mode)))
1026 return (NFSERR_NOTDIR);
1027+ if (!auth_checkdev(h->last_mount, sbuf.st_dev))
1028+ dotsonly = 1;
1029+
1030 if ((dirp = efs_opendir(h->path)) == NULL)
1031 return ((errno ? nfs_errno() : NFSERR_NAMETOOLONG));
1032
1033@@ -923,7 +948,7 @@
1034 }
1035
1036 e = *ep = (entry *) xmalloc(sizeof(entry));
1037- e->fileid = pseudo_inode(dp->d_ino, sbuf.st_dev);
1038+ e->fileid = visible_inode(dp->d_ino, sbuf.st_dev, h->last_mount);
1039 e->name = xmalloc(NLENGTH(dp) + 1);
1040 strcpy(e->name, dp->d_name);
1041 dloc = htonl(efs_telldir(dirp));
1042@@ -1033,6 +1058,9 @@
1043 case 'x':
1044 cross_mounts = 0;
1045 break;
1046+ case 'I':
1047+ hashed_inodes = 1;
1048+ break;
1049 case 'z':
1050 if (optarg)
1051 failsafe_level = atoi(optarg);
1052@@ -1189,7 +1217,7 @@
1053 " [--debug kind] [--exports-file=file] [--port port]\n"
1054 " [--allow-non-root] [--promiscuous] [--version] [--foreground]\n"
1055 " [--re-export] [--log-transfers] [--public-root path]\n"
1056-" [--no-spoof-trace] [--help]\n"
1057+" [--no-spoof-trace] [--no-cross-mounts] [--hashed-inodes] [--help]\n"
1058 , program_name);
1059 exit(n);
1060 }
1061--- nfs-server/nfsd.h
1062+++ nfs-server/nfsd.h 2002/11/08 13:59:16
1063@@ -51,6 +51,7 @@
1064 extern int need_reinit;
1065 extern int need_flush;
1066 extern time_t nfs_dispatch_time;
1067+extern int cross_mounts, hashed_inodes;
1068
1069 /* Include the other module definitions. */
1070 #include "auth.h"
1071--- nfs-server/setattr.c
1072+++ nfs-server/setattr.c 2002/11/08 13:59:16
1073@@ -17,6 +17,7 @@
1074
1075 #define IGNORE_TIME ((unsigned int) -1)
1076
1077+#if 0
1078 /*
1079 * Set file attributes based on file handle
1080 */
1081@@ -33,6 +34,7 @@
1082 }
1083 return setattr(path, attr, s, rqstp, flags);
1084 }
1085+#endif
1086
1087 /*
1088 * Set file attributes given the path. The flags argument
1089--- nfs-server/teahash3.c
1090+++ nfs-server/teahash3.c 2002/11/08 13:59:16
1091@@ -0,0 +1,168 @@
1092+/* Taken from the reiserfs source code and hacked slightly by AK.
1093+ * This is GPLed. */
1094+/*
1095+ * Keyed 32-bit hash function using TEA in a Davis-Meyer function
1096+ * H0 = Key
1097+ * Hi = E Mi(Hi-1) + Hi-1
1098+ *
1099+ * (see Applied Cryptography, 2nd edition, p448).
1100+ *
1101+ * Jeremy Fitzhardinge <jeremy@zip.com.au> 1998
1102+ *
1103+ * Jeremy has agreed to the contents of reiserfs/README. -Hans
1104+ */
1105+
1106+#include <assert.h>
1107+
1108+#if 0
1109+/* OK for Intel */
1110+typedef unsigned long u32;
1111+typedef const unsigned char u8;
1112+#else
1113+#include <inttypes.h>
1114+typedef uint32_t u32;
1115+typedef uint8_t u8;
1116+#endif
1117+
1118+
1119+#define DELTA 0x9E3779B9
1120+#define FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */
1121+#define PARTROUNDS 6 /* 6 gets complete mixing */
1122+
1123+/* a, b, c, d - data; h0, h1 - accumulated hash */
1124+#define TEACORE(rounds) \
1125+ do { \
1126+ u32 sum = 0; \
1127+ int n = rounds; \
1128+ u32 b0, b1; \
1129+ \
1130+ b0 = h0; \
1131+ b1 = h1; \
1132+ \
1133+ do \
1134+ { \
1135+ sum += DELTA; \
1136+ b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b); \
1137+ b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d); \
1138+ } while(--n); \
1139+ \
1140+ h0 += b0; \
1141+ h1 += b1; \
1142+ } while(0)
1143+
1144+u32 teahash3(/*u32 k[2], *//*u8*/const char *msg, int len)
1145+{
1146+ u32 k[] = { 0x9464a485, 0x542e1a94, 0x3e846bff, 0xb75bcfc3};
1147+
1148+ u32 h0 = k[0], h1 = k[1];
1149+ u32 a, b, c, d;
1150+ u32 pad;
1151+ int i;
1152+
1153+ assert(len >= 0 && len < 256);
1154+
1155+ pad = (u32)len | ((u32)len << 8);
1156+ pad |= pad << 16;
1157+
1158+ while(len >= 16)
1159+ {
1160+ a = (u32)msg[ 0] |
1161+ (u32)msg[ 1] << 8 |
1162+ (u32)msg[ 2] << 16|
1163+ (u32)msg[ 3] << 24;
1164+ b = (u32)msg[ 4] |
1165+ (u32)msg[ 5] << 8 |
1166+ (u32)msg[ 6] << 16|
1167+ (u32)msg[ 7] << 24;
1168+ c = (u32)msg[ 8] |
1169+ (u32)msg[ 9] << 8 |
1170+ (u32)msg[10] << 16|
1171+ (u32)msg[11] << 24;
1172+ d = (u32)msg[12] |
1173+ (u32)msg[13] << 8 |
1174+ (u32)msg[14] << 16|
1175+ (u32)msg[15] << 24;
1176+
1177+ TEACORE(PARTROUNDS);
1178+
1179+ len -= 16;
1180+ msg += 16;
1181+ }
1182+
1183+ if (len >= 12)
1184+ {
1185+ assert(len < 16);
1186+
1187+ a = (u32)msg[ 0] |
1188+ (u32)msg[ 1] << 8 |
1189+ (u32)msg[ 2] << 16|
1190+ (u32)msg[ 3] << 24;
1191+ b = (u32)msg[ 4] |
1192+ (u32)msg[ 5] << 8 |
1193+ (u32)msg[ 6] << 16|
1194+ (u32)msg[ 7] << 24;
1195+ c = (u32)msg[ 8] |
1196+ (u32)msg[ 9] << 8 |
1197+ (u32)msg[10] << 16|
1198+ (u32)msg[11] << 24;
1199+
1200+ d = pad;
1201+ for(i = 12; i < len; i++)
1202+ {
1203+ d <<= 8;
1204+ d |= msg[i];
1205+ }
1206+ }
1207+ else if (len >= 8)
1208+ {
1209+ assert(len < 12);
1210+
1211+ a = (u32)msg[ 0] |
1212+ (u32)msg[ 1] << 8 |
1213+ (u32)msg[ 2] << 16|
1214+ (u32)msg[ 3] << 24;
1215+ b = (u32)msg[ 4] |
1216+ (u32)msg[ 5] << 8 |
1217+ (u32)msg[ 6] << 16|
1218+ (u32)msg[ 7] << 24;
1219+
1220+ c = d = pad;
1221+ for(i = 8; i < len; i++)
1222+ {
1223+ c <<= 8;
1224+ c |= msg[i];
1225+ }
1226+ }
1227+ else if (len >= 4)
1228+ {
1229+ assert(len < 8);
1230+
1231+ a = (u32)msg[ 0] |
1232+ (u32)msg[ 1] << 8 |
1233+ (u32)msg[ 2] << 16|
1234+ (u32)msg[ 3] << 24;
1235+
1236+ b = c = d = pad;
1237+ for(i = 4; i < len; i++)
1238+ {
1239+ b <<= 8;
1240+ b |= msg[i];
1241+ }
1242+ }
1243+ else
1244+ {
1245+ assert(len < 4);
1246+
1247+ a = b = c = d = pad;
1248+ for(i = 0; i < len; i++)
1249+ {
1250+ a <<= 8;
1251+ a |= msg[i];
1252+ }
1253+ }
1254+
1255+ TEACORE(FULLROUNDS);
1256+
1257+/* return 0;*/
1258+ return h0^h1;
1259+}
1260--- nfs-server/ugid_map.c
1261+++ nfs-server/ugid_map.c 2002/11/08 13:59:16
1262@@ -276,8 +276,10 @@
1263 if ((gid == 0 && mountp->o.root_squash) || mountp->o.all_squash)
1264 retgid = mountp->o.nobody_gid;
1265
1266+#if 0
1267 Dprintf(D_UGID, "lgid(%s, %d) = %d\n",
1268 inet_ntoa(mountp->client->clnt_addr), gid, retgid);
1269+#endif
1270 return retgid;
1271 }
1272
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/007-map.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/007-map.patch
new file mode 100644
index 0000000000..89baabe1c2
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/007-map.patch
@@ -0,0 +1,78 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/auth.c
4+++ nfs-server/auth.c 2002/11/08 12:49:13
5@@ -595,7 +595,6 @@
6 cp->clnt_addr.s_addr = INADDR_ANY;
7 cp->flags = 0;
8 cp->m = NULL;
9- cp->umap = NULL;
10
11 if (hname == NULL) {
12 if (anonymous_client != NULL) {
13@@ -1200,10 +1199,9 @@
14 free (mp->path);
15 if (mp->o.clnt_nisdomain)
16 free(mp->o.clnt_nisdomain);
17+ if (mp->umap)
18+ ugid_free_map(mp->umap);
19 free (mp);
20- }
21- if (cp->umap != NULL) {
22- ugid_free_map(cp->umap);
23 }
24 free (cp);
25 }
26--- nfs-server/auth.h
27+++ nfs-server/auth.h 2002/11/08 12:50:24
28@@ -66,6 +66,11 @@
29 char * path;
30 nfs_options o;
31 dev_t mount_dev;
32+ /*
33+ * This is the uid/gid map.
34+ * See ugid_map.c for details
35+ */
36+ struct ugid_map * umap;
37 /* Original NFS client */
38 struct nfs_client * origin;
39 } nfs_mount;
40@@ -77,12 +82,6 @@
41 char * clnt_name;
42 unsigned short flags;
43 nfs_mount * m;
44-
45- /*
46- * This is the uid/gid map.
47- * See ugid_map.c for details
48- */
49- struct ugid_map * umap;
50 } nfs_client;
51
52 #define AUTH_CLNT_WILDCARD 0x0001
53--- nfs-server/ugid_map.c
54+++ nfs-server/ugid_map.c 2002/11/08 12:49:14
55@@ -401,12 +401,11 @@
56 static ugid_map *
57 ugid_get_map(nfs_mount *mountp)
58 {
59- nfs_client *clientp = mountp->client;
60 struct ugid_map *umap;
61 unsigned int how;
62
63- if (clientp->umap == NULL) {
64- clientp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
65+ if (mountp->umap == NULL) {
66+ mountp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
67 memset(umap, 0, sizeof(ugid_map));
68
69 for (how = 0; how < 4; how++) {
70@@ -415,7 +414,7 @@
71 }
72 }
73
74- return clientp->umap;
75+ return mountp->umap;
76 }
77
78 static void
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/008-configure.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/008-configure.patch
new file mode 100644
index 0000000000..a6d45993ee
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/008-configure.patch
@@ -0,0 +1,13 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/configure.in 2002/11/08 14:24:55 1.1
4+++ nfs-server/configure.in 2002/11/08 14:25:27
5@@ -98,7 +98,7 @@
6 fi
7 if test "$enable_ugid_dynamic" = yes; then
8 AC_DEFINE(ENABLE_UGID_DAEMON)
9- UGIDD_PROG=\${rpcprefix}.ugidd
10+ UGIDD_PROG=\${rpcprefix}ugidd
11 UGIDD_MAN=ugidd
12 fi
13 if test "$enable_ugid_nis" = yes; then
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/009-multirw.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/009-multirw.patch
new file mode 100644
index 0000000000..65b0b9eee5
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/009-multirw.patch
@@ -0,0 +1,15 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/nfsd.c
4+++ nfs-server/nfsd.c
5@@ -1133,8 +1133,8 @@
6 }
7 }
8
9- if (ncopies > 1)
10- read_only = 1;
11+ /* if (ncopies > 1)
12+ read_only = 1; */
13
14 /*
15 * We first fork off a child and detach from tty
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/010-realpath.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/010-realpath.patch
new file mode 100644
index 0000000000..c3b5d58151
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/010-realpath.patch
@@ -0,0 +1,30 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/configure.in
4+++ nfs-server/configure.in
5@@ -81,7 +81,7 @@
6 AC_CHECK_LIB(rpc, main)
7 AC_CHECK_LIB(crypt, main)
8 AC_CHECK_LIB(nys, main)
9-AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred)
10+AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred realpath)
11 AC_AUTHDES_GETUCRED
12 AC_BROKEN_SETFSUID
13 AC_MOUNTLIST
14--- nfs-server/realpath.c
15+++ nfs-server/realpath.c
16@@ -53,6 +53,8 @@
17
18 #define MAX_READLINKS 32
19
20+#ifndef HAVE_REALPATH
21+
22 #ifdef __STDC__
23 char *realpath(const char *path, char resolved_path [])
24 #else
25@@ -173,3 +175,5 @@
26 strcpy (resolved_path, got_path);
27 return resolved_path;
28 }
29+
30+#endif /* HAVE_REALPATH */
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/011-fno-strict-aliasing.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/011-fno-strict-aliasing.patch
new file mode 100644
index 0000000000..695b8c7d19
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/011-fno-strict-aliasing.patch
@@ -0,0 +1,13 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/Makefile.in
4+++ nfs-server/Makefile.in
5@@ -225,7 +225,7 @@
6 $(RPCGEN) -l -o $@ $?
7
8 nfs_prot_xdr.o: nfs_prot_xdr.c
9- $(COMPILE) $(RPC_WARNFLAGS) -c nfs_prot_xdr.c
10+ $(COMPILE) $(RPC_WARNFLAGS) -fno-strict-aliasing -c nfs_prot_xdr.c
11 mount_xdr.o: mount_xdr.c
12 $(COMPILE) $(RPC_WARNFLAGS) -c mount_xdr.c
13 mount_svc.o: mount_svc.c
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/012-nostrip.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/012-nostrip.patch
new file mode 100644
index 0000000000..a815ee4373
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/012-nostrip.patch
@@ -0,0 +1,13 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/Makefile.in.xx 2006-01-12 12:43:09.000000000 +0100
4+++ nfs-server/Makefile.in 2006-01-12 12:43:10.000000000 +0100
5@@ -64,7 +64,7 @@
6 NFSD_DEFS =
7
8 CFLAGS = @CFLAGS@
9-LDFLAGS = @LDFLAGS@ -s
10+LDFLAGS = @LDFLAGS@
11 WARNFLAGS = @WARNFLAGS@
12 RPC_WARNFLAGS = @RPC_WARNFLAGS@
13 TRANSPORTFLAGS = @RPCGEN_I@ -s udp -s tcp
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch
new file mode 100644
index 0000000000..1f10d3c941
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch
@@ -0,0 +1,32 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/mountd.c 2006/01/12 14:00:13 1.13
4+++ nfs-server/mountd.c 2006/01/12 14:37:35
5@@ -76,7 +76,7 @@
6 0
7 };
8
9-char argbuf[MNTPATHLEN + 1];
10+char argbuf[PATH_MAX + 1];
11 char *auth_file = NULL;
12 static char *program_name;
13 int need_reinit = 0;
14@@ -97,6 +97,9 @@
15 /*
16 * MOUNT
17 * This is what the whole protocol is all about
18+ *
19+ * Note: librpc gets us MNTPATHLEN length strings, but realpath
20+ * needs a PATH_MAX length output buffer.
21 */
22 fhstatus *
23 mountproc_mnt_1_svc(dirpath *argp, struct svc_req *rqstp)
24@@ -105,7 +108,7 @@
25 struct stat stbuf;
26 nfs_client *cp;
27 nfs_mount *mp;
28- char nargbuf[MNTPATHLEN + 1];
29+ char nargbuf[PATH_MAX + 1];
30 int saved_errno = 0;
31 #ifdef WANT_LOG_MOUNTS
32 struct in_addr addr;
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/014-uninitialized.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/014-uninitialized.patch
new file mode 100644
index 0000000000..233c08a2f3
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/014-uninitialized.patch
@@ -0,0 +1,12 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/mountd.c
4+++ nfs-server/mountd.c
5@@ -278,6 +278,7 @@
6 || (mp = auth_path(cp, rqstp, dir)) == NULL
7 || mp->o.noaccess) {
8 #ifdef WANT_LOG_MOUNTS
9+ addr = svc_getcaller(rqstp->rq_xprt)->sin_addr;
10 Dprintf(L_WARNING, "Blocked attempt of %s to pathconf(%s)\n",
11 inet_ntoa(addr), dir);
12 #endif /* WANT_LOG_MOUNTS */
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/015-setattr.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/015-setattr.patch
new file mode 100644
index 0000000000..cbfb8e8214
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/015-setattr.patch
@@ -0,0 +1,26 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/setattr.c.orig 2006-07-28 16:38:26.000000000 +0200
4+++ nfs-server/setattr.c 2006-07-28 16:42:28.000000000 +0200
5@@ -97,7 +97,20 @@
6 tvp[1].tv_sec = s->st_mtime;
7 tvp[1].tv_usec = 0;
8 }
9- if (efs_utimes(path, tvp) < 0)
10+ if (m_secs != IGNORE_TIME && attr->mtime.useconds == 1000000) {
11+ /*
12+ * from kernel/fs/nfsd/nfsxdr.c:
13+ * Passing the invalid value useconds=1000000 for mtime
14+ * is a Sun convention for "set both mtime and atime to
15+ * current server time". It's needed to make permissions
16+ * checks for the "touch" program across v2 mounts to
17+ * Solaris and Irix boxes work correctly. See description of
18+ * sattr in section 6.1 of "NFS Illustrated" by
19+ * Brent Callaghan, Addison-Wesley, ISBN 0-201-32750-5
20+ */
21+ if (utime(path, (struct utimbuf *)0) < 0)
22+ goto failure;
23+ } else if (efs_utimes(path, tvp) < 0)
24 goto failure;
25 }
26 }
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/016-makefile.in.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/016-makefile.in.patch
new file mode 100644
index 0000000000..634ce46090
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/016-makefile.in.patch
@@ -0,0 +1,14 @@
1# Makefile fix for staging to work correctly.
2# Scott Garman <scott.a.garman@intel.com>
3
4--- nfs-server-2.2beta47/Makefile.in.orig 2010-08-03 20:55:05.000000000 -0700
5+++ nfs-server-2.2beta47/Makefile.in 2010-08-03 20:55:42.000000000 -0700
6@@ -69,7 +69,7 @@
7 RPC_WARNFLAGS = @RPC_WARNFLAGS@
8 TRANSPORTFLAGS = @RPCGEN_I@ -s udp -s tcp
9
10-prefix = $(install_prefix)/usr
11+prefix = @prefix@
12 exec_prefix = $(prefix)
13
14 bindir = $(exec_prefix)/sbin
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/017-wrs-dynamic-rpc.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/017-wrs-dynamic-rpc.patch
new file mode 100644
index 0000000000..18e12de789
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/017-wrs-dynamic-rpc.patch
@@ -0,0 +1,258 @@
1# Add the ability to choose alternate RPC ports at runtime and disable
2# security so that it can run as a userland process
3# Patch origin: Wind River
4
5Index: nfs-server-2.2beta47/auth_init.c
6===================================================================
7--- nfs-server-2.2beta47.orig/auth_init.c
8+++ nfs-server-2.2beta47/auth_init.c
9@@ -409,6 +409,7 @@ auth_init(char *fname)
10 fname = EXPORTSFILE;
11 auth_file = fname; /* Save for re-initialization */
12
13+#ifdef ROOT_LEVEL_SECURITY
14 /* Check protection of exports file. */
15 switch(iCheckAccess(auth_file, EXPORTSOWNERUID, EXPORTSOWNERGID)) {
16 case FACCESSWRITABLE:
17@@ -424,6 +425,7 @@ auth_init(char *fname)
18 Dprintf(L_ERROR, "exiting because of security violation.\n");
19 exit(1);
20 }
21+#endif
22
23 if ((ef = fopen(fname, "r")) == NULL) {
24 Dprintf(L_ERROR, "Could not open exports file %s: %s\n",
25Index: nfs-server-2.2beta47/nfsd.c
26===================================================================
27--- nfs-server-2.2beta47.orig/nfsd.c
28+++ nfs-server-2.2beta47/nfsd.c
29@@ -46,6 +46,7 @@ static char pathbuf_1[NFS_MAXPATHLEN + N
30
31 extern char version[];
32 static char *program_name;
33+static int nfs_prog = NFS_PROGRAM;
34
35 /*
36 * Option table
37@@ -60,6 +61,7 @@ static struct option longopts[] = {
38 { "help", 0, 0, 'h' },
39 { "log-transfers", 0, 0, 'l' },
40 { "allow-non-root", 0, 0, 'n' },
41+ { "prog", required_argument, 0, 'g' },
42 { "port", required_argument, 0, 'P' },
43 { "promiscuous", 0, 0, 'p' },
44 { "re-export", 0, 0, 'r' },
45@@ -73,9 +75,10 @@ static struct option longopts[] = {
46 { "udp-only", 0, 0, OPT_NOTCP },
47 { "loopback-only", 0, 0, OPT_LOOPBACK },
48 { "hashed-inodes", 0, 0, 'I' },
49+ { "nfs-pid", required_argument, 0, 'N' },
50 { NULL, 0, 0, 0 }
51 };
52-static const char * shortopts = "a:d:Ff:hlnP:prR:tvz::";
53+static const char * shortopts = "a:d:Ff:g:hlnN:P:prR:tvz::";
54
55 /*
56 * Table of supported versions
57@@ -1003,6 +1006,8 @@ main(int argc, char **argv)
58 int failsafe_level = 0;
59 int c;
60 int i, ncopies = 1;
61+ char *nfs_pid_file = NULL;
62+
63
64 program_name = argv[0];
65 chdir("/");
66@@ -1026,9 +1031,15 @@ main(int argc, char **argv)
67 case 'f':
68 auth_file = optarg;
69 break;
70+ case 'g':
71+ nfs_prog = atoi(optarg);
72+ break;
73 case 'l':
74 log_transfers = 1;
75 break;
76+ case 'N':
77+ nfs_pid_file = strdup(optarg);
78+ break;
79 case 'n':
80 allow_non_root = 1;
81 break;
82@@ -1114,7 +1125,7 @@ main(int argc, char **argv)
83 log_open("nfsd", foreground);
84
85 /* Initialize RPC stuff */
86- rpc_init("nfsd", NFS_PROGRAM, nfsd_versions, nfs_dispatch,
87+ rpc_init("nfsd", nfs_prog, nfsd_versions, nfs_dispatch,
88 nfsport, NFS_MAXDATA);
89
90 if (_rpcpmstart) {
91@@ -1145,7 +1156,10 @@ main(int argc, char **argv)
92 /* Initialize the AUTH module. */
93 auth_init(auth_file);
94
95- setpidpath(_PATH_NFSD_PIDFILE);
96+ if (nfs_pid_file == 0)
97+ nfs_pid_file = _PATH_NFSD_PIDFILE;
98+ setpidpath(nfs_pid_file);
99+
100 if (failsafe_level == 0) {
101 /* Start multiple copies of the server */
102 writepid(getpid(), 1);
103@@ -1215,9 +1229,11 @@ usage(FILE *fp, int n)
104 fprintf(fp,
105 "Usage: %s [-Fhnpv] [-d kind] [-f exports-file] [-P port] [--version]\n"
106 " [--debug kind] [--exports-file=file] [--port port]\n"
107+" [--prog alternate_rpc_port_nubmer]\n"
108 " [--allow-non-root] [--promiscuous] [--version] [--foreground]\n"
109 " [--re-export] [--log-transfers] [--public-root path]\n"
110 " [--no-spoof-trace] [--no-cross-mounts] [--hashed-inodes] [--help]\n"
111+" [--nfs-pid file]\n"
112 , program_name);
113 exit(n);
114 }
115@@ -1234,7 +1250,7 @@ sigterm(int sig)
116 static void
117 terminate(void)
118 {
119- rpc_exit(NFS_PROGRAM, nfsd_versions);
120+ rpc_exit(nfs_prog, nfsd_versions);
121 efs_shutdown();
122 }
123
124Index: nfs-server-2.2beta47/mountd.c
125===================================================================
126--- nfs-server-2.2beta47.orig/mountd.c
127+++ nfs-server-2.2beta47/mountd.c
128@@ -42,6 +42,7 @@ int hashed_inodes; /* dummy */
129 static void usage(FILE *, int);
130 static void terminate(void);
131 static RETSIGTYPE sigterm(int sig);
132+int mount_prog = MOUNTPROG;
133
134 /*
135 * Option table for mountd
136@@ -55,6 +56,7 @@ static struct option longopts[] =
137 { "help", 0, 0, 'h' },
138 { "allow-non-root", 0, 0, 'n' },
139 { "port", required_argument, 0, 'P' },
140+ { "prog", required_argument, 0, 'g' },
141 { "promiscous", 0, 0, 'p' },
142 { "re-export", 0, 0, 'r' },
143 { "no-spoof-trace", 0, 0, 't' },
144@@ -63,9 +65,11 @@ static struct option longopts[] =
145 { "no-cross-mounts", 0, 0, 'x' },
146 { "no-tcp", 0, 0, OPT_NOTCP },
147 { "loopback-only", 0, 0, OPT_LOOPBACK },
148+ { "mount-pid", required_argument, 0, 'N' },
149+ { "rmtab", required_argument, 0, 'R' },
150 { NULL, 0, 0, 0 }
151 };
152-static const char * shortopts = "Fd:f:hnpP:rtvz::";
153+static const char * shortopts = "Fd:f:g:hnN:pP:rRtvz::";
154
155 /*
156 * Table of supported versions
157@@ -318,6 +322,7 @@ main(int argc, char **argv)
158 int failsafe_level = 0;
159 int port = 0;
160 int c;
161+ char *mount_pid_file = NULL;
162
163 program_name = argv[0];
164
165@@ -340,9 +345,15 @@ main(int argc, char **argv)
166 case 'f':
167 auth_file = optarg;
168 break;
169+ case 'g':
170+ mount_prog = port = atoi(optarg);
171+ break;
172 case 'n':
173 allow_non_root = 1;
174 break;
175+ case 'N':
176+ mount_pid_file = strdup(optarg);
177+ break;
178 case 'P':
179 port = atoi(optarg);
180 if (port <= 0 || port > 65535) {
181@@ -354,6 +365,9 @@ main(int argc, char **argv)
182 case 'p':
183 promiscuous = 1;
184 break;
185+ case 'R':
186+ _PATH_RMTAB = strdup(optarg);
187+ break;
188 case 'r':
189 re_export = 1;
190 break;
191@@ -401,7 +415,7 @@ main(int argc, char **argv)
192 log_open("mountd", foreground);
193
194 /* Create services and register with portmapper */
195- rpc_init("mountd", MOUNTPROG, mountd_versions, mount_dispatch, port, 0);
196+ rpc_init("mountd", mount_prog, mountd_versions, mount_dispatch, port, 0);
197
198 if (_rpcpmstart) {
199 /* Always foreground mode */
200@@ -422,7 +436,9 @@ main(int argc, char **argv)
201 auth_init(auth_file);
202
203 /* Write pidfile */
204- setpidpath(_PATH_MOUNTD_PIDFILE);
205+ if (mount_pid_file == 0)
206+ mount_pid_file = _PATH_MOUNTD_PIDFILE;
207+ setpidpath(mount_pid_file);
208 writepid(getpid(), 1);
209
210 /* Failsafe mode */
211@@ -453,7 +469,9 @@ usage(FILE *fp, int n)
212 program_name);
213 fprintf(fp, " [--debug kind] [--help] [--allow-non-root]\n");
214 fprintf(fp, " [--promiscuous] [--version] [--port portnum]\n");
215+ fprintf(fp, " [--prog alternate_rpc_port_nubmer]\n");
216 fprintf(fp, " [--exports-file=file] [--no-cross-mounts]\n");
217+ fprintf(fp, " [--mount-pid file] [--rmtab file]\n");
218 exit(n);
219 }
220
221@@ -467,7 +485,7 @@ sigterm(int sig)
222 static void
223 terminate(void)
224 {
225- rpc_exit(MOUNTPROG, mountd_versions);
226+ rpc_exit(mount_prog, mountd_versions);
227 }
228
229 RETSIGTYPE
230Index: nfs-server-2.2beta47/rmtab.c
231===================================================================
232--- nfs-server-2.2beta47.orig/rmtab.c
233+++ nfs-server-2.2beta47/rmtab.c
234@@ -14,6 +14,8 @@ static char * rmtab_gethost(struct svc_r
235 static int rmtab_insert(char *, char *);
236 static void rmtab_file(char);
237
238+char *_PATH_RMTAB = _PATH_RMTAB_VAL;
239+
240 /*
241 * global top to linklist
242 */
243Index: nfs-server-2.2beta47/rmtab.h
244===================================================================
245--- nfs-server-2.2beta47.orig/rmtab.h
246+++ nfs-server-2.2beta47/rmtab.h
247@@ -11,8 +11,9 @@
248 * Location of rmtab file. /etc/rmtab is the standard on most systems.
249 */
250 #include <paths.h>
251-#ifndef _PATH_RMTAB
252-#define _PATH_RMTAB "/etc/rmtab"
253+extern char *_PATH_RMTAB;
254+#ifndef _PATH_RMTAB_VAL
255+#define _PATH_RMTAB_VAL "/etc/rmtab"
256 #endif
257
258 extern void rmtab_add_client(dirpath, struct svc_req *);
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/018-remove-tcp-wrappers.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/018-remove-tcp-wrappers.patch
new file mode 100644
index 0000000000..95ecdee611
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/018-remove-tcp-wrappers.patch
@@ -0,0 +1,20 @@
1# Remove the requirement to link with libwrap
2# Patch origin: Wind River
3
4Index: nfs-server-2.2beta47/haccess.c
5===================================================================
6--- nfs-server-2.2beta47.orig/haccess.c 1999-04-08 08:47:19.000000000 -0400
7+++ nfs-server-2.2beta47/haccess.c 2006-08-07 17:05:31.868221639 -0400
8@@ -79,8 +79,12 @@
9 clients[hash] = hp;
10
11 hp->clnt_addr = addr;
12+#ifdef USE_TCP_WRAPPERS
13 hp->status = hosts_ctl(rpcprog, "unknown",
14 inet_ntoa(addr), "root");
15+#else
16+ hp->status = 1;
17+#endif
18 nrhosts++;
19 }
20
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/019-pid-before-fork.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/019-pid-before-fork.patch
new file mode 100644
index 0000000000..960ca8e47f
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/019-pid-before-fork.patch
@@ -0,0 +1,125 @@
1# Write a pid file before forking
2# Patch origin: Wind River
3
4Index: nfs-server-2.2beta47/daemon.c
5===================================================================
6--- nfs-server-2.2beta47.orig/daemon.c
7+++ nfs-server-2.2beta47/daemon.c
8@@ -15,6 +15,19 @@
9 static const char * pidfilename = 0;
10 static const char * get_signame(int signo);
11
12+void
13+writepid(pid_t pid, int clear)
14+{
15+ FILE *fp;
16+
17+ fp = fopen(pidfilename, clear? "w" : "a");
18+ if (fp == NULL)
19+ Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
20+ fprintf(fp, "%d\n", pid);
21+ fclose(fp);
22+ return;
23+}
24+
25 /*
26 * Do the Crawley Thing
27 */
28@@ -33,8 +46,10 @@ daemonize(void)
29 Dprintf(L_FATAL, "unable to fork: %s", strerror(errno));
30
31 /* Parent process: exit */
32- if (c > 0)
33+ if (c > 0) {
34+ writepid(c, 1);
35 exit(0);
36+ }
37
38 /* Do the session stuff */
39 close(0);
40@@ -60,19 +75,6 @@ setpidpath(const char *filename)
41 }
42
43 void
44-writepid(pid_t pid, int clear)
45-{
46- FILE *fp;
47-
48- fp = fopen(pidfilename, clear? "w" : "a");
49- if (fp == NULL)
50- Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
51- fprintf(fp, "%d\n", pid);
52- fclose(fp);
53- return;
54-}
55-
56-void
57 failsafe(int level, int ncopies)
58 {
59 int *servers, running, child, i;
60Index: nfs-server-2.2beta47/mountd.c
61===================================================================
62--- nfs-server-2.2beta47.orig/mountd.c
63+++ nfs-server-2.2beta47/mountd.c
64@@ -425,9 +425,6 @@ main(int argc, char **argv)
65 background_logging();
66 }
67
68- /* Become a daemon */
69- if (!foreground)
70- daemonize();
71
72 /* Initialize the FH module. */
73 fh_init();
74@@ -435,11 +432,15 @@ main(int argc, char **argv)
75 /* Initialize the AUTH module. */
76 auth_init(auth_file);
77
78- /* Write pidfile */
79 if (mount_pid_file == 0)
80 mount_pid_file = _PATH_MOUNTD_PIDFILE;
81 setpidpath(mount_pid_file);
82- writepid(getpid(), 1);
83+
84+ /* Become a daemon */
85+ if (!foreground)
86+ daemonize();
87+ else
88+ writepid(getpid(), 1);
89
90 /* Failsafe mode */
91 if (failsafe_level)
92Index: nfs-server-2.2beta47/nfsd.c
93===================================================================
94--- nfs-server-2.2beta47.orig/nfsd.c
95+++ nfs-server-2.2beta47/nfsd.c
96@@ -1147,11 +1147,6 @@ main(int argc, char **argv)
97 /* if (ncopies > 1)
98 read_only = 1; */
99
100- /*
101- * We first fork off a child and detach from tty
102- */
103- if (!foreground)
104- daemonize();
105
106 /* Initialize the AUTH module. */
107 auth_init(auth_file);
108@@ -1160,9 +1155,16 @@ main(int argc, char **argv)
109 nfs_pid_file = _PATH_NFSD_PIDFILE;
110 setpidpath(nfs_pid_file);
111
112+ /*
113+ * We first fork off a child and detach from tty
114+ */
115+ if (!foreground)
116+ daemonize();
117+ else
118+ writepid(getpid(), 1);
119+
120 if (failsafe_level == 0) {
121 /* Start multiple copies of the server */
122- writepid(getpid(), 1);
123 for (i = 1; i < ncopies; i++) {
124 pid_t pid;
125
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/020-undefined-chmod-fix.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/020-undefined-chmod-fix.patch
new file mode 100644
index 0000000000..0f1108c214
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/020-undefined-chmod-fix.patch
@@ -0,0 +1,18 @@
1# Fix a problem with chmod attributes when using no_squash_all
2# Patch origin: Wind River
3
4---
5 setattr.c | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8--- a/setattr.c
9+++ b/setattr.c
10@@ -115,7 +115,7 @@ nfsstat setattr(char *path, sattr *attr,
11 }
12 }
13
14- if (flags & SATTR_CHMOD) {
15+ if (flags & SATTR_CHMOD && attr->mode != -1) {
16 unsigned int mode = attr->mode;
17
18 /* If setuid is not allowed, silently squash them */
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/021-nolibwrap.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/021-nolibwrap.patch
new file mode 100644
index 0000000000..c0901fadcc
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/021-nolibwrap.patch
@@ -0,0 +1,20 @@
1# Remove libwrap linkage
2# Patch origin: Wind River
3
4---
5 configure.in | 4 ++--
6 1 file changed, 2 insertions(+), 2 deletions(-)
7
8--- a/configure.in
9+++ b/configure.in
10@@ -86,8 +86,8 @@ AC_AUTHDES_GETUCRED
11 AC_BROKEN_SETFSUID
12 AC_MOUNTLIST
13 AC_FSUSAGE
14-AC_CHECK_LIB(wrap, main)
15-AC_LIBWRAP_BUG
16+dnl AC_CHECK_LIB(wrap, main)
17+dnl AC_LIBWRAP_BUG
18 AC_BSD_SIGNALS
19
20 dnl **************************************************************
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/022-add-close-on-exec-descriptors.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/022-add-close-on-exec-descriptors.patch
new file mode 100644
index 0000000000..011ae74cde
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/022-add-close-on-exec-descriptors.patch
@@ -0,0 +1,61 @@
1# Force socket fds to close on exec when used in conjunction with pseudo
2# Patch origin: Wind River
3
4---
5 nfsd.c | 8 ++++++++
6 rpcmisc.c | 9 +++++++++
7 ugidd.c | 8 ++++++++
8 3 files changed, 25 insertions(+)
9
10--- a/nfsd.c
11+++ b/nfsd.c
12@@ -630,6 +630,14 @@ nfsd_nfsproc_create_2(createargs *argp,
13 if (S_ISSOCK(argp->attributes.mode)) {
14 if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
15 return(nfs_errno());
16+ /* if there is a pseudo exec mark the socket to be
17+ * closed automatically
18+ */
19+ {
20+ long f_flags;
21+ f_flags = fcntl(s, F_GETFD);
22+ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
23+ }
24 sa.sun_family = AF_UNIX;
25 strncpy(sa.sun_path, pathbuf, sizeof(sa.sun_path));
26 sa.sun_path[sizeof(sa.sun_path)-1] = '\0';
27--- a/rpcmisc.c
28+++ b/rpcmisc.c
29@@ -197,6 +197,15 @@ makesock(int port, int proto, int socksz
30 Dprintf(L_FATAL, "Could not make a %s socket: %s\n",
31 prot_name, strerror(errno));
32
33+ /* if there is a pseudo exec mark the socket to be
34+ * closed automatically
35+ */
36+ {
37+ long f_flags;
38+ f_flags = fcntl(s, F_GETFD);
39+ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
40+ }
41+ fcntl(s, FD_CLOEXEC, 1);
42 memset((char *) &sin, 0, sizeof(sin));
43 sin.sin_family = AF_INET;
44 sin.sin_addr.s_addr = INADDR_ANY;
45--- a/ugidd.c
46+++ b/ugidd.c
47@@ -195,6 +195,14 @@ authenticate_1_svc(argp, rqstp)
48 destaddr.sin_port = htons(*argp);
49 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
50 goto bad;
51+ /* if there is a pseudo exec mark the socket to be
52+ * closed automatically
53+ */
54+ {
55+ long f_flags;
56+ f_flags = fcntl(s, F_GETFD);
57+ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
58+ }
59 setsockopt(s, SOL_SOCKET, SO_LINGER, 0, 0);
60 bzero((char *) &sendaddr, sizeof sendaddr);
61 /* find a reserved port */
diff --git a/meta/recipes-devtools/unfs-server/unfs-server_2.2beta47.bb b/meta/recipes-devtools/unfs-server/unfs-server_2.2beta47.bb
new file mode 100644
index 0000000000..ecba4525a2
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server_2.2beta47.bb
@@ -0,0 +1,71 @@
1DESCRIPTION = "Userspace NFS server"
2SECTION = "console/network"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
5
6PR = "r0"
7
8SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir/nfs-server-${PV}.tar.gz \
9 file://001-2.2b47-2.2b51.patch \
10 file://002-destdir.patch \
11 file://003-manpages.patch \
12 file://004-strsignal.patch \
13 file://005-sys-time.patch \
14 file://006-reiserfs.patch \
15 file://007-map.patch \
16 file://008-configure.patch \
17 file://009-multirw.patch \
18 file://010-realpath.patch \
19 file://011-fno-strict-aliasing.patch \
20 file://012-nostrip.patch \
21 file://013-mntpathlen.patch \
22 file://014-uninitialized.patch \
23 file://015-setattr.patch \
24 file://016-makefile.in.patch \
25 file://017-wrs-dynamic-rpc.patch \
26 file://018-remove-tcp-wrappers.patch \
27 file://019-pid-before-fork.patch \
28 file://020-undefined-chmod-fix.patch \
29 file://021-nolibwrap.patch \
30 file://022-add-close-on-exec-descriptors.patch \
31 "
32
33SRC_URI[md5sum] = "79a29fe9f79b2f3241d4915767b8c511"
34SRC_URI[sha256sum] = "7eeaf3cf0b9d96167a5ba03bf1046e39b4585de1339a55b285e673c06ba415cb"
35
36S = "${WORKDIR}/nfs-server-${PV}/"
37
38inherit autotools
39
40BBCLASSEXTEND = "native nativesdk"
41
42CFLAGS = "-fPIE -fstack-protector-all"
43LDFLAGS = "-pie"
44
45EXTRA_OECONF = "--enable-ugid-dynamic \
46 --enable-ugid-nis \
47 --enable-host-access \
48 --with-exports-uid=0 \
49 --with-exports-gid=0 \
50 --enable-mount-logging \
51 --with-devtab=${DESTDIR}${base_prefix}/var/lib/nfs/devtab \
52 "
53
54do_configure_prepend () {
55 # Remove pregenerated xdr functions. They use long
56 # instead of u32, which produces incorrect code on
57 # 64-bit architectures:
58 rm -f *_xdr.c
59
60 mv aclocal.m4 acinclude.m4
61}
62
63# This recipe is intended for -native and -nativesdk builds only,
64# not target installs:
65python __anonymous () {
66 import re
67
68 pn = bb.data.getVar("PN", d, 1)
69 if not pn.endswith('-native') and not pn.endswith('-nativesdk'):
70 raise bb.parse.SkipPackage("unfs-server is intended for native/nativesdk builds only")
71}
diff --git a/meta/recipes-devtools/unifdef/files/unifdef.c b/meta/recipes-devtools/unifdef/files/unifdef.c
new file mode 100644
index 0000000000..5cbac15608
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/files/unifdef.c
@@ -0,0 +1,1005 @@
1/*
2 * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
3 *
4 * This code is derived from software contributed to Berkeley by Dave Yost.
5 * It was rewritten to support ANSI C by Tony Finch. The original version of
6 * unifdef carried the following copyright notice. None of its code remains
7 * in this version (though some of the names remain).
8 *
9 * Copyright (c) 1985, 1993
10 * The Regents of the University of California. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35
36#ifndef lint
37#if 0
38static const char copyright[] =
39"@(#) Copyright (c) 1985, 1993\n\
40 The Regents of the University of California. All rights reserved.\n";
41#endif
42#ifdef __IDSTRING
43__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
44__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
45__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
46#endif
47#endif /* not lint */
48#ifdef __FBSDID
49__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
50#endif
51
52/*
53 * unifdef - remove ifdef'ed lines
54 *
55 * Wishlist:
56 * provide an option which will append the name of the
57 * appropriate symbol after #else's and #endif's
58 * provide an option which will check symbols after
59 * #else's and #endif's to see that they match their
60 * corresponding #ifdef or #ifndef
61 *
62 * The first two items above require better buffer handling, which would
63 * also make it possible to handle all "dodgy" directives correctly.
64 */
65
66#include <ctype.h>
67#include <err.h>
68#include <stdarg.h>
69#include <stdbool.h>
70#include <stdio.h>
71#include <stdlib.h>
72#include <string.h>
73#include <unistd.h>
74
75size_t strlcpy(char *dst, const char *src, size_t siz);
76
77/* types of input lines: */
78typedef enum {
79 LT_TRUEI, /* a true #if with ignore flag */
80 LT_FALSEI, /* a false #if with ignore flag */
81 LT_IF, /* an unknown #if */
82 LT_TRUE, /* a true #if */
83 LT_FALSE, /* a false #if */
84 LT_ELIF, /* an unknown #elif */
85 LT_ELTRUE, /* a true #elif */
86 LT_ELFALSE, /* a false #elif */
87 LT_ELSE, /* #else */
88 LT_ENDIF, /* #endif */
89 LT_DODGY, /* flag: directive is not on one line */
90 LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
91 LT_PLAIN, /* ordinary line */
92 LT_EOF, /* end of file */
93 LT_COUNT
94} Linetype;
95
96static char const * const linetype_name[] = {
97 "TRUEI", "FALSEI", "IF", "TRUE", "FALSE",
98 "ELIF", "ELTRUE", "ELFALSE", "ELSE", "ENDIF",
99 "DODGY TRUEI", "DODGY FALSEI",
100 "DODGY IF", "DODGY TRUE", "DODGY FALSE",
101 "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
102 "DODGY ELSE", "DODGY ENDIF",
103 "PLAIN", "EOF"
104};
105
106/* state of #if processing */
107typedef enum {
108 IS_OUTSIDE,
109 IS_FALSE_PREFIX, /* false #if followed by false #elifs */
110 IS_TRUE_PREFIX, /* first non-false #(el)if is true */
111 IS_PASS_MIDDLE, /* first non-false #(el)if is unknown */
112 IS_FALSE_MIDDLE, /* a false #elif after a pass state */
113 IS_TRUE_MIDDLE, /* a true #elif after a pass state */
114 IS_PASS_ELSE, /* an else after a pass state */
115 IS_FALSE_ELSE, /* an else after a true state */
116 IS_TRUE_ELSE, /* an else after only false states */
117 IS_FALSE_TRAILER, /* #elifs after a true are false */
118 IS_COUNT
119} Ifstate;
120
121static char const * const ifstate_name[] = {
122 "OUTSIDE", "FALSE_PREFIX", "TRUE_PREFIX",
123 "PASS_MIDDLE", "FALSE_MIDDLE", "TRUE_MIDDLE",
124 "PASS_ELSE", "FALSE_ELSE", "TRUE_ELSE",
125 "FALSE_TRAILER"
126};
127
128/* state of comment parser */
129typedef enum {
130 NO_COMMENT = false, /* outside a comment */
131 C_COMMENT, /* in a comment like this one */
132 CXX_COMMENT, /* between // and end of line */
133 STARTING_COMMENT, /* just after slash-backslash-newline */
134 FINISHING_COMMENT, /* star-backslash-newline in a C comment */
135 CHAR_LITERAL, /* inside '' */
136 STRING_LITERAL /* inside "" */
137} Comment_state;
138
139static char const * const comment_name[] = {
140 "NO", "C", "CXX", "STARTING", "FINISHING", "CHAR", "STRING"
141};
142
143/* state of preprocessor line parser */
144typedef enum {
145 LS_START, /* only space and comments on this line */
146 LS_HASH, /* only space, comments, and a hash */
147 LS_DIRTY /* this line can't be a preprocessor line */
148} Line_state;
149
150static char const * const linestate_name[] = {
151 "START", "HASH", "DIRTY"
152};
153
154/*
155 * Minimum translation limits from ISO/IEC 9899:1999 5.2.4.1
156 */
157#define MAXDEPTH 64 /* maximum #if nesting */
158#define MAXLINE 4096 /* maximum length of line */
159#define MAXSYMS 4096 /* maximum number of symbols */
160
161/*
162 * Sometimes when editing a keyword the replacement text is longer, so
163 * we leave some space at the end of the tline buffer to accommodate this.
164 */
165#define EDITSLOP 10
166
167/*
168 * Globals.
169 */
170
171static bool complement; /* -c: do the complement */
172static bool debugging; /* -d: debugging reports */
173static bool iocccok; /* -e: fewer IOCCC errors */
174static bool killconsts; /* -k: eval constant #ifs */
175static bool lnblank; /* -l: blank deleted lines */
176static bool lnnum; /* -n: add #line directives */
177static bool symlist; /* -s: output symbol list */
178static bool text; /* -t: this is a text file */
179
180static const char *symname[MAXSYMS]; /* symbol name */
181static const char *value[MAXSYMS]; /* -Dsym=value */
182static bool ignore[MAXSYMS]; /* -iDsym or -iUsym */
183static int nsyms; /* number of symbols */
184
185static FILE *input; /* input file pointer */
186static const char *filename; /* input file name */
187static int linenum; /* current line number */
188
189static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
190static char *keyword; /* used for editing #elif's */
191
192static Comment_state incomment; /* comment parser state */
193static Line_state linestate; /* #if line parser state */
194static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
195static bool ignoring[MAXDEPTH]; /* ignore comments state */
196static int stifline[MAXDEPTH]; /* start of current #if */
197static int depth; /* current #if nesting */
198static int delcount; /* count of deleted lines */
199static bool keepthis; /* don't delete constant #if */
200
201static int exitstat; /* program exit status */
202
203static void addsym(bool, bool, char *);
204static void debug(const char *, ...);
205static void done(void);
206static void error(const char *);
207static int findsym(const char *);
208static void flushline(bool);
209static Linetype getline34(void);
210static Linetype ifeval(const char **);
211static void ignoreoff(void);
212static void ignoreon(void);
213static void keywordedit(const char *);
214static void nest(void);
215static void process(void);
216static const char *skipcomment(const char *);
217static const char *skipsym(const char *);
218static void state(Ifstate);
219static int strlcmp(const char *, const char *, size_t);
220static void unnest(void);
221static void usage(void);
222
223#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
224
225/*
226 * The main program.
227 */
228int
229main(int argc, char *argv[])
230{
231 int opt;
232
233 while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
234 switch (opt) {
235 case 'i': /* treat stuff controlled by these symbols as text */
236 /*
237 * For strict backwards-compatibility the U or D
238 * should be immediately after the -i but it doesn't
239 * matter much if we relax that requirement.
240 */
241 opt = *optarg++;
242 if (opt == 'D')
243 addsym(true, true, optarg);
244 else if (opt == 'U')
245 addsym(true, false, optarg);
246 else
247 usage();
248 break;
249 case 'D': /* define a symbol */
250 addsym(false, true, optarg);
251 break;
252 case 'U': /* undef a symbol */
253 addsym(false, false, optarg);
254 break;
255 case 'I':
256 /* no-op for compatibility with cpp */
257 break;
258 case 'c': /* treat -D as -U and vice versa */
259 complement = true;
260 break;
261 case 'd':
262 debugging = true;
263 break;
264 case 'e': /* fewer errors from dodgy lines */
265 iocccok = true;
266 break;
267 case 'k': /* process constant #ifs */
268 killconsts = true;
269 break;
270 case 'l': /* blank deleted lines instead of omitting them */
271 lnblank = true;
272 break;
273 case 'n': /* add #line directive after deleted lines */
274 lnnum = true;
275 break;
276 case 's': /* only output list of symbols that control #ifs */
277 symlist = true;
278 break;
279 case 't': /* don't parse C comments */
280 text = true;
281 break;
282 default:
283 usage();
284 }
285 argc -= optind;
286 argv += optind;
287 if (argc > 1) {
288 errx(2, "can only do one file");
289 } else if (argc == 1 && strcmp(*argv, "-") != 0) {
290 filename = *argv;
291 input = fopen(filename, "r");
292 if (input == NULL)
293 err(2, "can't open %s", filename);
294 } else {
295 filename = "[stdin]";
296 input = stdin;
297 }
298 process();
299 abort(); /* bug */
300}
301
302static void
303usage(void)
304{
305 fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
306 " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
307 exit(2);
308}
309
310/*
311 * A state transition function alters the global #if processing state
312 * in a particular way. The table below is indexed by the current
313 * processing state and the type of the current line.
314 *
315 * Nesting is handled by keeping a stack of states; some transition
316 * functions increase or decrease the depth. They also maintain the
317 * ignore state on a stack. In some complicated cases they have to
318 * alter the preprocessor directive, as follows.
319 *
320 * When we have processed a group that starts off with a known-false
321 * #if/#elif sequence (which has therefore been deleted) followed by a
322 * #elif that we don't understand and therefore must keep, we edit the
323 * latter into a #if to keep the nesting correct.
324 *
325 * When we find a true #elif in a group, the following block will
326 * always be kept and the rest of the sequence after the next #elif or
327 * #else will be discarded. We edit the #elif into a #else and the
328 * following directive to #endif since this has the desired behaviour.
329 *
330 * "Dodgy" directives are split across multiple lines, the most common
331 * example being a multi-line comment hanging off the right of the
332 * directive. We can handle them correctly only if there is no change
333 * from printing to dropping (or vice versa) caused by that directive.
334 * If the directive is the first of a group we have a choice between
335 * failing with an error, or passing it through unchanged instead of
336 * evaluating it. The latter is not the default to avoid questions from
337 * users about unifdef unexpectedly leaving behind preprocessor directives.
338 */
339typedef void state_fn(void);
340
341/* report an error */
342static void Eelif (void) { error("Inappropriate #elif"); }
343static void Eelse (void) { error("Inappropriate #else"); }
344static void Eendif(void) { error("Inappropriate #endif"); }
345static void Eeof (void) { error("Premature EOF"); }
346static void Eioccc(void) { error("Obfuscated preprocessor control line"); }
347/* plain line handling */
348static void print (void) { flushline(true); }
349static void drop (void) { flushline(false); }
350/* output lacks group's start line */
351static void Strue (void) { drop(); ignoreoff(); state(IS_TRUE_PREFIX); }
352static void Sfalse(void) { drop(); ignoreoff(); state(IS_FALSE_PREFIX); }
353static void Selse (void) { drop(); state(IS_TRUE_ELSE); }
354/* print/pass this block */
355static void Pelif (void) { print(); ignoreoff(); state(IS_PASS_MIDDLE); }
356static void Pelse (void) { print(); state(IS_PASS_ELSE); }
357static void Pendif(void) { print(); unnest(); }
358/* discard this block */
359static void Dfalse(void) { drop(); ignoreoff(); state(IS_FALSE_TRAILER); }
360static void Delif (void) { drop(); ignoreoff(); state(IS_FALSE_MIDDLE); }
361static void Delse (void) { drop(); state(IS_FALSE_ELSE); }
362static void Dendif(void) { drop(); unnest(); }
363/* first line of group */
364static void Fdrop (void) { nest(); Dfalse(); }
365static void Fpass (void) { nest(); Pelif(); }
366static void Ftrue (void) { nest(); Strue(); }
367static void Ffalse(void) { nest(); Sfalse(); }
368/* variable pedantry for obfuscated lines */
369static void Oiffy (void) { if (!iocccok) Eioccc(); Fpass(); ignoreon(); }
370static void Oif (void) { if (!iocccok) Eioccc(); Fpass(); }
371static void Oelif (void) { if (!iocccok) Eioccc(); Pelif(); }
372/* ignore comments in this block */
373static void Idrop (void) { Fdrop(); ignoreon(); }
374static void Itrue (void) { Ftrue(); ignoreon(); }
375static void Ifalse(void) { Ffalse(); ignoreon(); }
376/* edit this line */
377static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
378static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
379static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
380static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
381
382static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
383/* IS_OUTSIDE */
384{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
385 Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
386 print, done },
387/* IS_FALSE_PREFIX */
388{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
389 Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
390 drop, Eeof },
391/* IS_TRUE_PREFIX */
392{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
393 Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
394 print, Eeof },
395/* IS_PASS_MIDDLE */
396{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
397 Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
398 print, Eeof },
399/* IS_FALSE_MIDDLE */
400{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
401 Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
402 drop, Eeof },
403/* IS_TRUE_MIDDLE */
404{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
405 Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
406 print, Eeof },
407/* IS_PASS_ELSE */
408{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
409 Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
410 print, Eeof },
411/* IS_FALSE_ELSE */
412{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
413 Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
414 drop, Eeof },
415/* IS_TRUE_ELSE */
416{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
417 Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
418 print, Eeof },
419/* IS_FALSE_TRAILER */
420{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
421 Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
422 drop, Eeof }
423/*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
424 TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
425 PLAIN EOF */
426};
427
428/*
429 * State machine utility functions
430 */
431static void
432done(void)
433{
434 if (incomment)
435 error("EOF in comment");
436 exit(exitstat);
437}
438static void
439ignoreoff(void)
440{
441 if (depth == 0)
442 abort(); /* bug */
443 ignoring[depth] = ignoring[depth-1];
444}
445static void
446ignoreon(void)
447{
448 ignoring[depth] = true;
449}
450static void
451keywordedit(const char *replacement)
452{
453 size_t size = tline + sizeof(tline) - keyword;
454 char *dst = keyword;
455 const char *src = replacement;
456 if (size != 0) {
457 while ((--size != 0) && (*src != '\0'))
458 *dst++ = *src++;
459 *dst = '\0';
460 }
461 print();
462}
463static void
464nest(void)
465{
466 depth += 1;
467 if (depth >= MAXDEPTH)
468 error("Too many levels of nesting");
469 stifline[depth] = linenum;
470}
471static void
472unnest(void)
473{
474 if (depth == 0)
475 abort(); /* bug */
476 depth -= 1;
477}
478static void
479state(Ifstate is)
480{
481 ifstate[depth] = is;
482}
483
484/*
485 * Write a line to the output or not, according to command line options.
486 */
487static void
488flushline(bool keep)
489{
490 if (symlist)
491 return;
492 if (keep ^ complement) {
493 if (lnnum && delcount > 0)
494 printf("#line %d\n", linenum);
495 fputs(tline, stdout);
496 delcount = 0;
497 } else {
498 if (lnblank)
499 putc('\n', stdout);
500 exitstat = 1;
501 delcount += 1;
502 }
503}
504
505/*
506 * The driver for the state machine.
507 */
508static void
509process(void)
510{
511 Linetype lineval;
512
513 for (;;) {
514 linenum++;
515 lineval = getline34();
516 trans_table[ifstate[depth]][lineval]();
517 debug("process %s -> %s depth %d",
518 linetype_name[lineval],
519 ifstate_name[ifstate[depth]], depth);
520 }
521}
522
523/*
524 * Parse a line and determine its type. We keep the preprocessor line
525 * parser state between calls in the global variable linestate, with
526 * help from skipcomment().
527 */
528static Linetype
529getline34(void)
530{
531 const char *cp;
532 int cursym;
533 int kwlen;
534 Linetype retval;
535 Comment_state wascomment;
536
537 if (fgets(tline, MAXLINE, input) == NULL)
538 return (LT_EOF);
539 retval = LT_PLAIN;
540 wascomment = incomment;
541 cp = skipcomment(tline);
542 if (linestate == LS_START) {
543 if (*cp == '#') {
544 linestate = LS_HASH;
545 cp = skipcomment(cp + 1);
546 } else if (*cp != '\0')
547 linestate = LS_DIRTY;
548 }
549 if (!incomment && linestate == LS_HASH) {
550 keyword = tline + (cp - tline);
551 cp = skipsym(cp);
552 kwlen = cp - keyword;
553 /* no way can we deal with a continuation inside a keyword */
554 if (strncmp(cp, "\\\n", 2) == 0)
555 Eioccc();
556 if (strlcmp("ifdef", keyword, kwlen) == 0 ||
557 strlcmp("ifndef", keyword, kwlen) == 0) {
558 cp = skipcomment(cp);
559 if ((cursym = findsym(cp)) < 0)
560 retval = LT_IF;
561 else {
562 retval = (keyword[2] == 'n')
563 ? LT_FALSE : LT_TRUE;
564 if (value[cursym] == NULL)
565 retval = (retval == LT_TRUE)
566 ? LT_FALSE : LT_TRUE;
567 if (ignore[cursym])
568 retval = (retval == LT_TRUE)
569 ? LT_TRUEI : LT_FALSEI;
570 }
571 cp = skipsym(cp);
572 } else if (strlcmp("if", keyword, kwlen) == 0)
573 retval = ifeval(&cp);
574 else if (strlcmp("elif", keyword, kwlen) == 0)
575 retval = ifeval(&cp) - LT_IF + LT_ELIF;
576 else if (strlcmp("else", keyword, kwlen) == 0)
577 retval = LT_ELSE;
578 else if (strlcmp("endif", keyword, kwlen) == 0)
579 retval = LT_ENDIF;
580 else {
581 linestate = LS_DIRTY;
582 retval = LT_PLAIN;
583 }
584 cp = skipcomment(cp);
585 if (*cp != '\0') {
586 linestate = LS_DIRTY;
587 if (retval == LT_TRUE || retval == LT_FALSE ||
588 retval == LT_TRUEI || retval == LT_FALSEI)
589 retval = LT_IF;
590 if (retval == LT_ELTRUE || retval == LT_ELFALSE)
591 retval = LT_ELIF;
592 }
593 if (retval != LT_PLAIN && (wascomment || incomment)) {
594 retval += LT_DODGY;
595 if (incomment)
596 linestate = LS_DIRTY;
597 }
598 /* skipcomment should have changed the state */
599 if (linestate == LS_HASH)
600 abort(); /* bug */
601 }
602 if (linestate == LS_DIRTY) {
603 while (*cp != '\0')
604 cp = skipcomment(cp + 1);
605 }
606 debug("parser %s comment %s line",
607 comment_name[incomment], linestate_name[linestate]);
608 return (retval);
609}
610
611/*
612 * These are the binary operators that are supported by the expression
613 * evaluator. Note that if support for division is added then we also
614 * need short-circuiting booleans because of divide-by-zero.
615 */
616static int op_lt(int a, int b) { return (a < b); }
617static int op_gt(int a, int b) { return (a > b); }
618static int op_le(int a, int b) { return (a <= b); }
619static int op_ge(int a, int b) { return (a >= b); }
620static int op_eq(int a, int b) { return (a == b); }
621static int op_ne(int a, int b) { return (a != b); }
622static int op_or(int a, int b) { return (a || b); }
623static int op_and(int a, int b) { return (a && b); }
624
625/*
626 * An evaluation function takes three arguments, as follows: (1) a pointer to
627 * an element of the precedence table which lists the operators at the current
628 * level of precedence; (2) a pointer to an integer which will receive the
629 * value of the expression; and (3) a pointer to a char* that points to the
630 * expression to be evaluated and that is updated to the end of the expression
631 * when evaluation is complete. The function returns LT_FALSE if the value of
632 * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
633 * expression could not be evaluated.
634 */
635struct ops;
636
637typedef Linetype eval_fn(const struct ops *, int *, const char **);
638
639static eval_fn eval_table, eval_unary;
640
641/*
642 * The precedence table. Expressions involving binary operators are evaluated
643 * in a table-driven way by eval_table. When it evaluates a subexpression it
644 * calls the inner function with its first argument pointing to the next
645 * element of the table. Innermost expressions have special non-table-driven
646 * handling.
647 */
648static const struct ops {
649 eval_fn *inner;
650 struct op {
651 const char *str;
652 int (*fn)(int, int);
653 } op[5];
654} eval_ops[] = {
655 { eval_table, { { "||", op_or } } },
656 { eval_table, { { "&&", op_and } } },
657 { eval_table, { { "==", op_eq },
658 { "!=", op_ne } } },
659 { eval_unary, { { "<=", op_le },
660 { ">=", op_ge },
661 { "<", op_lt },
662 { ">", op_gt } } }
663};
664
665/*
666 * Function for evaluating the innermost parts of expressions,
667 * viz. !expr (expr) defined(symbol) symbol number
668 * We reset the keepthis flag when we find a non-constant subexpression.
669 */
670static Linetype
671eval_unary(const struct ops *ops, int *valp, const char **cpp)
672{
673 const char *cp;
674 char *ep;
675 int sym;
676
677 cp = skipcomment(*cpp);
678 if (*cp == '!') {
679 debug("eval%d !", ops - eval_ops);
680 cp++;
681 if (eval_unary(ops, valp, &cp) == LT_IF)
682 return (LT_IF);
683 *valp = !*valp;
684 } else if (*cp == '(') {
685 cp++;
686 debug("eval%d (", ops - eval_ops);
687 if (eval_table(eval_ops, valp, &cp) == LT_IF)
688 return (LT_IF);
689 cp = skipcomment(cp);
690 if (*cp++ != ')')
691 return (LT_IF);
692 } else if (isdigit((unsigned char)*cp)) {
693 debug("eval%d number", ops - eval_ops);
694 *valp = strtol(cp, &ep, 0);
695 cp = skipsym(cp);
696 } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
697 cp = skipcomment(cp+7);
698 debug("eval%d defined", ops - eval_ops);
699 if (*cp++ != '(')
700 return (LT_IF);
701 cp = skipcomment(cp);
702 sym = findsym(cp);
703 if (sym < 0)
704 return (LT_IF);
705 *valp = (value[sym] != NULL);
706 cp = skipsym(cp);
707 cp = skipcomment(cp);
708 if (*cp++ != ')')
709 return (LT_IF);
710 keepthis = false;
711 } else if (!endsym(*cp)) {
712 debug("eval%d symbol", ops - eval_ops);
713 sym = findsym(cp);
714 if (sym < 0)
715 return (LT_IF);
716 if (value[sym] == NULL)
717 *valp = 0;
718 else {
719 *valp = strtol(value[sym], &ep, 0);
720 if (*ep != '\0' || ep == value[sym])
721 return (LT_IF);
722 }
723 cp = skipsym(cp);
724 keepthis = false;
725 } else {
726 debug("eval%d bad expr", ops - eval_ops);
727 return (LT_IF);
728 }
729
730 *cpp = cp;
731 debug("eval%d = %d", ops - eval_ops, *valp);
732 return (*valp ? LT_TRUE : LT_FALSE);
733}
734
735/*
736 * Table-driven evaluation of binary operators.
737 */
738static Linetype
739eval_table(const struct ops *ops, int *valp, const char **cpp)
740{
741 const struct op *op;
742 const char *cp;
743 int val;
744
745 debug("eval%d", ops - eval_ops);
746 cp = *cpp;
747 if (ops->inner(ops+1, valp, &cp) == LT_IF)
748 return (LT_IF);
749 for (;;) {
750 cp = skipcomment(cp);
751 for (op = ops->op; op->str != NULL; op++)
752 if (strncmp(cp, op->str, strlen(op->str)) == 0)
753 break;
754 if (op->str == NULL)
755 break;
756 cp += strlen(op->str);
757 debug("eval%d %s", ops - eval_ops, op->str);
758 if (ops->inner(ops+1, &val, &cp) == LT_IF)
759 return (LT_IF);
760 *valp = op->fn(*valp, val);
761 }
762
763 *cpp = cp;
764 debug("eval%d = %d", ops - eval_ops, *valp);
765 return (*valp ? LT_TRUE : LT_FALSE);
766}
767
768/*
769 * Evaluate the expression on a #if or #elif line. If we can work out
770 * the result we return LT_TRUE or LT_FALSE accordingly, otherwise we
771 * return just a generic LT_IF.
772 */
773static Linetype
774ifeval(const char **cpp)
775{
776 int ret;
777 int val;
778
779 debug("eval %s", *cpp);
780 keepthis = killconsts ? false : true;
781 ret = eval_table(eval_ops, &val, cpp);
782 debug("eval = %d", val);
783 return (keepthis ? LT_IF : ret);
784}
785
786/*
787 * Skip over comments, strings, and character literals and stop at the
788 * next character position that is not whitespace. Between calls we keep
789 * the comment state in the global variable incomment, and we also adjust
790 * the global variable linestate when we see a newline.
791 * XXX: doesn't cope with the buffer splitting inside a state transition.
792 */
793static const char *
794skipcomment(const char *cp)
795{
796 if (text || ignoring[depth]) {
797 for (; isspace((unsigned char)*cp); cp++)
798 if (*cp == '\n')
799 linestate = LS_START;
800 return (cp);
801 }
802 while (*cp != '\0')
803 /* don't reset to LS_START after a line continuation */
804 if (strncmp(cp, "\\\n", 2) == 0)
805 cp += 2;
806 else switch (incomment) {
807 case NO_COMMENT:
808 if (strncmp(cp, "/\\\n", 3) == 0) {
809 incomment = STARTING_COMMENT;
810 cp += 3;
811 } else if (strncmp(cp, "/*", 2) == 0) {
812 incomment = C_COMMENT;
813 cp += 2;
814 } else if (strncmp(cp, "//", 2) == 0) {
815 incomment = CXX_COMMENT;
816 cp += 2;
817 } else if (strncmp(cp, "\'", 1) == 0) {
818 incomment = CHAR_LITERAL;
819 linestate = LS_DIRTY;
820 cp += 1;
821 } else if (strncmp(cp, "\"", 1) == 0) {
822 incomment = STRING_LITERAL;
823 linestate = LS_DIRTY;
824 cp += 1;
825 } else if (strncmp(cp, "\n", 1) == 0) {
826 linestate = LS_START;
827 cp += 1;
828 } else if (strchr(" \t", *cp) != NULL) {
829 cp += 1;
830 } else
831 return (cp);
832 continue;
833 case CXX_COMMENT:
834 if (strncmp(cp, "\n", 1) == 0) {
835 incomment = NO_COMMENT;
836 linestate = LS_START;
837 }
838 cp += 1;
839 continue;
840 case CHAR_LITERAL:
841 case STRING_LITERAL:
842 if ((incomment == CHAR_LITERAL && cp[0] == '\'') ||
843 (incomment == STRING_LITERAL && cp[0] == '\"')) {
844 incomment = NO_COMMENT;
845 cp += 1;
846 } else if (cp[0] == '\\') {
847 if (cp[1] == '\0')
848 cp += 1;
849 else
850 cp += 2;
851 } else if (strncmp(cp, "\n", 1) == 0) {
852 if (incomment == CHAR_LITERAL)
853 error("unterminated char literal");
854 else
855 error("unterminated string literal");
856 } else
857 cp += 1;
858 continue;
859 case C_COMMENT:
860 if (strncmp(cp, "*\\\n", 3) == 0) {
861 incomment = FINISHING_COMMENT;
862 cp += 3;
863 } else if (strncmp(cp, "*/", 2) == 0) {
864 incomment = NO_COMMENT;
865 cp += 2;
866 } else
867 cp += 1;
868 continue;
869 case STARTING_COMMENT:
870 if (*cp == '*') {
871 incomment = C_COMMENT;
872 cp += 1;
873 } else if (*cp == '/') {
874 incomment = CXX_COMMENT;
875 cp += 1;
876 } else {
877 incomment = NO_COMMENT;
878 linestate = LS_DIRTY;
879 }
880 continue;
881 case FINISHING_COMMENT:
882 if (*cp == '/') {
883 incomment = NO_COMMENT;
884 cp += 1;
885 } else
886 incomment = C_COMMENT;
887 continue;
888 default:
889 abort(); /* bug */
890 }
891 return (cp);
892}
893
894/*
895 * Skip over an identifier.
896 */
897static const char *
898skipsym(const char *cp)
899{
900 while (!endsym(*cp))
901 ++cp;
902 return (cp);
903}
904
905/*
906 * Look for the symbol in the symbol table. If is is found, we return
907 * the symbol table index, else we return -1.
908 */
909static int
910findsym(const char *str)
911{
912 const char *cp;
913 int symind;
914
915 cp = skipsym(str);
916 if (cp == str)
917 return (-1);
918 if (symlist) {
919 printf("%.*s\n", (int)(cp-str), str);
920 /* we don't care about the value of the symbol */
921 return (0);
922 }
923 for (symind = 0; symind < nsyms; ++symind) {
924 if (strlcmp(symname[symind], str, cp-str) == 0) {
925 debug("findsym %s %s", symname[symind],
926 value[symind] ? value[symind] : "");
927 return (symind);
928 }
929 }
930 return (-1);
931}
932
933/*
934 * Add a symbol to the symbol table.
935 */
936static void
937addsym(bool ignorethis, bool definethis, char *sym)
938{
939 int symind;
940 char *val;
941
942 symind = findsym(sym);
943 if (symind < 0) {
944 if (nsyms >= MAXSYMS)
945 errx(2, "too many symbols");
946 symind = nsyms++;
947 }
948 symname[symind] = sym;
949 ignore[symind] = ignorethis;
950 val = sym + (skipsym(sym) - sym);
951 if (definethis) {
952 if (*val == '=') {
953 value[symind] = val+1;
954 *val = '\0';
955 } else if (*val == '\0')
956 value[symind] = "";
957 else
958 usage();
959 } else {
960 if (*val != '\0')
961 usage();
962 value[symind] = NULL;
963 }
964}
965
966/*
967 * Compare s with n characters of t.
968 * The same as strncmp() except that it checks that s[n] == '\0'.
969 */
970static int
971strlcmp(const char *s, const char *t, size_t n)
972{
973 while (n-- && *t != '\0')
974 if (*s != *t)
975 return ((unsigned char)*s - (unsigned char)*t);
976 else
977 ++s, ++t;
978 return ((unsigned char)*s);
979}
980
981/*
982 * Diagnostics.
983 */
984static void
985debug(const char *msg, ...)
986{
987 va_list ap;
988
989 if (debugging) {
990 va_start(ap, msg);
991 vwarnx(msg, ap);
992 va_end(ap);
993 }
994}
995
996static void
997error(const char *msg)
998{
999 if (depth == 0)
1000 warnx("%s: %d: %s", filename, linenum, msg);
1001 else
1002 warnx("%s: %d: %s (#if line %d depth %d)",
1003 filename, linenum, msg, stifline[depth], depth);
1004 errx(2, "output may be truncated");
1005}
diff --git a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
new file mode 100644
index 0000000000..d879782b29
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Kernel header preprocessor"
2SECTION = "devel"
3LICENSE = "GPL"
4
5SRC_URI = "file://unifdef.c"
6
7inherit native
8
9do_compile() {
10 ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef ${WORKDIR}/unifdef.c
11}
12
13do_install() {
14 install -d ${D}${bindir}
15 install -m 0755 unifdef ${D}${bindir}
16}
17
diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc
new file mode 100644
index 0000000000..106fa25e14
--- /dev/null
+++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc
@@ -0,0 +1,30 @@
1LICENSE = "GPL"
2SECTION = "base"
3SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz"
4S = "${WORKDIR}/dpkg-${PV}"
5PACKAGE_ARCH = "all"
6PR = "r2"
7
8do_patch () {
9 cat ${S}/scripts/update-alternatives.pl | \
10 sed -n -e '
11 /^\$admindir=.*staging/{
12 x
13 s/^.*$/$D=$ENV{"D"} || ""\;/;
14 p;
15 x;
16 s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/dpkg"\;,;
17 };
18 s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,;
19 p;' > ${S}/scripts/update-alternatives
20}
21
22do_install () {
23 install -d ${D}${sbindir} \
24 ${D}${localstatedir}/dpkg/alternatives \
25 ${D}${sysconfdir}/alternatives
26
27 install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives
28}
29
30BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb
new file mode 100644
index 0000000000..5d38d5d36f
--- /dev/null
+++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb
@@ -0,0 +1,7 @@
1require update-alternatives-dpkg.inc
2
3PROVIDES += "virtual/update-alternatives"
4RPROVIDES_${PN} += "update-alternatives"
5EXTRA_RDEPENDS = "perl dpkg"
6EXTRA_RDEPENDS_virtclass-native = ""
7RDEPENDS_${PN} += "${EXTRA_RDEPENDS}"
diff --git a/meta/recipes-devtools/valgrind/valgrind/fix_issue_caused_by_ccache.patch b/meta/recipes-devtools/valgrind/valgrind/fix_issue_caused_by_ccache.patch
new file mode 100644
index 0000000000..a5c273c45b
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/fix_issue_caused_by_ccache.patch
@@ -0,0 +1,30 @@
1The script does not expect use of ccache, hence fix it to recognise it.
2
32010/08/17
4Nitin A Kamble <nitin.a.kamble@intel.com>
5
6Index: valgrind-3.5.0/coregrind/link_tool_exe_linux.in
7===================================================================
8--- valgrind-3.5.0.orig/coregrind/link_tool_exe_linux.in
9+++ valgrind-3.5.0/coregrind/link_tool_exe_linux.in
10@@ -62,6 +62,11 @@ die "Bogus alt-load address"
11
12 # The cc invokation to do the final link
13 my $cc = $ARGV[1];
14+my $next = 2;
15+if ("$cc" eq "ccache") {
16+ $cc = "$cc $ARGV[2]";
17+ $next = 3;
18+}
19
20 # and the 'restargs' are argv[2 ..]
21
22@@ -71,7 +76,7 @@ my $cc = $ARGV[1];
23 my $cmd="$cc -static -Wl,-Ttext=$ala";
24
25 # Add the rest of the parameters
26-foreach my $n (2 .. $#ARGV) {
27+foreach my $n ($next .. $#ARGV) {
28 $cmd = "$cmd $ARGV[$n]";
29 }
30
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind_3.5.0-svn_r11264.patch.bz2 b/meta/recipes-devtools/valgrind/valgrind/valgrind_3.5.0-svn_r11264.patch.bz2
new file mode 100644
index 0000000000..66b3698f25
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind_3.5.0-svn_r11264.patch.bz2
Binary files differ
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.5.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.5.0.bb
new file mode 100644
index 0000000000..c1a73f878d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind_3.5.0.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "Valgrind memory debugger"
2HOMEPAGE = "http://valgrind.org/"
3BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
4LICENSE = "GPLv2+ & BSD & FDLv1.2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
6 file://include/pub_tool_basics.h;beginline=1;endline=29;md5=b4765f122b7672cdf9b2e8fd75a33172 \
7 file://include/valgrind.h;beginline=1;endline=56;md5=13a71cedba99112334d8596162aec37e \
8 file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
9DEPENDS = "virtual/libx11"
10PR = "r3"
11
12SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
13 file://valgrind_3.5.0-svn_r11264.patch.bz2 \
14 file://fix_issue_caused_by_ccache.patch "
15
16COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
17
18inherit autotools
19
20EXTRA_OECONF = "--enable-tls"
21EXTRA_OEMAKE = "-w"
22PARALLEL_MAKE = ""
23
24FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"